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

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: Simplify picker logic for multiple criteria 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..afb2c200f1fb7a16e808ed418f1260814c7e2ffe 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 was_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 was_user_requested);
fgorski 2016/07/20 16:23:31 nit: user_requested
Pete Williamson 2016/07/20 19:50:44 Done.
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_;
fgorski 2016/07/20 16:23:31 I like this name :)
Pete Williamson 2016/07/20 19:50:44 Acknowledged.
};
} // namespace offline_pages

Powered by Google App Engine
This is Rietveld 408576698