| 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/download/download_controller.h" | 5 #include "chrome/browser/android/download/download_controller.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/android/context_utils.h" | 10 #include "base/android/context_utils.h" |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 } | 353 } |
| 354 | 354 |
| 355 DCHECK(java_object_); | 355 DCHECK(java_object_); |
| 356 return java_object_; | 356 return java_object_; |
| 357 } | 357 } |
| 358 | 358 |
| 359 void DownloadController::StartContextMenuDownload( | 359 void DownloadController::StartContextMenuDownload( |
| 360 const ContextMenuParams& params, WebContents* web_contents, bool is_link, | 360 const ContextMenuParams& params, WebContents* web_contents, bool is_link, |
| 361 const std::string& extra_headers) { | 361 const std::string& extra_headers) { |
| 362 int process_id = web_contents->GetRenderProcessHost()->GetID(); | 362 int process_id = web_contents->GetRenderProcessHost()->GetID(); |
| 363 int routing_id = web_contents->GetRoutingID(); | 363 int routing_id = web_contents->GetRenderViewHost()->GetRoutingID(); |
| 364 AcquireFileAccessPermission( | 364 AcquireFileAccessPermission( |
| 365 web_contents, base::Bind(&CreateContextMenuDownload, process_id, | 365 web_contents, base::Bind(&CreateContextMenuDownload, process_id, |
| 366 routing_id, params, is_link, extra_headers)); | 366 routing_id, params, is_link, extra_headers)); |
| 367 } | 367 } |
| 368 | 368 |
| OLD | NEW |