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

Side by Side Diff: chrome/browser/chromeos/cros_settings_provider.cc

Issue 8091002: PART2: Make SignedSettings use proper Value types instead of string all around the place. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed the nits and rebased on ToT (which now has PART1 in). Created 9 years, 1 month 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/cros_settings_provider.h" 5 #include "chrome/browser/chromeos/cros_settings_provider.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chrome/common/chrome_switches.h" 11 #include "chrome/common/chrome_switches.h"
12 12
13 namespace chromeos { 13 namespace chromeos {
14 14
15 void CrosSettingsProvider::Set(const std::string& path, Value* value) { 15 void CrosSettingsProvider::Set(const std::string& path,
16 const base::Value& value) {
16 // We don't allow changing any of the cros settings without prefix 17 // We don't allow changing any of the cros settings without prefix
17 // "cros.session." in the guest mode. 18 // "cros.session." in the guest mode.
18 // It should not reach here from UI in the guest mode, but just in case. 19 // It should not reach here from UI in the guest mode, but just in case.
19 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession) && 20 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession) &&
20 !::StartsWithASCII(path, "cros.session.", true)) { 21 !::StartsWithASCII(path, "cros.session.", true)) {
21 LOG(ERROR) << "Ignoring the guest request to change: " << path; 22 LOG(ERROR) << "Ignoring the guest request to change: " << path;
22 return; 23 return;
23 } 24 }
24 DoSet(path, value); 25 DoSet(path, value);
25 } 26 }
26 27
27 }; // namespace chromeos 28 }; // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros_settings_provider.h ('k') | chrome/browser/chromeos/login/existing_user_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698