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_IO_DATA_H_ | 5 #ifndef CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
6 #define CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 6 #define CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
16 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
17 #include "base/prefs/pref_member.h" | 17 #include "base/prefs/pref_member.h" |
18 #include "base/synchronization/lock.h" | 18 #include "base/synchronization/lock.h" |
19 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 19 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
20 #include "chrome/browser/io_thread.h" | 20 #include "chrome/browser/io_thread.h" |
21 #include "chrome/browser/net/chrome_url_request_context.h" | 21 #include "chrome/browser/net/chrome_url_request_context.h" |
22 #include "chrome/browser/profiles/profile.h" | 22 #include "chrome/browser/profiles/profile.h" |
23 #include "chrome/browser/profiles/storage_partition_descriptor.h" | 23 #include "chrome/browser/profiles/storage_partition_descriptor.h" |
24 #include "chrome/common/content_settings_types.h" | 24 #include "chrome/common/content_settings_types.h" |
25 #include "components/data_reduction_proxy/browser/data_reduction_proxy_settings. h" | |
25 #include "components/data_reduction_proxy/browser/data_reduction_proxy_usage_sta ts.h" | 26 #include "components/data_reduction_proxy/browser/data_reduction_proxy_usage_sta ts.h" |
26 #include "content/public/browser/content_browser_client.h" | 27 #include "content/public/browser/content_browser_client.h" |
27 #include "content/public/browser/resource_context.h" | 28 #include "content/public/browser/resource_context.h" |
28 #include "net/cookies/cookie_monster.h" | 29 #include "net/cookies/cookie_monster.h" |
29 #include "net/http/http_cache.h" | 30 #include "net/http/http_cache.h" |
30 #include "net/http/http_network_session.h" | 31 #include "net/http/http_network_session.h" |
31 #include "net/url_request/url_request_job_factory.h" | 32 #include "net/url_request/url_request_job_factory.h" |
32 | 33 |
33 class ChromeHttpUserAgentSettings; | 34 class ChromeHttpUserAgentSettings; |
34 class ChromeNetworkDelegate; | 35 class ChromeNetworkDelegate; |
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
334 prerender::PrerenderTracker* prerender_tracker; | 335 prerender::PrerenderTracker* prerender_tracker; |
335 }; | 336 }; |
336 | 337 |
337 explicit ProfileIOData(Profile::ProfileType profile_type); | 338 explicit ProfileIOData(Profile::ProfileType profile_type); |
338 | 339 |
339 static std::string GetSSLSessionCacheShard(); | 340 static std::string GetSSLSessionCacheShard(); |
340 | 341 |
341 void InitializeOnUIThread(Profile* profile); | 342 void InitializeOnUIThread(Profile* profile); |
342 void ApplyProfileParamsToContext(ChromeURLRequestContext* context) const; | 343 void ApplyProfileParamsToContext(ChromeURLRequestContext* context) const; |
343 | 344 |
344 #if defined(OS_ANDROID) | 345 // Setup data reduction proxy for given profile with params and usage_stats |
345 #if defined(SPDY_PROXY_AUTH_ORIGIN) | 346 // from io thread globals. |
bengr
2014/07/18 19:41:44
for given --> for the given
params --> |params|
u
Not at Google. Contact bengr
2014/07/21 17:46:25
Done.
| |
346 void SetDataReductionProxyUsageStatsOnIOThread(IOThread* io_thread, | 347 void SetupDataReductionProxyOnIOThread(IOThread* io_thread, |
347 Profile* profile); | 348 Profile* profile); |
348 void SetDataReductionProxyUsageStatsOnUIThread(Profile* profile, | 349 |
350 // Setup data reduction proxy for given profile, params, and usage_stats. | |
bengr
2014/07/18 19:41:44
Say something about ownership. Is ownership retain
Not at Google. Contact bengr
2014/07/21 17:46:25
As discussed, I no longer instantiate the settings
| |
351 void SetupDataReductionProxyOnUIThread(Profile* profile, | |
352 data_reduction_proxy::DataReductionProxyParams* params, | |
349 data_reduction_proxy::DataReductionProxyUsageStats* usage_stats); | 353 data_reduction_proxy::DataReductionProxyUsageStats* usage_stats); |
350 #endif | |
351 #endif | |
352 | 354 |
353 scoped_ptr<net::URLRequestJobFactory> SetUpJobFactoryDefaults( | 355 scoped_ptr<net::URLRequestJobFactory> SetUpJobFactoryDefaults( |
354 scoped_ptr<net::URLRequestJobFactoryImpl> job_factory, | 356 scoped_ptr<net::URLRequestJobFactoryImpl> job_factory, |
355 content::URLRequestInterceptorScopedVector request_interceptors, | 357 content::URLRequestInterceptorScopedVector request_interceptors, |
356 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> | 358 scoped_ptr<ProtocolHandlerRegistry::JobInterceptorFactory> |
357 protocol_handler_interceptor, | 359 protocol_handler_interceptor, |
358 net::NetworkDelegate* network_delegate, | 360 net::NetworkDelegate* network_delegate, |
359 net::FtpTransactionFactory* ftp_transaction_factory) const; | 361 net::FtpTransactionFactory* ftp_transaction_factory) const; |
360 | 362 |
361 // Called when the profile is destroyed. | 363 // Called when the profile is destroyed. |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
612 supervised_user_url_filter_; | 614 supervised_user_url_filter_; |
613 #endif | 615 #endif |
614 | 616 |
615 mutable scoped_ptr<DevToolsNetworkController> network_controller_; | 617 mutable scoped_ptr<DevToolsNetworkController> network_controller_; |
616 | 618 |
617 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. | 619 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. |
618 bool initialized_on_UI_thread_; | 620 bool initialized_on_UI_thread_; |
619 | 621 |
620 const Profile::ProfileType profile_type_; | 622 const Profile::ProfileType profile_type_; |
621 | 623 |
624 scoped_ptr<data_reduction_proxy::DataReductionProxySettings> | |
bengr
2014/07/18 19:41:44
Shouldn't this only be declared for non-Android/iO
Not at Google. Contact bengr
2014/07/21 17:46:25
Removed.
| |
625 data_reduction_proxy_settings_; | |
bengr
2014/07/18 19:41:44
Optional: Style isn't clear on whether the second
Not at Google. Contact bengr
2014/07/21 17:46:25
Removed.
I thought this would be treated like any
| |
626 | |
622 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); | 627 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); |
623 }; | 628 }; |
624 | 629 |
625 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ | 630 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ |
OLD | NEW |