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

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

Issue 8404049: Added member data to classes to support download resumption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DownloadSaveInfo::offset is now int64. Created 9 years 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_MANAGER_H_
6 #define CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_MANAGER_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_MANAGER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "content/browser/download/download_manager.h" 9 #include "content/browser/download/download_manager.h"
10 #include "content/browser/download/download_id.h" 10 #include "content/browser/download/download_id.h"
(...skipping 12 matching lines...) Expand all
23 // DownloadManager: 23 // DownloadManager:
24 virtual void Shutdown() OVERRIDE; 24 virtual void Shutdown() OVERRIDE;
25 virtual void GetTemporaryDownloads(const FilePath& dir_path, 25 virtual void GetTemporaryDownloads(const FilePath& dir_path,
26 DownloadVector* result) OVERRIDE; 26 DownloadVector* result) OVERRIDE;
27 virtual void GetAllDownloads(const FilePath& dir_path, 27 virtual void GetAllDownloads(const FilePath& dir_path,
28 DownloadVector* result) OVERRIDE; 28 DownloadVector* result) OVERRIDE;
29 virtual void SearchDownloads(const string16& query, 29 virtual void SearchDownloads(const string16& query,
30 DownloadVector* result) OVERRIDE; 30 DownloadVector* result) OVERRIDE;
31 virtual bool Init(content::BrowserContext* browser_context) OVERRIDE; 31 virtual bool Init(content::BrowserContext* browser_context) OVERRIDE;
32 virtual void StartDownload(int32 id) OVERRIDE; 32 virtual void StartDownload(int32 id) OVERRIDE;
33 virtual void UpdateDownload(int32 download_id, int64 size) OVERRIDE; 33 virtual void UpdateDownload(int32 download_id,
34 int64 size,
35 std::string hash_state) OVERRIDE;
34 virtual void OnResponseCompleted(int32 download_id, int64 size, 36 virtual void OnResponseCompleted(int32 download_id, int64 size,
35 const std::string& hash) OVERRIDE; 37 const std::string& hash) OVERRIDE;
36 virtual void CancelDownload(int32 download_id) OVERRIDE; 38 virtual void CancelDownload(int32 download_id) OVERRIDE;
37 virtual void OnDownloadInterrupted(int32 download_id, int64 size, 39 virtual void OnDownloadInterrupted(int32 download_id,
40 int64 size,
41 std::string hash_state,
38 InterruptReason reason) OVERRIDE; 42 InterruptReason reason) OVERRIDE;
39 virtual void DownloadCancelledInternal(DownloadItem* download) OVERRIDE; 43 virtual void DownloadCancelledInternal(DownloadItem* download) OVERRIDE;
40 virtual void RemoveDownload(int64 download_handle) OVERRIDE; 44 virtual void RemoveDownload(int64 download_handle) OVERRIDE;
41 virtual bool IsDownloadReadyForCompletion(DownloadItem* download) OVERRIDE; 45 virtual bool IsDownloadReadyForCompletion(DownloadItem* download) OVERRIDE;
42 virtual void MaybeCompleteDownload(DownloadItem* download) OVERRIDE; 46 virtual void MaybeCompleteDownload(DownloadItem* download) OVERRIDE;
43 virtual void OnDownloadRenamedToFinalName(int download_id, 47 virtual void OnDownloadRenamedToFinalName(int download_id,
44 const FilePath& full_path, 48 const FilePath& full_path,
45 int uniquifier) OVERRIDE; 49 int uniquifier) OVERRIDE;
46 virtual int RemoveDownloadsBetween(const base::Time remove_begin, 50 virtual int RemoveDownloadsBetween(const base::Time remove_begin,
47 const base::Time remove_end) OVERRIDE; 51 const base::Time remove_end) OVERRIDE;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 private: 98 private:
95 content::DownloadManagerDelegate* delegate_; 99 content::DownloadManagerDelegate* delegate_;
96 DownloadIdFactory* id_factory_; 100 DownloadIdFactory* id_factory_;
97 DownloadStatusUpdater* updater_; 101 DownloadStatusUpdater* updater_;
98 DownloadFileManager* file_manager_; 102 DownloadFileManager* file_manager_;
99 std::map<int32, DownloadItem*> item_map_; 103 std::map<int32, DownloadItem*> item_map_;
100 std::map<int32, DownloadItem*> inactive_item_map_; 104 std::map<int32, DownloadItem*> inactive_item_map_;
101 }; 105 };
102 106
103 #endif // CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_MANAGER_H_ 107 #endif // CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698