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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/fileapi/file_stream_writer.cc

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/chromeos/file_system_provider/fileapi/file_stream_write r.h" 5 #include "chrome/browser/chromeos/file_system_provider/fileapi/file_stream_write r.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/thread_task_runner_handle.h" 9 #include "base/thread_task_runner_handle.h"
10 #include "base/trace_event/trace_event.h" 10 #include "base/trace_event/trace_event.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 base::File::Error result) { 125 base::File::Error result) {
126 DCHECK_CURRENTLY_ON(BrowserThread::UI); 126 DCHECK_CURRENTLY_ON(BrowserThread::UI);
127 127
128 abort_callback_ = AbortCallback(); 128 abort_callback_ = AbortCallback();
129 BrowserThread::PostTask( 129 BrowserThread::PostTask(
130 BrowserThread::IO, FROM_HERE, base::Bind(callback, result)); 130 BrowserThread::IO, FROM_HERE, base::Bind(callback, result));
131 } 131 }
132 132
133 AbortCallback abort_callback_; 133 AbortCallback abort_callback_;
134 base::WeakPtr<ProvidedFileSystemInterface> file_system_; 134 base::WeakPtr<ProvidedFileSystemInterface> file_system_;
135 scoped_ptr<ScopedFileOpener> file_opener_; 135 std::unique_ptr<ScopedFileOpener> file_opener_;
136 int file_handle_; 136 int file_handle_;
137 137
138 DISALLOW_COPY_AND_ASSIGN(OperationRunner); 138 DISALLOW_COPY_AND_ASSIGN(OperationRunner);
139 }; 139 };
140 140
141 FileStreamWriter::FileStreamWriter(const storage::FileSystemURL& url, 141 FileStreamWriter::FileStreamWriter(const storage::FileSystemURL& url,
142 int64_t initial_offset) 142 int64_t initial_offset)
143 : url_(url), 143 : url_(url),
144 current_offset_(initial_offset), 144 current_offset_(initial_offset),
145 runner_(new OperationRunner), 145 runner_(new OperationRunner),
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 current_offset_, 335 current_offset_,
336 buffer_length, 336 buffer_length,
337 base::Bind(&FileStreamWriter::OnWriteFileCompleted, 337 base::Bind(&FileStreamWriter::OnWriteFileCompleted,
338 weak_ptr_factory_.GetWeakPtr(), 338 weak_ptr_factory_.GetWeakPtr(),
339 buffer_length, 339 buffer_length,
340 callback))); 340 callback)));
341 } 341 }
342 342
343 } // namespace file_system_provider 343 } // namespace file_system_provider
344 } // namespace chromeos 344 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698