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

Side by Side Diff: chrome/browser/chromeos/settings/device_settings_provider.h

Issue 11975009: Prevent a DCHECK when starting a chromeos=1 build with --stub-cros-settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: IsDeviceSettings() Created 7 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/settings/device_settings_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_PROVIDER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_PROVIDER_H_
6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_PROVIDER_H_ 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_PROVIDER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 19 matching lines...) Expand all
30 namespace chromeos { 30 namespace chromeos {
31 31
32 // CrosSettingsProvider implementation that works with device settings. 32 // CrosSettingsProvider implementation that works with device settings.
33 class DeviceSettingsProvider : public CrosSettingsProvider, 33 class DeviceSettingsProvider : public CrosSettingsProvider,
34 public DeviceSettingsService::Observer { 34 public DeviceSettingsService::Observer {
35 public: 35 public:
36 DeviceSettingsProvider(const NotifyObserversCallback& notify_cb, 36 DeviceSettingsProvider(const NotifyObserversCallback& notify_cb,
37 DeviceSettingsService* device_settings_service); 37 DeviceSettingsService* device_settings_service);
38 virtual ~DeviceSettingsProvider(); 38 virtual ~DeviceSettingsProvider();
39 39
40 // Returns true if |path| is handled by this provider.
41 static bool IsDeviceSetting(const std::string& name);
42
40 // CrosSettingsProvider implementation. 43 // CrosSettingsProvider implementation.
41 virtual const base::Value* Get(const std::string& path) const OVERRIDE; 44 virtual const base::Value* Get(const std::string& path) const OVERRIDE;
42 virtual TrustedStatus PrepareTrustedValues( 45 virtual TrustedStatus PrepareTrustedValues(
43 const base::Closure& callback) OVERRIDE; 46 const base::Closure& callback) OVERRIDE;
44 virtual bool HandlesSetting(const std::string& path) const OVERRIDE; 47 virtual bool HandlesSetting(const std::string& path) const OVERRIDE;
45 48
46 private: 49 private:
47 // CrosSettingsProvider implementation: 50 // CrosSettingsProvider implementation:
48 virtual void DoSet(const std::string& path, 51 virtual void DoSet(const std::string& path,
49 const base::Value& value) OVERRIDE; 52 const base::Value& value) OVERRIDE;
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 InitializationTestUnowned); 160 InitializationTestUnowned);
158 FRIEND_TEST_ALL_PREFIXES(DeviceSettingsProviderTest, 161 FRIEND_TEST_ALL_PREFIXES(DeviceSettingsProviderTest,
159 PolicyFailedPermanentlyNotification); 162 PolicyFailedPermanentlyNotification);
160 FRIEND_TEST_ALL_PREFIXES(DeviceSettingsProviderTest, PolicyLoadNotification); 163 FRIEND_TEST_ALL_PREFIXES(DeviceSettingsProviderTest, PolicyLoadNotification);
161 DISALLOW_COPY_AND_ASSIGN(DeviceSettingsProvider); 164 DISALLOW_COPY_AND_ASSIGN(DeviceSettingsProvider);
162 }; 165 };
163 166
164 } // namespace chromeos 167 } // namespace chromeos
165 168
166 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_PROVIDER_H_ 169 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/settings/device_settings_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698