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

Side by Side Diff: components/offline_pages/core/background/save_page_request.cc

Issue 2489443002: Move all components/offline_pages/ files into component/offline_pages/core (Closed)
Patch Set: rebase Created 4 years 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 unified diff | Download patch
OLDNEW
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/core/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 user_requested) 13 const bool user_requested)
14 : request_id_(request_id), 14 : request_id_(request_id),
15 url_(url), 15 url_(url),
(...skipping 29 matching lines...) Expand all
45 activation_time_(other.activation_time_), 45 activation_time_(other.activation_time_),
46 started_attempt_count_(other.started_attempt_count_), 46 started_attempt_count_(other.started_attempt_count_),
47 completed_attempt_count_(other.completed_attempt_count_), 47 completed_attempt_count_(other.completed_attempt_count_),
48 last_attempt_time_(other.last_attempt_time_), 48 last_attempt_time_(other.last_attempt_time_),
49 user_requested_(other.user_requested_), 49 user_requested_(other.user_requested_),
50 state_(other.state_) {} 50 state_(other.state_) {}
51 51
52 SavePageRequest::~SavePageRequest() {} 52 SavePageRequest::~SavePageRequest() {}
53 53
54 bool SavePageRequest::operator==(const SavePageRequest& other) const { 54 bool SavePageRequest::operator==(const SavePageRequest& other) const {
55 return request_id_ == other.request_id_ && 55 return request_id_ == other.request_id_ && url_ == other.url_ &&
56 url_ == other.url_ &&
57 client_id_ == other.client_id_ && 56 client_id_ == other.client_id_ &&
58 creation_time_ == other.creation_time_ && 57 creation_time_ == other.creation_time_ &&
59 activation_time_ == other.activation_time_ && 58 activation_time_ == other.activation_time_ &&
60 started_attempt_count_ == other.started_attempt_count_ && 59 started_attempt_count_ == other.started_attempt_count_ &&
61 completed_attempt_count_ == other.completed_attempt_count_ && 60 completed_attempt_count_ == other.completed_attempt_count_ &&
62 last_attempt_time_ == other.last_attempt_time_ && 61 last_attempt_time_ == other.last_attempt_time_ &&
63 state_ == other.state_; 62 state_ == other.state_;
64 } 63 }
65 64
66 void SavePageRequest::MarkAttemptStarted(const base::Time& start_time) { 65 void SavePageRequest::MarkAttemptStarted(const base::Time& start_time) {
(...skipping 17 matching lines...) Expand all
84 // was killed before it completed, so we could use the phone or browser for 83 // was killed before it completed, so we could use the phone or browser for
85 // other things. 84 // other things.
86 state_ = RequestState::AVAILABLE; 85 state_ = RequestState::AVAILABLE;
87 } 86 }
88 87
89 void SavePageRequest::MarkAttemptPaused() { 88 void SavePageRequest::MarkAttemptPaused() {
90 state_ = RequestState::PAUSED; 89 state_ = RequestState::PAUSED;
91 } 90 }
92 91
93 } // namespace offline_pages 92 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698