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

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

Issue 2356433004: [Offline pages] Extracting AddRequest method in RequestQueueStore (Closed)
Patch Set: Updating the callback for AddRequest. Created 4 years, 3 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 19 matching lines...) Expand all
30 const bool user_requested); 30 const bool user_requested);
31 SavePageRequest(int64_t request_id, 31 SavePageRequest(int64_t request_id,
32 const GURL& url, 32 const GURL& url,
33 const ClientId& client_id, 33 const ClientId& client_id,
34 const base::Time& creation_time, 34 const base::Time& creation_time,
35 const base::Time& activation_time, 35 const base::Time& activation_time,
36 const bool user_requested); 36 const bool user_requested);
37 SavePageRequest(const SavePageRequest& other); 37 SavePageRequest(const SavePageRequest& other);
38 ~SavePageRequest(); 38 ~SavePageRequest();
39 39
40 bool operator==(const SavePageRequest& other) const;
41
40 // Updates the |last_attempt_time_| and increments |attempt_count_|. 42 // Updates the |last_attempt_time_| and increments |attempt_count_|.
41 void MarkAttemptStarted(const base::Time& start_time); 43 void MarkAttemptStarted(const base::Time& start_time);
42 44
43 // Marks attempt as completed and clears |last_attempt_time_|. 45 // Marks attempt as completed and clears |last_attempt_time_|.
44 void MarkAttemptCompleted(); 46 void MarkAttemptCompleted();
45 47
46 // Marks attempt as aborted. Specifically it clears |last_attempt_time_| 48 // Marks attempt as aborted. Specifically it clears |last_attempt_time_|
47 // and decrements |attempt_count_|. 49 // and decrements |attempt_count_|.
48 void MarkAttemptAborted(); 50 void MarkAttemptAborted();
49 51
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // like AGSA or Now.) 118 // like AGSA or Now.)
117 bool user_requested_; 119 bool user_requested_;
118 120
119 // The current state of this request 121 // The current state of this request
120 RequestState state_; 122 RequestState state_;
121 }; 123 };
122 124
123 } // namespace offline_pages 125 } // namespace offline_pages
124 126
125 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_SAVE_PAGE_REQUEST_H_ 127 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_SAVE_PAGE_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698