| 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 16 matching lines...) Expand all Loading... |
| 27 content::DownloadItem* download_item) { | 27 content::DownloadItem* download_item) { |
| 28 } | 28 } |
| 29 | 29 |
| 30 void MockDownloadControllerAndroid::StartContextMenuDownload( | 30 void MockDownloadControllerAndroid::StartContextMenuDownload( |
| 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, |
| 38 } | 38 const std::string& download_guid, |
| 39 bool accept) {} |
| 39 | 40 |
| 40 void MockDownloadControllerAndroid::AcquireFileAccessPermission( | 41 void MockDownloadControllerAndroid::AcquireFileAccessPermission( |
| 41 content::WebContents* web_contents, | 42 content::WebContents* web_contents, |
| 42 const DownloadControllerAndroid::AcquireFileAccessPermissionCallback& cb) { | 43 const DownloadControllerAndroid::AcquireFileAccessPermissionCallback& cb) { |
| 43 base::ThreadTaskRunnerHandle::Get()->PostTask( | 44 base::ThreadTaskRunnerHandle::Get()->PostTask( |
| 44 FROM_HERE, base::Bind(cb, approve_file_access_request_)); | 45 FROM_HERE, base::Bind(cb, approve_file_access_request_)); |
| 45 } | 46 } |
| 46 | 47 |
| 47 void MockDownloadControllerAndroid::SetApproveFileAccessRequestForTesting( | 48 void MockDownloadControllerAndroid::SetApproveFileAccessRequestForTesting( |
| 48 bool approve) { | 49 bool approve) { |
| 49 approve_file_access_request_ = approve; | 50 approve_file_access_request_ = approve; |
| 50 } | 51 } |
| 51 | 52 |
| 52 } // namespace android | 53 } // namespace android |
| 53 } // namespace chrome | 54 } // namespace chrome |
| OLD | NEW |