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

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: Updated comment. 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_item_impl.h" 9 #include "content/browser/download/download_item_impl.h"
10 #include "content/browser/download/download_manager.h" 10 #include "content/browser/download/download_manager.h"
(...skipping 14 matching lines...) Expand all
25 // DownloadManager: 25 // DownloadManager:
26 virtual void Shutdown() OVERRIDE; 26 virtual void Shutdown() OVERRIDE;
27 virtual void GetTemporaryDownloads(const FilePath& dir_path, 27 virtual void GetTemporaryDownloads(const FilePath& dir_path,
28 DownloadVector* result) OVERRIDE; 28 DownloadVector* result) OVERRIDE;
29 virtual void GetAllDownloads(const FilePath& dir_path, 29 virtual void GetAllDownloads(const FilePath& dir_path,
30 DownloadVector* result) OVERRIDE; 30 DownloadVector* result) OVERRIDE;
31 virtual void SearchDownloads(const string16& query, 31 virtual void SearchDownloads(const string16& query,
32 DownloadVector* result) OVERRIDE; 32 DownloadVector* result) OVERRIDE;
33 virtual bool Init(content::BrowserContext* browser_context) OVERRIDE; 33 virtual bool Init(content::BrowserContext* browser_context) OVERRIDE;
34 virtual void StartDownload(int32 id) OVERRIDE; 34 virtual void StartDownload(int32 id) OVERRIDE;
35 virtual void UpdateDownload(int32 download_id, int64 bytes_so_far, 35 virtual void UpdateDownload(int32 download_id,
36 int64 bytes_per_sec) OVERRIDE; 36 int64 bytes_so_far,
37 int64 bytes_per_sec,
38 std::string hash_state) OVERRIDE;
37 virtual void OnResponseCompleted(int32 download_id, int64 size, 39 virtual void OnResponseCompleted(int32 download_id, int64 size,
38 const std::string& hash) OVERRIDE; 40 const std::string& hash) OVERRIDE;
39 virtual void CancelDownload(int32 download_id) OVERRIDE; 41 virtual void CancelDownload(int32 download_id) OVERRIDE;
40 virtual void OnDownloadInterrupted(int32 download_id, int64 size, 42 virtual void OnDownloadInterrupted(int32 download_id,
43 int64 size,
44 std::string hash_state,
41 InterruptReason reason) OVERRIDE; 45 InterruptReason reason) OVERRIDE;
42 virtual void OnDownloadRenamedToFinalName(int download_id, 46 virtual void OnDownloadRenamedToFinalName(int download_id,
43 const FilePath& full_path, 47 const FilePath& full_path,
44 int uniquifier) OVERRIDE; 48 int uniquifier) OVERRIDE;
45 virtual int RemoveDownloadsBetween(const base::Time remove_begin, 49 virtual int RemoveDownloadsBetween(const base::Time remove_begin,
46 const base::Time remove_end) OVERRIDE; 50 const base::Time remove_end) OVERRIDE;
47 virtual int RemoveDownloads(const base::Time remove_begin) OVERRIDE; 51 virtual int RemoveDownloads(const base::Time remove_begin) OVERRIDE;
48 virtual int RemoveAllDownloads() OVERRIDE; 52 virtual int RemoveAllDownloads() OVERRIDE;
49 virtual void DownloadUrl(const GURL& url, 53 virtual void DownloadUrl(const GURL& url,
50 const GURL& referrer, 54 const GURL& referrer,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 private: 95 private:
92 content::DownloadManagerDelegate* delegate_; 96 content::DownloadManagerDelegate* delegate_;
93 DownloadIdFactory* id_factory_; 97 DownloadIdFactory* id_factory_;
94 DownloadStatusUpdater* updater_; 98 DownloadStatusUpdater* updater_;
95 DownloadFileManager* file_manager_; 99 DownloadFileManager* file_manager_;
96 std::map<int32, DownloadItem*> item_map_; 100 std::map<int32, DownloadItem*> item_map_;
97 std::map<int32, DownloadItem*> inactive_item_map_; 101 std::map<int32, DownloadItem*> inactive_item_map_;
98 }; 102 };
99 103
100 #endif // CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_MANAGER_H_ 104 #endif // CONTENT_BROWSER_DOWNLOAD_MOCK_DOWNLOAD_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698