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

Side by Side Diff: chrome/browser/sync/backend_migrator.cc

Issue 697953002: ObserverList::HasObserver now takes a const pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compile errors (ChromeOS unit tests). Created 6 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
« no previous file with comments | « chrome/browser/sync/backend_migrator.h ('k') | chrome/browser/sync/profile_sync_service.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/backend_migrator.h" 5 #include "chrome/browser/sync/backend_migrator.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/tracked_objects.h" 9 #include "base/tracked_objects.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 DCHECK_GT(state_, WAITING_TO_START); 68 DCHECK_GT(state_, WAITING_TO_START);
69 // If we're already migrating, interrupt the current migration. 69 // If we're already migrating, interrupt the current migration.
70 RestartMigration(); 70 RestartMigration();
71 } 71 }
72 72
73 void BackendMigrator::AddMigrationObserver(MigrationObserver* observer) { 73 void BackendMigrator::AddMigrationObserver(MigrationObserver* observer) {
74 migration_observers_.AddObserver(observer); 74 migration_observers_.AddObserver(observer);
75 } 75 }
76 76
77 bool BackendMigrator::HasMigrationObserver( 77 bool BackendMigrator::HasMigrationObserver(
78 MigrationObserver* observer) const { 78 const MigrationObserver* observer) const {
79 return migration_observers_.HasObserver(observer); 79 return migration_observers_.HasObserver(observer);
80 } 80 }
81 81
82 void BackendMigrator::RemoveMigrationObserver(MigrationObserver* observer) { 82 void BackendMigrator::RemoveMigrationObserver(MigrationObserver* observer) {
83 migration_observers_.RemoveObserver(observer); 83 migration_observers_.RemoveObserver(observer);
84 } 84 }
85 85
86 void BackendMigrator::ChangeState(State new_state) { 86 void BackendMigrator::ChangeState(State new_state) {
87 state_ = new_state; 87 state_ = new_state;
88 FOR_EACH_OBSERVER(MigrationObserver, migration_observers_, 88 FOR_EACH_OBSERVER(MigrationObserver, migration_observers_,
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 216
217 syncer::ModelTypeSet BackendMigrator::GetPendingMigrationTypesForTest() const { 217 syncer::ModelTypeSet BackendMigrator::GetPendingMigrationTypesForTest() const {
218 return to_migrate_; 218 return to_migrate_;
219 } 219 }
220 220
221 #undef SDVLOG 221 #undef SDVLOG
222 222
223 #undef SLOG 223 #undef SLOG
224 224
225 }; // namespace browser_sync 225 }; // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/backend_migrator.h ('k') | chrome/browser/sync/profile_sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698