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" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 12 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
13 #include "chrome/browser/net/chrome_url_request_context_getter.h" | 13 #include "chrome/browser/net/chrome_url_request_context_getter.h" |
14 #include "chrome/browser/profiles/profile_io_data.h" | 14 #include "chrome/browser/profiles/profile_io_data.h" |
15 #include "content/public/browser/cookie_store_factory.h" | 15 #include "content/public/browser/cookie_store_factory.h" |
16 | 16 |
17 class ChromeSdchPolicy; | 17 class ChromeSdchPolicy; |
18 | 18 |
19 namespace chrome_browser_net { | 19 namespace chrome_browser_net { |
20 class Predictor; | 20 class Predictor; |
21 } // namespace chrome_browser_net | 21 } // namespace chrome_browser_net |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 class CookieCryptoDelegate; | 24 class CookieCryptoDelegate; |
25 } // namespace content | 25 } // namespace content |
26 | 26 |
| 27 namespace data_reduction_proxy { |
| 28 class DataReductionProxyNetworkDelegate; |
| 29 } // namespace data_reduction_proxy |
| 30 |
27 namespace domain_reliability { | 31 namespace domain_reliability { |
28 class DomainReliabilityMonitor; | 32 class DomainReliabilityMonitor; |
29 } // namespace domain_reliability | 33 } // namespace domain_reliability |
30 | 34 |
31 namespace net { | 35 namespace net { |
32 class FtpTransactionFactory; | 36 class FtpTransactionFactory; |
33 class HttpServerProperties; | 37 class HttpServerProperties; |
34 class HttpServerPropertiesManager; | 38 class HttpServerPropertiesManager; |
35 class HttpTransactionFactory; | 39 class HttpTransactionFactory; |
36 class ProxyConfig; | 40 class ProxyConfig; |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 152 |
149 Profile* const profile_; | 153 Profile* const profile_; |
150 | 154 |
151 mutable bool initialized_; | 155 mutable bool initialized_; |
152 | 156 |
153 DISALLOW_COPY_AND_ASSIGN(Handle); | 157 DISALLOW_COPY_AND_ASSIGN(Handle); |
154 }; | 158 }; |
155 | 159 |
156 bool IsDataReductionProxyEnabled() const override; | 160 bool IsDataReductionProxyEnabled() const override; |
157 | 161 |
158 BooleanPrefMember* data_reduction_proxy_enabled() const { | |
159 return &data_reduction_proxy_enabled_; | |
160 } | |
161 | |
162 private: | 162 private: |
163 friend class base::RefCountedThreadSafe<ProfileImplIOData>; | 163 friend class base::RefCountedThreadSafe<ProfileImplIOData>; |
164 | 164 |
165 struct LazyParams { | 165 struct LazyParams { |
166 LazyParams(); | 166 LazyParams(); |
167 ~LazyParams(); | 167 ~LazyParams(); |
168 | 168 |
169 // All of these parameters are intended to be read on the IO thread. | 169 // All of these parameters are intended to be read on the IO thread. |
170 base::FilePath cookie_path; | 170 base::FilePath cookie_path; |
171 base::FilePath channel_id_path; | 171 base::FilePath channel_id_path; |
172 base::FilePath cache_path; | 172 base::FilePath cache_path; |
173 int cache_max_size; | 173 int cache_max_size; |
174 base::FilePath media_cache_path; | 174 base::FilePath media_cache_path; |
175 int media_cache_max_size; | 175 int media_cache_max_size; |
176 base::FilePath extensions_cookie_path; | 176 base::FilePath extensions_cookie_path; |
177 base::FilePath infinite_cache_path; | 177 base::FilePath infinite_cache_path; |
178 content::CookieStoreConfig::SessionCookieMode session_cookie_mode; | 178 content::CookieStoreConfig::SessionCookieMode session_cookie_mode; |
179 scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy; | 179 scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy; |
180 }; | 180 }; |
181 | 181 |
182 ProfileImplIOData(); | 182 ProfileImplIOData(); |
183 ~ProfileImplIOData() override; | 183 ~ProfileImplIOData() override; |
184 | 184 |
185 void InitializeInternal(ProfileParams* profile_params, | 185 void InitializeInternal( |
186 content::ProtocolHandlerMap* protocol_handlers, | 186 scoped_ptr<ChromeNetworkDelegate> chrome_network_delegate, |
187 content::URLRequestInterceptorScopedVector | 187 ProfileParams* profile_params, |
188 request_interceptors) const override; | 188 content::ProtocolHandlerMap* protocol_handlers, |
| 189 content::URLRequestInterceptorScopedVector |
| 190 request_interceptors) const override; |
189 void InitializeExtensionsRequestContext( | 191 void InitializeExtensionsRequestContext( |
190 ProfileParams* profile_params) const override; | 192 ProfileParams* profile_params) const override; |
191 net::URLRequestContext* InitializeAppRequestContext( | 193 net::URLRequestContext* InitializeAppRequestContext( |
192 net::URLRequestContext* main_context, | 194 net::URLRequestContext* main_context, |
193 const StoragePartitionDescriptor& partition_descriptor, | 195 const StoragePartitionDescriptor& partition_descriptor, |
194 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 196 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
195 protocol_handler_interceptor, | 197 protocol_handler_interceptor, |
196 content::ProtocolHandlerMap* protocol_handlers, | 198 content::ProtocolHandlerMap* protocol_handlers, |
197 content::URLRequestInterceptorScopedVector request_interceptors) | 199 content::URLRequestInterceptorScopedVector request_interceptors) |
198 const override; | 200 const override; |
(...skipping 13 matching lines...) Expand all Loading... |
212 net::URLRequestContext* app_context, | 214 net::URLRequestContext* app_context, |
213 const StoragePartitionDescriptor& partition_descriptor) const override; | 215 const StoragePartitionDescriptor& partition_descriptor) const override; |
214 | 216 |
215 // Deletes all network related data since |time|. It deletes transport | 217 // Deletes all network related data since |time|. It deletes transport |
216 // security state since |time| and also deletes HttpServerProperties data. | 218 // security state since |time| and also deletes HttpServerProperties data. |
217 // Works asynchronously, however if the |completion| callback is non-null, | 219 // Works asynchronously, however if the |completion| callback is non-null, |
218 // it will be posted on the UI thread once the removal process completes. | 220 // it will be posted on the UI thread once the removal process completes. |
219 void ClearNetworkingHistorySinceOnIOThread(base::Time time, | 221 void ClearNetworkingHistorySinceOnIOThread(base::Time time, |
220 const base::Closure& completion); | 222 const base::Closure& completion); |
221 | 223 |
| 224 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyNetworkDelegate> |
| 225 network_delegate_; |
| 226 |
222 // Lazy initialization params. | 227 // Lazy initialization params. |
223 mutable scoped_ptr<LazyParams> lazy_params_; | 228 mutable scoped_ptr<LazyParams> lazy_params_; |
224 | 229 |
225 mutable scoped_ptr<net::HttpTransactionFactory> main_http_factory_; | 230 mutable scoped_ptr<net::HttpTransactionFactory> main_http_factory_; |
226 mutable scoped_ptr<net::FtpTransactionFactory> ftp_factory_; | 231 mutable scoped_ptr<net::FtpTransactionFactory> ftp_factory_; |
227 | 232 |
228 // Same as |ProfileIOData::http_server_properties_|, owned there to maintain | 233 // Same as |ProfileIOData::http_server_properties_|, owned there to maintain |
229 // destruction ordering. | 234 // destruction ordering. |
230 mutable net::HttpServerPropertiesManager* http_server_properties_manager_; | 235 mutable net::HttpServerPropertiesManager* http_server_properties_manager_; |
231 | 236 |
(...skipping 14 matching lines...) Expand all Loading... |
246 | 251 |
247 // Parameters needed for isolated apps. | 252 // Parameters needed for isolated apps. |
248 base::FilePath profile_path_; | 253 base::FilePath profile_path_; |
249 int app_cache_max_size_; | 254 int app_cache_max_size_; |
250 int app_media_cache_max_size_; | 255 int app_media_cache_max_size_; |
251 | 256 |
252 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); | 257 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); |
253 }; | 258 }; |
254 | 259 |
255 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ | 260 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ |
OLD | NEW |