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

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

Issue 19705017: Create a new FileSystemOperationRunner for each FileAPIMessageFilter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | « webkit/browser/fileapi/file_system_context.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "webkit/browser/fileapi/file_system_context.h" 5 #include "webkit/browser/fileapi/file_system_context.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/task_runner_util.h" 10 #include "base/task_runner_util.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 const FileSystemURL& url, 319 const FileSystemURL& url,
320 int64 offset) { 320 int64 offset) {
321 if (!url.is_valid()) 321 if (!url.is_valid())
322 return scoped_ptr<FileStreamWriter>(); 322 return scoped_ptr<FileStreamWriter>();
323 FileSystemBackend* backend = GetFileSystemBackend(url.type()); 323 FileSystemBackend* backend = GetFileSystemBackend(url.type());
324 if (!backend) 324 if (!backend)
325 return scoped_ptr<FileStreamWriter>(); 325 return scoped_ptr<FileStreamWriter>();
326 return backend->CreateFileStreamWriter(url, offset, this); 326 return backend->CreateFileStreamWriter(url, offset, this);
327 } 327 }
328 328
329 scoped_ptr<FileSystemOperationRunner>
330 FileSystemContext::CreateFileSystemOperationRunner() {
331 return make_scoped_ptr(new FileSystemOperationRunner(this));
332 }
333
329 void FileSystemContext::SetLocalFileChangeTracker( 334 void FileSystemContext::SetLocalFileChangeTracker(
330 scoped_ptr<sync_file_system::LocalFileChangeTracker> tracker) { 335 scoped_ptr<sync_file_system::LocalFileChangeTracker> tracker) {
331 DCHECK(!change_tracker_.get()); 336 DCHECK(!change_tracker_.get());
332 DCHECK(tracker.get()); 337 DCHECK(tracker.get());
333 change_tracker_ = tracker.Pass(); 338 change_tracker_ = tracker.Pass();
334 sandbox_backend_->AddFileUpdateObserver( 339 sandbox_backend_->AddFileUpdateObserver(
335 kFileSystemTypeSyncable, 340 kFileSystemTypeSyncable,
336 change_tracker_.get(), 341 change_tracker_.get(),
337 task_runners_->file_task_runner()); 342 task_runners_->file_task_runner());
338 sandbox_backend_->AddFileChangeObserver( 343 sandbox_backend_->AddFileChangeObserver(
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 FileSystemType type = static_cast<FileSystemType>(t); 455 FileSystemType type = static_cast<FileSystemType>(t);
451 if (backend->CanHandleType(type)) { 456 if (backend->CanHandleType(type)) {
452 const bool inserted = backend_map_.insert( 457 const bool inserted = backend_map_.insert(
453 std::make_pair(type, backend)).second; 458 std::make_pair(type, backend)).second;
454 DCHECK(inserted); 459 DCHECK(inserted);
455 } 460 }
456 } 461 }
457 } 462 }
458 463
459 } // namespace fileapi 464 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/browser/fileapi/file_system_context.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698