Remove unneeded HasSwitch check
This commit is contained in:
parent
5b02974aa8
commit
ed076a8693
1 changed files with 4 additions and 6 deletions
|
@ -93,13 +93,11 @@ URLRequestContextGetter::Delegate::CreateURLRequestJobFactory(
|
||||||
net::HttpCache::BackendFactory*
|
net::HttpCache::BackendFactory*
|
||||||
URLRequestContextGetter::Delegate::CreateHttpCacheBackendFactory(
|
URLRequestContextGetter::Delegate::CreateHttpCacheBackendFactory(
|
||||||
const base::FilePath& base_path) {
|
const base::FilePath& base_path) {
|
||||||
auto& command_line = *base::CommandLine::ForCurrentProcess();
|
auto command_line = base::CommandLine::ForCurrentProcess();
|
||||||
int max_size = 0;
|
int max_size = 0;
|
||||||
if (command_line.HasSwitch(switches::kDiskCacheSize)) {
|
base::StringToInt(command_line->GetSwitchValueASCII(switches::kDiskCacheSize),
|
||||||
base::StringToInt(
|
&max_size);
|
||||||
command_line.GetSwitchValueASCII(switches::kDiskCacheSize),
|
|
||||||
&max_size);
|
|
||||||
}
|
|
||||||
base::FilePath cache_path = base_path.Append(FILE_PATH_LITERAL("Cache"));
|
base::FilePath cache_path = base_path.Append(FILE_PATH_LITERAL("Cache"));
|
||||||
return new net::HttpCache::DefaultBackend(
|
return new net::HttpCache::DefaultBackend(
|
||||||
net::DISK_CACHE,
|
net::DISK_CACHE,
|
||||||
|
|
Loading…
Add table
Reference in a new issue