| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |