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

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

Issue 1951483002: [Offline pages] Adding in memory request queue store with tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Udpating name of variable to make code more readable Created 4 years, 7 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 18 matching lines...) Expand all
29 29
30 SavePageRequest(int64_t request_id, 30 SavePageRequest(int64_t request_id,
31 const GURL& url, 31 const GURL& url,
32 const ClientId& client_id, 32 const ClientId& client_id,
33 const base::Time& creation_time); 33 const base::Time& creation_time);
34 SavePageRequest(int64_t request_id, 34 SavePageRequest(int64_t request_id,
35 const GURL& url, 35 const GURL& url,
36 const ClientId& client_id, 36 const ClientId& client_id,
37 const base::Time& creation_time, 37 const base::Time& creation_time,
38 const base::Time& activation_time); 38 const base::Time& activation_time);
39 SavePageRequest(const SavePageRequest& other);
39 ~SavePageRequest(); 40 ~SavePageRequest();
40 41
41 // Status of this request. 42 // Status of this request.
42 Status GetStatus(const base::Time& now) const; 43 Status GetStatus(const base::Time& now) const;
43 44
44 // Updates the |last_attempt_time_| and increments |attempt_count_|. 45 // Updates the |last_attempt_time_| and increments |attempt_count_|.
45 void MarkAttemptStarted(const base::Time& start_time); 46 void MarkAttemptStarted(const base::Time& start_time);
46 47
47 // Marks attempt as completed and clears |last_attempt_time_|. 48 // Marks attempt as completed and clears |last_attempt_time_|.
48 void MarkAttemptCompleted(); 49 void MarkAttemptCompleted();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // Number of attempts made to get the page. 82 // Number of attempts made to get the page.
82 int attempt_count_; 83 int attempt_count_;
83 84
84 // Timestamp of the last request starting. 85 // Timestamp of the last request starting.
85 base::Time last_attempt_time_; 86 base::Time last_attempt_time_;
86 }; 87 };
87 88
88 } // namespace offline_pages 89 } // namespace offline_pages
89 90
90 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_SAVE_PAGE_REQUEST_H_ 91 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_SAVE_PAGE_REQUEST_H_
OLDNEW
« no previous file with comments | « components/offline_pages/background/request_queue_store.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