Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(719)

Side by Side Diff: chrome/browser/profiles/profile_impl_io_data.h

Issue 473723002: Update data reduction proxy statistics prefs less often on desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@tooManyWritesPatch
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #if defined(SPDY_PROXY_AUTH_ORIGIN) 25 #if defined(SPDY_PROXY_AUTH_ORIGIN)
26 namespace data_reduction_proxy { 26 namespace data_reduction_proxy {
27 class DataReductionProxyParams; 27 class DataReductionProxyParams;
28 class DataReductionProxyUsageStats; 28 class DataReductionProxyUsageStats;
29 class DataReductionProxyAuthRequestHandler; 29 class DataReductionProxyAuthRequestHandler;
30 } 30 class DataReductionProxyDelayedPrefService;
31 } // namespace data_reduction_proxy
bengr 2014/08/14 17:39:41 } // namespace...
megjablon 2014/08/26 19:28:40 Done.
31 #endif 32 #endif
32 33
33 namespace domain_reliability { 34 namespace domain_reliability {
34 class DomainReliabilityMonitor; 35 class DomainReliabilityMonitor;
35 } // namespace domain_reliability 36 } // namespace domain_reliability
36 37
37 namespace net { 38 namespace net {
38 class FtpTransactionFactory; 39 class FtpTransactionFactory;
39 class HttpServerProperties; 40 class HttpServerProperties;
40 class HttpServerPropertiesManager; 41 class HttpServerPropertiesManager;
41 class HttpTransactionFactory; 42 class HttpTransactionFactory;
42 class SDCHManager; 43 class SDCHManager;
43 } // namespace net 44 } // namespace net
44 45
45 namespace quota { 46 namespace quota {
46 class SpecialStoragePolicy; 47 class SpecialStoragePolicy;
47 } // namespace quota 48 } // namespace quota
48 49
49 class ProfileImplIOData : public ProfileIOData { 50 class ProfileImplIOData : public ProfileIOData {
50 public: 51 public:
51 class Handle { 52 class Handle {
52 public: 53 public:
53 explicit Handle(Profile* profile); 54 explicit Handle(Profile* profile);
54 ~Handle(); 55 ~Handle();
55 56
56 // Init() must be called before ~Handle(). It records most of the 57 // Init() must be called before ~Handle(). It records most of the
57 // parameters needed to construct a ChromeURLRequestContextGetter. 58 // parameters needed to construct a ChromeURLRequestContextGetter.
58 void Init(const base::FilePath& cookie_path, 59 void Init(
59 const base::FilePath& channel_id_path, 60 const base::FilePath& cookie_path,
60 const base::FilePath& cache_path, 61 const base::FilePath& channel_id_path,
61 int cache_max_size, 62 const base::FilePath& cache_path,
62 const base::FilePath& media_cache_path, 63 int cache_max_size,
63 int media_cache_max_size, 64 const base::FilePath& media_cache_path,
64 const base::FilePath& extensions_cookie_path, 65 int media_cache_max_size,
65 const base::FilePath& profile_path, 66 const base::FilePath& extensions_cookie_path,
66 const base::FilePath& infinite_cache_path, 67 const base::FilePath& profile_path,
67 chrome_browser_net::Predictor* predictor, 68 const base::FilePath& infinite_cache_path,
68 content::CookieStoreConfig::SessionCookieMode 69 chrome_browser_net::Predictor* predictor,
69 session_cookie_mode, 70 content::CookieStoreConfig::SessionCookieMode
70 quota::SpecialStoragePolicy* special_storage_policy, 71 session_cookie_mode,
71 scoped_ptr<domain_reliability::DomainReliabilityMonitor> 72 quota::SpecialStoragePolicy* special_storage_policy,
72 domain_reliability_monitor, 73 scoped_ptr<domain_reliability::DomainReliabilityMonitor>
73 const base::Callback<void(bool)>& 74 domain_reliability_monitor,
74 data_reduction_proxy_unavailable, 75 const base::Callback<void(bool)>&
75 scoped_ptr<data_reduction_proxy::DataReductionProxyParams> 76 data_reduction_proxy_unavailable,
76 data_reduction_proxy_params); 77 scoped_ptr<data_reduction_proxy::DataReductionProxyParams>
78 data_reduction_proxy_params,
79 scoped_ptr<data_reduction_proxy::DataReductionProxyDelayedPrefService>
80 data_reduction_proxy_delayed_pref_service);
77 81
78 // These Create*ContextGetter() functions are only exposed because the 82 // These Create*ContextGetter() functions are only exposed because the
79 // circular relationship between Profile, ProfileIOData::Handle, and the 83 // circular relationship between Profile, ProfileIOData::Handle, and the
80 // ChromeURLRequestContextGetter factories requires Profile be able to call 84 // ChromeURLRequestContextGetter factories requires Profile be able to call
81 // these functions. 85 // these functions.
82 scoped_refptr<ChromeURLRequestContextGetter> CreateMainRequestContextGetter( 86 scoped_refptr<ChromeURLRequestContextGetter> CreateMainRequestContextGetter(
83 content::ProtocolHandlerMap* protocol_handlers, 87 content::ProtocolHandlerMap* protocol_handlers,
84 content::URLRequestInterceptorScopedVector request_interceptors, 88 content::URLRequestInterceptorScopedVector request_interceptors,
85 PrefService* local_state, 89 PrefService* local_state,
86 IOThread* io_thread) const; 90 IOThread* io_thread) const;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 int app_media_cache_max_size_; 248 int app_media_cache_max_size_;
245 249
246 #if defined(SPDY_PROXY_AUTH_ORIGIN) 250 #if defined(SPDY_PROXY_AUTH_ORIGIN)
247 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyParams> 251 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyParams>
248 data_reduction_proxy_params_; 252 data_reduction_proxy_params_;
249 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyUsageStats> 253 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyUsageStats>
250 data_reduction_proxy_usage_stats_; 254 data_reduction_proxy_usage_stats_;
251 mutable base::Callback<void(bool)> data_reduction_proxy_unavailable_callback_; 255 mutable base::Callback<void(bool)> data_reduction_proxy_unavailable_callback_;
252 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyAuthRequestHandler> 256 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyAuthRequestHandler>
253 data_reduction_proxy_auth_request_handler_; 257 data_reduction_proxy_auth_request_handler_;
258 mutable scoped_ptr<data_reduction_proxy::DataReductionProxyDelayedPrefService>
259 data_reduction_proxy_delayed_pref_service_;
254 #endif // defined(SPDY_PROXY_AUTH_ORIGIN) 260 #endif // defined(SPDY_PROXY_AUTH_ORIGIN)
255 261
256 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData); 262 DISALLOW_COPY_AND_ASSIGN(ProfileImplIOData);
257 }; 263 };
258 264
259 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_ 265 #endif // CHROME_BROWSER_PROFILES_PROFILE_IMPL_IO_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698