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

Side by Side Diff: chrome/browser/chromeos/drive/fileapi/webkit_file_stream_writer_impl.cc

Issue 492873002: Collapse fileapi, webkit_blob, webkit_database, quota, and webkit_common namespaces into single sto… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix chromeos build Created 6 years, 4 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 | Annotate | Revision Log
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/drive/fileapi/webkit_file_stream_writer_impl.h " 5 #include "chrome/browser/chromeos/drive/fileapi/webkit_file_stream_writer_impl.h "
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "chrome/browser/chromeos/drive/file_system_util.h" 9 #include "chrome/browser/chromeos/drive/file_system_util.h"
10 #include "chrome/browser/chromeos/drive/fileapi/fileapi_worker.h" 10 #include "chrome/browser/chromeos/drive/fileapi/fileapi_worker.h"
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 if (open_result != base::File::FILE_OK) { 161 if (open_result != base::File::FILE_OK) {
162 DCHECK(close_callback_on_ui_thread.is_null()); 162 DCHECK(close_callback_on_ui_thread.is_null());
163 callback.Run( 163 callback.Run(
164 net::FileErrorToNetError(open_result)); 164 net::FileErrorToNetError(open_result));
165 return; 165 return;
166 } 166 }
167 167
168 // Keep |close_callback| to close the file when the stream is destructed. 168 // Keep |close_callback| to close the file when the stream is destructed.
169 DCHECK(!close_callback_on_ui_thread.is_null()); 169 DCHECK(!close_callback_on_ui_thread.is_null());
170 close_callback_on_ui_thread_ = close_callback_on_ui_thread; 170 close_callback_on_ui_thread_ = close_callback_on_ui_thread;
171 local_file_writer_.reset(fileapi::FileStreamWriter::CreateForLocalFile( 171 local_file_writer_.reset(storage::FileStreamWriter::CreateForLocalFile(
172 file_task_runner_.get(), local_path, offset_, 172 file_task_runner_.get(),
173 fileapi::FileStreamWriter::OPEN_EXISTING_FILE)); 173 local_path,
174 offset_,
175 storage::FileStreamWriter::OPEN_EXISTING_FILE));
174 int result = local_file_writer_->Write(buf, buf_len, callback); 176 int result = local_file_writer_->Write(buf, buf_len, callback);
175 if (result != net::ERR_IO_PENDING) 177 if (result != net::ERR_IO_PENDING)
176 callback.Run(result); 178 callback.Run(result);
177 } 179 }
178 180
179 } // namespace internal 181 } // namespace internal
180 } // namespace drive 182 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698