| OLD | NEW |
| 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 10 matching lines...) Expand all Loading... |
| 21 public: | 21 public: |
| 22 RequestQueueInMemoryStore(); | 22 RequestQueueInMemoryStore(); |
| 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 void RemoveRequests(const std::vector<int64_t>& request_ids, | 29 void RemoveRequests(const std::vector<int64_t>& request_ids, |
| 30 const RemoveCallback& callback) override; | 30 const RemoveCallback& callback) override; |
| 31 void RemoveRequestsByClientId(const std::vector<ClientId>& client_ids, |
| 32 const RemoveCallback& callback) override; |
| 31 void Reset(const ResetCallback& callback) override; | 33 void Reset(const ResetCallback& callback) override; |
| 32 | 34 |
| 33 private: | 35 private: |
| 34 typedef std::map<int64_t, SavePageRequest> RequestsMap; | 36 typedef std::map<int64_t, SavePageRequest> RequestsMap; |
| 35 RequestsMap requests_; | 37 RequestsMap requests_; |
| 36 | 38 |
| 37 DISALLOW_COPY_AND_ASSIGN(RequestQueueInMemoryStore); | 39 DISALLOW_COPY_AND_ASSIGN(RequestQueueInMemoryStore); |
| 38 }; | 40 }; |
| 39 | 41 |
| 40 } // namespace offline_pages | 42 } // namespace offline_pages |
| 41 | 43 |
| 42 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_IN_MEMORY_STORE_H_ | 44 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_IN_MEMORY_STORE_H_ |
| OLD | NEW |