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

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

Issue 564503002: Remove implicit conversions from scoped_refptr to T* in c/b/chromeos/file* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "chrome/browser/chromeos/file_system_provider/fileapi/provider_async_fi le_util.h" 9 #include "chrome/browser/chromeos/file_system_provider/fileapi/provider_async_fi le_util.h"
10 #include "chrome/browser/chromeos/file_system_provider/mount_path_util.h" 10 #include "chrome/browser/chromeos/file_system_provider/mount_path_util.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 if (!file_system_.get()) { 78 if (!file_system_.get()) {
79 BrowserThread::PostTask( 79 BrowserThread::PostTask(
80 BrowserThread::IO, 80 BrowserThread::IO,
81 FROM_HERE, 81 FROM_HERE,
82 base::Bind(callback, base::File::FILE_ERROR_ABORT)); 82 base::Bind(callback, base::File::FILE_ERROR_ABORT));
83 return; 83 return;
84 } 84 }
85 85
86 abort_callback_ = file_system_->WriteFile( 86 abort_callback_ = file_system_->WriteFile(
87 file_handle_, 87 file_handle_,
88 buffer, 88 buffer.get(),
89 offset, 89 offset,
90 length, 90 length,
91 base::Bind( 91 base::Bind(
92 &OperationRunner::OnWriteFileCompletedOnUIThread, this, callback)); 92 &OperationRunner::OnWriteFileCompletedOnUIThread, this, callback));
93 } 93 }
94 94
95 // Aborts the most recent operation (if exists), and calls the callback. 95 // Aborts the most recent operation (if exists), and calls the callback.
96 void AbortOnUIThread(const storage::AsyncFileUtil::StatusCallback& callback) { 96 void AbortOnUIThread(const storage::AsyncFileUtil::StatusCallback& callback) {
97 DCHECK_CURRENTLY_ON(BrowserThread::UI); 97 DCHECK_CURRENTLY_ON(BrowserThread::UI);
98 98
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 current_offset_, 329 current_offset_,
330 buffer_length, 330 buffer_length,
331 base::Bind(&FileStreamWriter::OnWriteFileCompleted, 331 base::Bind(&FileStreamWriter::OnWriteFileCompleted,
332 weak_ptr_factory_.GetWeakPtr(), 332 weak_ptr_factory_.GetWeakPtr(),
333 buffer_length, 333 buffer_length,
334 callback))); 334 callback)));
335 } 335 }
336 336
337 } // namespace file_system_provider 337 } // namespace file_system_provider
338 } // namespace chromeos 338 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698