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

Side by Side Diff: base/prefs/default_pref_store.cc

Issue 11243002: Move the bits of Prefs where production code has only trivially easy (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments, fix gypi problem Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/prefs/default_pref_store.h ('k') | base/prefs/json_pref_store.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/prefs/default_pref_store.h" 5 #include "base/prefs/default_pref_store.h"
6 6
7 using base::Value; 7 using base::Value;
8 8
9 DefaultPrefStore::DefaultPrefStore() {} 9 DefaultPrefStore::DefaultPrefStore() {}
10 10
11 void DefaultPrefStore::SetDefaultValue(const std::string& key, Value* value) { 11 void DefaultPrefStore::SetDefaultValue(const std::string& key, Value* value) {
12 CHECK(GetValue(key, NULL) == READ_NO_VALUE); 12 CHECK(GetValue(key, NULL) == READ_NO_VALUE);
13 SetValue(key, value); 13 SetValue(key, value);
14 } 14 }
15 15
16 void DefaultPrefStore::RemoveDefaultValue(const std::string& key) { 16 void DefaultPrefStore::RemoveDefaultValue(const std::string& key) {
17 CHECK(GetValue(key, NULL) == READ_OK); 17 CHECK(GetValue(key, NULL) == READ_OK);
18 RemoveValue(key); 18 RemoveValue(key);
19 } 19 }
20 20
21 base::Value::Type DefaultPrefStore::GetType(const std::string& key) const { 21 base::Value::Type DefaultPrefStore::GetType(const std::string& key) const {
22 const Value* value; 22 const Value* value;
23 return GetValue(key, &value) == READ_OK ? value->GetType() : Value::TYPE_NULL; 23 return GetValue(key, &value) == READ_OK ? value->GetType() : Value::TYPE_NULL;
24 } 24 }
25 25
26 DefaultPrefStore::~DefaultPrefStore() {} 26 DefaultPrefStore::~DefaultPrefStore() {}
OLDNEW
« no previous file with comments | « base/prefs/default_pref_store.h ('k') | base/prefs/json_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698