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

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

Issue 2379353003: [Offline pages] Applying StoreState to track RequestQueueStore state (Closed)
Patch Set: Addressing feedback Created 4 years, 2 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
« no previous file with comments | « no previous file | components/offline_pages/background/request_queue_in_memory_store.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_IN_MEMORY_STORE_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_IN_MEMORY_STORE_H_
6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_IN_MEMORY_STORE_H_ 6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_IN_MEMORY_STORE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 24 matching lines...) Expand all
35 const RemoveCallback& callback) override; 35 const RemoveCallback& callback) override;
36 36
37 // Set the state of associated requests to |new_state|. The callback will get 37 // Set the state of associated requests to |new_state|. The callback will get
38 // a list of UpdateMultipleRequestResults, and a list of the updated requests. 38 // a list of UpdateMultipleRequestResults, and a list of the updated requests.
39 void ChangeRequestsState( 39 void ChangeRequestsState(
40 const std::vector<int64_t>& request_ids, 40 const std::vector<int64_t>& request_ids,
41 const SavePageRequest::RequestState new_state, 41 const SavePageRequest::RequestState new_state,
42 const UpdateMultipleRequestsCallback& callback) override; 42 const UpdateMultipleRequestsCallback& callback) override;
43 43
44 void Reset(const ResetCallback& callback) override; 44 void Reset(const ResetCallback& callback) override;
45 StoreState state() const override;
45 46
46 private: 47 private:
47 typedef std::map<int64_t, SavePageRequest> RequestsMap; 48 typedef std::map<int64_t, SavePageRequest> RequestsMap;
48 RequestsMap requests_; 49 RequestsMap requests_;
49 50
50 DISALLOW_COPY_AND_ASSIGN(RequestQueueInMemoryStore); 51 DISALLOW_COPY_AND_ASSIGN(RequestQueueInMemoryStore);
51 }; 52 };
52 53
53 } // namespace offline_pages 54 } // namespace offline_pages
54 55
55 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_IN_MEMORY_STORE_H_ 56 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_IN_MEMORY_STORE_H_
OLDNEW
« no previous file with comments | « no previous file | components/offline_pages/background/request_queue_in_memory_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698