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

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

Issue 2353393002: [Offline pages] Extracting and templatizing types for store callbacks (Closed)
Patch Set: Removing offline_store_types_impl.h 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_REQUEST_QUEUE_STORE_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_STORE_H_
6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_STORE_H_ 6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_STORE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "components/offline_pages/background/request_queue.h" 12 #include "components/offline_pages/background/request_queue.h"
13 #include "components/offline_pages/background/save_page_request.h" 13 #include "components/offline_pages/background/save_page_request.h"
14 #include "components/offline_pages/offline_page_types.h" 14 #include "components/offline_pages/offline_store_types.h"
15 15
16 namespace offline_pages { 16 namespace offline_pages {
17 17
18 // Interface for classes storing save page requests. 18 // Interface for classes storing save page requests.
19 class RequestQueueStore { 19 class RequestQueueStore {
20 public: 20 public:
21 enum class UpdateStatus { 21 enum class UpdateStatus {
22 ADDED, // Request was added successfully. 22 ADDED, // Request was added successfully.
23 UPDATED, // Request was updated successfully. 23 UPDATED, // Request was updated successfully.
24 FAILED, // Add or update attempt failed. 24 FAILED, // Add or update attempt failed.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 const SavePageRequest::RequestState new_state, 70 const SavePageRequest::RequestState new_state,
71 const UpdateMultipleRequestsCallback& callback) = 0; 71 const UpdateMultipleRequestsCallback& callback) = 0;
72 72
73 // Resets the store. 73 // Resets the store.
74 virtual void Reset(const ResetCallback& callback) = 0; 74 virtual void Reset(const ResetCallback& callback) = 0;
75 }; 75 };
76 76
77 } // namespace offline_pages 77 } // namespace offline_pages
78 78
79 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_STORE_H_ 79 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_STORE_H_
OLDNEW
« no previous file with comments | « components/offline_pages/BUILD.gn ('k') | components/offline_pages/offline_page_metadata_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698