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

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

Issue 2872933003: Add base persistence interfaces for Prefetching Offline Pages. (Closed)
Patch Set: Addressed comments and other changes; added constants file. 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
Index: components/offline_pages/core/prefetch/prefetch_constants.h
diff --git a/components/offline_pages/core/prefetch/prefetch_constants.h b/components/offline_pages/core/prefetch/prefetch_constants.h
new file mode 100644
index 0000000000000000000000000000000000000000..0f3b9375eef74399cbecc62aa8a795023fbe59bb
--- /dev/null
+++ b/components/offline_pages/core/prefetch/prefetch_constants.h
@@ -0,0 +1,51 @@
+// Copyright 2017 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 COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_CONSTANTS_H_
+#define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_CONSTANTS_H_
+
+namespace offline_pages {
+
+// 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 {
fgorski 2017/05/10 05:02:53 I don't thing my original problem was addressed. H
carlosk 2017/05/10 22:48:53 Done. I didn't understand your initial concern. P
+ // New request just received from the client.
+ NEW_REQ,
+ // The item has been included in a GeneratePageBundle RPC requesting the
+ // creation of an archive for its URL.
+ SENT_GPB,
+ // The archive was not immediately available (cached) upon the request and
+ // is now waiting for a GCM message notifying of its archiving operation
+ // completion.
+ WAIT_GCM,
+ // The GCM message notifying of the archiving operation completion was
+ // received for this item.
+ GOT_GCM,
+ // A GetOperation RPC was sent for this item to query for the final results
+ // of its archiving request.
+ SENT_GET_OP,
+ // Information was received about a successfully created archive for this
+ // item that can now be downloaded.
+ RECV_BUNDLE,
+ // This item's archive is currently being downloaded.
+ DL,
+ // Item has finished processing, successfully or otherwise and is waiting to
fgorski 2017/05/10 05:02:53 nit: put a , after otherwise
carlosk 2017/05/10 22:48:53 Done.
+ // be processed for stats reporting to UMA.
+ FIN,
+ // 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 {
+ NO_ERROR,
+};
+
+} // namespace offline_pages
+
+#endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_ITEM_H_

Powered by Google App Engine
This is Rietveld 408576698