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

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, 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 | 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 explicit AppRequestContext(chrome_browser_net::CacheStats* cache_stats);
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 return proxy_service_.get(); 229 return proxy_service_.get();
229 } 230 }
230 231
231 void set_http_server_properties_manager( 232 void set_http_server_properties_manager(
232 chrome_browser_net::HttpServerPropertiesManager* manager) const; 233 chrome_browser_net::HttpServerPropertiesManager* manager) const;
233 234
234 ChromeURLRequestContext* main_request_context() const { 235 ChromeURLRequestContext* main_request_context() const {
235 return main_request_context_.get(); 236 return main_request_context_.get();
236 } 237 }
237 238
239 chrome_browser_net::CacheStats* cache_stats() const {
240 return cache_stats_;
241 }
242
238 // Destroys the ResourceContext first, to cancel any URLRequests that are 243 // Destroys the ResourceContext first, to cancel any URLRequests that are
239 // using it still, before we destroy the member variables that those 244 // using it still, before we destroy the member variables that those
240 // URLRequests may be accessing. 245 // URLRequests may be accessing.
241 void DestroyResourceContext(); 246 void DestroyResourceContext();
242 247
243 private: 248 private:
244 class ResourceContext : public content::ResourceContext { 249 class ResourceContext : public content::ResourceContext {
245 public: 250 public:
246 explicit ResourceContext(ProfileIOData* io_data); 251 explicit ResourceContext(ProfileIOData* io_data);
247 virtual ~ResourceContext(); 252 virtual ~ResourceContext();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 285
281 // These functions are used to transfer ownership of the lazily initialized 286 // These functions are used to transfer ownership of the lazily initialized
282 // context from ProfileIOData to the URLRequestContextGetter. 287 // context from ProfileIOData to the URLRequestContextGetter.
283 virtual ChromeURLRequestContext* 288 virtual ChromeURLRequestContext*
284 AcquireMediaRequestContext() const = 0; 289 AcquireMediaRequestContext() const = 0;
285 virtual ChromeURLRequestContext* 290 virtual ChromeURLRequestContext*
286 AcquireIsolatedAppRequestContext( 291 AcquireIsolatedAppRequestContext(
287 ChromeURLRequestContext* main_context, 292 ChromeURLRequestContext* main_context,
288 const std::string& app_id) const = 0; 293 const std::string& app_id) const = 0;
289 294
295 // Returns the CacheStats object to be used for this profile
296 // (may be NULL for OTR profiles).
297 virtual chrome_browser_net::CacheStats* GetCacheStats(
rvargas (doing something else) 2012/07/26 18:47:33 Shouldn't this be before line 273?
tburkard 2012/07/26 19:12:49 Done.
298 IOThread* io_thread) const;
299
290 // The order *DOES* matter for the majority of these member variables, so 300 // The order *DOES* matter for the majority of these member variables, so
291 // don't move them around unless you know what you're doing! 301 // don't move them around unless you know what you're doing!
292 // General rules: 302 // General rules:
293 // * ResourceContext references the URLRequestContexts, so 303 // * ResourceContext references the URLRequestContexts, so
294 // URLRequestContexts must outlive ResourceContext, hence ResourceContext 304 // URLRequestContexts must outlive ResourceContext, hence ResourceContext
295 // should be destroyed first. 305 // should be destroyed first.
296 // * URLRequestContexts reference a whole bunch of members, so 306 // * URLRequestContexts reference a whole bunch of members, so
297 // URLRequestContext needs to be destroyed before them. 307 // URLRequestContext needs to be destroyed before them.
298 // * Therefore, ResourceContext should be listed last, and then the 308 // * Therefore, ResourceContext should be listed last, and then the
299 // URLRequestContexts, and then the URLRequestContext members. 309 // URLRequestContexts, and then the URLRequestContext members.
(...skipping 52 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