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

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

Issue 2209813002: [Offline Pages] Moves Coordinator to using MarkAttemptStarted/MarkAttemptCompleted API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge Created 4 years, 4 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 #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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 // Status of this request. 44 // Status of this request.
45 Status GetStatus(const base::Time& now) const; 45 Status GetStatus(const base::Time& now) const;
46 46
47 // Updates the |last_attempt_time_| and increments |attempt_count_|. 47 // Updates the |last_attempt_time_| and increments |attempt_count_|.
48 void MarkAttemptStarted(const base::Time& start_time); 48 void MarkAttemptStarted(const base::Time& start_time);
49 49
50 // Marks attempt as completed and clears |last_attempt_time_|. 50 // Marks attempt as completed and clears |last_attempt_time_|.
51 void MarkAttemptCompleted(); 51 void MarkAttemptCompleted();
52 52
53 // Marks attempt as aborted. Specifically it clears |last_attempt_time_|
54 // and decrements |attempt_count_|.
55 void MarkAttemptAborted();
56
53 int64_t request_id() const { return request_id_; } 57 int64_t request_id() const { return request_id_; }
54 58
55 const GURL& url() const { return url_; } 59 const GURL& url() const { return url_; }
56 60
57 const ClientId& client_id() const { return client_id_; } 61 const ClientId& client_id() const { return client_id_; }
58 62
59 const base::Time& creation_time() const { return creation_time_; } 63 const base::Time& creation_time() const { return creation_time_; }
60 64
61 const base::Time& activation_time() const { return activation_time_; } 65 const base::Time& activation_time() const { return activation_time_; }
62 66
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 base::Time last_attempt_time_; 104 base::Time last_attempt_time_;
101 105
102 // Whether the user specifically requested this page (as opposed to a client 106 // Whether the user specifically requested this page (as opposed to a client
103 // like AGSA or Now.) 107 // like AGSA or Now.)
104 bool user_requested_; 108 bool user_requested_;
105 }; 109 };
106 110
107 } // namespace offline_pages 111 } // namespace offline_pages
108 112
109 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_SAVE_PAGE_REQUEST_H_ 113 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_SAVE_PAGE_REQUEST_H_
OLDNEW
« no previous file with comments | « components/offline_pages/background/request_queue.h ('k') | components/offline_pages/background/save_page_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698