OLD | NEW |
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 #include <set> | 5 #include <set> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 const DownloadTargetCallback&)); | 178 const DownloadTargetCallback&)); |
179 MOCK_METHOD0(GetAlternativeWebContentsToNotifyForDownload, WebContents*()); | 179 MOCK_METHOD0(GetAlternativeWebContentsToNotifyForDownload, WebContents*()); |
180 MOCK_METHOD1(ShouldOpenFileBasedOnExtension, bool(const FilePath&)); | 180 MOCK_METHOD1(ShouldOpenFileBasedOnExtension, bool(const FilePath&)); |
181 MOCK_METHOD2(ShouldCompleteDownload, | 181 MOCK_METHOD2(ShouldCompleteDownload, |
182 bool(DownloadItem*, const base::Closure&)); | 182 bool(DownloadItem*, const base::Closure&)); |
183 MOCK_METHOD2(ShouldOpenDownload, | 183 MOCK_METHOD2(ShouldOpenDownload, |
184 bool(DownloadItem*, const DownloadOpenDelayedCallback&)); | 184 bool(DownloadItem*, const DownloadOpenDelayedCallback&)); |
185 MOCK_METHOD0(GenerateFileHash, bool()); | 185 MOCK_METHOD0(GenerateFileHash, bool()); |
186 MOCK_METHOD1(AddItemToPersistentStore, void(DownloadItem*)); | 186 MOCK_METHOD1(AddItemToPersistentStore, void(DownloadItem*)); |
187 MOCK_METHOD1(UpdateItemInPersistentStore, void(DownloadItem*)); | 187 MOCK_METHOD1(UpdateItemInPersistentStore, void(DownloadItem*)); |
188 MOCK_METHOD2(UpdatePathForItemInPersistentStore, | 188 MOCK_METHOD3(UpdatePathForItemInPersistentStore, |
189 void(DownloadItem*, const FilePath&)); | 189 void(DownloadItem*, const FilePath&, const FilePath&)); |
190 MOCK_METHOD1(RemoveItemFromPersistentStore, void(DownloadItem*)); | 190 MOCK_METHOD1(RemoveItemFromPersistentStore, void(DownloadItem*)); |
191 MOCK_METHOD2(RemoveItemsFromPersistentStoreBetween, void( | 191 MOCK_METHOD2(RemoveItemsFromPersistentStoreBetween, void( |
192 base::Time remove_begin, base::Time remove_end)); | 192 base::Time remove_begin, base::Time remove_end)); |
193 MOCK_METHOD4(GetSaveDir, void(BrowserContext*, | 193 MOCK_METHOD4(GetSaveDir, void(BrowserContext*, |
194 FilePath*, FilePath*, bool*)); | 194 FilePath*, FilePath*, bool*)); |
195 MOCK_METHOD5(ChooseSavePath, void( | 195 MOCK_METHOD5(ChooseSavePath, void( |
196 WebContents*, const FilePath&, const FilePath::StringType&, | 196 WebContents*, const FilePath&, const FilePath::StringType&, |
197 bool, const SavePackagePathPickedCallback&)); | 197 bool, const SavePackagePathPickedCallback&)); |
198 }; | 198 }; |
199 | 199 |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 UpdateItemInPersistentStore(&item)); | 684 UpdateItemInPersistentStore(&item)); |
685 EXPECT_CALL(item, GetState()) | 685 EXPECT_CALL(item, GetState()) |
686 .WillRepeatedly(Return(DownloadItem::CANCELLED)); | 686 .WillRepeatedly(Return(DownloadItem::CANCELLED)); |
687 EXPECT_CALL(item, GetDbHandle()) | 687 EXPECT_CALL(item, GetDbHandle()) |
688 .WillRepeatedly(Return(db_handle)); | 688 .WillRepeatedly(Return(db_handle)); |
689 | 689 |
690 DownloadStopped(&item); | 690 DownloadStopped(&item); |
691 } | 691 } |
692 | 692 |
693 } // namespace content | 693 } // namespace content |
OLD | NEW |