Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(650)

Side by Side Diff: chrome/browser/android/download/mock_download_controller.cc

Issue 2496983003: Use native implementation of dangerous download infobar (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/android/download/mock_download_controller.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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::OnDownloadStarted( 20 void MockDownloadController::OnDownloadStarted(
21 content::DownloadItem* download_item) { 21 content::DownloadItem* download_item) {
22 } 22 }
23 23
24 void MockDownloadController::StartContextMenuDownload( 24 void MockDownloadController::StartContextMenuDownload(
25 const content::ContextMenuParams& params, 25 const content::ContextMenuParams& params,
26 content::WebContents* web_contents, 26 content::WebContents* web_contents,
27 bool is_link, const std::string& extra_headers) { 27 bool is_link, const std::string& extra_headers) {
28 } 28 }
29 29
30 void MockDownloadController::DangerousDownloadValidated(
31 content::WebContents* web_contents,
32 const std::string& download_guid,
33 bool accept) {}
34
35 void MockDownloadController::AcquireFileAccessPermission( 30 void MockDownloadController::AcquireFileAccessPermission(
36 content::WebContents* web_contents, 31 content::WebContents* web_contents,
37 const DownloadControllerBase::AcquireFileAccessPermissionCallback& cb) { 32 const DownloadControllerBase::AcquireFileAccessPermissionCallback& cb) {
38 base::ThreadTaskRunnerHandle::Get()->PostTask( 33 base::ThreadTaskRunnerHandle::Get()->PostTask(
39 FROM_HERE, base::Bind(cb, approve_file_access_request_)); 34 FROM_HERE, base::Bind(cb, approve_file_access_request_));
40 } 35 }
41 36
42 void MockDownloadController::SetApproveFileAccessRequestForTesting( 37 void MockDownloadController::SetApproveFileAccessRequestForTesting(
43 bool approve) { 38 bool approve) {
44 approve_file_access_request_ = approve; 39 approve_file_access_request_ = approve;
45 } 40 }
46 41
47 } // namespace android 42 } // namespace android
48 } // namespace chrome 43 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/android/download/mock_download_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698