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

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

Issue 15573003: New architecture of the activity logging: Policies for summarization (and compression) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed browser test. Created 7 years, 6 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 "base/strings/stringprintf.h" 5 #include "base/strings/stringprintf.h"
6 #include "chrome/browser/extensions/activity_log/activity_log.h" 6 #include "chrome/browser/extensions/activity_log/activity_log.h"
7 #include "chrome/browser/extensions/extension_apitest.h" 7 #include "chrome/browser/extensions/extension_apitest.h"
8 #include "chrome/browser/extensions/extension_browsertest.h" 8 #include "chrome/browser/extensions/extension_browsertest.h"
9 #include "chrome/browser/prerender/prerender_handle.h" 9 #include "chrome/browser/prerender/prerender_handle.h"
10 #include "chrome/browser/prerender/prerender_manager.h" 10 #include "chrome/browser/prerender/prerender_manager.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 host_resolver()->AddRule("*", "127.0.0.1"); 130 host_resolver()->AddRule("*", "127.0.0.1");
131 StartTestServer(); 131 StartTestServer();
132 int port = test_server()->host_port_pair().port(); 132 int port = test_server()->host_port_pair().port();
133 133
134 // Get the extension (chrome/test/data/extensions/activity_log) 134 // Get the extension (chrome/test/data/extensions/activity_log)
135 const Extension* ext = 135 const Extension* ext =
136 LoadExtension(test_data_dir_.AppendASCII("activity_log")); 136 LoadExtension(test_data_dir_.AppendASCII("activity_log"));
137 ASSERT_TRUE(ext); 137 ASSERT_TRUE(ext);
138 138
139 ActivityLog* activity_log = ActivityLog::GetInstance(profile()); 139 ActivityLog* activity_log = ActivityLog::GetInstance(profile());
140 activity_log->SetDefaultPolicy(ActivityLogPolicy::POLICY_FULLSTREAM);
140 ASSERT_TRUE(activity_log); 141 ASSERT_TRUE(activity_log);
141 142
142 //Disable rate limiting in PrerenderManager 143 //Disable rate limiting in PrerenderManager
143 prerender::PrerenderManager* prerender_manager = 144 prerender::PrerenderManager* prerender_manager =
144 prerender::PrerenderManagerFactory::GetForProfile(profile()); 145 prerender::PrerenderManagerFactory::GetForProfile(profile());
145 ASSERT_TRUE(prerender_manager); 146 ASSERT_TRUE(prerender_manager);
146 prerender_manager->mutable_config().rate_limit_enabled = false; 147 prerender_manager->mutable_config().rate_limit_enabled = false;
147 // Increase maximum size of prerenderer, otherwise this test fails 148 // Increase maximum size of prerenderer, otherwise this test fails
148 // on Windows XP. 149 // on Windows XP.
149 prerender_manager->mutable_config().max_bytes = 1000 * 1024 * 1024; 150 prerender_manager->mutable_config().max_bytes = 1000 * 1024 * 1024;
(...skipping 21 matching lines...) Expand all
171 172
172 activity_log->GetActions( 173 activity_log->GetActions(
173 ext->id(), 0, base::Bind( 174 ext->id(), 0, base::Bind(
174 ActivityLogExtensionTest::Prerender_Arguments, port)); 175 ActivityLogExtensionTest::Prerender_Arguments, port));
175 176
176 // Allow invocation of Prerender_Arguments 177 // Allow invocation of Prerender_Arguments
177 base::MessageLoop::current()->Run(); 178 base::MessageLoop::current()->Run();
178 } 179 }
179 180
180 } // namespace extensions 181 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/activity_log/activity_log.cc ('k') | chrome/browser/extensions/activity_log/activity_log_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698