Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 174 // referrer for the download, and may be empty. If |prefer_cache| is true, | 174 // referrer for the download, and may be empty. If |prefer_cache| is true, |
| 175 // then if the response to |url| is in the HTTP cache it will be used without | 175 // then if the response to |url| is in the HTTP cache it will be used without |
| 176 // revalidation. |save_info| specifies where the downloaded file should be | 176 // revalidation. |save_info| specifies where the downloaded file should be |
| 177 // saved, and whether the user should be prompted about the download. | 177 // saved, and whether the user should be prompted about the download. |
| 178 // |web_contents| is the web page that the download is done in context of, | 178 // |web_contents| is the web page that the download is done in context of, |
| 179 // and must be non-NULL. | 179 // and must be non-NULL. |
| 180 virtual void DownloadUrl(const GURL& url, | 180 virtual void DownloadUrl(const GURL& url, |
| 181 const GURL& referrer, | 181 const GURL& referrer, |
| 182 const std::string& referrer_encoding, | 182 const std::string& referrer_encoding, |
| 183 bool prefer_cache, | 183 bool prefer_cache, |
| 184 int64 post_id, | |
|
Randy Smith (Not in Mondays)
2012/02/02 19:46:10
Please document this argument, including the "don'
cbentzel
2012/02/02 19:53:06
Agreed.
cbentzel
2012/02/03 15:54:47
I documented this. I considered adding a constant
Randy Smith (Not in Mondays)
2012/02/03 19:43:06
Yeah, I considered asking for a constant but had t
| |
| 184 const DownloadSaveInfo& save_info, | 185 const DownloadSaveInfo& save_info, |
| 185 content::WebContents* web_contents) = 0; | 186 content::WebContents* web_contents) = 0; |
| 186 | 187 |
| 187 // Allow objects to observe the download creation process. | 188 // Allow objects to observe the download creation process. |
| 188 virtual void AddObserver(Observer* observer) = 0; | 189 virtual void AddObserver(Observer* observer) = 0; |
| 189 | 190 |
| 190 // Remove a download observer from ourself. | 191 // Remove a download observer from ourself. |
| 191 virtual void RemoveObserver(Observer* observer) = 0; | 192 virtual void RemoveObserver(Observer* observer) = 0; |
| 192 | 193 |
| 193 // Called by the embedder, after creating the download manager, to let it know | 194 // 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 Loading... | |
| 279 friend class base::RefCountedThreadSafe< | 280 friend class base::RefCountedThreadSafe< |
| 280 DownloadManager, content::BrowserThread::DeleteOnUIThread>; | 281 DownloadManager, content::BrowserThread::DeleteOnUIThread>; |
| 281 friend struct content::BrowserThread::DeleteOnThread< | 282 friend struct content::BrowserThread::DeleteOnThread< |
| 282 content::BrowserThread::UI>; | 283 content::BrowserThread::UI>; |
| 283 friend class base::DeleteHelper<DownloadManager>; | 284 friend class base::DeleteHelper<DownloadManager>; |
| 284 }; | 285 }; |
| 285 | 286 |
| 286 } // namespace content | 287 } // namespace content |
| 287 | 288 |
| 288 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ | 289 #endif // CONTENT_PUBLIC_BROWSER_DOWNLOAD_MANAGER_H_ |
| OLD | NEW |