| 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 24 matching lines...) Expand all Loading... |
| 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_ |
| OLD | NEW |