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

Side by Side Diff: chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.cc

Issue 2321083002: [NoStatePrefetch] Add performance histograms. (Closed)
Patch Set: Review comments Created 4 years, 3 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 #include "chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.h" 5 #include "chrome/browser/ui/webui/net_internals/net_internals_ui_browsertest.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 command_line->AppendSwitchASCII(switches::kPrerenderMode, 335 command_line->AppendSwitchASCII(switches::kPrerenderMode,
336 switches::kPrerenderModeSwitchValueEnabled); 336 switches::kPrerenderModeSwitchValueEnabled);
337 } 337 }
338 338
339 void NetInternalsTest::SetUpOnMainThread() { 339 void NetInternalsTest::SetUpOnMainThread() {
340 WebUIBrowserTest::SetUpOnMainThread(); 340 WebUIBrowserTest::SetUpOnMainThread();
341 // Increase the memory allowed in a prerendered page above normal settings, 341 // Increase the memory allowed in a prerendered page above normal settings,
342 // as debug builds use more memory and often go over the usual limit. 342 // as debug builds use more memory and often go over the usual limit.
343 Profile* profile = browser()->profile(); 343 Profile* profile = browser()->profile();
344 prerender::PrerenderManager* prerender_manager = 344 prerender::PrerenderManager* prerender_manager =
345 prerender::PrerenderManagerFactory::GetForProfile(profile); 345 prerender::PrerenderManagerFactory::GetForBrowserContext(profile);
346 prerender_manager->mutable_config().max_bytes = 1000 * 1024 * 1024; 346 prerender_manager->mutable_config().max_bytes = 1000 * 1024 * 1024;
347 } 347 }
348 348
349 content::WebUIMessageHandler* NetInternalsTest::GetMockMessageHandler() { 349 content::WebUIMessageHandler* NetInternalsTest::GetMockMessageHandler() {
350 return message_handler_.get(); 350 return message_handler_.get();
351 } 351 }
352 352
353 GURL NetInternalsTest::CreatePrerenderLoaderUrl( 353 GURL NetInternalsTest::CreatePrerenderLoaderUrl(
354 const GURL& prerender_url) { 354 const GURL& prerender_url) {
355 EXPECT_TRUE(StartTestServer()); 355 EXPECT_TRUE(StartTestServer());
(...skipping 11 matching lines...) Expand all
367 if (test_server_started_) 367 if (test_server_started_)
368 return true; 368 return true;
369 test_server_started_ = embedded_test_server()->Start(); 369 test_server_started_ = embedded_test_server()->Start();
370 370
371 // Sample domain for SDCH-view test. Dictionaries for localhost/127.0.0.1 371 // Sample domain for SDCH-view test. Dictionaries for localhost/127.0.0.1
372 // are forbidden. 372 // are forbidden.
373 host_resolver()->AddRule("testdomain.com", "127.0.0.1"); 373 host_resolver()->AddRule("testdomain.com", "127.0.0.1");
374 host_resolver()->AddRule("sub.testdomain.com", "127.0.0.1"); 374 host_resolver()->AddRule("sub.testdomain.com", "127.0.0.1");
375 return test_server_started_; 375 return test_server_started_;
376 } 376 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/net_internals/net_internals_ui.cc ('k') | chrome/test/data/nostore.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698