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

Side by Side Diff: chrome/browser/sync/test/integration/typed_urls_helper.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) 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/sync/test/integration/typed_urls_helper.h" 5 #include "chrome/browser/sync/test/integration/typed_urls_helper.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 } 157 }
158 158
159 // Creates a URLRow in the specified HistoryService with the passed transition 159 // Creates a URLRow in the specified HistoryService with the passed transition
160 // type. 160 // type.
161 void AddToHistory(history::HistoryService* service, 161 void AddToHistory(history::HistoryService* service,
162 const GURL& url, 162 const GURL& url,
163 ui::PageTransition transition, 163 ui::PageTransition transition,
164 history::VisitSource source, 164 history::VisitSource source,
165 const base::Time& timestamp) { 165 const base::Time& timestamp) {
166 service->AddPage(url, timestamp, 166 service->AddPage(url, timestamp,
167 NULL, // scope 167 nullptr, // scope
168 1234, // nav_entry_id 168 1234, // nav_entry_id
169 GURL(), // referrer 169 GURL(), // referrer
170 history::RedirectList(), transition, source, false); 170 history::RedirectList(), transition, source, false);
171 } 171 }
172 172
173 history::URLRows GetTypedUrlsFromHistoryService( 173 history::URLRows GetTypedUrlsFromHistoryService(
174 history::HistoryService* service) { 174 history::HistoryService* service) {
175 base::CancelableTaskTracker tracker; 175 base::CancelableTaskTracker tracker;
176 history::URLRows rows; 176 history::URLRows rows;
177 base::WaitableEvent wait_event( 177 base::WaitableEvent wait_event(
178 base::WaitableEvent::ResetPolicy::MANUAL, 178 base::WaitableEvent::ResetPolicy::MANUAL,
179 base::WaitableEvent::InitialState::NOT_SIGNALED); 179 base::WaitableEvent::InitialState::NOT_SIGNALED);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 base::CancelableTaskTracker tracker; 219 base::CancelableTaskTracker tracker;
220 base::WaitableEvent wait_event( 220 base::WaitableEvent wait_event(
221 base::WaitableEvent::ResetPolicy::MANUAL, 221 base::WaitableEvent::ResetPolicy::MANUAL,
222 base::WaitableEvent::InitialState::NOT_SIGNALED); 222 base::WaitableEvent::InitialState::NOT_SIGNALED);
223 service->ScheduleDBTask(std::unique_ptr<history::HistoryDBTask>( 223 service->ScheduleDBTask(std::unique_ptr<history::HistoryDBTask>(
224 new RemoveVisitsTask(visits, &wait_event)), 224 new RemoveVisitsTask(visits, &wait_event)),
225 &tracker); 225 &tracker);
226 wait_event.Wait(); 226 wait_event.Wait();
227 } 227 }
228 228
229 static base::Time* timestamp = NULL; 229 static base::Time* timestamp = nullptr;
230 230
231 } // namespace 231 } // namespace
232 232
233 namespace typed_urls_helper { 233 namespace typed_urls_helper {
234 234
235 history::URLRows GetTypedUrlsFromClient(int index) { 235 history::URLRows GetTypedUrlsFromClient(int index) {
236 history::HistoryService* service = 236 history::HistoryService* service =
237 HistoryServiceFactory::GetForProfileWithoutCreating( 237 HistoryServiceFactory::GetForProfileWithoutCreating(
238 test()->GetProfile(index)); 238 test()->GetProfile(index));
239 return GetTypedUrlsFromHistoryService(service); 239 return GetTypedUrlsFromHistoryService(service);
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 : MultiClientStatusChangeChecker( 424 : MultiClientStatusChangeChecker(
425 sync_datatype_helper::test()->GetSyncServices()) {} 425 sync_datatype_helper::test()->GetSyncServices()) {}
426 426
427 bool ProfilesHaveSameURLsChecker::IsExitConditionSatisfied() { 427 bool ProfilesHaveSameURLsChecker::IsExitConditionSatisfied() {
428 return typed_urls_helper::CheckAllProfilesHaveSameURLs(); 428 return typed_urls_helper::CheckAllProfilesHaveSameURLs();
429 } 429 }
430 430
431 std::string ProfilesHaveSameURLsChecker::GetDebugMessage() const { 431 std::string ProfilesHaveSameURLsChecker::GetDebugMessage() const {
432 return "Waiting for matching typed urls profiles"; 432 return "Waiting for matching typed urls profiles";
433 } 433 }
OLDNEW
« no previous file with comments | « chrome/browser/sync/test/integration/two_client_bookmarks_sync_test.cc ('k') | components/browser_sync/profile_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698