| 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 {
|
|
|