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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 int routing_id = web_contents->GetRenderViewHost()->GetRoutingID(); | 397 int routing_id = web_contents->GetRenderViewHost()->GetRoutingID(); |
399 | 398 |
400 const content::ResourceRequestInfo::WebContentsGetter& wc_getter( | 399 const content::ResourceRequestInfo::WebContentsGetter& wc_getter( |
401 base::Bind(&GetWebContents, process_id, routing_id)); | 400 base::Bind(&GetWebContents, process_id, routing_id)); |
402 | 401 |
403 AcquireFileAccessPermission( | 402 AcquireFileAccessPermission( |
404 wc_getter, base::Bind(&CreateContextMenuDownload, wc_getter, params, | 403 wc_getter, base::Bind(&CreateContextMenuDownload, wc_getter, params, |
405 is_link, extra_headers)); | 404 is_link, extra_headers)); |
406 } | 405 } |
407 | 406 |
OLD | NEW |