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

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

Issue 2334603002: Fix SSLUITest.TestBadHTTPSDownload with PlzNavigate. (Closed)
Patch Set: fix android temporarily Created 4 years, 3 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 #ifndef CHROME_BROWSER_ANDROID_DOWNLOAD_MOCK_DOWNLOAD_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_DOWNLOAD_MOCK_DOWNLOAD_CONTROLLER_H_
6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_MOCK_DOWNLOAD_CONTROLLER_H_ 6 #define CHROME_BROWSER_ANDROID_DOWNLOAD_MOCK_DOWNLOAD_CONTROLLER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
11 #include "chrome/browser/android/download/download_controller_base.h" 11 #include "chrome/browser/android/download/download_controller_base.h"
12 12
13 namespace content { 13 namespace content {
14 class DownloadItem; 14 class DownloadItem;
15 class WebContents; 15 class WebContents;
16 } // namespace content 16 } // namespace content
17 17
18 namespace chrome { 18 namespace chrome {
19 namespace android { 19 namespace android {
20 20
21 // Mock implementation of the DownloadController. 21 // Mock implementation of the DownloadController.
22 class MockDownloadController : public DownloadControllerBase { 22 class MockDownloadController : public DownloadControllerBase {
23 public: 23 public:
24 MockDownloadController(); 24 MockDownloadController();
25 ~MockDownloadController() override; 25 ~MockDownloadController() override;
26 26
27 // DownloadControllerBase implementation. 27 // DownloadControllerBase implementation.
28 void CreateGETDownload(int render_process_id, int render_view_id, 28 void CreateGETDownload(
29 bool mustDownload, 29 const content::ResourceRequestInfo::WebContentsGetter& wc_getter,
30 const DownloadInfo& info) override; 30 bool must_download,
31 const DownloadInfo& info) override;
31 void OnDownloadStarted(content::DownloadItem* download_item) override; 32 void OnDownloadStarted(content::DownloadItem* download_item) override;
32 void StartContextMenuDownload( 33 void StartContextMenuDownload(
33 const content::ContextMenuParams& params, 34 const content::ContextMenuParams& params,
34 content::WebContents* web_contents, 35 content::WebContents* web_contents,
35 bool is_link, const std::string& extra_headers) override; 36 bool is_link, const std::string& extra_headers) override;
36 void DangerousDownloadValidated(content::WebContents* web_contents, 37 void DangerousDownloadValidated(content::WebContents* web_contents,
37 const std::string& download_guid, 38 const std::string& download_guid,
38 bool accept) override; 39 bool accept) override;
39 void AcquireFileAccessPermission( 40 void AcquireFileAccessPermission(
40 content::WebContents* web_contents, 41 content::WebContents* web_contents,
41 const AcquireFileAccessPermissionCallback& callback) override; 42 const AcquireFileAccessPermissionCallback& callback) override;
42 void SetApproveFileAccessRequestForTesting(bool approve) override; 43 void SetApproveFileAccessRequestForTesting(bool approve) override;
43 44
44 private: 45 private:
45 bool approve_file_access_request_; 46 bool approve_file_access_request_;
46 DISALLOW_COPY_AND_ASSIGN(MockDownloadController); 47 DISALLOW_COPY_AND_ASSIGN(MockDownloadController);
47 }; 48 };
48 49
49 } // namespace android 50 } // namespace android
50 } // namespace chrome 51 } // namespace chrome
51 52
52 53
53 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_MOCK_DOWNLOAD_CONTROLLER_H_ 54 #endif // CHROME_BROWSER_ANDROID_DOWNLOAD_MOCK_DOWNLOAD_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698