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

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

Issue 1467563002: Use ResourceRequestInfo::GetWebContents in DownloadRequestLimiter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@web-contents-callback
Patch Set: Addressed davidben's comments Created 5 years 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_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 20 matching lines...) Expand all
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, int download_id, bool accept) {
38 } 38 }
39 39
40 void MockDownloadControllerAndroid::AcquireFileAccessPermission( 40 void MockDownloadControllerAndroid::AcquireFileAccessPermission(
41 int render_process_id, 41 content::WebContents* web_contents,
42 int render_view_id,
43 const DownloadControllerAndroid::AcquireFileAccessPermissionCallback& cb) { 42 const DownloadControllerAndroid::AcquireFileAccessPermissionCallback& cb) {
44 base::ThreadTaskRunnerHandle::Get()->PostTask( 43 base::ThreadTaskRunnerHandle::Get()->PostTask(
45 FROM_HERE, base::Bind(cb, approve_file_access_request_)); 44 FROM_HERE, base::Bind(cb, approve_file_access_request_));
46 } 45 }
47 46
48 void MockDownloadControllerAndroid::SetApproveFileAccessRequestForTesting( 47 void MockDownloadControllerAndroid::SetApproveFileAccessRequestForTesting(
49 bool approve) { 48 bool approve) {
50 approve_file_access_request_ = approve; 49 approve_file_access_request_ = approve;
51 } 50 }
52 51
53 } // namespace android 52 } // namespace android
54 } // namespace chrome 53 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/android/download/mock_download_controller_android.h ('k') | chrome/browser/download/download_request_limiter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698