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

Side by Side Diff: webkit/browser/fileapi/file_system_operation_runner.cc

Issue 16413007: Make FileSystemOperation NOT self-destruct (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix browser_tests Created 7 years, 6 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 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 "webkit/browser/fileapi/file_system_operation_runner.h" 5 #include "webkit/browser/fileapi/file_system_operation_runner.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "webkit/browser/fileapi/file_observers.h" 8 #include "webkit/browser/fileapi/file_observers.h"
9 #include "webkit/browser/fileapi/file_system_context.h" 9 #include "webkit/browser/fileapi/file_system_context.h"
10 #include "webkit/browser/fileapi/local_file_system_operation.h" 10 #include "webkit/browser/fileapi/local_file_system_operation.h"
11 #include "webkit/common/blob/shareable_file_reference.h" 11 #include "webkit/common/blob/shareable_file_reference.h"
12 12
13 namespace fileapi { 13 namespace fileapi {
14 14
15 typedef FileSystemOperationRunner::OperationID OperationID; 15 typedef FileSystemOperationRunner::OperationID OperationID;
16 16
17 const OperationID FileSystemOperationRunner::kErrorOperationID = -1; 17 const OperationID FileSystemOperationRunner::kErrorOperationID = -1;
18 18
19 FileSystemOperationRunner::~FileSystemOperationRunner() { 19 FileSystemOperationRunner::~FileSystemOperationRunner() {
20 } 20 }
21 21
22 void FileSystemOperationRunner::Shutdown() {
23 operations_.Clear();
24 }
25
22 OperationID FileSystemOperationRunner::CreateFile( 26 OperationID FileSystemOperationRunner::CreateFile(
23 const FileSystemURL& url, 27 const FileSystemURL& url,
24 bool exclusive, 28 bool exclusive,
25 const StatusCallback& callback) { 29 const StatusCallback& callback) {
26 base::PlatformFileError error = base::PLATFORM_FILE_OK; 30 base::PlatformFileError error = base::PLATFORM_FILE_OK;
27 FileSystemOperation* operation = 31 FileSystemOperation* operation =
28 file_system_context_->CreateFileSystemOperation(url, &error); 32 file_system_context_->CreateFileSystemOperation(url, &error);
29 if (!operation) { 33 if (!operation) {
30 callback.Run(error); 34 callback.Run(error);
31 return kErrorOperationID; 35 return kErrorOperationID;
(...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 &FileUpdateObserver::OnEndUpdate, MakeTuple(*iter)); 538 &FileUpdateObserver::OnEndUpdate, MakeTuple(*iter));
535 } 539 }
536 } 540 }
537 write_target_urls_.erase(found); 541 write_target_urls_.erase(found);
538 } 542 }
539 DCHECK(operations_.Lookup(id)); 543 DCHECK(operations_.Lookup(id));
540 operations_.Remove(id); 544 operations_.Remove(id);
541 } 545 }
542 546
543 } // namespace fileapi 547 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/file_system_operation_runner.h ('k') | webkit/browser/fileapi/file_writer_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698