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

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

Issue 2014803002: Move DownloadControllerAndroid from content/ to chrome/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix failing tests/bugs Created 4 years, 6 months 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
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_android.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 using content::DownloadControllerAndroid;
12
13 namespace chrome { 11 namespace chrome {
14 namespace android { 12 namespace android {
15 13
16 MockDownloadControllerAndroid::MockDownloadControllerAndroid() 14 MockDownloadController::MockDownloadController()
17 : approve_file_access_request_(true) { 15 : approve_file_access_request_(true) {
18 } 16 }
19 17
20 MockDownloadControllerAndroid::~MockDownloadControllerAndroid() {} 18 MockDownloadController::~MockDownloadController() {}
21 19
22 void MockDownloadControllerAndroid::CreateGETDownload( 20 void MockDownloadController::CreateGETDownload(
23 int render_process_id, int render_view_id, int request_id, 21 int render_process_id, int render_view_id,
24 bool must_download) { 22 bool must_download, const DownloadInfo& info) {
25 } 23 }
26 24
27 void MockDownloadControllerAndroid::OnDownloadStarted( 25 void MockDownloadController::OnDownloadStarted(
28 content::DownloadItem* download_item) { 26 content::DownloadItem* download_item) {
29 } 27 }
30 28
31 void MockDownloadControllerAndroid::StartContextMenuDownload( 29 void MockDownloadController::StartContextMenuDownload(
32 const content::ContextMenuParams& params, 30 const content::ContextMenuParams& params,
33 content::WebContents* web_contents, 31 content::WebContents* web_contents,
34 bool is_link, const std::string& extra_headers) { 32 bool is_link, const std::string& extra_headers) {
35 } 33 }
36 34
37 void MockDownloadControllerAndroid::DangerousDownloadValidated( 35 void MockDownloadController::DangerousDownloadValidated(
38 content::WebContents* web_contents, 36 content::WebContents* web_contents,
39 const std::string& download_guid, 37 const std::string& download_guid,
40 bool accept) {} 38 bool accept) {}
41 39
42 void MockDownloadControllerAndroid::AcquireFileAccessPermission( 40 void MockDownloadController::AcquireFileAccessPermission(
43 content::WebContents* web_contents, 41 content::WebContents* web_contents,
44 const DownloadControllerAndroid::AcquireFileAccessPermissionCallback& cb) { 42 const DownloadControllerBase::AcquireFileAccessPermissionCallback& cb) {
45 base::ThreadTaskRunnerHandle::Get()->PostTask( 43 base::ThreadTaskRunnerHandle::Get()->PostTask(
46 FROM_HERE, base::Bind(cb, approve_file_access_request_)); 44 FROM_HERE, base::Bind(cb, approve_file_access_request_));
47 } 45 }
48 46
49 void MockDownloadControllerAndroid::SetApproveFileAccessRequestForTesting( 47 void MockDownloadController::SetApproveFileAccessRequestForTesting(
50 bool approve) { 48 bool approve) {
51 approve_file_access_request_ = approve; 49 approve_file_access_request_ = approve;
52 } 50 }
53 51
54 } // namespace android 52 } // namespace android
55 } // namespace chrome 53 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698