OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #include <vector> | 10 #include <vector> |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 void OnAcceptLanguageChange(const std::string& accept_language); | 175 void OnAcceptLanguageChange(const std::string& accept_language); |
176 void OnDefaultCharsetChange(const std::string& default_charset); | 176 void OnDefaultCharsetChange(const std::string& default_charset); |
177 void OnClearSiteDataOnExitChange(bool clear_site_data); | 177 void OnClearSiteDataOnExitChange(bool clear_site_data); |
178 | 178 |
179 // Saves the cookie store to |result| and signals |completion|. | 179 // Saves the cookie store to |result| and signals |completion|. |
180 void GetCookieStoreAsyncHelper(base::WaitableEvent* completion, | 180 void GetCookieStoreAsyncHelper(base::WaitableEvent* completion, |
181 net::CookieStore** result); | 181 net::CookieStore** result); |
182 | 182 |
183 PrefChangeRegistrar registrar_; | 183 PrefChangeRegistrar registrar_; |
184 | 184 |
185 // |io_thread_| is always valid during the lifetime of |this| since |this| is | |
186 // deleted on the IO thread. | |
187 IOThread* const io_thread_; | |
188 | |
189 // Deferred logic for creating a ChromeURLRequestContext. | 185 // Deferred logic for creating a ChromeURLRequestContext. |
190 // Access only from the IO thread. | 186 // Access only from the IO thread. |
191 scoped_ptr<ChromeURLRequestContextFactory> factory_; | 187 scoped_ptr<ChromeURLRequestContextFactory> factory_; |
192 | 188 |
193 // NULL if not yet initialized. Otherwise, it is the net::URLRequestContext | 189 // NULL if not yet initialized. Otherwise, it is the net::URLRequestContext |
194 // instance that was lazily created by GetURLRequestContext(). | 190 // instance that was lazily created by GetURLRequestContext(). |
195 // Access only from the IO thread. | 191 // Access only from the IO thread. |
196 base::WeakPtr<net::URLRequestContext> url_request_context_; | 192 base::WeakPtr<net::URLRequestContext> url_request_context_; |
197 | 193 |
198 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextGetter); | 194 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextGetter); |
199 }; | 195 }; |
200 | 196 |
201 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ | 197 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ |
OLD | NEW |