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

Unified Diff: components/offline_pages/background/save_page_request.h

Issue 2113383002: More detailed implementation of the RequestPicker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix merge Created 4 years, 5 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/background/save_page_request.h
diff --git a/components/offline_pages/background/save_page_request.h b/components/offline_pages/background/save_page_request.h
index afc6bd7ee3969cba0d5178603655c234a9e68408..8c09562fa791eaaef8b1cf41d4e2fb49b40f7655 100644
--- a/components/offline_pages/background/save_page_request.h
+++ b/components/offline_pages/background/save_page_request.h
@@ -30,12 +30,14 @@ class SavePageRequest {
SavePageRequest(int64_t request_id,
const GURL& url,
const ClientId& client_id,
- const base::Time& creation_time);
+ const base::Time& creation_time,
+ const bool user_requested);
SavePageRequest(int64_t request_id,
const GURL& url,
const ClientId& client_id,
const base::Time& creation_time,
- const base::Time& activation_time);
+ const base::Time& activation_time,
+ const bool user_requested);
SavePageRequest(const SavePageRequest& other);
~SavePageRequest();
@@ -68,6 +70,12 @@ class SavePageRequest {
last_attempt_time_ = last_attempt_time;
}
+ bool user_requested() const { return user_requested_; }
+
+ void set_user_requested(bool user_requested) {
+ user_requested_ = user_requested;
+ }
+
private:
// ID of this request.
int64_t request_id_;
@@ -90,6 +98,10 @@ class SavePageRequest {
// Timestamp of the last request starting.
base::Time last_attempt_time_;
+
+ // Whether the user specifically requested this page (as opposed to a client
+ // like AGSA or Now.)
+ bool user_requested_;
};
} // namespace offline_pages

Powered by Google App Engine
This is Rietveld 408576698