| 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_BACKGROUND_SAVE_PAGE_REQUEST_H_ | 5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_SAVE_PAGE_REQUEST_H_ |
| 6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_SAVE_PAGE_REQUEST_H_ | 6 #define COMPONENTS_OFFLINE_PAGES_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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 const GURL& url() const { return url_; } | 53 const GURL& url() const { return url_; } |
| 54 | 54 |
| 55 const ClientId& client_id() const { return client_id_; } | 55 const ClientId& client_id() const { return client_id_; } |
| 56 | 56 |
| 57 const base::Time& creation_time() const { return creation_time_; } | 57 const base::Time& creation_time() const { return creation_time_; } |
| 58 | 58 |
| 59 const base::Time& activation_time() const { return activation_time_; } | 59 const base::Time& activation_time() const { return activation_time_; } |
| 60 | 60 |
| 61 int64_t attempt_count() const { return attempt_count_; } | 61 int64_t attempt_count() const { return attempt_count_; } |
| 62 void set_attempt_count(int64_t attempt_count) { |
| 63 attempt_count_ = attempt_count; |
| 64 } |
| 62 | 65 |
| 63 const base::Time& last_attempt_time() const { return last_attempt_time_; } | 66 const base::Time& last_attempt_time() const { return last_attempt_time_; } |
| 67 void set_last_attempt_time(const base::Time& last_attempt_time) { |
| 68 last_attempt_time_ = last_attempt_time; |
| 69 } |
| 64 | 70 |
| 65 private: | 71 private: |
| 66 // ID of this request. | 72 // ID of this request. |
| 67 int64_t request_id_; | 73 int64_t request_id_; |
| 68 | 74 |
| 69 // Online URL of a page to be offlined. | 75 // Online URL of a page to be offlined. |
| 70 GURL url_; | 76 GURL url_; |
| 71 | 77 |
| 72 // Client ID related to the request. Contains namespace and ID assigned by the | 78 // Client ID related to the request. Contains namespace and ID assigned by the |
| 73 // requester. | 79 // requester. |
| 74 ClientId client_id_; | 80 ClientId client_id_; |
| 75 | 81 |
| 76 // Time when this request was created. (Alternative 2). | 82 // Time when this request was created. (Alternative 2). |
| 77 base::Time creation_time_; | 83 base::Time creation_time_; |
| 78 | 84 |
| 79 // Time when this request will become active. | 85 // Time when this request will become active. |
| 80 base::Time activation_time_; | 86 base::Time activation_time_; |
| 81 | 87 |
| 82 // Number of attempts made to get the page. | 88 // Number of attempts made to get the page. |
| 83 int attempt_count_; | 89 int attempt_count_; |
| 84 | 90 |
| 85 // Timestamp of the last request starting. | 91 // Timestamp of the last request starting. |
| 86 base::Time last_attempt_time_; | 92 base::Time last_attempt_time_; |
| 87 }; | 93 }; |
| 88 | 94 |
| 89 } // namespace offline_pages | 95 } // namespace offline_pages |
| 90 | 96 |
| 91 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_SAVE_PAGE_REQUEST_H_ | 97 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_SAVE_PAGE_REQUEST_H_ |
| OLD | NEW |