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

Side by Side Diff: chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h

Issue 300843013: Install and launch kiosk app from cached crx file at start up. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_APP_MODE_KIOSK_APP_LAUNCH_ERROR_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_LAUNCH_ERROR_H_
6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_LAUNCH_ERROR_H_ 6 #define CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_LAUNCH_ERROR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 11
12 namespace chromeos { 12 namespace chromeos {
13 13
14 class KioskAppLaunchError { 14 class KioskAppLaunchError {
15 public: 15 public:
16 enum Error { 16 enum Error {
17 NONE, // No error. 17 NONE, // No error.
18 HAS_PENDING_LAUNCH, // There is a pending launch already. 18 HAS_PENDING_LAUNCH, // There is a pending launch already.
19 CRYPTOHOMED_NOT_RUNNING, // Unable to call cryptohome daemon. 19 CRYPTOHOMED_NOT_RUNNING, // Unable to call cryptohome daemon.
20 ALREADY_MOUNTED, // Cryptohome is already mounted. 20 ALREADY_MOUNTED, // Cryptohome is already mounted.
21 UNABLE_TO_MOUNT, // Unable to mount cryptohome. 21 UNABLE_TO_MOUNT, // Unable to mount cryptohome.
22 UNABLE_TO_REMOVE, // Unable to remove cryptohome. 22 UNABLE_TO_REMOVE, // Unable to remove cryptohome.
23 UNABLE_TO_INSTALL, // Unable to install app. 23 UNABLE_TO_INSTALL, // Unable to install app.
24 UNABLE_TO_DOWNLOAD, // Unalbe to download app's crx file.
25 UNABLE_TO_LAUNCH, // Unable to launch app.
xiyuan 2014/05/29 19:49:01 Append to the end so that existing enums still hav
jennyz 2014/07/07 21:11:12 Done.
24 USER_CANCEL, // Canceled by user. 26 USER_CANCEL, // Canceled by user.
25 NOT_KIOSK_ENABLED, // Not a kiosk enabled app. 27 NOT_KIOSK_ENABLED, // Not a kiosk enabled app.
26 UNABLE_TO_RETRIEVE_HASH, // Unable to retrieve username hash. 28 UNABLE_TO_RETRIEVE_HASH, // Unable to retrieve username hash.
27 POLICY_LOAD_FAILED, // Failed to load policy for kiosk account. 29 POLICY_LOAD_FAILED, // Failed to load policy for kiosk account.
28 }; 30 };
29 31
30 // Returns a message for given |error|. 32 // Returns a message for given |error|.
31 static std::string GetErrorMessage(Error error); 33 static std::string GetErrorMessage(Error error);
32 34
33 // Save error for displaying on next restart. Note only the last saved error 35 // Save error for displaying on next restart. Note only the last saved error
34 // will be kept. 36 // will be kept.
35 static void Save(Error error); 37 static void Save(Error error);
36 38
37 // Gets the saved error. 39 // Gets the saved error.
38 static Error Get(); 40 static Error Get();
39 41
40 // Clears the saved error. 42 // Clears the saved error.
41 static void Clear(); 43 static void Clear();
42 44
43 private: 45 private:
44 DISALLOW_IMPLICIT_CONSTRUCTORS(KioskAppLaunchError); 46 DISALLOW_IMPLICIT_CONSTRUCTORS(KioskAppLaunchError);
45 }; 47 };
46 48
47 } // namespace chromeos 49 } // namespace chromeos
48 50
49 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_LAUNCH_ERROR_H_ 51 #endif // CHROME_BROWSER_CHROMEOS_APP_MODE_KIOSK_APP_LAUNCH_ERROR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698