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

Side by Side Diff: content/browser/renderer_host/pepper/pepper_file_io_host.cc

Issue 131043002: [Pepper] Use platform path for QuotaReservation::GetOpenFileHandle (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: suppress DCHECK failure Created 6 years, 11 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
« no previous file with comments | « no previous file | content/browser/renderer_host/pepper/pepper_file_system_browser_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/browser/renderer_host/pepper/pepper_file_io_host.h" 5 #include "content/browser/renderer_host/pepper/pepper_file_io_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/files/file_util_proxy.h" 10 #include "base/files/file_util_proxy.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 base::PlatformFileError result, 228 base::PlatformFileError result,
229 base::PlatformFile file, 229 base::PlatformFile file,
230 const base::Closure& on_close_callback) { 230 const base::Closure& on_close_callback) {
231 if (result == base::PLATFORM_FILE_OK) { 231 if (result == base::PLATFORM_FILE_OK) {
232 on_close_callback_ = on_close_callback; 232 on_close_callback_ = on_close_callback;
233 233
234 if (FileOpenForWrite(open_flags_) && file_system_host_->ChecksQuota()) { 234 if (FileOpenForWrite(open_flags_) && file_system_host_->ChecksQuota()) {
235 check_quota_ = true; 235 check_quota_ = true;
236 file_system_host_->OpenQuotaFile( 236 file_system_host_->OpenQuotaFile(
237 this, 237 this,
238 file_system_url_.path(), 238 file_system_url_,
239 base::Bind(&PepperFileIOHost::DidOpenQuotaFile, 239 base::Bind(&PepperFileIOHost::DidOpenQuotaFile,
240 weak_factory_.GetWeakPtr(), 240 weak_factory_.GetWeakPtr(),
241 reply_context, 241 reply_context,
242 file)); 242 file));
243 return; 243 return;
244 } 244 }
245 } 245 }
246 246
247 ExecutePlatformOpenFileCallback( 247 ExecutePlatformOpenFileCallback(
248 reply_context, result, base::PassPlatformFile(&file), true); 248 reply_context, result, base::PassPlatformFile(&file), true);
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 462
463 ppapi::proxy::SerializedHandle file_handle; 463 ppapi::proxy::SerializedHandle file_handle;
464 // A non-zero resource id signals NaClIPCAdapter to create a NaClQuotaDesc. 464 // A non-zero resource id signals NaClIPCAdapter to create a NaClQuotaDesc.
465 PP_Resource quota_file_io = check_quota_ ? pp_resource() : 0; 465 PP_Resource quota_file_io = check_quota_ ? pp_resource() : 0;
466 file_handle.set_file_handle(transit_file, open_flags, quota_file_io); 466 file_handle.set_file_handle(transit_file, open_flags, quota_file_io);
467 reply_context->params.AppendHandle(file_handle); 467 reply_context->params.AppendHandle(file_handle);
468 return true; 468 return true;
469 } 469 }
470 470
471 } // namespace content 471 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/pepper/pepper_file_system_browser_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698