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

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

Issue 2053163002: [Offline pages] Adding persistent request queue based on SQLite (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing Created 4 years, 6 months 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/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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698