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

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

Issue 10736066: Adding histograms showing fraction of page load times (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | Annotate | Revision Log
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_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 <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 12 matching lines...) Expand all
23 class CookieSettings; 23 class CookieSettings;
24 class DesktopNotificationService; 24 class DesktopNotificationService;
25 class ExtensionInfoMap; 25 class ExtensionInfoMap;
26 class HostContentSettingsMap; 26 class HostContentSettingsMap;
27 class IOThread; 27 class IOThread;
28 class Profile; 28 class Profile;
29 class ProtocolHandlerRegistry; 29 class ProtocolHandlerRegistry;
30 class TransportSecurityPersister; 30 class TransportSecurityPersister;
31 31
32 namespace chrome_browser_net { 32 namespace chrome_browser_net {
33 class CacheStats;
33 class HttpServerPropertiesManager; 34 class HttpServerPropertiesManager;
34 class ResourcePrefetchPredictorObserver; 35 class ResourcePrefetchPredictorObserver;
35 } 36 }
36 37
37 namespace net { 38 namespace net {
38 class CookieStore; 39 class CookieStore;
39 class FraudulentCertificateReporter; 40 class FraudulentCertificateReporter;
40 class HttpTransactionFactory; 41 class HttpTransactionFactory;
41 class ServerBoundCertService; 42 class ServerBoundCertService;
42 class ProxyConfigService; 43 class ProxyConfigService;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 void InitializeMetricsEnabledStateOnUIThread(); 126 void InitializeMetricsEnabledStateOnUIThread();
126 127
127 // Returns whether or not metrics reporting is enabled in the browser instance 128 // Returns whether or not metrics reporting is enabled in the browser instance
128 // on which this profile resides. This is safe for use from the IO thread, and 129 // on which this profile resides. This is safe for use from the IO thread, and
129 // should only be called from there. 130 // should only be called from there.
130 bool GetMetricsEnabledStateOnIOThread() const; 131 bool GetMetricsEnabledStateOnIOThread() const;
131 132
132 protected: 133 protected:
133 class AppRequestContext : public ChromeURLRequestContext { 134 class AppRequestContext : public ChromeURLRequestContext {
134 public: 135 public:
135 AppRequestContext(); 136 AppRequestContext(chrome_browser_net::CacheStats* cache_stats);
willchan no longer on Chromium 2012/07/26 01:39:37 explicit
tburkard 2012/07/26 02:10:40 Done.
136 137
137 void SetCookieStore(net::CookieStore* cookie_store); 138 void SetCookieStore(net::CookieStore* cookie_store);
138 void SetHttpTransactionFactory(net::HttpTransactionFactory* http_factory); 139 void SetHttpTransactionFactory(net::HttpTransactionFactory* http_factory);
139 140
140 private: 141 private:
141 virtual ~AppRequestContext(); 142 virtual ~AppRequestContext();
142 143
143 scoped_refptr<net::CookieStore> cookie_store_; 144 scoped_refptr<net::CookieStore> cookie_store_;
144 scoped_ptr<net::HttpTransactionFactory> http_factory_; 145 scoped_ptr<net::HttpTransactionFactory> http_factory_;
145 }; 146 };
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 195
195 // Lazy initializes the ProfileIOData object the first time a request context 196 // Lazy initializes the ProfileIOData object the first time a request context
196 // is requested. The lazy logic is implemented here. The actual initialization 197 // is requested. The lazy logic is implemented here. The actual initialization
197 // is done in LazyInitializeInternal(), implemented by subtypes. Static helper 198 // is done in LazyInitializeInternal(), implemented by subtypes. Static helper
198 // functions have been provided to assist in common operations. 199 // functions have been provided to assist in common operations.
199 void LazyInitialize() const; 200 void LazyInitialize() const;
200 201
201 // Called when the profile is destroyed. 202 // Called when the profile is destroyed.
202 void ShutdownOnUIThread(); 203 void ShutdownOnUIThread();
203 204
205 // Returns the CacheStats object to be used for this profile
206 // (may be NULL for OTR profiles).
207 virtual chrome_browser_net::CacheStats* GetCacheStats(
208 IOThread* io_thread) const;
209
204 BooleanPrefMember* enable_referrers() const { 210 BooleanPrefMember* enable_referrers() const {
205 return &enable_referrers_; 211 return &enable_referrers_;
206 } 212 }
207 213
208 ChromeURLDataManagerBackend* chrome_url_data_manager_backend() const { 214 ChromeURLDataManagerBackend* chrome_url_data_manager_backend() const {
209 return chrome_url_data_manager_backend_.get(); 215 return chrome_url_data_manager_backend_.get();
210 } 216 }
211 217
212 // A ServerBoundCertService object is created by a derived class of 218 // A ServerBoundCertService object is created by a derived class of
213 // ProfileIOData, and the derived class calls this method to set the 219 // ProfileIOData, and the derived class calls this method to set the
(...skipping 14 matching lines...) Expand all
228 return proxy_service_.get(); 234 return proxy_service_.get();
229 } 235 }
230 236
231 void set_http_server_properties_manager( 237 void set_http_server_properties_manager(
232 chrome_browser_net::HttpServerPropertiesManager* manager) const; 238 chrome_browser_net::HttpServerPropertiesManager* manager) const;
233 239
234 ChromeURLRequestContext* main_request_context() const { 240 ChromeURLRequestContext* main_request_context() const {
235 return main_request_context_.get(); 241 return main_request_context_.get();
236 } 242 }
237 243
244 chrome_browser_net::CacheStats* cache_stats() const {
245 return cache_stats_;
246 }
247
238 // Destroys the ResourceContext first, to cancel any URLRequests that are 248 // Destroys the ResourceContext first, to cancel any URLRequests that are
239 // using it still, before we destroy the member variables that those 249 // using it still, before we destroy the member variables that those
240 // URLRequests may be accessing. 250 // URLRequests may be accessing.
241 void DestroyResourceContext(); 251 void DestroyResourceContext();
242 252
243 private: 253 private:
244 class ResourceContext : public content::ResourceContext { 254 class ResourceContext : public content::ResourceContext {
245 public: 255 public:
246 explicit ResourceContext(ProfileIOData* io_data); 256 explicit ResourceContext(ProfileIOData* io_data);
247 virtual ~ResourceContext(); 257 virtual ~ResourceContext();
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 mutable AppRequestContextMap app_request_context_map_; 362 mutable AppRequestContextMap app_request_context_map_;
353 363
354 mutable scoped_ptr<ResourceContext> resource_context_; 364 mutable scoped_ptr<ResourceContext> resource_context_;
355 365
356 mutable scoped_refptr<ExtensionInfoMap> extension_info_map_; 366 mutable scoped_refptr<ExtensionInfoMap> extension_info_map_;
357 mutable scoped_refptr<CookieSettings> cookie_settings_; 367 mutable scoped_refptr<CookieSettings> cookie_settings_;
358 368
359 mutable scoped_ptr<chrome_browser_net::ResourcePrefetchPredictorObserver> 369 mutable scoped_ptr<chrome_browser_net::ResourcePrefetchPredictorObserver>
360 resource_prefetch_predictor_observer_; 370 resource_prefetch_predictor_observer_;
361 371
372 mutable chrome_browser_net::CacheStats* cache_stats_;
373
362 // TODO(jhawkins): Remove once crbug.com/102004 is fixed. 374 // TODO(jhawkins): Remove once crbug.com/102004 is fixed.
363 bool initialized_on_UI_thread_; 375 bool initialized_on_UI_thread_;
364 376
365 bool is_incognito_; 377 bool is_incognito_;
366 378
367 DISALLOW_COPY_AND_ASSIGN(ProfileIOData); 379 DISALLOW_COPY_AND_ASSIGN(ProfileIOData);
368 }; 380 };
369 381
370 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_ 382 #endif // CHROME_BROWSER_PROFILES_PROFILE_IO_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698