summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/cros_settings_provider.cc
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-11-18 18:32:45 +0000
committerBen Murdoch <benm@google.com>2010-11-18 18:38:07 +0000
commit513209b27ff55e2841eac0e4120199c23acce758 (patch)
treeaeba30bb08c5f47c57003544e378a377c297eee6 /chrome/browser/chromeos/cros_settings_provider.cc
parent164f7496de0fbee436b385a79ead9e3cb81a50c1 (diff)
downloadexternal_chromium-513209b27ff55e2841eac0e4120199c23acce758.zip
external_chromium-513209b27ff55e2841eac0e4120199c23acce758.tar.gz
external_chromium-513209b27ff55e2841eac0e4120199c23acce758.tar.bz2
Merge Chromium at r65505: Initial merge by git.
Change-Id: I31d8f1d8cd33caaf7f47ffa7350aef42d5fbdb45
Diffstat (limited to 'chrome/browser/chromeos/cros_settings_provider.cc')
-rw-r--r--chrome/browser/chromeos/cros_settings_provider.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/chrome/browser/chromeos/cros_settings_provider.cc b/chrome/browser/chromeos/cros_settings_provider.cc
new file mode 100644
index 0000000..1bdd78b
--- /dev/null
+++ b/chrome/browser/chromeos/cros_settings_provider.cc
@@ -0,0 +1,23 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/chromeos/cros_settings_provider.h"
+
+#include "base/command_line.h"
+#include "base/logging.h"
+#include "chrome/common/chrome_switches.h"
+
+namespace chromeos {
+
+void CrosSettingsProvider::Set(const std::string& path, Value* value) {
+ // We don't allow changing any of the cros settings in the guest mode.
+ // It should not reach here from UI in the guest mode, but just in case.
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession)) {
+ LOG(ERROR) << "Ignoring the guest request to change: " << path;
+ return;
+ }
+ DoSet(path, value);
+}
+
+}; // namespace chromeos