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

Side by Side Diff: content/browser/download/mock_download_item_impl.h

Issue 2742093002: Glue parallel download job and download file together. (Closed)
Patch Set: Work on feedback. Created 3 years, 9 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_ITEM_IMPL_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_ITEM_IMPL_H_
6 #define CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_ITEM_IMPL_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_ITEM_IMPL_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "content/browser/download/download_create_info.h" 9 #include "content/browser/download/download_create_info.h"
10 #include "content/browser/download/download_file.h" 10 #include "content/browser/download/download_file.h"
11 #include "content/browser/download/download_item_impl.h" 11 #include "content/browser/download/download_item_impl.h"
12 #include "content/browser/download/download_request_handle.h" 12 #include "content/browser/download/download_request_handle.h"
13 #include "testing/gmock/include/gmock/gmock.h" 13 #include "testing/gmock/include/gmock/gmock.h"
14 14
15 namespace content { 15 namespace content {
16 16
17 class BrowserContext; 17 class BrowserContext;
18 class DownloadManager; 18 class DownloadManager;
19 class WebContents; 19 class WebContents;
20 20
21 class MockDownloadItemImpl : public DownloadItemImpl { 21 class MockDownloadItemImpl : public DownloadItemImpl {
22 public: 22 public:
23 // Use history constructor for minimal base object. 23 // Use history constructor for minimal base object.
24 explicit MockDownloadItemImpl(DownloadItemImplDelegate* delegate); 24 explicit MockDownloadItemImpl(DownloadItemImplDelegate* delegate);
25 MockDownloadItemImpl(DownloadItemImplDelegate* delegate,
26 const DownloadItem::ReceivedSlices& received_slices);
25 ~MockDownloadItemImpl() override; 27 ~MockDownloadItemImpl() override;
26 28
27 MOCK_METHOD4(OnDownloadTargetDetermined, 29 MOCK_METHOD4(OnDownloadTargetDetermined,
28 void(const base::FilePath&, 30 void(const base::FilePath&,
29 TargetDisposition, 31 TargetDisposition,
30 DownloadDangerType, 32 DownloadDangerType,
31 const base::FilePath&)); 33 const base::FilePath&));
32 MOCK_METHOD1(AddObserver, void(DownloadItem::Observer*)); 34 MOCK_METHOD1(AddObserver, void(DownloadItem::Observer*));
33 MOCK_METHOD1(RemoveObserver, void(DownloadItem::Observer*)); 35 MOCK_METHOD1(RemoveObserver, void(DownloadItem::Observer*));
34 MOCK_METHOD0(UpdateObservers, void()); 36 MOCK_METHOD0(UpdateObservers, void());
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 MOCK_CONST_METHOD0(GetWebContents, WebContents*()); 111 MOCK_CONST_METHOD0(GetWebContents, WebContents*());
110 MOCK_CONST_METHOD0(GetFileNameToReportUser, base::FilePath()); 112 MOCK_CONST_METHOD0(GetFileNameToReportUser, base::FilePath());
111 MOCK_METHOD1(SetDisplayName, void(const base::FilePath&)); 113 MOCK_METHOD1(SetDisplayName, void(const base::FilePath&));
112 MOCK_METHOD0(NotifyRemoved, void()); 114 MOCK_METHOD0(NotifyRemoved, void());
113 // May be called when vlog is on. 115 // May be called when vlog is on.
114 std::string DebugString(bool verbose) const override { return std::string(); } 116 std::string DebugString(bool verbose) const override { return std::string(); }
115 }; 117 };
116 } // namespace content 118 } // namespace content
117 119
118 #endif // CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_ITEM_IMPL_H_ 120 #endif // CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_ITEM_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698