summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/cros_settings_provider.cc
blob: 1bdd78b936a78759a18b929864b7e3dc12685dfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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