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

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

Issue 10704052: Download filename determination refactor (3/3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use a callback with DetermineDownloadTarget(). Created 8 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 | Annotate | Revision Log
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_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_MANAGER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_MANAGER_H_
6 #define CONTENT_PUBLIC_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_MANAGER_H_ 6 #define CONTENT_PUBLIC_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "content/public/browser/download_manager.h" 9 #include "content/public/browser/download_manager.h"
10 #include "content/public/browser/download_save_info.h" 10 #include "content/public/browser/download_save_info.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 DownloadUrlMock(params.get()); 64 DownloadUrlMock(params.get());
65 } 65 }
66 MOCK_METHOD1(AddObserver, void(Observer* observer)); 66 MOCK_METHOD1(AddObserver, void(Observer* observer));
67 MOCK_METHOD1(RemoveObserver, void(Observer* observer)); 67 MOCK_METHOD1(RemoveObserver, void(Observer* observer));
68 MOCK_METHOD1(OnPersistentStoreQueryComplete, void( 68 MOCK_METHOD1(OnPersistentStoreQueryComplete, void(
69 std::vector<DownloadPersistentStoreInfo>* entries)); 69 std::vector<DownloadPersistentStoreInfo>* entries));
70 MOCK_METHOD2(OnItemAddedToPersistentStore, void(int32 download_id, 70 MOCK_METHOD2(OnItemAddedToPersistentStore, void(int32 download_id,
71 int64 db_handle)); 71 int64 db_handle));
72 MOCK_CONST_METHOD0(InProgressCount, int()); 72 MOCK_CONST_METHOD0(InProgressCount, int());
73 MOCK_CONST_METHOD0(GetBrowserContext, content::BrowserContext*()); 73 MOCK_CONST_METHOD0(GetBrowserContext, content::BrowserContext*());
74 MOCK_METHOD0(LastDownloadPath, FilePath());
75 MOCK_METHOD1(CreateDownloadItem, net::BoundNetLog(DownloadCreateInfo* info)); 74 MOCK_METHOD1(CreateDownloadItem, net::BoundNetLog(DownloadCreateInfo* info));
76 MOCK_METHOD5(CreateSavePackageDownloadItem, content::DownloadItem*( 75 MOCK_METHOD5(CreateSavePackageDownloadItem, content::DownloadItem*(
77 const FilePath& main_file_path, 76 const FilePath& main_file_path,
78 const GURL& page_url, 77 const GURL& page_url,
79 bool is_otr, 78 bool is_otr,
80 const std::string& mime_type, 79 const std::string& mime_type,
81 content::DownloadItem::Observer* observer)); 80 content::DownloadItem::Observer* observer));
82 MOCK_METHOD0(ClearLastDownloadPath, void()); 81 MOCK_METHOD0(ClearTransientState, void());
83 MOCK_METHOD2(FileSelected, void(const FilePath& path, int32 download_id));
84 MOCK_METHOD1(FileSelectionCanceled, void(int32 download_id));
85 MOCK_METHOD1(RestartDownload, void(int32 download_id)); 82 MOCK_METHOD1(RestartDownload, void(int32 download_id));
86 MOCK_METHOD0(CheckForHistoryFilesRemoval, void()); 83 MOCK_METHOD0(CheckForHistoryFilesRemoval, void());
87 MOCK_METHOD1(GetDownloadItem, content::DownloadItem*(int id)); 84 MOCK_METHOD1(GetDownloadItem, content::DownloadItem*(int id));
88 MOCK_METHOD1(GetDownload, content::DownloadItem*(int id)); 85 MOCK_METHOD1(GetDownload, content::DownloadItem*(int id));
89 MOCK_METHOD1(SavePageDownloadFinished, void(content::DownloadItem* download)); 86 MOCK_METHOD1(SavePageDownloadFinished, void(content::DownloadItem* download));
90 MOCK_METHOD1(GetActiveDownloadItem, content::DownloadItem*(int id)); 87 MOCK_METHOD1(GetActiveDownloadItem, content::DownloadItem*(int id));
91 MOCK_METHOD0(GenerateFileHash, bool()); 88 MOCK_METHOD0(GenerateFileHash, bool());
92 MOCK_METHOD2(ContinueDownloadWithPath, void(content::DownloadItem* download, 89 MOCK_METHOD2(ContinueDownloadWithPath, void(content::DownloadItem* download,
93 const FilePath& chosen_file)); 90 const FilePath& chosen_file));
94 MOCK_METHOD1(GetActiveDownload, content::DownloadItem*(int32 download_id)); 91 MOCK_METHOD1(GetActiveDownload, content::DownloadItem*(int32 download_id));
95 MOCK_METHOD1(SetFileManager, void(DownloadFileManager* file_manager)); 92 MOCK_METHOD1(SetFileManager, void(DownloadFileManager* file_manager));
96 93
97 protected: 94 protected:
98 virtual ~MockDownloadManager(); 95 virtual ~MockDownloadManager();
99 }; 96 };
100 97
101 } // namespace content 98 } // namespace content
102 99
103 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_MANAGER_H_ 100 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698