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

Side by Side Diff: content/public/browser/download_manager.h

Issue 11363222: Persist download interrupt reason, both target and current paths, and url_chain. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed try bot problems, specifically issues in http://crbug.com/172672 Created 7 years, 10 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 // The DownloadManager object manages the process of downloading, including 5 // The DownloadManager object manages the process of downloading, including
6 // updates to the history system and providing the information for displaying 6 // updates to the history system and providing the information for displaying
7 // the downloads view in the Destinations tab. There is one DownloadManager per 7 // the downloads view in the Destinations tab. There is one DownloadManager per
8 // active browser context in Chrome. 8 // active browser context in Chrome.
9 // 9 //
10 // Download observers: 10 // Download observers:
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 // Allow objects to observe the download creation process. 138 // Allow objects to observe the download creation process.
139 virtual void AddObserver(Observer* observer) = 0; 139 virtual void AddObserver(Observer* observer) = 0;
140 140
141 // Remove a download observer from ourself. 141 // Remove a download observer from ourself.
142 virtual void RemoveObserver(Observer* observer) = 0; 142 virtual void RemoveObserver(Observer* observer) = 0;
143 143
144 // Called by the embedder, after creating the download manager, to let it know 144 // Called by the embedder, after creating the download manager, to let it know
145 // about downloads from previous runs of the browser. 145 // about downloads from previous runs of the browser.
146 virtual DownloadItem* CreateDownloadItem( 146 virtual DownloadItem* CreateDownloadItem(
147 const FilePath& path, 147 const FilePath& current_path,
148 const GURL& url, 148 const FilePath& target_path,
149 const std::vector<GURL>& url_chain,
149 const GURL& referrer_url, 150 const GURL& referrer_url,
150 const base::Time& start_time, 151 const base::Time& start_time,
151 const base::Time& end_time, 152 const base::Time& end_time,
152 int64 received_bytes, 153 int64 received_bytes,
153 int64 total_bytes, 154 int64 total_bytes,
154 DownloadItem::DownloadState state, 155 DownloadItem::DownloadState state,
156 DownloadDangerType danger_type,
157 DownloadInterruptReason interrupt_reason,
155 bool opened) = 0; 158 bool opened) = 0;
156 159
157 // The number of in progress (including paused) downloads. 160 // The number of in progress (including paused) downloads.
158 // Performance note: this loops over all items. If profiling finds that this 161 // Performance note: this loops over all items. If profiling finds that this
159 // is too slow, use an AllDownloadItemNotifier to count in-progress items. 162 // is too slow, use an AllDownloadItemNotifier to count in-progress items.
160 virtual int InProgressCount() const = 0; 163 virtual int InProgressCount() const = 0;
161 164
162 virtual BrowserContext* GetBrowserContext() const = 0; 165 virtual BrowserContext* GetBrowserContext() const = 0;
163 166
164 // Checks whether downloaded files still exist. Updates state of downloads 167 // Checks whether downloaded files still exist. Updates state of downloads
(...skipping 11 matching lines...) Expand all
176 protected: 179 protected:
177 virtual ~DownloadManager() {} 180 virtual ~DownloadManager() {}
178 181
179 private: 182 private:
180 friend class base::RefCountedThreadSafe<DownloadManager>; 183 friend class base::RefCountedThreadSafe<DownloadManager>;
181 }; 184 };
182 185
183 } // namespace content 186 } // namespace content
184 187
185 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ 188 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698