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

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

Issue 10912183: Remove DownloadManager::GetDownloadItem in favor of GetDownload() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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 | 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_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 scoped_ptr<content::DownloadUrlParameters> params) OVERRIDE; 79 scoped_ptr<content::DownloadUrlParameters> params) OVERRIDE;
80 virtual void AddObserver(Observer* observer) OVERRIDE; 80 virtual void AddObserver(Observer* observer) OVERRIDE;
81 virtual void RemoveObserver(Observer* observer) OVERRIDE; 81 virtual void RemoveObserver(Observer* observer) OVERRIDE;
82 virtual void OnPersistentStoreQueryComplete( 82 virtual void OnPersistentStoreQueryComplete(
83 std::vector<content::DownloadPersistentStoreInfo>* entries) OVERRIDE; 83 std::vector<content::DownloadPersistentStoreInfo>* entries) OVERRIDE;
84 virtual void OnItemAddedToPersistentStore(int32 download_id, 84 virtual void OnItemAddedToPersistentStore(int32 download_id,
85 int64 db_handle) OVERRIDE; 85 int64 db_handle) OVERRIDE;
86 virtual int InProgressCount() const OVERRIDE; 86 virtual int InProgressCount() const OVERRIDE;
87 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; 87 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE;
88 virtual void CheckForHistoryFilesRemoval() OVERRIDE; 88 virtual void CheckForHistoryFilesRemoval() OVERRIDE;
89 virtual content::DownloadItem* GetDownloadItem(int id) OVERRIDE;
90 virtual content::DownloadItem* GetDownload(int id) OVERRIDE; 89 virtual content::DownloadItem* GetDownload(int id) OVERRIDE;
91 virtual void SavePageDownloadFinished( 90 virtual void SavePageDownloadFinished(
92 content::DownloadItem* download) OVERRIDE; 91 content::DownloadItem* download) OVERRIDE;
93 virtual content::DownloadItem* GetActiveDownloadItem(int id) OVERRIDE;
94 virtual bool GenerateFileHash() OVERRIDE; 92 virtual bool GenerateFileHash() OVERRIDE;
95 93
96 private: 94 private:
97 typedef std::set<content::DownloadItem*> DownloadSet; 95 typedef std::set<content::DownloadItem*> DownloadSet;
98 typedef base::hash_map<int32, DownloadItemImpl*> DownloadMap; 96 typedef base::hash_map<int32, DownloadItemImpl*> DownloadMap;
99 typedef std::vector<DownloadItemImpl*> DownloadItemImplVector; 97 typedef std::vector<DownloadItemImpl*> DownloadItemImplVector;
100 98
101 // For testing. 99 // For testing.
102 friend class DownloadManagerTest; 100 friend class DownloadManagerTest;
103 friend class DownloadTest; 101 friend class DownloadTest;
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 230
233 // Allows an embedder to control behavior. Guaranteed to outlive this object. 231 // Allows an embedder to control behavior. Guaranteed to outlive this object.
234 content::DownloadManagerDelegate* delegate_; 232 content::DownloadManagerDelegate* delegate_;
235 233
236 net::NetLog* net_log_; 234 net::NetLog* net_log_;
237 235
238 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl); 236 DISALLOW_COPY_AND_ASSIGN(DownloadManagerImpl);
239 }; 237 };
240 238
241 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_ 239 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698