Use new ScopedGeneric move support.

BUG=crashpad:14
R=mark@chromium.org

Review URL: https://codereview.chromium.org/1001713002
This commit is contained in:
Robert Sesek 2015-03-12 09:47:55 -04:00
parent 94f7f9eeb2
commit 995e762a45
2 changed files with 2 additions and 2 deletions

View File

@ -216,7 +216,7 @@ bool Settings::WriteSettings(FileHandle handle, const Data& data) {
bool Settings::RecoverSettings(FileHandle handle, Data* out_data) { bool Settings::RecoverSettings(FileHandle handle, Data* out_data) {
ScopedFileHandle scoped_handle; ScopedFileHandle scoped_handle;
if (handle == kInvalidFileHandle) { if (handle == kInvalidFileHandle) {
scoped_handle.reset(OpenForReadingAndWriting().release()); scoped_handle = OpenForReadingAndWriting();
handle = scoped_handle.get(); handle = scoped_handle.get();
// Test if the file has already been recovered now that the exclusive lock // Test if the file has already been recovered now that the exclusive lock

View File

@ -80,7 +80,7 @@ mach_port_t ChildPortHandshake::RunServer() {
pipe_read_.reset(); pipe_read_.reset();
// Transfer ownership of the write pipe into this methods scope. // Transfer ownership of the write pipe into this methods scope.
base::ScopedFD pipe_write_owner(pipe_write_.release()); base::ScopedFD pipe_write_owner = pipe_write_.Pass();
// Initialize the token and share it with the client via the pipe. // Initialize the token and share it with the client via the pipe.
token_ = base::RandUint64(); token_ = base::RandUint64();