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

Side by Side Diff: chrome/browser/extensions/activity_log/activity_log_browsertest.cc

Issue 2321083002: [NoStatePrefetch] Add performance histograms. (Closed)
Patch Set: rename url_ to start_url_ 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 const Extension* ext = 74 const Extension* ext =
75 LoadExtension(test_data_dir_.AppendASCII("activity_log")); 75 LoadExtension(test_data_dir_.AppendASCII("activity_log"));
76 ASSERT_TRUE(ext); 76 ASSERT_TRUE(ext);
77 77
78 ActivityLog* activity_log = ActivityLog::GetInstance(profile()); 78 ActivityLog* activity_log = ActivityLog::GetInstance(profile());
79 activity_log->SetWatchdogAppActiveForTesting(true); 79 activity_log->SetWatchdogAppActiveForTesting(true);
80 ASSERT_TRUE(activity_log); 80 ASSERT_TRUE(activity_log);
81 81
82 // Disable rate limiting in PrerenderManager 82 // Disable rate limiting in PrerenderManager
83 prerender::PrerenderManager* prerender_manager = 83 prerender::PrerenderManager* prerender_manager =
84 prerender::PrerenderManagerFactory::GetForProfile(profile()); 84 prerender::PrerenderManagerFactory::GetForBrowserContext(profile());
85 ASSERT_TRUE(prerender_manager); 85 ASSERT_TRUE(prerender_manager);
86 prerender_manager->mutable_config().rate_limit_enabled = false; 86 prerender_manager->mutable_config().rate_limit_enabled = false;
87 // Increase prerenderer limits, otherwise this test fails 87 // Increase prerenderer limits, otherwise this test fails
88 // on Windows XP. 88 // on Windows XP.
89 prerender_manager->mutable_config().max_bytes = 1000 * 1024 * 1024; 89 prerender_manager->mutable_config().max_bytes = 1000 * 1024 * 1024;
90 prerender_manager->mutable_config().time_to_live = 90 prerender_manager->mutable_config().time_to_live =
91 base::TimeDelta::FromMinutes(10); 91 base::TimeDelta::FromMinutes(10);
92 prerender_manager->mutable_config().abandon_time_to_live = 92 prerender_manager->mutable_config().abandon_time_to_live =
93 base::TimeDelta::FromMinutes(10); 93 base::TimeDelta::FromMinutes(10);
94 94
(...skipping 20 matching lines...) Expand all
115 activity_log->GetFilteredActions( 115 activity_log->GetFilteredActions(
116 ext->id(), Action::ACTION_ANY, "", "", "", -1, 116 ext->id(), Action::ACTION_ANY, "", "", "", -1,
117 base::Bind(ActivityLogPrerenderTest::Prerender_Arguments, ext->id(), port, 117 base::Bind(ActivityLogPrerenderTest::Prerender_Arguments, ext->id(), port,
118 run_loop.QuitWhenIdleClosure())); 118 run_loop.QuitWhenIdleClosure()));
119 119
120 // Allow invocation of Prerender_Arguments 120 // Allow invocation of Prerender_Arguments
121 run_loop.Run(); 121 run_loop.Run();
122 } 122 }
123 123
124 } // namespace extensions 124 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698