Chromium Code Reviews| 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_H_ | 5 #ifndef COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_H_ |
| 6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_H_ | 6 #define COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 71 | 71 |
| 72 // Updates a request in the request queue if a request with matching ID | 72 // Updates a request in the request queue if a request with matching ID |
| 73 // exists. Does nothing otherwise. Result is returned through |callback|. | 73 // exists. Does nothing otherwise. Result is returned through |callback|. |
| 74 void UpdateRequest(const SavePageRequest& request, | 74 void UpdateRequest(const SavePageRequest& request, |
| 75 const UpdateRequestCallback& callback); | 75 const UpdateRequestCallback& callback); |
| 76 | 76 |
| 77 // Removes the request matching the |request_id|. Result is returned through | 77 // Removes the request matching the |request_id|. Result is returned through |
| 78 // |callback|. | 78 // |callback|. |
| 79 void RemoveRequest(int64_t request_id, const UpdateRequestCallback& callback); | 79 void RemoveRequest(int64_t request_id, const UpdateRequestCallback& callback); |
| 80 | 80 |
| 81 void RemoveRequestsById(std::vector<int64_t> request_ids, | |
|
Pete Williamson
2016/08/10 17:15:11
You can remove this method. RemoveRequest() is ch
romax
2016/08/16 23:20:56
Done.
| |
| 82 const UpdateRequestCallback& callback); | |
| 83 | |
| 81 // Removes the requests matching the |client_ids|. Results are returned | 84 // Removes the requests matching the |client_ids|. Results are returned |
| 82 // through |callback|. | 85 // through |callback|. |
| 83 void RemoveRequestsByClientId(const std::vector<ClientId>& client_id, | 86 void RemoveRequestsByClientId(const std::vector<ClientId>& client_id, |
| 84 const UpdateRequestCallback& callback); | 87 const UpdateRequestCallback& callback); |
| 85 | 88 |
| 86 void GetForUpdateDone( | 89 void GetForUpdateDone( |
| 87 const RequestQueue::UpdateRequestCallback& update_callback, | 90 const RequestQueue::UpdateRequestCallback& update_callback, |
| 88 const SavePageRequest& update_request, | 91 const SavePageRequest& update_request, |
| 89 bool success, | 92 bool success, |
| 90 const std::vector<SavePageRequest>& requests); | 93 const std::vector<SavePageRequest>& requests); |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 104 | 107 |
| 105 // Allows us to pass a weak pointer to callbacks. | 108 // Allows us to pass a weak pointer to callbacks. |
| 106 base::WeakPtrFactory<RequestQueue> weak_ptr_factory_; | 109 base::WeakPtrFactory<RequestQueue> weak_ptr_factory_; |
| 107 | 110 |
| 108 DISALLOW_COPY_AND_ASSIGN(RequestQueue); | 111 DISALLOW_COPY_AND_ASSIGN(RequestQueue); |
| 109 }; | 112 }; |
| 110 | 113 |
| 111 } // namespace offline_pages | 114 } // namespace offline_pages |
| 112 | 115 |
| 113 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_H_ | 116 #endif // COMPONENTS_OFFLINE_PAGES_BACKGROUND_REQUEST_QUEUE_H_ |
| OLD | NEW |