| 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 #include "chrome/browser/android/offline_pages/downloads/offline_page_download_b
ridge.h" | 5 #include "chrome/browser/android/offline_pages/downloads/offline_page_download_b
ridge.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/android/jni_string.h" | 9 #include "base/android/jni_string.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 for (const auto& request : requests) { | 75 for (const auto& request : requests) { |
| 76 if (request->client_id().id == guid && | 76 if (request->client_id().id == guid && |
| 77 (request->client_id().name_space == kDownloadNamespace || | 77 (request->client_id().name_space == kDownloadNamespace || |
| 78 request->client_id().name_space == kAsyncNamespace)) { | 78 request->client_id().name_space == kAsyncNamespace)) { |
| 79 request_ids.push_back(request->request_id()); | 79 request_ids.push_back(request->request_id()); |
| 80 } | 80 } |
| 81 } | 81 } |
| 82 return request_ids; | 82 return request_ids; |
| 83 } | 83 } |
| 84 | 84 |
| 85 void CancelRequestCallback(const RequestQueue::UpdateMultipleRequestResults&) { | 85 void CancelRequestCallback(const MultipleItemStatuses&) { |
| 86 // Results ignored here, as UI uses observer to update itself. | 86 // Results ignored here, as UI uses observer to update itself. |
| 87 } | 87 } |
| 88 | 88 |
| 89 void CancelRequestsContinuation( | 89 void CancelRequestsContinuation( |
| 90 content::BrowserContext* browser_context, | 90 content::BrowserContext* browser_context, |
| 91 const std::string& guid, | 91 const std::string& guid, |
| 92 std::vector<std::unique_ptr<SavePageRequest>> requests) { | 92 std::vector<std::unique_ptr<SavePageRequest>> requests) { |
| 93 RequestCoordinator* coordinator = | 93 RequestCoordinator* coordinator = |
| 94 RequestCoordinatorFactory::GetForBrowserContext(browser_context); | 94 RequestCoordinatorFactory::GetForBrowserContext(browser_context); |
| 95 if (coordinator) { | 95 if (coordinator) { |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 | 354 |
| 355 DownloadUIAdapter* adapter = | 355 DownloadUIAdapter* adapter = |
| 356 DownloadUIAdapter::FromOfflinePageModel(offline_page_model); | 356 DownloadUIAdapter::FromOfflinePageModel(offline_page_model); |
| 357 | 357 |
| 358 return reinterpret_cast<jlong>( | 358 return reinterpret_cast<jlong>( |
| 359 new OfflinePageDownloadBridge(env, obj, adapter, browser_context)); | 359 new OfflinePageDownloadBridge(env, obj, adapter, browser_context)); |
| 360 } | 360 } |
| 361 | 361 |
| 362 } // namespace android | 362 } // namespace android |
| 363 } // namespace offline_pages | 363 } // namespace offline_pages |
| OLD | NEW |