| 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.h" | 5 #include "chrome/browser/android/download/mock_download_controller.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/threading/thread_task_runner_handle.h" | 9 #include "base/threading/thread_task_runner_handle.h" |
| 10 | 10 |
| 11 namespace chrome { | 11 namespace chrome { |
| 12 namespace android { | 12 namespace android { |
| 13 | 13 |
| 14 MockDownloadController::MockDownloadController() | 14 MockDownloadController::MockDownloadController() |
| 15 : approve_file_access_request_(true) { | 15 : approve_file_access_request_(true) { |
| 16 } | 16 } |
| 17 | 17 |
| 18 MockDownloadController::~MockDownloadController() {} | 18 MockDownloadController::~MockDownloadController() {} |
| 19 | 19 |
| 20 void MockDownloadController::CreateGETDownload( | 20 void MockDownloadController::CreateGETDownload( |
| 21 int render_process_id, int render_view_id, | 21 const content::ResourceRequestInfo::WebContentsGetter& wc_getter, |
| 22 bool must_download, const DownloadInfo& info) { | 22 bool must_download, const DownloadInfo& info) { |
| 23 } | 23 } |
| 24 | 24 |
| 25 void MockDownloadController::OnDownloadStarted( | 25 void MockDownloadController::OnDownloadStarted( |
| 26 content::DownloadItem* download_item) { | 26 content::DownloadItem* download_item) { |
| 27 } | 27 } |
| 28 | 28 |
| 29 void MockDownloadController::StartContextMenuDownload( | 29 void MockDownloadController::StartContextMenuDownload( |
| 30 const content::ContextMenuParams& params, | 30 const content::ContextMenuParams& params, |
| 31 content::WebContents* web_contents, | 31 content::WebContents* web_contents, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 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 MockDownloadController::SetApproveFileAccessRequestForTesting( | 47 void MockDownloadController::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 |