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

Unified Diff: components/sync_preferences/synced_pref_change_registrar.cc

Issue 2459823002: [Sync] Rename syncable_prefs to sync_preferences. (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: components/sync_preferences/synced_pref_change_registrar.cc
diff --git a/components/syncable_prefs/synced_pref_change_registrar.cc b/components/sync_preferences/synced_pref_change_registrar.cc
similarity index 85%
rename from components/syncable_prefs/synced_pref_change_registrar.cc
rename to components/sync_preferences/synced_pref_change_registrar.cc
index 57999e69e8ef21ab663766d7d8ac5cd187357073..3d8fa89bf23050d89e7a2403fdd708ecf2553834 100644
--- a/components/syncable_prefs/synced_pref_change_registrar.cc
+++ b/components/sync_preferences/synced_pref_change_registrar.cc
@@ -2,11 +2,11 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "components/syncable_prefs/synced_pref_change_registrar.h"
+#include "components/sync_preferences/synced_pref_change_registrar.h"
#include "base/bind.h"
-namespace syncable_prefs {
+namespace sync_preferences {
namespace {
@@ -28,19 +28,19 @@ SyncedPrefChangeRegistrar::~SyncedPrefChangeRegistrar() {
RemoveAll();
}
-void SyncedPrefChangeRegistrar::Add(const char *path,
+void SyncedPrefChangeRegistrar::Add(const char* path,
const ChangeCallback& callback) {
Add(path, base::Bind(InvokeUnnamedCallback, callback));
}
-void SyncedPrefChangeRegistrar::Add(const char *path,
+void SyncedPrefChangeRegistrar::Add(const char* path,
const NamedChangeCallback& callback) {
DCHECK(!IsObserved(path));
observers_[path] = callback;
pref_service_->AddSyncedPrefObserver(path, this);
}
-void SyncedPrefChangeRegistrar::Remove(const char *path) {
+void SyncedPrefChangeRegistrar::Remove(const char* path) {
observers_.erase(path);
pref_service_->RemoveSyncedPrefObserver(path, this);
}
@@ -67,4 +67,4 @@ void SyncedPrefChangeRegistrar::OnSyncedPrefChanged(const std::string& path,
iter->second.Run(path, from_sync);
}
-} // namespace syncable_prefs
+} // namespace sync_preferences
« no previous file with comments | « components/sync_preferences/synced_pref_change_registrar.h ('k') | components/sync_preferences/synced_pref_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698