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

Unified Diff: chrome/browser/sync/test/integration/performance/typed_urls_sync_perf_test.cc

Issue 8890089: [Sync] Add HistoryService::DeleteURLsForTest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
« no previous file with comments | « chrome/browser/history/history.cc ('k') | chrome/browser/sync/test/integration/typed_urls_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/test/integration/performance/typed_urls_sync_perf_test.cc
diff --git a/chrome/browser/sync/test/integration/performance/typed_urls_sync_perf_test.cc b/chrome/browser/sync/test/integration/performance/typed_urls_sync_perf_test.cc
index 715a32d59e5d01920952709ed29724c464ed05b2..d1b4d3d4fedca499ce9e2d736a42fb8426422bc0 100644
--- a/chrome/browser/sync/test/integration/performance/typed_urls_sync_perf_test.cc
+++ b/chrome/browser/sync/test/integration/performance/typed_urls_sync_perf_test.cc
@@ -12,7 +12,7 @@
using typed_urls_helper::AddUrlToHistory;
using typed_urls_helper::AssertAllProfilesHaveSameURLsAsVerifier;
-using typed_urls_helper::DeleteUrlFromHistory;
+using typed_urls_helper::DeleteUrlsFromHistory;
using typed_urls_helper::GetTypedUrlsFromClient;
// This number should be as far away from a multiple of
@@ -73,11 +73,13 @@ void TypedUrlsSyncPerfTest::UpdateURLs(int profile) {
}
void TypedUrlsSyncPerfTest::RemoveURLs(int profile) {
- std::vector<history::URLRow> urls = GetTypedUrlsFromClient(profile);
+ const std::vector<history::URLRow>& urls = GetTypedUrlsFromClient(profile);
Andrew T Wilson (Slow) 2011/12/14 18:17:07 This scares me, but I trust you when you say this
akalin 2011/12/14 18:21:15 Yeap, see http://herbsutter.com/2008/01/01/gotw-88
+ std::vector<GURL> gurls;
for (std::vector<history::URLRow>::const_iterator it = urls.begin();
it != urls.end(); ++it) {
- DeleteUrlFromHistory(profile, it->url());
+ gurls.push_back(it->url());
}
+ DeleteUrlsFromHistory(profile, gurls);
}
int TypedUrlsSyncPerfTest::GetURLCount(int profile) {
« no previous file with comments | « chrome/browser/history/history.cc ('k') | chrome/browser/sync/test/integration/typed_urls_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698