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

Unified Diff: components/prefs/default_pref_store.cc

Issue 1645073005: Revert of Move base/prefs to components/prefs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « components/prefs/default_pref_store.h ('k') | components/prefs/default_pref_store_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/prefs/default_pref_store.cc
diff --git a/components/prefs/default_pref_store.cc b/components/prefs/default_pref_store.cc
deleted file mode 100644
index b08ef7a52866d221ec89a98adef2d8864605b625..0000000000000000000000000000000000000000
--- a/components/prefs/default_pref_store.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/prefs/default_pref_store.h"
-
-#include <utility>
-
-#include "base/logging.h"
-
-using base::Value;
-
-DefaultPrefStore::DefaultPrefStore() {}
-
-bool DefaultPrefStore::GetValue(const std::string& key,
- const Value** result) const {
- return prefs_.GetValue(key, result);
-}
-
-void DefaultPrefStore::AddObserver(PrefStore::Observer* observer) {
- observers_.AddObserver(observer);
-}
-
-void DefaultPrefStore::RemoveObserver(PrefStore::Observer* observer) {
- observers_.RemoveObserver(observer);
-}
-
-bool DefaultPrefStore::HasObservers() const {
- return observers_.might_have_observers();
-}
-
-void DefaultPrefStore::SetDefaultValue(const std::string& key,
- scoped_ptr<Value> value) {
- DCHECK(!GetValue(key, NULL));
- prefs_.SetValue(key, std::move(value));
-}
-
-void DefaultPrefStore::ReplaceDefaultValue(const std::string& key,
- scoped_ptr<Value> value) {
- const Value* old_value = NULL;
- GetValue(key, &old_value);
- bool notify = !old_value->Equals(value.get());
- prefs_.SetValue(key, std::move(value));
- if (notify)
- FOR_EACH_OBSERVER(Observer, observers_, OnPrefValueChanged(key));
-}
-
-DefaultPrefStore::const_iterator DefaultPrefStore::begin() const {
- return prefs_.begin();
-}
-
-DefaultPrefStore::const_iterator DefaultPrefStore::end() const {
- return prefs_.end();
-}
-
-DefaultPrefStore::~DefaultPrefStore() {}
« no previous file with comments | « components/prefs/default_pref_store.h ('k') | components/prefs/default_pref_store_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698