| 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 #include "components/offline_pages/background/save_page_request.h" | 5 #include "components/offline_pages/background/save_page_request.h" |
| 6 | 6 |
| 7 namespace offline_pages { | 7 namespace offline_pages { |
| 8 | 8 |
| 9 SavePageRequest::SavePageRequest(int64_t request_id, | 9 SavePageRequest::SavePageRequest(int64_t request_id, |
| 10 const GURL& url, | 10 const GURL& url, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 void SavePageRequest::MarkAttemptStarted(const base::Time& start_time) { | 63 void SavePageRequest::MarkAttemptStarted(const base::Time& start_time) { |
| 64 DCHECK_LE(activation_time_, start_time); | 64 DCHECK_LE(activation_time_, start_time); |
| 65 // TODO(fgorski): As part of introducing policy in GetStatus, we can make a | 65 // TODO(fgorski): As part of introducing policy in GetStatus, we can make a |
| 66 // check here to ensure we only start tasks in status pending, and bail out in | 66 // check here to ensure we only start tasks in status pending, and bail out in |
| 67 // other cases. | 67 // other cases. |
| 68 last_attempt_time_ = start_time; | 68 last_attempt_time_ = start_time; |
| 69 ++attempt_count_; | 69 ++attempt_count_; |
| 70 } | 70 } |
| 71 | 71 |
| 72 void SavePageRequest::MarkAttemptCompleted() { | 72 void SavePageRequest::MarkAttemptCompleted(const base::Time& time) { |
| 73 last_attempt_time_ = base::Time(); | 73 last_attempt_time_ = time; |
| 74 } | 74 } |
| 75 | 75 |
| 76 } // namespace offline_pages | 76 } // namespace offline_pages |
| OLD | NEW |