Index: chrome/browser/chromeos/policy/device_local_account.h |
diff --git a/chrome/browser/chromeos/policy/device_local_account.h b/chrome/browser/chromeos/policy/device_local_account.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a8451eeae125890ad1234204340a4334b58c7b95 |
--- /dev/null |
+++ b/chrome/browser/chromeos/policy/device_local_account.h |
@@ -0,0 +1,49 @@ |
+// Copyright (c) 2013 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. |
+ |
+#ifndef CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_H_ |
+#define CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_H_ |
+ |
+#include <string> |
+#include <vector> |
+ |
+namespace base { |
+class ListValue; |
+} |
+ |
+namespace policy { |
+ |
+// This must match DeviceLocalAccountInfoProto.AccountType in |
+// chrome_device_policy.proto. |
+struct DeviceLocalAccount { |
+ enum Type { |
+ // A login-less, policy-configured browsing session. |
+ TYPE_PUBLIC_SESSION, |
+ // An account that serves as a container for a single full-screen app. |
+ TYPE_KIOSK_APP, |
+ // Sentinel, must be last. |
+ TYPE_COUNT |
+ }; |
+ |
+ DeviceLocalAccount(Type type, |
+ const std::string& account_id, |
+ const std::string& kiosk_app_id, |
+ const std::string& kiosk_app_update_url); |
+ |
+ Type type; |
+ std::string account_id; |
+ std::string user_id; |
+ std::string kiosk_app_id; |
+ std::string kiosk_app_update_url; |
+}; |
+ |
+std::string GenerateDeviceLocalAccountUserId(const std::string& account_id, |
+ DeviceLocalAccount::Type type); |
+ |
+std::vector<DeviceLocalAccount> DecodeDeviceLocalAccountsList( |
+ const base::ListValue* list); |
+ |
+} // namespace policy |
+ |
+#endif // CHROME_BROWSER_CHROMEOS_POLICY_DEVICE_LOCAL_ACCOUNT_H_ |