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

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

Issue 1229933010: move file access permission logic to DownloadResourceThrottle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 5 years, 5 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_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 content::WebContents* web_contents, 41 int render_process_id,
42 int render_view_id,
42 const DownloadControllerAndroid::AcquireFileAccessPermissionCallback& cb) { 43 const DownloadControllerAndroid::AcquireFileAccessPermissionCallback& cb) {
43 base::ThreadTaskRunnerHandle::Get()->PostTask( 44 base::ThreadTaskRunnerHandle::Get()->PostTask(
44 FROM_HERE, base::Bind(cb, approve_file_access_request_)); 45 FROM_HERE, base::Bind(cb, approve_file_access_request_));
45 } 46 }
46 47
47 void MockDownloadControllerAndroid::SetApproveFileAccessRequestForTesting( 48 void MockDownloadControllerAndroid::SetApproveFileAccessRequestForTesting(
48 bool approve) { 49 bool approve) {
49 approve_file_access_request_ = approve; 50 approve_file_access_request_ = approve;
50 } 51 }
51 52
52 } // namespace android 53 } // namespace android
53 } // namespace chrome 54 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698