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

Side by Side Diff: content/browser/download/drag_download_util.cc

Issue 1545243002: Convert Pass()→std::move() in //content/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
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/download/drag_download_util.h" 5 #include "content/browser/download/drag_download_util.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 new_file_path = file_path->InsertBeforeExtension(suffix); 75 new_file_path = file_path->InsertBeforeExtension(suffix);
76 } 76 }
77 77
78 // http://crbug.com/110709 78 // http://crbug.com/110709
79 base::ThreadRestrictions::ScopedAllowIO allow_io; 79 base::ThreadRestrictions::ScopedAllowIO allow_io;
80 80
81 base::File file( 81 base::File file(
82 new_file_path, base::File::FLAG_CREATE | base::File::FLAG_WRITE); 82 new_file_path, base::File::FLAG_CREATE | base::File::FLAG_WRITE);
83 if (file.IsValid()) { 83 if (file.IsValid()) {
84 *file_path = new_file_path; 84 *file_path = new_file_path;
85 return file.Pass(); 85 return file;
86 } 86 }
87 } 87 }
88 88
89 return base::File(); 89 return base::File();
90 } 90 }
91 91
92 PromiseFileFinalizer::PromiseFileFinalizer( 92 PromiseFileFinalizer::PromiseFileFinalizer(
93 DragDownloadFile* drag_file_downloader) 93 DragDownloadFile* drag_file_downloader)
94 : drag_file_downloader_(drag_file_downloader) { 94 : drag_file_downloader_(drag_file_downloader) {
95 } 95 }
(...skipping 12 matching lines...) Expand all
108 } 108 }
109 109
110 PromiseFileFinalizer::~PromiseFileFinalizer() {} 110 PromiseFileFinalizer::~PromiseFileFinalizer() {}
111 111
112 void PromiseFileFinalizer::Cleanup() { 112 void PromiseFileFinalizer::Cleanup() {
113 if (drag_file_downloader_.get()) 113 if (drag_file_downloader_.get())
114 drag_file_downloader_ = NULL; 114 drag_file_downloader_ = NULL;
115 } 115 }
116 116
117 } // namespace content 117 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/drag_download_file.cc ('k') | content/browser/download/mhtml_generation_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698