| 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, |
| 11 const ClientId& client_id, | 11 const ClientId& client_id, |
| 12 const base::Time& creation_time, | 12 const base::Time& creation_time, |
| 13 const bool was_user_requested) | 13 const bool user_requested) |
| 14 : request_id_(request_id), | 14 : request_id_(request_id), |
| 15 url_(url), | 15 url_(url), |
| 16 client_id_(client_id), | 16 client_id_(client_id), |
| 17 creation_time_(creation_time), | 17 creation_time_(creation_time), |
| 18 activation_time_(creation_time), | 18 activation_time_(creation_time), |
| 19 started_attempt_count_(0), | 19 started_attempt_count_(0), |
| 20 completed_attempt_count_(0), | 20 completed_attempt_count_(0), |
| 21 user_requested_(was_user_requested), | 21 user_requested_(user_requested), |
| 22 state_(RequestState::AVAILABLE) {} | 22 state_(RequestState::AVAILABLE) {} |
| 23 | 23 |
| 24 SavePageRequest::SavePageRequest(int64_t request_id, | 24 SavePageRequest::SavePageRequest(int64_t request_id, |
| 25 const GURL& url, | 25 const GURL& url, |
| 26 const ClientId& client_id, | 26 const ClientId& client_id, |
| 27 const base::Time& creation_time, | 27 const base::Time& creation_time, |
| 28 const base::Time& activation_time, | 28 const base::Time& activation_time, |
| 29 const bool user_requested) | 29 const bool user_requested) |
| 30 : request_id_(request_id), | 30 : request_id_(request_id), |
| 31 url_(url), | 31 url_(url), |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // was killed before it completed, so we could use the phone or browser for | 72 // was killed before it completed, so we could use the phone or browser for |
| 73 // other things. | 73 // other things. |
| 74 state_ = RequestState::AVAILABLE; | 74 state_ = RequestState::AVAILABLE; |
| 75 } | 75 } |
| 76 | 76 |
| 77 void SavePageRequest::MarkAttemptPaused() { | 77 void SavePageRequest::MarkAttemptPaused() { |
| 78 state_ = RequestState::PAUSED; | 78 state_ = RequestState::PAUSED; |
| 79 } | 79 } |
| 80 | 80 |
| 81 } // namespace offline_pages | 81 } // namespace offline_pages |
| OLD | NEW |