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

Unified Diff: chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h

Issue 2699833005: kiosk: UMA for launch error (Closed)
Patch Set: update comment Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/app_mode/kiosk_app_launch_error.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h
diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h b/chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h
index 1f5f2efd0ed8ee994e5cb9e8c1e05319094eb48a..61579cb604cb09579622a56b625bd6844d6f5f79 100644
--- a/chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h
+++ b/chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h
@@ -11,37 +11,46 @@
namespace chromeos {
+class AuthFailure;
+
class KioskAppLaunchError {
public:
+ // Enum used for UMA. Do NOT reorder or remove entry. Don't forget to
+ // update histograms.xml when adding new entries.
enum Error {
- NONE, // No error.
- HAS_PENDING_LAUNCH, // There is a pending launch already.
- CRYPTOHOMED_NOT_RUNNING, // Unable to call cryptohome daemon.
- ALREADY_MOUNTED, // Cryptohome is already mounted.
- UNABLE_TO_MOUNT, // Unable to mount cryptohome.
- UNABLE_TO_REMOVE, // Unable to remove cryptohome.
- UNABLE_TO_INSTALL, // Unable to install app.
- USER_CANCEL, // Canceled by user.
- NOT_KIOSK_ENABLED, // Not a kiosk enabled app.
- UNABLE_TO_RETRIEVE_HASH, // Unable to retrieve username hash.
- POLICY_LOAD_FAILED, // Failed to load policy for kiosk account.
- UNABLE_TO_DOWNLOAD, // Unable to download app's crx file.
- UNABLE_TO_LAUNCH, // Unable to launch app.
- ARC_AUTH_FAILED, // Failed to authorise ARC session
+ NONE = 0, // No error.
+ HAS_PENDING_LAUNCH = 1, // There is a pending launch already.
+ CRYPTOHOMED_NOT_RUNNING = 2, // Unable to call cryptohome daemon.
+ ALREADY_MOUNTED = 3, // Cryptohome is already mounted.
+ UNABLE_TO_MOUNT = 4, // Unable to mount cryptohome.
+ UNABLE_TO_REMOVE = 5, // Unable to remove cryptohome.
+ UNABLE_TO_INSTALL = 6, // Unable to install app.
+ USER_CANCEL = 7, // Canceled by user.
+ NOT_KIOSK_ENABLED = 8, // Not a kiosk enabled app.
+ UNABLE_TO_RETRIEVE_HASH = 9, // Unable to retrieve username hash.
+ POLICY_LOAD_FAILED = 10, // Failed to load policy for kiosk account.
+ UNABLE_TO_DOWNLOAD = 11, // Unable to download app's crx file.
+ UNABLE_TO_LAUNCH = 12, // Unable to launch app.
+ ARC_AUTH_FAILED = 13, // Failed to authorise ARC session
+ ERROR_COUNT, // Count of all errors.
};
// Returns a message for given |error|.
static std::string GetErrorMessage(Error error);
- // Save error for displaying on next restart. Note only the last saved error
- // will be kept.
+ // Saves a launch error. The error is used on the next Chrome run to report
+ // metrics and display a message to the user.
static void Save(Error error);
+ // Saves a cryptohome auth error. The error is used for metrics report on the
+ // next Chrome run.
+ static void SaveCryptohomeFailure(const AuthFailure& auth_failure);
+
// Gets the saved error.
static Error Get();
- // Clears the saved error.
- static void Clear();
+ // Records the launch error and cryptohome auth error metric and clears them.
+ static void RecordMetricAndClear();
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(KioskAppLaunchError);
« no previous file with comments | « no previous file | chrome/browser/chromeos/app_mode/kiosk_app_launch_error.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698