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 namespace chrome_browser_net { | 17 namespace chrome_browser_net { |
18 class Predictor; | 18 class Predictor; |
19 } // namespace chrome_browser_net | 19 } // namespace chrome_browser_net |
20 | 20 |
21 namespace content { | 21 namespace content { |
22 class CookieCryptoDelegate; | 22 class CookieCryptoDelegate; |
23 } // namespace content | 23 } // namespace content |
24 | 24 |
25 namespace data_reduction_proxy { | 25 namespace data_reduction_proxy { |
26 class DataReductionProxyConfigurator; | |
27 class DataReductionProxyNetworkDelegate; | 26 class DataReductionProxyNetworkDelegate; |
28 } // namespace data_reduction_proxy | 27 } // namespace data_reduction_proxy |
29 | 28 |
30 namespace domain_reliability { | 29 namespace domain_reliability { |
31 class DomainReliabilityMonitor; | 30 class DomainReliabilityMonitor; |
32 } // namespace domain_reliability | 31 } // namespace domain_reliability |
33 | 32 |
34 namespace net { | 33 namespace net { |
35 class FtpTransactionFactory; | 34 class FtpTransactionFactory; |
36 class HttpServerProperties; | 35 class HttpServerProperties; |
(...skipping 24 matching lines...) Expand all Loading... |
61 int cache_max_size, | 60 int cache_max_size, |
62 const base::FilePath& media_cache_path, | 61 const base::FilePath& media_cache_path, |
63 int media_cache_max_size, | 62 int media_cache_max_size, |
64 const base::FilePath& extensions_cookie_path, | 63 const base::FilePath& extensions_cookie_path, |
65 const base::FilePath& profile_path, | 64 const base::FilePath& profile_path, |
66 const base::FilePath& infinite_cache_path, | 65 const base::FilePath& infinite_cache_path, |
67 chrome_browser_net::Predictor* predictor, | 66 chrome_browser_net::Predictor* predictor, |
68 content::CookieStoreConfig::SessionCookieMode session_cookie_mode, | 67 content::CookieStoreConfig::SessionCookieMode session_cookie_mode, |
69 storage::SpecialStoragePolicy* special_storage_policy, | 68 storage::SpecialStoragePolicy* special_storage_policy, |
70 scoped_ptr<domain_reliability::DomainReliabilityMonitor> | 69 scoped_ptr<domain_reliability::DomainReliabilityMonitor> |
71 domain_reliability_monitor, | 70 domain_reliability_monitor); |
72 const base::Callback<void(bool)>& data_reduction_proxy_unavailable, | |
73 scoped_ptr<data_reduction_proxy::DataReductionProxyConfigurator> | |
74 data_reduction_proxy_configurator, | |
75 scoped_ptr<data_reduction_proxy::DataReductionProxyParams> | |
76 data_reduction_proxy_params, | |
77 scoped_ptr<data_reduction_proxy::DataReductionProxyStatisticsPrefs> | |
78 data_reduction_proxy_statistics_prefs, | |
79 scoped_ptr<data_reduction_proxy::DataReductionProxyEventStore> | |
80 data_reduction_proxy_event_store); | |
81 | 71 |
82 // These Create*ContextGetter() functions are only exposed because the | 72 // These Create*ContextGetter() functions are only exposed because the |
83 // circular relationship between Profile, ProfileIOData::Handle, and the | 73 // circular relationship between Profile, ProfileIOData::Handle, and the |
84 // ChromeURLRequestContextGetter factories requires Profile be able to call | 74 // ChromeURLRequestContextGetter factories requires Profile be able to call |
85 // these functions. | 75 // these functions. |
86 scoped_refptr<ChromeURLRequestContextGetter> CreateMainRequestContextGetter( | 76 scoped_refptr<ChromeURLRequestContextGetter> CreateMainRequestContextGetter( |
87 content::ProtocolHandlerMap* protocol_handlers, | 77 content::ProtocolHandlerMap* protocol_handlers, |
88 content::URLRequestInterceptorScopedVector request_interceptors, | 78 content::URLRequestInterceptorScopedVector request_interceptors, |
89 PrefService* local_state, | 79 PrefService* local_state, |
90 IOThread* io_thread) const; | 80 IOThread* io_thread) const; |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 isolated_media_request_context_getter_map_; | 140 isolated_media_request_context_getter_map_; |
151 ProfileImplIOData* const io_data_; | 141 ProfileImplIOData* const io_data_; |
152 | 142 |
153 Profile* const profile_; | 143 Profile* const profile_; |
154 | 144 |
155 mutable bool initialized_; | 145 mutable bool initialized_; |
156 | 146 |
157 DISALLOW_COPY_AND_ASSIGN(Handle); | 147 DISALLOW_COPY_AND_ASSIGN(Handle); |
158 }; | 148 }; |
159 | 149 |
160 bool IsDataReductionProxyEnabled() const override; | |
161 | |
162 private: | 150 private: |
163 friend class base::RefCountedThreadSafe<ProfileImplIOData>; | 151 friend class base::RefCountedThreadSafe<ProfileImplIOData>; |
164 | 152 |
165 struct LazyParams { | 153 struct LazyParams { |
166 LazyParams(); | 154 LazyParams(); |
167 ~LazyParams(); | 155 ~LazyParams(); |
168 | 156 |
169 // All of these parameters are intended to be read on the IO thread. | 157 // All of these parameters are intended to be read on the IO thread. |
170 base::FilePath cookie_path; | 158 base::FilePath cookie_path; |
171 base::FilePath channel_id_path; | 159 base::FilePath channel_id_path; |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 | 228 |
241 mutable scoped_ptr<net::URLRequestJobFactory> main_job_factory_; | 229 mutable scoped_ptr<net::URLRequestJobFactory> main_job_factory_; |
242 mutable scoped_ptr<net::URLRequestJobFactory> extensions_job_factory_; | 230 mutable scoped_ptr<net::URLRequestJobFactory> extensions_job_factory_; |
243 | 231 |
244 mutable scoped_ptr<domain_reliability::DomainReliabilityMonitor> | 232 mutable scoped_ptr<domain_reliability::DomainReliabilityMonitor> |
245 domain_reliability_monitor_; | 233 domain_reliability_monitor_; |
246 | 234 |
247 mutable scoped_ptr<net::SdchManager> sdch_manager_; | 235 mutable scoped_ptr<net::SdchManager> sdch_manager_; |
248 mutable scoped_ptr<net::SdchOwner> sdch_policy_; | 236 mutable scoped_ptr<net::SdchOwner> sdch_policy_; |
249 | 237 |
250 mutable BooleanPrefMember data_reduction_proxy_enabled_; | |
251 | |
252 // Parameters needed for isolated apps. | 238 // Parameters needed for isolated apps. |
253 base::FilePath profile_path_; | 239 base::FilePath profile_path_; |
254 int app_cache_max_size_; | 240 int app_cache_max_size_; |
255 int app_media_cache_max_size_; | 241 int app_media_cache_max_size_; |
256 | 242 |
257 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); | 243 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); |
258 }; | 244 }; |
259 | 245 |
260 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ | 246 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ |
OLD | NEW |