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

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 time check and MeetsConditions check 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..cd4ca3e10c8dea6ddf3dbcc4cb48f0d88d05697f 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_reqeusted);
dougarnett 2016/07/18 21:45:45 spelling
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_reqeusted);
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_reqeusted(bool user_requested) {
dougarnett 2016/07/18 21:45:45 spelling
Pete Williamson 2016/07/18 22:52:09 Done.
+ 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