| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/chrome_url_request_context.h" | 5 #include "chrome/browser/net/chrome_url_request_context.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/chrome_thread.h" | 10 #include "chrome/browser/chrome_thread.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // See the note about V8 multithreading in net/proxy/proxy_resolver_v8.h | 89 // See the note about V8 multithreading in net/proxy/proxy_resolver_v8.h |
| 90 // to understand why we have this limitation. | 90 // to understand why we have this limitation. |
| 91 LOG(ERROR) << "Cannot use V8 Proxy resolver in single process mode."; | 91 LOG(ERROR) << "Cannot use V8 Proxy resolver in single process mode."; |
| 92 use_v8 = false; // Fallback to non-v8 implementation. | 92 use_v8 = false; // Fallback to non-v8 implementation. |
| 93 } | 93 } |
| 94 | 94 |
| 95 return net::ProxyService::Create( | 95 return net::ProxyService::Create( |
| 96 proxy_config_service, | 96 proxy_config_service, |
| 97 use_v8, | 97 use_v8, |
| 98 context, | 98 context, |
| 99 NULL, // TODO(eroman): Pass a valid NetworkChangeNotifier implementation |
| 100 // (http://crbug.com/12293). |
| 99 io_loop); | 101 io_loop); |
| 100 } | 102 } |
| 101 | 103 |
| 102 // ---------------------------------------------------------------------------- | 104 // ---------------------------------------------------------------------------- |
| 103 // Helper factories | 105 // Helper factories |
| 104 // ---------------------------------------------------------------------------- | 106 // ---------------------------------------------------------------------------- |
| 105 | 107 |
| 106 // Factory that creates the main ChromeURLRequestContext. | 108 // Factory that creates the main ChromeURLRequestContext. |
| 107 class FactoryForOriginal : public ChromeURLRequestContextFactory { | 109 class FactoryForOriginal : public ChromeURLRequestContextFactory { |
| 108 public: | 110 public: |
| (...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 } | 962 } |
| 961 | 963 |
| 962 if (command_line.HasSwitch(switches::kProxyBypassList)) { | 964 if (command_line.HasSwitch(switches::kProxyBypassList)) { |
| 963 proxy_config->ParseNoProxyList( | 965 proxy_config->ParseNoProxyList( |
| 964 WideToASCII(command_line.GetSwitchValue( | 966 WideToASCII(command_line.GetSwitchValue( |
| 965 switches::kProxyBypassList))); | 967 switches::kProxyBypassList))); |
| 966 } | 968 } |
| 967 | 969 |
| 968 return proxy_config; | 970 return proxy_config; |
| 969 } | 971 } |
| OLD | NEW |