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_PROFILES_PROFILE_IMPL_IO_DATA_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ |
6 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 namespace net { | 37 namespace net { |
38 class FtpTransactionFactory; | 38 class FtpTransactionFactory; |
39 class HttpServerProperties; | 39 class HttpServerProperties; |
40 class HttpServerPropertiesManager; | 40 class HttpServerPropertiesManager; |
41 class HttpTransactionFactory; | 41 class HttpTransactionFactory; |
42 class ProxyConfig; | 42 class ProxyConfig; |
43 class SDCHManager; | 43 class SDCHManager; |
44 } // namespace net | 44 } // namespace net |
45 | 45 |
46 namespace quota { | 46 namespace storage { |
47 class SpecialStoragePolicy; | 47 class SpecialStoragePolicy; |
48 } // namespace quota | 48 } // namespace storage |
49 | 49 |
50 class DataReductionProxyChromeConfigurator; | 50 class DataReductionProxyChromeConfigurator; |
51 | 51 |
52 class ProfileImplIOData : public ProfileIOData { | 52 class ProfileImplIOData : public ProfileIOData { |
53 public: | 53 public: |
54 class Handle { | 54 class Handle { |
55 public: | 55 public: |
56 explicit Handle(Profile* profile); | 56 explicit Handle(Profile* profile); |
57 ~Handle(); | 57 ~Handle(); |
58 | 58 |
59 // Init() must be called before ~Handle(). It records most of the | 59 // Init() must be called before ~Handle(). It records most of the |
60 // parameters needed to construct a ChromeURLRequestContextGetter. | 60 // parameters needed to construct a ChromeURLRequestContextGetter. |
61 void Init(const base::FilePath& cookie_path, | 61 void Init( |
62 const base::FilePath& channel_id_path, | 62 const base::FilePath& cookie_path, |
63 const base::FilePath& cache_path, | 63 const base::FilePath& channel_id_path, |
64 int cache_max_size, | 64 const base::FilePath& cache_path, |
65 const base::FilePath& media_cache_path, | 65 int cache_max_size, |
66 int media_cache_max_size, | 66 const base::FilePath& media_cache_path, |
67 const base::FilePath& extensions_cookie_path, | 67 int media_cache_max_size, |
68 const base::FilePath& profile_path, | 68 const base::FilePath& extensions_cookie_path, |
69 const base::FilePath& infinite_cache_path, | 69 const base::FilePath& profile_path, |
70 chrome_browser_net::Predictor* predictor, | 70 const base::FilePath& infinite_cache_path, |
71 content::CookieStoreConfig::SessionCookieMode | 71 chrome_browser_net::Predictor* predictor, |
72 session_cookie_mode, | 72 content::CookieStoreConfig::SessionCookieMode session_cookie_mode, |
73 quota::SpecialStoragePolicy* special_storage_policy, | 73 storage::SpecialStoragePolicy* special_storage_policy, |
74 scoped_ptr<domain_reliability::DomainReliabilityMonitor> | 74 scoped_ptr<domain_reliability::DomainReliabilityMonitor> |
75 domain_reliability_monitor, | 75 domain_reliability_monitor, |
76 const base::Callback<void(bool)>& | 76 const base::Callback<void(bool)>& data_reduction_proxy_unavailable, |
77 data_reduction_proxy_unavailable, | 77 scoped_ptr<DataReductionProxyChromeConfigurator> |
78 scoped_ptr<DataReductionProxyChromeConfigurator> | 78 data_reduction_proxy_chrome_configurator, |
79 data_reduction_proxy_chrome_configurator, | 79 scoped_ptr<data_reduction_proxy::DataReductionProxyParams> |
80 scoped_ptr<data_reduction_proxy::DataReductionProxyParams> | 80 data_reduction_proxy_params); |
81 data_reduction_proxy_params); | |
82 | 81 |
83 // These Create*ContextGetter() functions are only exposed because the | 82 // These Create*ContextGetter() functions are only exposed because the |
84 // circular relationship between Profile, ProfileIOData::Handle, and the | 83 // circular relationship between Profile, ProfileIOData::Handle, and the |
85 // ChromeURLRequestContextGetter factories requires Profile be able to call | 84 // ChromeURLRequestContextGetter factories requires Profile be able to call |
86 // these functions. | 85 // these functions. |
87 scoped_refptr<ChromeURLRequestContextGetter> CreateMainRequestContextGetter( | 86 scoped_refptr<ChromeURLRequestContextGetter> CreateMainRequestContextGetter( |
88 content::ProtocolHandlerMap* protocol_handlers, | 87 content::ProtocolHandlerMap* protocol_handlers, |
89 content::URLRequestInterceptorScopedVector request_interceptors, | 88 content::URLRequestInterceptorScopedVector request_interceptors, |
90 PrefService* local_state, | 89 PrefService* local_state, |
91 IOThread* io_thread) const; | 90 IOThread* io_thread) const; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 // All of these parameters are intended to be read on the IO thread. | 167 // All of these parameters are intended to be read on the IO thread. |
169 base::FilePath cookie_path; | 168 base::FilePath cookie_path; |
170 base::FilePath channel_id_path; | 169 base::FilePath channel_id_path; |
171 base::FilePath cache_path; | 170 base::FilePath cache_path; |
172 int cache_max_size; | 171 int cache_max_size; |
173 base::FilePath media_cache_path; | 172 base::FilePath media_cache_path; |
174 int media_cache_max_size; | 173 int media_cache_max_size; |
175 base::FilePath extensions_cookie_path; | 174 base::FilePath extensions_cookie_path; |
176 base::FilePath infinite_cache_path; | 175 base::FilePath infinite_cache_path; |
177 content::CookieStoreConfig::SessionCookieMode session_cookie_mode; | 176 content::CookieStoreConfig::SessionCookieMode session_cookie_mode; |
178 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy; | 177 scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy; |
179 }; | 178 }; |
180 | 179 |
181 ProfileImplIOData(); | 180 ProfileImplIOData(); |
182 virtual ~ProfileImplIOData(); | 181 virtual ~ProfileImplIOData(); |
183 | 182 |
184 virtual void InitializeInternal( | 183 virtual void InitializeInternal( |
185 ProfileParams* profile_params, | 184 ProfileParams* profile_params, |
186 content::ProtocolHandlerMap* protocol_handlers, | 185 content::ProtocolHandlerMap* protocol_handlers, |
187 content::URLRequestInterceptorScopedVector request_interceptors) | 186 content::URLRequestInterceptorScopedVector request_interceptors) |
188 const OVERRIDE; | 187 const OVERRIDE; |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 mutable scoped_ptr<DataReductionProxyChromeConfigurator> | 257 mutable scoped_ptr<DataReductionProxyChromeConfigurator> |
259 data_reduction_proxy_chrome_configurator_; | 258 data_reduction_proxy_chrome_configurator_; |
260 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyAuthRequestHandler> | 259 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyAuthRequestHandler> |
261 data_reduction_proxy_auth_request_handler_; | 260 data_reduction_proxy_auth_request_handler_; |
262 #endif // defined(SPDY_PROXY_AUTH_ORIGIN) | 261 #endif // defined(SPDY_PROXY_AUTH_ORIGIN) |
263 | 262 |
264 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); | 263 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); |
265 }; | 264 }; |
266 | 265 |
267 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ | 266 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ |
OLD | NEW |