OLD | NEW |
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/chromeos/settings/cros_settings.h" | 5 #include "chrome/browser/chromeos/settings/cros_settings.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 CrosSettingsProvider::TrustedStatus status = | 114 CrosSettingsProvider::TrustedStatus status = |
115 providers_[i]->PrepareTrustedValues(callback); | 115 providers_[i]->PrepareTrustedValues(callback); |
116 if (status != CrosSettingsProvider::TRUSTED) | 116 if (status != CrosSettingsProvider::TRUSTED) |
117 return status; | 117 return status; |
118 } | 118 } |
119 return CrosSettingsProvider::TRUSTED; | 119 return CrosSettingsProvider::TRUSTED; |
120 } | 120 } |
121 | 121 |
122 void CrosSettings::SetBoolean(const std::string& path, bool in_value) { | 122 void CrosSettings::SetBoolean(const std::string& path, bool in_value) { |
123 DCHECK(CalledOnValidThread()); | 123 DCHECK(CalledOnValidThread()); |
124 base::FundamentalValue value(in_value); | 124 base::Value value(in_value); |
125 Set(path, value); | 125 Set(path, value); |
126 } | 126 } |
127 | 127 |
128 void CrosSettings::SetInteger(const std::string& path, int in_value) { | 128 void CrosSettings::SetInteger(const std::string& path, int in_value) { |
129 DCHECK(CalledOnValidThread()); | 129 DCHECK(CalledOnValidThread()); |
130 base::FundamentalValue value(in_value); | 130 base::Value value(in_value); |
131 Set(path, value); | 131 Set(path, value); |
132 } | 132 } |
133 | 133 |
134 void CrosSettings::SetDouble(const std::string& path, double in_value) { | 134 void CrosSettings::SetDouble(const std::string& path, double in_value) { |
135 DCHECK(CalledOnValidThread()); | 135 DCHECK(CalledOnValidThread()); |
136 base::FundamentalValue value(in_value); | 136 base::Value value(in_value); |
137 Set(path, value); | 137 Set(path, value); |
138 } | 138 } |
139 | 139 |
140 void CrosSettings::SetString(const std::string& path, | 140 void CrosSettings::SetString(const std::string& path, |
141 const std::string& in_value) { | 141 const std::string& in_value) { |
142 DCHECK(CalledOnValidThread()); | 142 DCHECK(CalledOnValidThread()); |
143 base::StringValue value(in_value); | 143 base::StringValue value(in_value); |
144 Set(path, value); | 144 Set(path, value); |
145 } | 145 } |
146 | 146 |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 | 348 |
349 ScopedTestCrosSettings::ScopedTestCrosSettings() { | 349 ScopedTestCrosSettings::ScopedTestCrosSettings() { |
350 CrosSettings::Initialize(); | 350 CrosSettings::Initialize(); |
351 } | 351 } |
352 | 352 |
353 ScopedTestCrosSettings::~ScopedTestCrosSettings() { | 353 ScopedTestCrosSettings::~ScopedTestCrosSettings() { |
354 CrosSettings::Shutdown(); | 354 CrosSettings::Shutdown(); |
355 } | 355 } |
356 | 356 |
357 } // namespace chromeos | 357 } // namespace chromeos |
OLD | NEW |