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

Unified Diff: components/user_prefs/tracked/segregated_pref_store.cc

Issue 1227973003: Componentize //chrome/browser/prefs/tracked. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 4 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/user_prefs/tracked/segregated_pref_store.cc
diff --git a/chrome/browser/prefs/tracked/segregated_pref_store.cc b/components/user_prefs/tracked/segregated_pref_store.cc
similarity index 94%
rename from chrome/browser/prefs/tracked/segregated_pref_store.cc
rename to components/user_prefs/tracked/segregated_pref_store.cc
index f83fc227aeb568823540562fd8f9ba5b6e0cfc5a..99031a2f0ecd55bc9198fa619817adc0d56065c4 100644
--- a/chrome/browser/prefs/tracked/segregated_pref_store.cc
+++ b/components/user_prefs/tracked/segregated_pref_store.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 "chrome/browser/prefs/tracked/segregated_pref_store.h"
+#include "components/user_prefs/tracked/segregated_pref_store.h"
#include "base/logging.h"
#include "base/stl_util.h"
@@ -12,7 +12,8 @@ SegregatedPrefStore::AggregatingObserver::AggregatingObserver(
SegregatedPrefStore* outer)
: outer_(outer),
failed_sub_initializations_(0),
- successful_sub_initializations_(0) {}
+ successful_sub_initializations_(0) {
+}
void SegregatedPrefStore::AggregatingObserver::OnPrefValueChanged(
const std::string& key) {
@@ -21,8 +22,8 @@ void SegregatedPrefStore::AggregatingObserver::OnPrefValueChanged(
if (failed_sub_initializations_ + successful_sub_initializations_ < 2)
return;
- FOR_EACH_OBSERVER(
- PrefStore::Observer, outer_->observers_, OnPrefValueChanged(key));
+ FOR_EACH_OBSERVER(PrefStore::Observer, outer_->observers_,
+ OnPrefValueChanged(key));
}
void SegregatedPrefStore::AggregatingObserver::OnInitializationCompleted(
@@ -42,8 +43,7 @@ void SegregatedPrefStore::AggregatingObserver::OnInitializationCompleted(
}
FOR_EACH_OBSERVER(
- PrefStore::Observer,
- outer_->observers_,
+ PrefStore::Observer, outer_->observers_,
OnInitializationCompleted(successful_sub_initializations_ == 2));
}
}
@@ -109,8 +109,7 @@ void SegregatedPrefStore::SetValueSilently(const std::string& key,
}
bool SegregatedPrefStore::ReadOnly() const {
- return selected_pref_store_->ReadOnly() ||
- default_pref_store_->ReadOnly();
+ return selected_pref_store_->ReadOnly() || default_pref_store_->ReadOnly();
}
PersistentPrefStore::PrefReadError SegregatedPrefStore::GetReadError() const {
« no previous file with comments | « components/user_prefs/tracked/segregated_pref_store.h ('k') | components/user_prefs/tracked/segregated_pref_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698