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

Side by Side Diff: components/offline_pages/background/save_page_request.h

Issue 1932953002: [Offline pages] Empty RequestQueue and SavePageRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated with documentation and formatting Created 4 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_SAVE_PAGE_REQUEST_H_
6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_SAVE_PAGE_REQUEST_H_
7
8 #include <stdint.h>
9
10 #include "base/time/time.h"
11 #include "components/offline_pages/offline_page_item.h"
12 #include "url/gurl.h"
13
14 namespace offline_pages {
15
16 // Class representing a request to save page.
17 class SavePageRequest {
Pete Williamson 2016/04/28 23:16:07 Would this be better as a struct? All the element
fgorski 2016/04/29 05:19:16 Done.
18 public:
19 enum Status {
20 WAITING, // Component requested a page be saved, but not until a certain
21 // time in future.
dougarnett 2016/04/29 15:39:14 time => opportune time ? // yeah I know, anothe
fgorski 2016/04/30 18:56:14 updated appropriately.
22 ACTIVE, // Page request is active, and coordinator can attempt it when it
23 // gets a chance to.
Pete Williamson 2016/04/28 23:16:07 SHould we also have an IN-PROGRESS state for reque
fgorski 2016/04/29 05:19:16 Done.
24 FAILED, // Page request failed.
Pete Williamson 2016/04/28 23:16:07 I think we need this case. Eventually when zine h
fgorski 2016/04/29 05:19:16 Done.
25 EXPIRED, // Save page request expired without being fulfilled.
26 }
27
28 SavePageRequest();
29 ~SavePageRequest();
30
31 // ID of this request.
32 int64_t request_id;
Pete Williamson 2016/04/28 23:16:08 Just curious, where does this request_id come from
fgorski 2016/04/29 05:19:16 We can either assign it at the coordinator level o
33
34 // Status of this request.
35 Status status;
36
37 // Online URL of a page to be offlined.
38 GURL url;
39
40 // Client ID related to the request. Contains namespace and ID assigned by the
41 // requester.
42 ClientID client_id;
43
44 // Time when this request was created. (Alternative 2).
45 base::Time creation_time;
46
47 // Time when this request will become active.
48 base::Time request_activation_time;
49
50 // Number of attempts made to get the page.
51 int attempt_count;
52
53 // Timestamp of the last request starting.
54 base::Time last_attempt_time;
55 };
56
57 } // namespace offline_pages
58
59 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_SAVE_PAGE_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698