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

Side by Side Diff: components/prefs/testing_pref_store.cc

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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
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 "components/prefs/testing_pref_store.h" 5 #include "components/prefs/testing_pref_store.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 118
119 void TestingPrefStore::ReportValueChanged(const std::string& key, 119 void TestingPrefStore::ReportValueChanged(const std::string& key,
120 uint32_t flags) { 120 uint32_t flags) {
121 for (Observer& observer : observers_) 121 for (Observer& observer : observers_)
122 observer.OnPrefValueChanged(key); 122 observer.OnPrefValueChanged(key);
123 } 123 }
124 124
125 void TestingPrefStore::SetString(const std::string& key, 125 void TestingPrefStore::SetString(const std::string& key,
126 const std::string& value) { 126 const std::string& value) {
127 SetValue(key, base::MakeUnique<base::StringValue>(value), 127 SetValue(key, base::MakeUnique<base::Value>(value), DEFAULT_PREF_WRITE_FLAGS);
128 DEFAULT_PREF_WRITE_FLAGS);
129 } 128 }
130 129
131 void TestingPrefStore::SetInteger(const std::string& key, int value) { 130 void TestingPrefStore::SetInteger(const std::string& key, int value) {
132 SetValue(key, base::MakeUnique<base::Value>(value), DEFAULT_PREF_WRITE_FLAGS); 131 SetValue(key, base::MakeUnique<base::Value>(value), DEFAULT_PREF_WRITE_FLAGS);
133 } 132 }
134 133
135 void TestingPrefStore::SetBoolean(const std::string& key, bool value) { 134 void TestingPrefStore::SetBoolean(const std::string& key, bool value) {
136 SetValue(key, base::MakeUnique<base::Value>(value), DEFAULT_PREF_WRITE_FLAGS); 135 SetValue(key, base::MakeUnique<base::Value>(value), DEFAULT_PREF_WRITE_FLAGS);
137 } 136 }
138 137
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 read_success_ = read_success; 180 read_success_ = read_success;
182 } 181 }
183 182
184 void TestingPrefStore::set_read_error( 183 void TestingPrefStore::set_read_error(
185 PersistentPrefStore::PrefReadError read_error) { 184 PersistentPrefStore::PrefReadError read_error) {
186 DCHECK(!init_complete_); 185 DCHECK(!init_complete_);
187 read_error_ = read_error; 186 read_error_ = read_error;
188 } 187 }
189 188
190 TestingPrefStore::~TestingPrefStore() {} 189 TestingPrefStore::~TestingPrefStore() {}
OLDNEW
« no previous file with comments | « components/prefs/pref_value_map_unittest.cc ('k') | components/printing/renderer/print_web_view_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698