| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #ifndef CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ | 5 #ifndef CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ |
| 6 #define CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ | 6 #define CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 144 |
| 145 // Callback for when new extensions are loaded. Takes ownership of | 145 // Callback for when new extensions are loaded. Takes ownership of |
| 146 // |extension_info|. | 146 // |extension_info|. |
| 147 void OnNewExtensions(const std::string& id, ExtensionInfo* extension_info); | 147 void OnNewExtensions(const std::string& id, ExtensionInfo* extension_info); |
| 148 | 148 |
| 149 // Callback for when an extension is unloaded. | 149 // Callback for when an extension is unloaded. |
| 150 void OnUnloadedExtension(const std::string& id); | 150 void OnUnloadedExtension(const std::string& id); |
| 151 | 151 |
| 152 // Returns true if this context is an external request context, like | 152 // Returns true if this context is an external request context, like |
| 153 // ChromeFrame. | 153 // ChromeFrame. |
| 154 virtual bool IsExternal() const { | 154 virtual bool IsExternal() const; |
| 155 return false; | |
| 156 } | |
| 157 | 155 |
| 158 protected: | 156 protected: |
| 159 // Copies the dependencies from |other| into |this|. If you use this | 157 // Copies the dependencies from |other| into |this|. If you use this |
| 160 // constructor, then you should hold a reference to |other|, as we | 158 // constructor, then you should hold a reference to |other|, as we |
| 161 // depend on |other| being alive. | 159 // depend on |other| being alive. |
| 162 explicit ChromeURLRequestContext(ChromeURLRequestContext* other); | 160 explicit ChromeURLRequestContext(ChromeURLRequestContext* other); |
| 163 virtual ~ChromeURLRequestContext(); | 161 virtual ~ChromeURLRequestContext(); |
| 164 | 162 |
| 165 public: | 163 public: |
| 166 // Setters to simplify initializing from factory objects. | 164 // Setters to simplify initializing from factory objects. |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 | 432 |
| 435 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextFactory); | 433 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextFactory); |
| 436 }; | 434 }; |
| 437 | 435 |
| 438 // Creates a proxy configuration from proxy-related preferences fetched | 436 // Creates a proxy configuration from proxy-related preferences fetched |
| 439 // from |pref_service|. The relevant preferences in |pref_service| are | 437 // from |pref_service|. The relevant preferences in |pref_service| are |
| 440 // initialized from the process' command line or by applicable proxy policies. | 438 // initialized from the process' command line or by applicable proxy policies. |
| 441 net::ProxyConfig* CreateProxyConfig(const PrefService* pref_service); | 439 net::ProxyConfig* CreateProxyConfig(const PrefService* pref_service); |
| 442 | 440 |
| 443 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ | 441 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ |
| OLD | NEW |