| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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/mock_download_controller_android.h" | 5 #include "chrome/browser/android/download/mock_download_controller_android.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/thread_task_runner_handle.h" | 9 #include "base/thread_task_runner_handle.h" |
| 10 | 10 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 const content::ContextMenuParams& params, | 31 const content::ContextMenuParams& params, |
| 32 content::WebContents* web_contents, | 32 content::WebContents* web_contents, |
| 33 bool is_link, const std::string& extra_headers) { | 33 bool is_link, const std::string& extra_headers) { |
| 34 } | 34 } |
| 35 | 35 |
| 36 void MockDownloadControllerAndroid::DangerousDownloadValidated( | 36 void MockDownloadControllerAndroid::DangerousDownloadValidated( |
| 37 content::WebContents* web_contents, int download_id, bool accept) { | 37 content::WebContents* web_contents, int download_id, bool accept) { |
| 38 } | 38 } |
| 39 | 39 |
| 40 void MockDownloadControllerAndroid::AcquireFileAccessPermission( | 40 void MockDownloadControllerAndroid::AcquireFileAccessPermission( |
| 41 content::WebContents* web_contents, | 41 int render_process_id, int render_view_id, |
| 42 const DownloadControllerAndroid::AcquireFileAccessPermissionCallback& cb) { | 42 const DownloadControllerAndroid::AcquireFileAccessPermissionCallback& cb) { |
| 43 base::ThreadTaskRunnerHandle::Get()->PostTask( | 43 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 44 FROM_HERE, base::Bind(cb, approve_file_access_request_)); | 44 FROM_HERE, base::Bind(cb, approve_file_access_request_)); |
| 45 } | 45 } |
| 46 | 46 |
| 47 void MockDownloadControllerAndroid::SetApproveFileAccessRequestForTesting( | 47 void MockDownloadControllerAndroid::SetApproveFileAccessRequestForTesting( |
| 48 bool approve) { | 48 bool approve) { |
| 49 approve_file_access_request_ = approve; | 49 approve_file_access_request_ = approve; |
| 50 } | 50 } |
| 51 | 51 |
| 52 } // namespace android | 52 } // namespace android |
| 53 } // namespace chrome | 53 } // namespace chrome |
| OLD | NEW |