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

Unified Diff: content/browser/web_contents/web_drag_source_gtk.cc

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
Index: content/browser/web_contents/web_drag_source_gtk.cc
diff --git a/content/browser/web_contents/web_drag_source_gtk.cc b/content/browser/web_contents/web_drag_source_gtk.cc
index 3572e75714ddb56b7a62bfd2e2efa58c8557c30f..f157421ae142ee4e61251aac6f73a3cf7dcc758c 100644
--- a/content/browser/web_contents/web_drag_source_gtk.cc
+++ b/content/browser/web_contents/web_drag_source_gtk.cc
@@ -244,16 +244,16 @@ void WebDragSourceGtk::OnDragDataGet(GtkWidget* sender,
FilePath file_path;
if (net::FileURLToFilePath(file_url, &file_path)) {
// Open the file as a stream.
- net::FileStream* file_stream =
+ scoped_ptr<net::FileStream> file_stream(
drag_download_util::CreateFileStreamForDrop(
&file_path,
- content::GetContentClient()->browser()->GetNetLog());
- if (file_stream) {
+ content::GetContentClient()->browser()->GetNetLog()));
+ if (file_stream.get()) {
// Start downloading the file to the stream.
scoped_refptr<DragDownloadFile> drag_file_downloader =
new DragDownloadFile(
file_path,
- linked_ptr<net::FileStream>(file_stream),
+ file_stream.Pass(),
download_url_,
content::Referrer(web_contents_->GetURL(),
drop_data_->referrer_policy),
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/browser/web_contents/web_drag_source_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698