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

Side by Side Diff: content/browser/web_contents/web_contents_drag_win.cc

Issue 16943003: Rewrite scoped_ptr<T>(NULL) to use the default ctor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
« no previous file with comments | « chrome_frame/urlmon_bind_status_callback.h ('k') | media/audio/win/audio_unified_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/browser/web_contents/web_contents_drag_win.h" 5 #include "content/browser/web_contents/web_contents_drag_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 // We cannot know when the target application will be done using the temporary 256 // We cannot know when the target application will be done using the temporary
257 // file, so schedule it to be deleted after rebooting. 257 // file, so schedule it to be deleted after rebooting.
258 file_util::DeleteAfterReboot(download_path); 258 file_util::DeleteAfterReboot(download_path);
259 file_util::DeleteAfterReboot(temp_dir_path); 259 file_util::DeleteAfterReboot(temp_dir_path);
260 260
261 // Provide the data as file (CF_HDROP). A temporary download file with the 261 // Provide the data as file (CF_HDROP). A temporary download file with the
262 // Zone.Identifier ADS (Alternate Data Stream) attached will be created. 262 // Zone.Identifier ADS (Alternate Data Stream) attached will be created.
263 scoped_refptr<DragDownloadFile> download_file = 263 scoped_refptr<DragDownloadFile> download_file =
264 new DragDownloadFile( 264 new DragDownloadFile(
265 download_path, 265 download_path,
266 scoped_ptr<net::FileStream>(NULL), 266 scoped_ptr<net::FileStream>(),
267 download_url, 267 download_url,
268 Referrer(page_url, drop_data.referrer_policy), 268 Referrer(page_url, drop_data.referrer_policy),
269 page_encoding, 269 page_encoding,
270 web_contents_); 270 web_contents_);
271 ui::OSExchangeData::DownloadFileInfo file_download(base::FilePath(), 271 ui::OSExchangeData::DownloadFileInfo file_download(base::FilePath(),
272 download_file.get()); 272 download_file.get());
273 data->SetDownloadFileInfo(file_download); 273 data->SetDownloadFileInfo(file_download);
274 274
275 // Enable asynchronous operation. 275 // Enable asynchronous operation.
276 ui::OSExchangeDataProviderWin::GetIAsyncOperation(*data)->SetAsyncMode(TRUE); 276 ui::OSExchangeDataProviderWin::GetIAsyncOperation(*data)->SetAsyncMode(TRUE);
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 FROM_HERE, 434 FROM_HERE,
435 base::Bind(&WebContentsDragWin::CloseThread, this)); 435 base::Bind(&WebContentsDragWin::CloseThread, this));
436 } 436 }
437 437
438 // static 438 // static
439 void WebContentsDragWin::DisableDragDropForTesting() { 439 void WebContentsDragWin::DisableDragDropForTesting() {
440 run_do_drag_drop = false; 440 run_do_drag_drop = false;
441 } 441 }
442 442
443 } // namespace content 443 } // namespace content
OLDNEW
« no previous file with comments | « chrome_frame/urlmon_bind_status_callback.h ('k') | media/audio/win/audio_unified_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698