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

Side by Side Diff: chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc

Issue 1549233002: Convert Pass()→std::move() in //chrome/browser/extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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 "chrome/browser/extensions/api/messaging/native_process_launcher.h" 5 #include "chrome/browser/extensions/api/messaging/native_process_launcher.h"
6 6
7 #include <utility>
8
7 #include "base/command_line.h" 9 #include "base/command_line.h"
8 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
9 #include "base/files/scoped_file.h" 11 #include "base/files/scoped_file.h"
10 #include "base/logging.h" 12 #include "base/logging.h"
11 #include "base/path_service.h" 13 #include "base/path_service.h"
12 #include "base/posix/eintr_wrapper.h" 14 #include "base/posix/eintr_wrapper.h"
13 #include "base/process/launch.h" 15 #include "base/process/launch.h"
14 #include "build/build_config.h" 16 #include "build/build_config.h"
15 #include "chrome/common/chrome_paths.h" 17 #include "chrome/common/chrome_paths.h"
16 18
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 base::Process local_process = base::LaunchProcess(command_line, options); 86 base::Process local_process = base::LaunchProcess(command_line, options);
85 if (!local_process.IsValid()) { 87 if (!local_process.IsValid()) {
86 LOG(ERROR) << "Error launching process"; 88 LOG(ERROR) << "Error launching process";
87 return false; 89 return false;
88 } 90 }
89 91
90 // We will not be reading from the write pipe, nor writing from the read pipe. 92 // We will not be reading from the write pipe, nor writing from the read pipe.
91 write_pipe_read_fd.reset(); 93 write_pipe_read_fd.reset();
92 read_pipe_write_fd.reset(); 94 read_pipe_write_fd.reset();
93 95
94 *process = local_process.Pass(); 96 *process = std::move(local_process);
95 *read_file = base::File(read_pipe_read_fd.release()); 97 *read_file = base::File(read_pipe_read_fd.release());
96 *write_file = base::File(write_pipe_write_fd.release()); 98 *write_file = base::File(write_pipe_write_fd.release());
97 99
98 return true; 100 return true;
99 } 101 }
100 102
101 } // namespace extensions 103 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698