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

Side by Side Diff: content/public/test/mock_download_item.h

Issue 2703883003: Read and restore persisted slice info (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « content/public/browser/download_manager.h ('k') | content/public/test/mock_download_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PUBLIC_TEST_MOCK_DOWNLOAD_ITEM_H_ 5 #ifndef CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_ITEM_H_
6 #define CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_ITEM_H_ 6 #define CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_ITEM_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 MOCK_CONST_METHOD0(GetFileExternallyRemoved, bool()); 81 MOCK_CONST_METHOD0(GetFileExternallyRemoved, bool());
82 MOCK_METHOD1(DeleteFile, void(const base::Callback<void(bool)>&)); 82 MOCK_METHOD1(DeleteFile, void(const base::Callback<void(bool)>&));
83 MOCK_CONST_METHOD0(IsDangerous, bool()); 83 MOCK_CONST_METHOD0(IsDangerous, bool());
84 MOCK_CONST_METHOD0(GetDangerType, DownloadDangerType()); 84 MOCK_CONST_METHOD0(GetDangerType, DownloadDangerType());
85 MOCK_CONST_METHOD1(TimeRemaining, bool(base::TimeDelta*)); 85 MOCK_CONST_METHOD1(TimeRemaining, bool(base::TimeDelta*));
86 MOCK_CONST_METHOD0(CurrentSpeed, int64_t()); 86 MOCK_CONST_METHOD0(CurrentSpeed, int64_t());
87 MOCK_CONST_METHOD0(PercentComplete, int()); 87 MOCK_CONST_METHOD0(PercentComplete, int());
88 MOCK_CONST_METHOD0(AllDataSaved, bool()); 88 MOCK_CONST_METHOD0(AllDataSaved, bool());
89 MOCK_CONST_METHOD0(GetTotalBytes, int64_t()); 89 MOCK_CONST_METHOD0(GetTotalBytes, int64_t());
90 MOCK_CONST_METHOD0(GetReceivedBytes, int64_t()); 90 MOCK_CONST_METHOD0(GetReceivedBytes, int64_t());
91 MOCK_CONST_METHOD0(GetReceivedSlices,
92 const std::vector<DownloadItem::ReceivedSlice>&());
91 MOCK_CONST_METHOD0(GetStartTime, base::Time()); 93 MOCK_CONST_METHOD0(GetStartTime, base::Time());
92 MOCK_CONST_METHOD0(GetEndTime, base::Time()); 94 MOCK_CONST_METHOD0(GetEndTime, base::Time());
93 MOCK_METHOD0(CanShowInFolder, bool()); 95 MOCK_METHOD0(CanShowInFolder, bool());
94 MOCK_METHOD0(CanOpenDownload, bool()); 96 MOCK_METHOD0(CanOpenDownload, bool());
95 MOCK_METHOD0(ShouldOpenFileBasedOnExtension, bool()); 97 MOCK_METHOD0(ShouldOpenFileBasedOnExtension, bool());
96 MOCK_CONST_METHOD0(GetOpenWhenComplete, bool()); 98 MOCK_CONST_METHOD0(GetOpenWhenComplete, bool());
97 MOCK_METHOD0(GetAutoOpened, bool()); 99 MOCK_METHOD0(GetAutoOpened, bool());
98 MOCK_CONST_METHOD0(GetOpened, bool()); 100 MOCK_CONST_METHOD0(GetOpened, bool());
99 MOCK_CONST_METHOD0(GetBrowserContext, BrowserContext*()); 101 MOCK_CONST_METHOD0(GetBrowserContext, BrowserContext*());
100 MOCK_CONST_METHOD0(GetWebContents, WebContents*()); 102 MOCK_CONST_METHOD0(GetWebContents, WebContents*());
101 MOCK_METHOD1(OnContentCheckCompleted, void(DownloadDangerType)); 103 MOCK_METHOD1(OnContentCheckCompleted, void(DownloadDangerType));
102 MOCK_METHOD1(SetOpenWhenComplete, void(bool)); 104 MOCK_METHOD1(SetOpenWhenComplete, void(bool));
103 MOCK_METHOD1(SetOpened, void(bool)); 105 MOCK_METHOD1(SetOpened, void(bool));
104 MOCK_METHOD1(SetDisplayName, void(const base::FilePath&)); 106 MOCK_METHOD1(SetDisplayName, void(const base::FilePath&));
105 MOCK_CONST_METHOD1(DebugString, std::string(bool)); 107 MOCK_CONST_METHOD1(DebugString, std::string(bool));
106 108
107 private: 109 private:
108 base::ObserverList<Observer> observers_; 110 base::ObserverList<Observer> observers_;
109 }; 111 };
110 112
111 } // namespace content 113 } // namespace content
112 114
113 #endif // CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_ITEM_H_ 115 #endif // CONTENT_PUBLIC_TEST_MOCK_DOWNLOAD_ITEM_H_
OLDNEW
« no previous file with comments | « content/public/browser/download_manager.h ('k') | content/public/test/mock_download_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698