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

Unified Diff: content/public/browser/download_url_parameters.h

Issue 11028131: Shift passage of FileStream in downloads system to be by scoped_ptr<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporated Al's comments. Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/browser/download_save_info.h ('k') | content/public/browser/download_url_parameters.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/download_url_parameters.h
diff --git a/content/public/browser/download_url_parameters.h b/content/public/browser/download_url_parameters.h
index 6a319487deda2f422f647f0eb5247577944b5bcd..6cff1c0e4b369b8ac185075a406d3679874e434f 100644
--- a/content/public/browser/download_url_parameters.h
+++ b/content/public/browser/download_url_parameters.h
@@ -47,14 +47,14 @@ class CONTENT_EXPORT DownloadUrlParameters {
static DownloadUrlParameters* FromWebContents(
WebContents* web_contents,
const GURL& url,
- const DownloadSaveInfo& save_info);
+ scoped_ptr<DownloadSaveInfo> save_info);
DownloadUrlParameters(
const GURL& url,
int render_process_host_id,
int render_view_host_routing_id,
content::ResourceContext* resource_context,
- const DownloadSaveInfo& save_info);
+ scoped_ptr<DownloadSaveInfo> save_info);
~DownloadUrlParameters();
@@ -83,6 +83,9 @@ class CONTENT_EXPORT DownloadUrlParameters {
callback_ = callback;
}
+ // Note that this nulls the internal copy of the DownloadSaveInfo!
+ scoped_ptr<DownloadSaveInfo> GetSaveInfo();
+
const OnStartedCallback& callback() const { return callback_; }
bool content_initiated() const { return content_initiated_; }
int load_flags() const { return load_flags_; }
@@ -108,7 +111,6 @@ class CONTENT_EXPORT DownloadUrlParameters {
ResourceDispatcherHost* resource_dispatcher_host() const {
return resource_dispatcher_host_;
}
- const DownloadSaveInfo& save_info() const { return save_info_; }
const GURL& url() const { return url_; }
private:
@@ -126,7 +128,7 @@ class CONTENT_EXPORT DownloadUrlParameters {
int render_view_host_routing_id_;
ResourceContext* resource_context_;
ResourceDispatcherHost* resource_dispatcher_host_;
- DownloadSaveInfo save_info_;
+ scoped_ptr<DownloadSaveInfo> save_info_;
GURL url_;
DISALLOW_COPY_AND_ASSIGN(DownloadUrlParameters);
« no previous file with comments | « content/public/browser/download_save_info.h ('k') | content/public/browser/download_url_parameters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698