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

Side by Side Diff: chrome/browser/chromeos/policy/device_local_account.h

Issue 1019283004: Switch to direct use of OwnerSettingsServiceChromeOS::Set() in tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits. Created 5 years, 8 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_POLICY_DEVICE_LOCAL_ACCOUNT_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_H_
6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_H_ 6 #define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 namespace chromeos { 11 namespace chromeos {
12 class CrosSettings; 12 class CrosSettings;
13 class OwnerSettingsServiceChromeOS;
13 } 14 }
14 15
15 namespace policy { 16 namespace policy {
16 17
17 // This must match DeviceLocalAccountInfoProto.AccountType in 18 // This must match DeviceLocalAccountInfoProto.AccountType in
18 // chrome_device_policy.proto. 19 // chrome_device_policy.proto.
19 struct DeviceLocalAccount { 20 struct DeviceLocalAccount {
20 enum Type { 21 enum Type {
21 // A login-less, policy-configured browsing session. 22 // A login-less, policy-configured browsing session.
22 TYPE_PUBLIC_SESSION, 23 TYPE_PUBLIC_SESSION,
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 }; 58 };
58 59
59 std::string GenerateDeviceLocalAccountUserId(const std::string& account_id, 60 std::string GenerateDeviceLocalAccountUserId(const std::string& account_id,
60 DeviceLocalAccount::Type type); 61 DeviceLocalAccount::Type type);
61 62
62 // Determines whether |user_id| belongs to a device-local account and if so, 63 // Determines whether |user_id| belongs to a device-local account and if so,
63 // returns the type of device-local account in |type| unless |type| is NULL. 64 // returns the type of device-local account in |type| unless |type| is NULL.
64 bool IsDeviceLocalAccountUser(const std::string& user_id, 65 bool IsDeviceLocalAccountUser(const std::string& user_id,
65 DeviceLocalAccount::Type* type); 66 DeviceLocalAccount::Type* type);
66 67
67 // Stores a list of device-local accounts in |cros_settings|. The accounts are 68 // Stores a list of device-local accounts in |cros_settings|. The accounts are
bartfab (slow) 2015/03/31 14:12:40 Nit: Update the comment.
68 // stored as a list of dictionaries with each dictionary containing the 69 // stored as a list of dictionaries with each dictionary containing the
69 // information about one |DeviceLocalAccount|. 70 // information about one |DeviceLocalAccount|.
70 void SetDeviceLocalAccounts( 71 void SetDeviceLocalAccounts(chromeos::OwnerSettingsServiceChromeOS* service,
71 chromeos::CrosSettings* cros_settings, 72 const std::vector<DeviceLocalAccount>& accounts);
72 const std::vector<DeviceLocalAccount>& accounts);
73 73
74 // Retrieves a list of device-local accounts from |cros_settings|. 74 // Retrieves a list of device-local accounts from |cros_settings|.
75 std::vector<DeviceLocalAccount> GetDeviceLocalAccounts( 75 std::vector<DeviceLocalAccount> GetDeviceLocalAccounts(
76 chromeos::CrosSettings* cros_settings); 76 chromeos::CrosSettings* cros_settings);
77 77
78 } // namespace policy 78 } // namespace policy
79 79
80 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_H_ 80 #endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698