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

Side by Side Diff: chrome/browser/sync/test/integration/performance/bookmarks_sync_perf_test.cc

Issue 2461463002: [Sync] Replacing NULL with nullptr/null throughout sync code. (Closed)
Patch Set: Reverted PROFILE_nullptr mistake. Created 4 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/macros.h" 5 #include "base/macros.h"
6 #include "chrome/browser/sync/test/integration/bookmarks_helper.h" 6 #include "chrome/browser/sync/test/integration/bookmarks_helper.h"
7 #include "chrome/browser/sync/test/integration/performance/sync_timing_helper.h" 7 #include "chrome/browser/sync/test/integration/performance/sync_timing_helper.h"
8 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" 8 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
9 #include "chrome/browser/sync/test/integration/sync_test.h" 9 #include "chrome/browser/sync/test/integration/sync_test.h"
10 #include "components/bookmarks/browser/bookmark_node.h" 10 #include "components/bookmarks/browser/bookmark_node.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // Returns a new unique bookmark title. 47 // Returns a new unique bookmark title.
48 std::string NextIndexedURLTitle(); 48 std::string NextIndexedURLTitle();
49 49
50 int url_number_; 50 int url_number_;
51 int url_title_number_; 51 int url_title_number_;
52 DISALLOW_COPY_AND_ASSIGN(BookmarksSyncPerfTest); 52 DISALLOW_COPY_AND_ASSIGN(BookmarksSyncPerfTest);
53 }; 53 };
54 54
55 void BookmarksSyncPerfTest::AddURLs(int profile, int num_urls) { 55 void BookmarksSyncPerfTest::AddURLs(int profile, int num_urls) {
56 for (int i = 0; i < num_urls; ++i) { 56 for (int i = 0; i < num_urls; ++i) {
57 ASSERT_TRUE(AddURL( 57 ASSERT_TRUE(AddURL(profile, 0, NextIndexedURLTitle(),
58 profile, 0, NextIndexedURLTitle(), GURL(NextIndexedURL())) != NULL); 58 GURL(NextIndexedURL())) != nullptr);
59 } 59 }
60 } 60 }
61 61
62 void BookmarksSyncPerfTest::UpdateURLs(int profile) { 62 void BookmarksSyncPerfTest::UpdateURLs(int profile) {
63 for (int i = 0; 63 for (int i = 0;
64 i < GetBookmarkBarNode(profile)->child_count(); 64 i < GetBookmarkBarNode(profile)->child_count();
65 ++i) { 65 ++i) {
66 ASSERT_TRUE(SetURL(profile, 66 ASSERT_TRUE(SetURL(profile,
67 GetBookmarkBarNode(profile)->GetChild(i), 67 GetBookmarkBarNode(profile)->GetChild(i),
68 GURL(NextIndexedURL()))); 68 GURL(NextIndexedURL())));
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 dt = TimeMutualSyncCycle(GetClient(0), GetClient(1)); 101 dt = TimeMutualSyncCycle(GetClient(0), GetClient(1));
102 ASSERT_EQ(kNumBookmarks, GetURLCount(1)); 102 ASSERT_EQ(kNumBookmarks, GetURLCount(1));
103 PrintResult("bookmarks", "update_bookmarks", dt); 103 PrintResult("bookmarks", "update_bookmarks", dt);
104 104
105 // TCM ID - 7566626. 105 // TCM ID - 7566626.
106 RemoveURLs(0); 106 RemoveURLs(0);
107 dt = TimeMutualSyncCycle(GetClient(0), GetClient(1)); 107 dt = TimeMutualSyncCycle(GetClient(0), GetClient(1));
108 ASSERT_EQ(0, GetURLCount(1)); 108 ASSERT_EQ(0, GetURLCount(1));
109 PrintResult("bookmarks", "delete_bookmarks", dt); 109 PrintResult("bookmarks", "delete_bookmarks", dt);
110 } 110 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698