diff --git a/client/settings.cc b/client/settings.cc index ca101d2d..b4e5f434 100644 --- a/client/settings.cc +++ b/client/settings.cc @@ -216,7 +216,7 @@ bool Settings::WriteSettings(FileHandle handle, const Data& data) { bool Settings::RecoverSettings(FileHandle handle, Data* out_data) { ScopedFileHandle scoped_handle; if (handle == kInvalidFileHandle) { - scoped_handle.reset(OpenForReadingAndWriting().release()); + scoped_handle = OpenForReadingAndWriting(); handle = scoped_handle.get(); // Test if the file has already been recovered now that the exclusive lock diff --git a/util/mach/child_port_handshake.cc b/util/mach/child_port_handshake.cc index b45a7170..eedcf47b 100644 --- a/util/mach/child_port_handshake.cc +++ b/util/mach/child_port_handshake.cc @@ -80,7 +80,7 @@ mach_port_t ChildPortHandshake::RunServer() { pipe_read_.reset(); // Transfer ownership of the write pipe into this method’s 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. token_ = base::RandUint64();