| 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 #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 <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 virtual ~ChromeURLRequestContextGetter(); | 166 virtual ~ChromeURLRequestContextGetter(); |
| 167 | 167 |
| 168 // Registers an observer on |profile|'s preferences which will be used | 168 // Registers an observer on |profile|'s preferences which will be used |
| 169 // to update the context when the default language and charset change. | 169 // to update the context when the default language and charset change. |
| 170 void RegisterPrefsObserver(Profile* profile); | 170 void RegisterPrefsObserver(Profile* profile); |
| 171 | 171 |
| 172 // These methods simply forward to the corresponding method on | 172 // These methods simply forward to the corresponding method on |
| 173 // ChromeURLRequestContext. | 173 // ChromeURLRequestContext. |
| 174 void OnAcceptLanguageChange(const std::string& accept_language); | 174 void OnAcceptLanguageChange(const std::string& accept_language); |
| 175 void OnDefaultCharsetChange(const std::string& default_charset); | 175 void OnDefaultCharsetChange(const std::string& default_charset); |
| 176 void OnClearSiteDataOnExitChange(bool clear_site_data); | |
| 177 | 176 |
| 178 PrefChangeRegistrar registrar_; | 177 PrefChangeRegistrar registrar_; |
| 179 | 178 |
| 180 // Deferred logic for creating a ChromeURLRequestContext. | 179 // Deferred logic for creating a ChromeURLRequestContext. |
| 181 // Access only from the IO thread. | 180 // Access only from the IO thread. |
| 182 scoped_ptr<ChromeURLRequestContextFactory> factory_; | 181 scoped_ptr<ChromeURLRequestContextFactory> factory_; |
| 183 | 182 |
| 184 // NULL if not yet initialized. Otherwise, it is the ChromeURLRequestContext | 183 // NULL if not yet initialized. Otherwise, it is the ChromeURLRequestContext |
| 185 // instance that was lazily created by GetURLRequestContext(). | 184 // instance that was lazily created by GetURLRequestContext(). |
| 186 // Access only from the IO thread. | 185 // Access only from the IO thread. |
| 187 base::WeakPtr<ChromeURLRequestContext> url_request_context_; | 186 base::WeakPtr<ChromeURLRequestContext> url_request_context_; |
| 188 | 187 |
| 189 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextGetter); | 188 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextGetter); |
| 190 }; | 189 }; |
| 191 | 190 |
| 192 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ | 191 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ |
| OLD | NEW |