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

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

Issue 9314037: Save As for content retrieved via POST works in most circumstances. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // deleted is returned back to the caller. 161 // deleted is returned back to the caller.
162 virtual int RemoveDownloads(base::Time remove_begin) = 0; 162 virtual int RemoveDownloads(base::Time remove_begin) = 0;
163 163
164 // Remove all downloads will delete all downloads. The number of downloads 164 // Remove all downloads will delete all downloads. The number of downloads
165 // deleted is returned back to the caller. 165 // deleted is returned back to the caller.
166 virtual int RemoveAllDownloads() = 0; 166 virtual int RemoveAllDownloads() = 0;
167 167
168 // Downloads the content at |url|. |referrer| and |referrer_encoding| are the 168 // Downloads the content at |url|. |referrer| and |referrer_encoding| are the
169 // referrer for the download, and may be empty. If |prefer_cache| is true, 169 // referrer for the download, and may be empty. If |prefer_cache| is true,
170 // then if the response to |url| is in the HTTP cache it will be used without 170 // then if the response to |url| is in the HTTP cache it will be used without
171 // revalidation. |save_info| specifies where the downloaded file should be 171 // revalidation. If |post_id| is non-negative, then it identifies the post
172 // transaction used to originally retrieve the |url| resource - it also
173 // requires |prefer_cache| to be |true| since re-post'ing is not done.
174 // |save_info| specifies where the downloaded file should be
172 // saved, and whether the user should be prompted about the download. 175 // saved, and whether the user should be prompted about the download.
173 // |web_contents| is the web page that the download is done in context of, 176 // |web_contents| is the web page that the download is done in context of,
174 // and must be non-NULL. 177 // and must be non-NULL.
175 virtual void DownloadUrl(const GURL& url, 178 virtual void DownloadUrl(const GURL& url,
176 const GURL& referrer, 179 const GURL& referrer,
177 const std::string& referrer_encoding, 180 const std::string& referrer_encoding,
178 bool prefer_cache, 181 bool prefer_cache,
182 int64 post_id,
179 const DownloadSaveInfo& save_info, 183 const DownloadSaveInfo& save_info,
180 content::WebContents* web_contents) = 0; 184 content::WebContents* web_contents) = 0;
181 185
182 // Allow objects to observe the download creation process. 186 // Allow objects to observe the download creation process.
183 virtual void AddObserver(Observer* observer) = 0; 187 virtual void AddObserver(Observer* observer) = 0;
184 188
185 // Remove a download observer from ourself. 189 // Remove a download observer from ourself.
186 virtual void RemoveObserver(Observer* observer) = 0; 190 virtual void RemoveObserver(Observer* observer) = 0;
187 191
188 // Called by the embedder, after creating the download manager, to let it know 192 // Called by the embedder, after creating the download manager, to let it know
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 friend class base::RefCountedThreadSafe< 278 friend class base::RefCountedThreadSafe<
275 DownloadManager, content::BrowserThread::DeleteOnUIThread>; 279 DownloadManager, content::BrowserThread::DeleteOnUIThread>;
276 friend struct content::BrowserThread::DeleteOnThread< 280 friend struct content::BrowserThread::DeleteOnThread<
277 content::BrowserThread::UI>; 281 content::BrowserThread::UI>;
278 friend class base::DeleteHelper<DownloadManager>; 282 friend class base::DeleteHelper<DownloadManager>;
279 }; 283 };
280 284
281 } // namespace content 285 } // namespace content
282 286
283 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ 287 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_
OLDNEW
« content/browser/tab_contents/tab_contents.cc ('K') | « content/browser/tab_contents/tab_contents.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698