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

Unified Diff: chrome/browser/chromeos/cros_settings_provider.cc

Issue 10824112: Move Chrome OS device settings stuff to chrome/browser/chromeos/settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/cros_settings_provider.h ('k') | chrome/browser/chromeos/cros_settings_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/cros_settings_provider.cc
diff --git a/chrome/browser/chromeos/cros_settings_provider.cc b/chrome/browser/chromeos/cros_settings_provider.cc
deleted file mode 100644
index a0d9b98bfd1fed10bf14b8ee2d5125005adee972..0000000000000000000000000000000000000000
--- a/chrome/browser/chromeos/cros_settings_provider.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) 2012 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 "base/string_util.h"
-#include "base/values.h"
-#include "chrome/common/chrome_switches.h"
-
-namespace chromeos {
-
-CrosSettingsProvider::CrosSettingsProvider(
- const NotifyObserversCallback& notify_cb)
- : notify_cb_(notify_cb) {
-}
-
-CrosSettingsProvider::~CrosSettingsProvider() {
-}
-
-void CrosSettingsProvider::Set(const std::string& path,
- const base::Value& value) {
- // We don't allow changing any of the cros settings without prefix
- // "cros.session." 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) &&
- !::StartsWithASCII(path, "cros.session.", true)) {
- LOG(ERROR) << "Ignoring the guest request to change: " << path;
- return;
- }
- DoSet(path, value);
-}
-
-void CrosSettingsProvider::NotifyObservers(const std::string& path) {
- if (!notify_cb_.is_null())
- notify_cb_.Run(path);
-}
-
-void CrosSettingsProvider::SetNotifyObserversCallback(
- const NotifyObserversCallback& notify_cb) {
- notify_cb_ = notify_cb;
-}
-
-}; // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/cros_settings_provider.h ('k') | chrome/browser/chromeos/cros_settings_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698