Index: services/preferences/tracked/tracked_preferences_migration.cc |
diff --git a/components/user_prefs/tracked/tracked_preferences_migration.cc b/services/preferences/tracked/tracked_preferences_migration.cc |
similarity index 94% |
rename from components/user_prefs/tracked/tracked_preferences_migration.cc |
rename to services/preferences/tracked/tracked_preferences_migration.cc |
index 50299141ed5927897b69138773c70c57d8269580..f2af336e350a08a60bcb010ffbcbf80b31267c29 100644 |
--- a/components/user_prefs/tracked/tracked_preferences_migration.cc |
+++ b/services/preferences/tracked/tracked_preferences_migration.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "components/user_prefs/tracked/tracked_preferences_migration.h" |
+#include "services/preferences/tracked/tracked_preferences_migration.h" |
#include <utility> |
@@ -12,11 +12,11 @@ |
#include "base/memory/ref_counted.h" |
#include "base/metrics/histogram.h" |
#include "base/values.h" |
-#include "components/user_prefs/tracked/dictionary_hash_store_contents.h" |
-#include "components/user_prefs/tracked/hash_store_contents.h" |
-#include "components/user_prefs/tracked/interceptable_pref_filter.h" |
-#include "components/user_prefs/tracked/pref_hash_store.h" |
-#include "components/user_prefs/tracked/pref_hash_store_transaction.h" |
+#include "services/preferences/tracked/dictionary_hash_store_contents.h" |
+#include "services/preferences/tracked/hash_store_contents.h" |
+#include "services/preferences/tracked/interceptable_pref_filter.h" |
+#include "services/preferences/tracked/pref_hash_store.h" |
+#include "services/preferences/tracked/pref_hash_store_transaction.h" |
namespace { |
@@ -42,10 +42,7 @@ class TrackedPreferencesMigrator |
private: |
friend class base::RefCounted<TrackedPreferencesMigrator>; |
- enum PrefFilterID { |
- UNPROTECTED_PREF_FILTER, |
- PROTECTED_PREF_FILTER |
- }; |
+ enum PrefFilterID { UNPROTECTED_PREF_FILTER, PROTECTED_PREF_FILTER }; |
~TrackedPreferencesMigrator(); |
@@ -124,8 +121,7 @@ void CleanupMigratedHashes(const std::set<std::string>& migrated_pref_names, |
std::unique_ptr<PrefHashStoreTransaction> transaction( |
origin_pref_hash_store->BeginTransaction(&dictionary_contents)); |
for (std::set<std::string>::const_iterator it = migrated_pref_names.begin(); |
- it != migrated_pref_names.end(); |
- ++it) { |
+ it != migrated_pref_names.end(); ++it) { |
transaction->ClearHash(*it); |
} |
} |
@@ -147,10 +143,9 @@ void MigratePrefsFromOldToNewStore(const std::set<std::string>& pref_names, |
new_hash_store->BeginTransaction(&dictionary_contents)); |
for (std::set<std::string>::const_iterator it = pref_names.begin(); |
- it != pref_names.end(); |
- ++it) { |
- const std::string& pref_name = *it; |
- const base::Value* value_in_old_store = NULL; |
+ it != pref_names.end(); ++it) { |
+ const std::string& pref_name = *it; |
+ const base::Value* value_in_old_store = NULL; |
// If the destination does not have a hash for this pref we will |
// unconditionally attempt to move it. |
@@ -222,12 +217,10 @@ TrackedPreferencesMigrator::TrackedPreferencesMigrator( |
// The callbacks bound below will own this TrackedPreferencesMigrator by |
// reference. |
unprotected_pref_filter->InterceptNextFilterOnLoad( |
- base::Bind(&TrackedPreferencesMigrator::InterceptFilterOnLoad, |
- this, |
+ base::Bind(&TrackedPreferencesMigrator::InterceptFilterOnLoad, this, |
UNPROTECTED_PREF_FILTER)); |
protected_pref_filter->InterceptNextFilterOnLoad( |
- base::Bind(&TrackedPreferencesMigrator::InterceptFilterOnLoad, |
- this, |
+ base::Bind(&TrackedPreferencesMigrator::InterceptFilterOnLoad, this, |
PROTECTED_PREF_FILTER)); |
} |
@@ -297,8 +290,7 @@ void TrackedPreferencesMigrator::MigrateIfReady() { |
// do it immediately if |!protected_prefs_altered|). |
ScheduleSourcePrefStoreCleanup( |
register_on_successful_protected_store_write_callback_, |
- unprotected_store_cleaner_, |
- protected_pref_names_, |
+ unprotected_store_cleaner_, protected_pref_names_, |
protected_prefs_altered); |
} |
@@ -308,8 +300,7 @@ void TrackedPreferencesMigrator::MigrateIfReady() { |
// do it immediately if |!unprotected_prefs_altered|). |
ScheduleSourcePrefStoreCleanup( |
register_on_successful_unprotected_store_write_callback_, |
- protected_store_cleaner_, |
- unprotected_pref_names_, |
+ protected_store_cleaner_, unprotected_pref_names_, |
unprotected_prefs_altered); |
} |
} |