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

Unified Diff: components/offline_pages/offline_store_types.h

Issue 2384423003: [Offline pages] Resetting offline page metadata store if initial load fails (Closed)
Patch Set: Rebased and comments addressed Created 4 years, 2 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
Index: components/offline_pages/offline_store_types.h
diff --git a/components/offline_pages/offline_store_types.h b/components/offline_pages/offline_store_types.h
index 9002c9d243f8f0406de8bbc3c054f4c802064d85..457b6bd648d4186f69dc8a2dbbcfb34b95ca4989 100644
--- a/components/offline_pages/offline_store_types.h
+++ b/components/offline_pages/offline_store_types.h
@@ -15,14 +15,20 @@
// offline page related components.
namespace offline_pages {
-// TODO(fgorski): This enum is meant to replace |LoadStatus|.
// Current store state. When LOADED, the store is operational. When
// loading or reset fails, it is reflected appropriately.
+// This enum is used in an UMA histogram. Hence the entries here shouldn't
+// be deleted or re-ordered and new ones should be added to the end.
enum class StoreState {
- NOT_LOADED, // Store is not loaded yet.
- LOADED, // Store is properly loaded and operational.
- FAILED_LOADING, // Store initialization failed.
- FAILED_RESET, // Resetting the store failed.
+ NOT_LOADED = 0, // Store is not loaded yet.
+ LOADED = 1, // Store is properly loaded and operational.
+ FAILED_LOADING = 2, // Store initialization failed.
+ FAILED_RESET = 3, // Resetting the store failed.
+ FAILED_OPERATION = 4, // Store is still loaded, but individual operation
+ // experienced problems. (We want to get UMA if that
+ // ever happens.
+ // NOTE: always keep this entry at the end.
+ STORE_STATE_COUNT, // Number of values for UMA reporting.
};
// Statuses referring to actions taken on items in the stores.

Powered by Google App Engine
This is Rietveld 408576698