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

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

Issue 2228813003: Changes to fit better with the needs of the download manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use typedef to hide an ugly type. 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_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 12 matching lines...) Expand all
23 ~RequestQueueInMemoryStore() override; 23 ~RequestQueueInMemoryStore() override;
24 24
25 // RequestQueueStore implementaiton. 25 // RequestQueueStore implementaiton.
26 void GetRequests(const GetRequestsCallback& callback) override; 26 void GetRequests(const GetRequestsCallback& callback) override;
27 void AddOrUpdateRequest(const SavePageRequest& request, 27 void AddOrUpdateRequest(const SavePageRequest& request,
28 const UpdateCallback& callback) override; 28 const UpdateCallback& callback) override;
29 // Remove requests by request ID. In case the |request_ids| is empty, the 29 // Remove requests by request ID. In case the |request_ids| is empty, the
30 // result will be true, but the count of deleted pages will be 0. 30 // result will be true, but the count of deleted pages will be 0.
31 void RemoveRequests(const std::vector<int64_t>& request_ids, 31 void RemoveRequests(const std::vector<int64_t>& request_ids,
32 const RemoveCallback& callback) override; 32 const RemoveCallback& callback) override;
33 // Remove requests by client ID. In case the |client_ids| is empty, the 33
34 // result will be true, but the count of deleted pages will be 0.
35 void RemoveRequestsByClientId(const std::vector<ClientId>& client_ids,
36 const RemoveCallback& callback) override;
37 void Reset(const ResetCallback& callback) override; 34 void Reset(const ResetCallback& callback) override;
38 35
39 private: 36 private:
40 typedef std::map<int64_t, SavePageRequest> RequestsMap; 37 typedef std::map<int64_t, SavePageRequest> RequestsMap;
41 RequestsMap requests_; 38 RequestsMap requests_;
42 39
43 DISALLOW_COPY_AND_ASSIGN(RequestQueueInMemoryStore); 40 DISALLOW_COPY_AND_ASSIGN(RequestQueueInMemoryStore);
44 }; 41 };
45 42
46 } // namespace offline_pages 43 } // namespace offline_pages
47 44
48 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_IN_MEMORY_STORE_H_ 45 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_IN_MEMORY_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698