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

Side by Side Diff: components/offline_pages/core/prefetch/prefetch_types.h

Issue 2920083002: Prefetching: Introduce store commands abstractions to be used by tasks. (Closed)
Patch Set: Minor changes Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_TYPES_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_TYPES_H_
6 #define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_TYPES_H_ 6 #define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_TYPES_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 enum class PrefetchItemErrorCode { 101 enum class PrefetchItemErrorCode {
102 SUCCESS, 102 SUCCESS,
103 EXPIRED, 103 EXPIRED,
104 }; 104 };
105 105
106 // Callback invoked upon completion of a prefetch request. 106 // Callback invoked upon completion of a prefetch request.
107 using PrefetchRequestFinishedCallback = 107 using PrefetchRequestFinishedCallback =
108 base::Callback<void(PrefetchRequestStatus status, 108 base::Callback<void(PrefetchRequestStatus status,
109 const std::vector<RenderPageInfo>& pages)>; 109 const std::vector<RenderPageInfo>& pages)>;
110 110
111 // Holds information about a new URL to be prefetched. 111 // Holds information about a suggested URL to be prefetched.
112 struct PrefetchURL { 112 struct PrefetchURL {
113 PrefetchURL(const ClientId& client_id, const GURL& url) 113 PrefetchURL(const std::string& id, const GURL& url) : id(id), url(url) {}
114 : client_id(client_id), url(url) {}
115 114
116 // Client provided ID to allow the matching of URLs to the respective work 115 // Client provided ID to allow the matching of provided URLs to the respective
117 // item in the prefetching system. It can be anything useful to identify the 116 // work item in the prefetching system within that client's assigned
118 // page . It will not be used internally for de-duplication. 117 // namespace. It can be any string value and it will not be used internally
119 ClientId client_id; 118 // for de-duplication.
119 std::string id;
120 120
121 // This URL will be prefetched by the service. 121 // This URL will be prefetched by the service.
122 GURL url; 122 GURL url;
123 }; 123 };
124 124
125 } // namespace offline_pages 125 } // namespace offline_pages
126 126
127 #endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_TYPES_H_ 127 #endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_TYPES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698