| 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" | |
| 11 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
| 12 #include "base/android/jni_string.h" | 11 #include "base/android/jni_string.h" |
| 13 #include "base/bind.h" | 12 #include "base/bind.h" |
| 14 #include "base/lazy_instance.h" | 13 #include "base/lazy_instance.h" |
| 15 #include "base/logging.h" | 14 #include "base/logging.h" |
| 16 #include "base/metrics/histogram_macros.h" | 15 #include "base/metrics/histogram_macros.h" |
| 17 #include "base/synchronization/lock.h" | 16 #include "base/synchronization/lock.h" |
| 18 #include "chrome/browser/android/download/chrome_download_delegate.h" | 17 #include "chrome/browser/android/download/chrome_download_delegate.h" |
| 19 #include "chrome/browser/android/download/dangerous_download_infobar_delegate.h" | 18 #include "chrome/browser/android/download/dangerous_download_infobar_delegate.h" |
| 20 #include "chrome/browser/android/download/download_manager_service.h" | 19 #include "chrome/browser/android/download/download_manager_service.h" |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 void DownloadController::StartContextMenuDownload( | 387 void DownloadController::StartContextMenuDownload( |
| 389 const ContextMenuParams& params, WebContents* web_contents, bool is_link, | 388 const ContextMenuParams& params, WebContents* web_contents, bool is_link, |
| 390 const std::string& extra_headers) { | 389 const std::string& extra_headers) { |
| 391 int process_id = web_contents->GetRenderProcessHost()->GetID(); | 390 int process_id = web_contents->GetRenderProcessHost()->GetID(); |
| 392 int routing_id = web_contents->GetRenderViewHost()->GetRoutingID(); | 391 int routing_id = web_contents->GetRenderViewHost()->GetRoutingID(); |
| 393 AcquireFileAccessPermission( | 392 AcquireFileAccessPermission( |
| 394 web_contents, base::Bind(&CreateContextMenuDownload, process_id, | 393 web_contents, base::Bind(&CreateContextMenuDownload, process_id, |
| 395 routing_id, params, is_link, extra_headers)); | 394 routing_id, params, is_link, extra_headers)); |
| 396 } | 395 } |
| 397 | 396 |
| OLD | NEW |