Skip to content

Commit

Permalink
Adding histograms showing fraction of page load times spent in the di…
Browse files Browse the repository at this point in the history
…sk cache, for full and partial page loads.

R=mmenke@chromium.org, jam@chromium.org, willchan@chromium.org, brettw@chromium.org
BUG=139210
Review URL: https://chromiumcodereview.appspot.com/10736066

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149007 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
tburkard@chromium.org committed Jul 30, 2012
1 parent 109acb8 commit 5a07c19
Show file tree
Hide file tree
Showing 49 changed files with 940 additions and 117 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ class ExtensionWebRequestTest : public testing::Test {
prefs::kEnableReferrers, profile_.GetTestingPrefService(), NULL);
network_delegate_.reset(new ChromeNetworkDelegate(
event_router_.get(), NULL, NULL, &profile_,
CookieSettings::Factory::GetForProfile(&profile_), &enable_referrers_));
CookieSettings::Factory::GetForProfile(&profile_), &enable_referrers_,
NULL));
context_.reset(new TestURLRequestContext(true));
context_->set_network_delegate(network_delegate_.get());
context_->Init();
Expand Down Expand Up @@ -441,7 +442,8 @@ class ExtensionWebRequestHeaderModificationTest :
prefs::kEnableReferrers, profile_.GetTestingPrefService(), NULL);
network_delegate_.reset(new ChromeNetworkDelegate(
event_router_.get(), NULL, NULL, &profile_,
CookieSettings::Factory::GetForProfile(&profile_), &enable_referrers_));
CookieSettings::Factory::GetForProfile(&profile_), &enable_referrers_,
NULL));
context_.reset(new TestURLRequestContext(true));
host_resolver_.reset(new net::MockHostResolver());
host_resolver_->rules()->AddSimulatedFailure("doesnotexist");
Expand Down
5 changes: 4 additions & 1 deletion chrome/browser/io_thread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/event_router_forwarder.h"
#include "chrome/browser/net/cache_stats.h"
#include "chrome/browser/net/chrome_net_log.h"
#include "chrome/browser/net/chrome_network_delegate.h"
#include "chrome/browser/net/chrome_url_request_context.h"
Expand Down Expand Up @@ -402,7 +403,8 @@ void IOThread::Init() {
NULL,
NULL,
NULL,
&system_enable_referrers_);
&system_enable_referrers_,
NULL);
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableExtensionsHttpThrottling)) {
network_delegate->NeverThrottleRequests();
Expand All @@ -426,6 +428,7 @@ void IOThread::Init() {
new net::ServerBoundCertService(
new net::DefaultServerBoundCertStore(NULL),
base::WorkerPool::GetTaskRunner(true)));
globals_->cache_stats.reset(new chrome_browser_net::CacheStats());
net::HttpNetworkSession::Params session_params;
session_params.host_resolver = globals_->host_resolver.get();
session_params.cert_verifier = globals_->cert_verifier.get();
Expand Down
2 changes: 2 additions & 0 deletions chrome/browser/io_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class PrefService;
class SystemURLRequestContextGetter;

namespace chrome_browser_net {
class CacheStats;
class HttpPipeliningCompatibilityClient;
}

Expand Down Expand Up @@ -111,6 +112,7 @@ class IOThread : public content::BrowserThreadDelegate {
extension_event_router_forwarder;
scoped_ptr<chrome_browser_net::HttpPipeliningCompatibilityClient>
http_pipelining_compatibility_client;
scoped_ptr<chrome_browser_net::CacheStats> cache_stats;
};

// |net_log| must either outlive the IOThread or be NULL.
Expand Down
Loading

0 comments on commit 5a07c19

Please sign in to comment.