Browse Source

Remove unneeded HasSwitch check

Kevin Sawicki 8 years ago
parent
commit
ed076a8693
1 changed files with 4 additions and 6 deletions
  1. 4 6
      brightray/browser/url_request_context_getter.cc

+ 4 - 6
brightray/browser/url_request_context_getter.cc

@@ -93,13 +93,11 @@ URLRequestContextGetter::Delegate::CreateURLRequestJobFactory(
 net::HttpCache::BackendFactory*
 URLRequestContextGetter::Delegate::CreateHttpCacheBackendFactory(
     const base::FilePath& base_path) {
-  auto& command_line = *base::CommandLine::ForCurrentProcess();
+  auto command_line = base::CommandLine::ForCurrentProcess();
   int max_size = 0;
-  if (command_line.HasSwitch(switches::kDiskCacheSize)) {
-    base::StringToInt(
-        command_line.GetSwitchValueASCII(switches::kDiskCacheSize),
-        &max_size);
-  }
+  base::StringToInt(command_line->GetSwitchValueASCII(switches::kDiskCacheSize),
+                    &max_size);
+
   base::FilePath cache_path = base_path.Append(FILE_PATH_LITERAL("Cache"));
   return new net::HttpCache::DefaultBackend(
       net::DISK_CACHE,