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

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

Issue 745613002: [cros] Cleanup: remove LoginUtils (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: get rid of FakeChromeUserManager usage in ExistingUserController* tests Created 5 years, 10 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
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_CROS_SETTINGS_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_CROS_SETTINGS_H_
6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_CROS_SETTINGS_H_ 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_CROS_SETTINGS_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 17 matching lines...) Expand all
28 28
29 // This class manages per-device/global settings. 29 // This class manages per-device/global settings.
30 class CrosSettings : public base::NonThreadSafe { 30 class CrosSettings : public base::NonThreadSafe {
31 public: 31 public:
32 // Manage singleton instance. 32 // Manage singleton instance.
33 static void Initialize(); 33 static void Initialize();
34 static bool IsInitialized(); 34 static bool IsInitialized();
35 static void Shutdown(); 35 static void Shutdown();
36 static CrosSettings* Get(); 36 static CrosSettings* Get();
37 37
38 // Checks if the given username is whitelisted and allowed to sign-in to
39 // this device. |wildcard_match| may be NULL. If it's present, it'll be set to
40 // true if the whitelist check was satisfied via a wildcard.
41 static bool IsWhitelisted(const std::string& username, bool* wildcard_match);
42
38 // Creates a device settings service instance. This is meant for unit tests, 43 // Creates a device settings service instance. This is meant for unit tests,
39 // production code uses the singleton returned by Get() above. 44 // production code uses the singleton returned by Get() above.
40 explicit CrosSettings(DeviceSettingsService* device_settings_service); 45 explicit CrosSettings(DeviceSettingsService* device_settings_service);
41 virtual ~CrosSettings(); 46 virtual ~CrosSettings();
42 47
43 // Helper function to test if the given |path| is a valid cros setting. 48 // Helper function to test if the given |path| is a valid cros setting.
44 static bool IsCrosSettings(const std::string& path); 49 static bool IsCrosSettings(const std::string& path);
45 50
46 // Sets |in_value| to given |path| in cros settings. 51 // Sets |in_value| to given |path| in cros settings.
47 void Set(const std::string& path, const base::Value& in_value); 52 void Set(const std::string& path, const base::Value& in_value);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 ScopedTestCrosSettings(); 143 ScopedTestCrosSettings();
139 ~ScopedTestCrosSettings(); 144 ~ScopedTestCrosSettings();
140 145
141 private: 146 private:
142 DISALLOW_COPY_AND_ASSIGN(ScopedTestCrosSettings); 147 DISALLOW_COPY_AND_ASSIGN(ScopedTestCrosSettings);
143 }; 148 };
144 149
145 } // namespace chromeos 150 } // namespace chromeos
146 151
147 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_CROS_SETTINGS_H_ 152 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_CROS_SETTINGS_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/profiles/profile_helper.h ('k') | chrome/browser/chromeos/settings/cros_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698