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

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

Issue 2879013002: Create skeleton for the Prefetching store and initial pipeline step. (Closed)
Patch Set: Dispatcher instance is now injected into Service. Minor changes. 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_types.h
diff --git a/components/offline_pages/core/prefetch/prefetch_types.h b/components/offline_pages/core/prefetch/prefetch_types.h
index f36526dcc7f3463bc56ad40c21c23eabe7755251..596c9a71d6ff60a9a391562ebfb498c896d55356 100644
--- a/components/offline_pages/core/prefetch/prefetch_types.h
+++ b/components/offline_pages/core/prefetch/prefetch_types.h
@@ -5,9 +5,11 @@
#ifndef COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_TYPES_H_
#define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_TYPES_H_
+#include <string>
#include <vector>
-#include "base/macros.h"
+
#include "base/time/time.h"
+#include "url/gurl.h"
namespace offline_pages {
@@ -105,6 +107,20 @@ using PrefetchRequestFinishedCallback =
base::Callback<void(PrefetchRequestStatus status,
const std::vector<RenderPageInfo>& pages)>;
+// Holds information about a new URL to be prefetched.
+struct PrefetchURL {
+ PrefetchURL(const std::string& client_id, const GURL& url)
+ : client_id(client_id), url(url) {}
+
+ // Client provided ID to allow the matching of URLs to the respective work
+ // item in the prefetching system. It can be anything useful to identify the
+ // page . It will not be used internally for de-duplication.
+ std::string client_id;
fgorski 2017/05/30 17:21:45 You are overloading the term Client ID. Is that in
carlosk 2017/06/01 01:49:59 It would have the same objective as the existing C
+
+ // This URL will be prefetched by the service.
+ GURL url;
+};
+
} // namespace offline_pages
#endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_TYPES_H_

Powered by Google App Engine
This is Rietveld 408576698