Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / android / download / mock_download_controller_android.cc
blobdb482a1420d678a8e1e2cf97adf00ff432dfcbbd
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
3 // found in the LICENSE file.
5 #include "chrome/browser/android/download/mock_download_controller_android.h"
7 #include "base/bind.h"
8 #include "base/location.h"
9 #include "base/thread_task_runner_handle.h"
11 using content::DownloadControllerAndroid;
13 namespace chrome {
14 namespace android {
16 MockDownloadControllerAndroid::MockDownloadControllerAndroid()
17 : approve_file_access_request_(true) {
20 MockDownloadControllerAndroid::~MockDownloadControllerAndroid() {}
22 void MockDownloadControllerAndroid::CreateGETDownload(
23 int render_process_id, int render_view_id, int request_id) {
26 void MockDownloadControllerAndroid::OnDownloadStarted(
27 content::DownloadItem* download_item) {
30 void MockDownloadControllerAndroid::StartContextMenuDownload(
31 const content::ContextMenuParams& params,
32 content::WebContents* web_contents,
33 bool is_link, const std::string& extra_headers) {
36 void MockDownloadControllerAndroid::DangerousDownloadValidated(
37 content::WebContents* web_contents, int download_id, bool accept) {
40 void MockDownloadControllerAndroid::AcquireFileAccessPermission(
41 int render_process_id,
42 int render_view_id,
43 const DownloadControllerAndroid::AcquireFileAccessPermissionCallback& cb) {
44 base::ThreadTaskRunnerHandle::Get()->PostTask(
45 FROM_HERE, base::Bind(cb, approve_file_access_request_));
48 void MockDownloadControllerAndroid::SetApproveFileAccessRequestForTesting(
49 bool approve) {
50 approve_file_access_request_ = approve;
53 } // namespace android
54 } // namespace chrome