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

Unified Diff: chrome/browser/profiles/profile_io_data.cc

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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/profile_io_data.cc
===================================================================
--- chrome/browser/profiles/profile_io_data.cc (revision 147972)
+++ chrome/browser/profiles/profile_io_data.cc (working copy)
@@ -28,6 +28,7 @@
#include "chrome/browser/extensions/extension_resource_protocols.h"
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/io_thread.h"
+#include "chrome/browser/net/cache_stats.h"
#include "chrome/browser/net/chrome_cookie_notification_details.h"
#include "chrome/browser/net/chrome_fraudulent_certificate_reporter.h"
#include "chrome/browser/net/chrome_net_log.h"
@@ -263,6 +264,9 @@
it->second->AssertNoURLRequests();
delete it->second;
}
+ chrome_browser_net::CacheStats* cache_stats = GetCacheStats();
+ if (cache_stats)
+ cache_stats->UnregisterMainURLRequestContext(main_request_context_.get());
}
// static
@@ -456,13 +460,18 @@
chrome_url_data_manager_backend_.reset(new ChromeURLDataManagerBackend);
+ chrome_browser_net::CacheStats* cache_stats = GetCacheStats();
+ if (cache_stats)
+ cache_stats->RegisterMainURLRequestContext(main_request_context_.get());
+
network_delegate_.reset(new ChromeNetworkDelegate(
io_thread_globals->extension_event_router_forwarder.get(),
profile_params_->extension_info_map,
url_blacklist_manager_.get(),
profile_params_->profile,
profile_params_->cookie_settings,
- &enable_referrers_));
+ &enable_referrers_,
+ cache_stats));
fraudulent_certificate_reporter_.reset(
new chrome_browser_net::ChromeFraudulentCertificateReporter(
@@ -583,3 +592,8 @@
void ProfileIOData::DestroyResourceContext() {
resource_context_.reset();
}
+
+chrome_browser_net::CacheStats* ProfileIOData::GetCacheStats() const {
rvargas (doing something else) 2012/07/26 02:13:43 ditto
tburkard 2012/07/26 02:50:54 Done.
+ DCHECK(profile_params_.get());
rvargas (doing something else) 2012/07/26 02:13:43 We usually don't dcheck things that will crash the
tburkard 2012/07/26 02:50:54 Done.
+ return profile_params_->io_thread->globals()->cache_stats.get();
+}

Powered by Google App Engine
This is Rietveld 408576698