OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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_BACKGROUND_SAVE_PAGE_REQUEST_H_ | 5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_SAVE_PAGE_REQUEST_H_ |
6 #define COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_SAVE_PAGE_REQUEST_H_ | 6 #define COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_SAVE_PAGE_REQUEST_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 void set_last_attempt_time(const base::Time& last_attempt_time) { | 80 void set_last_attempt_time(const base::Time& last_attempt_time) { |
81 last_attempt_time_ = last_attempt_time; | 81 last_attempt_time_ = last_attempt_time; |
82 } | 82 } |
83 | 83 |
84 bool user_requested() const { return user_requested_; } | 84 bool user_requested() const { return user_requested_; } |
85 | 85 |
86 void set_user_requested(bool user_requested) { | 86 void set_user_requested(bool user_requested) { |
87 user_requested_ = user_requested; | 87 user_requested_ = user_requested; |
88 } | 88 } |
89 | 89 |
| 90 const GURL& original_url() const { return original_url_; } |
| 91 void set_original_url(const GURL& original_url) { |
| 92 original_url_ = original_url; |
| 93 } |
| 94 |
90 private: | 95 private: |
91 // ID of this request. | 96 // ID of this request. |
92 int64_t request_id_; | 97 int64_t request_id_; |
93 | 98 |
94 // Online URL of a page to be offlined. | 99 // Online URL of a page to be offlined. |
95 GURL url_; | 100 GURL url_; |
96 | 101 |
97 // Client ID related to the request. Contains namespace and ID assigned by the | 102 // Client ID related to the request. Contains namespace and ID assigned by the |
98 // requester. | 103 // requester. |
99 ClientId client_id_; | 104 ClientId client_id_; |
(...skipping 13 matching lines...) Expand all Loading... |
113 | 118 |
114 // Timestamp of the last request starting. | 119 // Timestamp of the last request starting. |
115 base::Time last_attempt_time_; | 120 base::Time last_attempt_time_; |
116 | 121 |
117 // Whether the user specifically requested this page (as opposed to a client | 122 // Whether the user specifically requested this page (as opposed to a client |
118 // like AGSA or Now.) | 123 // like AGSA or Now.) |
119 bool user_requested_; | 124 bool user_requested_; |
120 | 125 |
121 // The current state of this request | 126 // The current state of this request |
122 RequestState state_; | 127 RequestState state_; |
| 128 |
| 129 // The original URL of the page to be offlined. Empty if no redirect occurs. |
| 130 GURL original_url_; |
123 }; | 131 }; |
124 | 132 |
125 } // namespace offline_pages | 133 } // namespace offline_pages |
126 | 134 |
127 #endif // COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_SAVE_PAGE_REQUEST_H_ | 135 #endif // COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_SAVE_PAGE_REQUEST_H_ |
OLD | NEW |