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

Side by Side Diff: content/common/fileapi/file_system_dispatcher.cc

Issue 13508005: Allow RequestOSFileHandle if an app has unlimited storage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert most of patch set 2 Created 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/common/fileapi/file_system_dispatcher.h" 5 #include "content/common/fileapi/file_system_dispatcher.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/process.h" 8 #include "base/process.h"
9 #include "content/common/child_thread.h" 9 #include "content/common/child_thread.h"
10 #include "content/common/fileapi/file_system_messages.h" 10 #include "content/common/fileapi/file_system_messages.h"
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 int request_id, int64 bytes, bool complete) { 344 int request_id, int64 bytes, bool complete) {
345 fileapi::FileSystemCallbackDispatcher* dispatcher = 345 fileapi::FileSystemCallbackDispatcher* dispatcher =
346 dispatchers_.Lookup(request_id); 346 dispatchers_.Lookup(request_id);
347 DCHECK(dispatcher); 347 DCHECK(dispatcher);
348 dispatcher->DidWrite(bytes, complete); 348 dispatcher->DidWrite(bytes, complete);
349 if (complete) 349 if (complete)
350 dispatchers_.Remove(request_id); 350 dispatchers_.Remove(request_id);
351 } 351 }
352 352
353 void FileSystemDispatcher::OnDidOpenFile( 353 void FileSystemDispatcher::OnDidOpenFile(
354 int request_id, IPC::PlatformFileForTransit file) { 354 int request_id,
355 IPC::PlatformFileForTransit file,
356 quota::QuotaLimitType quota_policy) {
355 fileapi::FileSystemCallbackDispatcher* dispatcher = 357 fileapi::FileSystemCallbackDispatcher* dispatcher =
356 dispatchers_.Lookup(request_id); 358 dispatchers_.Lookup(request_id);
357 DCHECK(dispatcher); 359 DCHECK(dispatcher);
358 dispatcher->DidOpenFile(IPC::PlatformFileForTransitToPlatformFile(file)); 360 dispatcher->DidOpenFile(IPC::PlatformFileForTransitToPlatformFile(file),
361 quota_policy);
359 dispatchers_.Remove(request_id); 362 dispatchers_.Remove(request_id);
360 } 363 }
361 364
362 } // namespace content 365 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698