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

Side by Side Diff: chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.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) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 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/chromeos/settings/scoped_cros_settings_test_helper.h" 5 #include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 Set(path, base::Value(in_value)); 88 Set(path, base::Value(in_value));
89 } 89 }
90 90
91 void ScopedCrosSettingsTestHelper::SetDouble(const std::string& path, 91 void ScopedCrosSettingsTestHelper::SetDouble(const std::string& path,
92 double in_value) { 92 double in_value) {
93 Set(path, base::Value(in_value)); 93 Set(path, base::Value(in_value));
94 } 94 }
95 95
96 void ScopedCrosSettingsTestHelper::SetString(const std::string& path, 96 void ScopedCrosSettingsTestHelper::SetString(const std::string& path,
97 const std::string& in_value) { 97 const std::string& in_value) {
98 Set(path, base::StringValue(in_value)); 98 Set(path, base::Value(in_value));
99 } 99 }
100 100
101 void ScopedCrosSettingsTestHelper::StoreCachedDeviceSetting( 101 void ScopedCrosSettingsTestHelper::StoreCachedDeviceSetting(
102 const std::string& path) { 102 const std::string& path) {
103 const base::Value* const value = stub_settings_provider_ptr_->Get(path); 103 const base::Value* const value = stub_settings_provider_ptr_->Get(path);
104 if (value) { 104 if (value) {
105 enterprise_management::PolicyData data; 105 enterprise_management::PolicyData data;
106 enterprise_management::ChromeDeviceSettingsProto settings; 106 enterprise_management::ChromeDeviceSettingsProto settings;
107 if (device_settings_cache::Retrieve(&data, 107 if (device_settings_cache::Retrieve(&data,
108 g_browser_process->local_state())) { 108 g_browser_process->local_state())) {
(...skipping 17 matching lines...) Expand all
126 126
127 void ScopedCrosSettingsTestHelper::Initialize(bool create_settings_service) { 127 void ScopedCrosSettingsTestHelper::Initialize(bool create_settings_service) {
128 if (create_settings_service) { 128 if (create_settings_service) {
129 CHECK(!DeviceSettingsService::IsInitialized()); 129 CHECK(!DeviceSettingsService::IsInitialized());
130 test_device_settings_service_.reset(new ScopedTestDeviceSettingsService()); 130 test_device_settings_service_.reset(new ScopedTestDeviceSettingsService());
131 test_cros_settings_.reset(new ScopedTestCrosSettings()); 131 test_cros_settings_.reset(new ScopedTestCrosSettings());
132 } 132 }
133 } 133 }
134 134
135 } // namespace chromeos 135 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698