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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 Profile* const profile_; | 149 Profile* const profile_; |
150 | 150 |
151 mutable bool initialized_; | 151 mutable bool initialized_; |
152 | 152 |
153 DISALLOW_COPY_AND_ASSIGN(Handle); | 153 DISALLOW_COPY_AND_ASSIGN(Handle); |
154 }; | 154 }; |
155 | 155 |
156 bool IsDataReductionProxyEnabled() const override; | 156 bool IsDataReductionProxyEnabled() const override; |
157 | 157 |
158 BooleanPrefMember* data_reduction_proxy_enabled() const { | 158 BooleanPrefMember* data_reduction_proxy_enabled_io() const { |
159 return &data_reduction_proxy_enabled_; | 159 return &data_reduction_proxy_enabled_io_; |
| 160 } |
| 161 |
| 162 BooleanPrefMember* data_reduction_proxy_enabled_ui() const { |
| 163 return &data_reduction_proxy_enabled_ui_; |
160 } | 164 } |
161 | 165 |
162 private: | 166 private: |
163 friend class base::RefCountedThreadSafe<ProfileImplIOData>; | 167 friend class base::RefCountedThreadSafe<ProfileImplIOData>; |
164 | 168 |
165 struct LazyParams { | 169 struct LazyParams { |
166 LazyParams(); | 170 LazyParams(); |
167 ~LazyParams(); | 171 ~LazyParams(); |
168 | 172 |
169 // All of these parameters are intended to be read on the IO thread. | 173 // All of these parameters are intended to be read on the IO thread. |
170 base::FilePath cookie_path; | 174 base::FilePath cookie_path; |
171 base::FilePath channel_id_path; | 175 base::FilePath channel_id_path; |
172 base::FilePath cache_path; | 176 base::FilePath cache_path; |
173 int cache_max_size; | 177 int cache_max_size; |
174 base::FilePath media_cache_path; | 178 base::FilePath media_cache_path; |
175 int media_cache_max_size; | 179 int media_cache_max_size; |
176 base::FilePath extensions_cookie_path; | 180 base::FilePath extensions_cookie_path; |
177 base::FilePath infinite_cache_path; | 181 base::FilePath infinite_cache_path; |
178 content::CookieStoreConfig::SessionCookieMode session_cookie_mode; | 182 content::CookieStoreConfig::SessionCookieMode session_cookie_mode; |
179 scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy; | 183 scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy; |
180 }; | 184 }; |
181 | 185 |
182 ProfileImplIOData(); | 186 ProfileImplIOData(); |
183 ~ProfileImplIOData() override; | 187 ~ProfileImplIOData() override; |
184 | 188 |
185 void InitializeInternal(ProfileParams* profile_params, | 189 void InitializeInternal( |
186 content::ProtocolHandlerMap* protocol_handlers, | 190 scoped_ptr<ChromeNetworkDelegate> chrome_network_delegate, |
187 content::URLRequestInterceptorScopedVector | 191 ProfileParams* profile_params, |
188 request_interceptors) const override; | 192 content::ProtocolHandlerMap* protocol_handlers, |
| 193 content::URLRequestInterceptorScopedVector |
| 194 request_interceptors) const override; |
189 void InitializeExtensionsRequestContext( | 195 void InitializeExtensionsRequestContext( |
190 ProfileParams* profile_params) const override; | 196 ProfileParams* profile_params) const override; |
191 net::URLRequestContext* InitializeAppRequestContext( | 197 net::URLRequestContext* InitializeAppRequestContext( |
192 net::URLRequestContext* main_context, | 198 net::URLRequestContext* main_context, |
193 const StoragePartitionDescriptor& partition_descriptor, | 199 const StoragePartitionDescriptor& partition_descriptor, |
194 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 200 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
195 protocol_handler_interceptor, | 201 protocol_handler_interceptor, |
196 content::ProtocolHandlerMap* protocol_handlers, | 202 content::ProtocolHandlerMap* protocol_handlers, |
197 content::URLRequestInterceptorScopedVector request_interceptors) | 203 content::URLRequestInterceptorScopedVector request_interceptors) |
198 const override; | 204 const override; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 | 241 |
236 mutable scoped_ptr<net::URLRequestJobFactory> main_job_factory_; | 242 mutable scoped_ptr<net::URLRequestJobFactory> main_job_factory_; |
237 mutable scoped_ptr<net::URLRequestJobFactory> extensions_job_factory_; | 243 mutable scoped_ptr<net::URLRequestJobFactory> extensions_job_factory_; |
238 | 244 |
239 mutable scoped_ptr<domain_reliability::DomainReliabilityMonitor> | 245 mutable scoped_ptr<domain_reliability::DomainReliabilityMonitor> |
240 domain_reliability_monitor_; | 246 domain_reliability_monitor_; |
241 | 247 |
242 mutable scoped_ptr<net::SdchManager> sdch_manager_; | 248 mutable scoped_ptr<net::SdchManager> sdch_manager_; |
243 mutable scoped_ptr<ChromeSdchPolicy> sdch_policy_; | 249 mutable scoped_ptr<ChromeSdchPolicy> sdch_policy_; |
244 | 250 |
245 mutable BooleanPrefMember data_reduction_proxy_enabled_; | 251 mutable BooleanPrefMember data_reduction_proxy_enabled_io_; |
| 252 mutable BooleanPrefMember data_reduction_proxy_enabled_ui_; |
246 | 253 |
247 // Parameters needed for isolated apps. | 254 // Parameters needed for isolated apps. |
248 base::FilePath profile_path_; | 255 base::FilePath profile_path_; |
249 int app_cache_max_size_; | 256 int app_cache_max_size_; |
250 int app_media_cache_max_size_; | 257 int app_media_cache_max_size_; |
251 | 258 |
252 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); | 259 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); |
253 }; | 260 }; |
254 | 261 |
255 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ | 262 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ |
OLD | NEW |