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

Side by Side Diff: chrome/browser/prefs/testing_pref_store.cc

Issue 10068036: RefCounted types should not have public destructors, chrome/browser/ part 5 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win fix Created 8 years, 8 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 | « chrome/browser/prefs/testing_pref_store.h ('k') | chrome/browser/prefs/value_map_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/testing_pref_store.h" 5 #include "chrome/browser/prefs/testing_pref_store.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 8
9 TestingPrefStore::TestingPrefStore() 9 TestingPrefStore::TestingPrefStore()
10 : read_only_(true), 10 : read_only_(true),
11 prefs_written_(false), 11 prefs_written_(false),
12 init_complete_(false) {} 12 init_complete_(false) {
13 13 }
14 TestingPrefStore::~TestingPrefStore() {}
15 14
16 PrefStore::ReadResult TestingPrefStore::GetValue(const std::string& key, 15 PrefStore::ReadResult TestingPrefStore::GetValue(const std::string& key,
17 const Value** value) const { 16 const Value** value) const {
18 return prefs_.GetValue(key, value) ? READ_OK : READ_NO_VALUE; 17 return prefs_.GetValue(key, value) ? READ_OK : READ_NO_VALUE;
19 } 18 }
20 19
21 PrefStore::ReadResult TestingPrefStore::GetMutableValue(const std::string& key, 20 PrefStore::ReadResult TestingPrefStore::GetMutableValue(const std::string& key,
22 Value** value) { 21 Value** value) {
23 return prefs_.GetValue(key, value) ? READ_OK : READ_NO_VALUE; 22 return prefs_.GetValue(key, value) ? READ_OK : READ_NO_VALUE;
24 } 23 }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 const Value* stored_value; 126 const Value* stored_value;
128 if (!prefs_.GetValue(key, &stored_value) || !stored_value) 127 if (!prefs_.GetValue(key, &stored_value) || !stored_value)
129 return false; 128 return false;
130 129
131 return stored_value->GetAsBoolean(value); 130 return stored_value->GetAsBoolean(value);
132 } 131 }
133 132
134 void TestingPrefStore::set_read_only(bool read_only) { 133 void TestingPrefStore::set_read_only(bool read_only) {
135 read_only_ = read_only; 134 read_only_ = read_only;
136 } 135 }
136
137 TestingPrefStore::~TestingPrefStore() {}
OLDNEW
« no previous file with comments | « chrome/browser/prefs/testing_pref_store.h ('k') | chrome/browser/prefs/value_map_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698