Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: chrome/browser/net/proxy_service_factory.cc

Issue 1989163002: Enable out-of-process pac by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/net/proxy_service_factory.h" 5 #include "chrome/browser/net/proxy_service_factory.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 26 matching lines...) Expand all
37 #include "chrome/browser/net/utility_process_mojo_proxy_resolver_factory.h" 37 #include "chrome/browser/net/utility_process_mojo_proxy_resolver_factory.h"
38 #include "net/proxy/proxy_service_mojo.h" 38 #include "net/proxy/proxy_service_mojo.h"
39 #endif 39 #endif
40 40
41 using content::BrowserThread; 41 using content::BrowserThread;
42 42
43 namespace { 43 namespace {
44 44
45 #if !defined(OS_ANDROID) 45 #if !defined(OS_ANDROID)
46 bool EnableOutOfProcessV8Pac(const base::CommandLine& command_line) { 46 bool EnableOutOfProcessV8Pac(const base::CommandLine& command_line) {
47 const std::string group_name =
48 base::FieldTrialList::FindFullName("OutOfProcessPac");
49
50 if (command_line.HasSwitch(switches::kDisableOutOfProcessPac)) 47 if (command_line.HasSwitch(switches::kDisableOutOfProcessPac))
51 return false; 48 return false;
52 if (command_line.HasSwitch(switches::kV8PacMojoOutOfProcess)) 49 if (command_line.HasSwitch(switches::kV8PacMojoOutOfProcess))
53 return true; 50 return true;
54 return group_name == "Enabled"; 51 return true;
55 } 52 }
56 #endif // !defined(OS_ANDROID) 53 #endif // !defined(OS_ANDROID)
57 54
58 } // namespace 55 } // namespace
59 56
60 // static 57 // static
61 std::unique_ptr<net::ProxyConfigService> 58 std::unique_ptr<net::ProxyConfigService>
62 ProxyServiceFactory::CreateProxyConfigService(PrefProxyConfigTracker* tracker) { 59 ProxyServiceFactory::CreateProxyConfigService(PrefProxyConfigTracker* tracker) {
63 // The linux gconf-based proxy settings getter relies on being initialized 60 // The linux gconf-based proxy settings getter relies on being initialized
64 // from the UI thread. 61 // from the UI thread.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 183 }
187 } else { 184 } else {
188 proxy_service = net::ProxyService::CreateUsingSystemProxyResolver( 185 proxy_service = net::ProxyService::CreateUsingSystemProxyResolver(
189 std::move(proxy_config_service), num_pac_threads, net_log); 186 std::move(proxy_config_service), num_pac_threads, net_log);
190 } 187 }
191 188
192 proxy_service->set_quick_check_enabled(quick_check_enabled); 189 proxy_service->set_quick_check_enabled(quick_check_enabled);
193 190
194 return proxy_service; 191 return proxy_service;
195 } 192 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698