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

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

Issue 9289017: Apply individual policies for the various parts of device status reports. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Julian's comments. Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 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"
(...skipping 16 matching lines...) Expand all
27 // It should not reach here from UI in the guest mode, but just in case. 27 // It should not reach here from UI in the guest mode, but just in case.
28 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession) && 28 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession) &&
29 !::StartsWithASCII(path, "cros.session.", true)) { 29 !::StartsWithASCII(path, "cros.session.", true)) {
30 LOG(ERROR) << "Ignoring the guest request to change: " << path; 30 LOG(ERROR) << "Ignoring the guest request to change: " << path;
31 return; 31 return;
32 } 32 }
33 DoSet(path, value); 33 DoSet(path, value);
34 } 34 }
35 35
36 void CrosSettingsProvider::NotifyObservers(const std::string& path) { 36 void CrosSettingsProvider::NotifyObservers(const std::string& path) {
37 notify_cb_.Run(path); 37 if (!notify_cb_.is_null())
38 notify_cb_.Run(path);
39 }
40
41 void CrosSettingsProvider::SetNotifyObserversCallback(
42 const NotifyObserversCallback& notify_cb) {
43 notify_cb_ = notify_cb;
38 } 44 }
39 45
40 }; // namespace chromeos 46 }; // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/cros_settings_provider.h ('k') | chrome/browser/chromeos/device_settings_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698