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

Unified Diff: components/offline_pages/core/prefetch/prefetch_types.h

Issue 2872933003: Add base persistence interfaces for Prefetching Offline Pages. (Closed)
Patch Set: Rename NO_ERROR to SUCCESS because of Windows. Created 3 years, 7 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 | « components/offline_pages/core/prefetch/prefetch_item_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/offline_pages/core/prefetch/prefetch_types.h
diff --git a/components/offline_pages/core/prefetch/prefetch_types.h b/components/offline_pages/core/prefetch/prefetch_types.h
index 98dc9126b1fae0fc1bea3b656f280da7646333d2..c15b6a0e014dfa0d9e6dc45b2514ed8180e8e8c7 100644
--- a/components/offline_pages/core/prefetch/prefetch_types.h
+++ b/components/offline_pages/core/prefetch/prefetch_types.h
@@ -59,6 +59,46 @@ struct RenderPageInfo {
base::Time render_time;
};
+// List of states a prefetch item can be at during its progress through the
+// prefetching process. They follow somewhat the order below, but some states
+// might be skipped.
+enum class PrefetchItemState {
+ // New request just received from the client.
+ NEW_REQUEST,
+ // The item has been included in a GeneratePageBundle RPC requesting the
+ // creation of an archive for its URL.
+ SENT_GENERATE_PAGE_BUNDLE,
+ // The archive was not immediately available (cached) upon the request and
+ // is now waiting for a GCM message notifying of its archiving operation
+ // completion.
+ AWAITING_GCM,
+ // The GCM message notifying of the archiving operation completion was
+ // received for this item.
+ RECEIVED_GCM,
+ // A GetOperation RPC was sent for this item to query for the final results
+ // of its archiving request.
+ SENT_GET_OPERATION,
+ // Information was received about a successfully created archive for this
+ // item that can now be downloaded.
+ RECEIVED_BUNDLE,
+ // This item's archive is currently being downloaded.
+ DOWNLOADING,
+ // Item has finished processing, successfully or otherwise, and is waiting to
+ // be processed for stats reporting to UMA.
+ FINISHED,
+ // UMA stats have been reported and the item is being kept just long enough
+ // to confirm that the same URL is not being repeatedly requested by its
+ // client.
+ ZOMBIE,
+};
+
+// Error codes used to identify the reason why a prefetch item has finished
+// processing.
+enum class PrefetchItemErrorCode {
+ SUCCESS,
+ EXPIRED,
+};
+
} // namespace offline_pages
#endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_TYPES_H_
« no previous file with comments | « components/offline_pages/core/prefetch/prefetch_item_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698