OLD | NEW |
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/fileapi/syncable/canned_syncable_file_system.h" | 5 #include "webkit/fileapi/syncable/canned_syncable_file_system.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/message_loop_proxy.h" | 10 #include "base/message_loop_proxy.h" |
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
438 const FileSystemURL& url) { | 438 const FileSystemURL& url) { |
439 return RunOnThread( | 439 return RunOnThread( |
440 file_task_runner_, | 440 file_task_runner_, |
441 FROM_HERE, | 441 FROM_HERE, |
442 base::Bind(&LocalFileChangeTracker::ClearChangesForURL, | 442 base::Bind(&LocalFileChangeTracker::ClearChangesForURL, |
443 base::Unretained(file_system_context_->change_tracker()), | 443 base::Unretained(file_system_context_->change_tracker()), |
444 url)); | 444 url)); |
445 } | 445 } |
446 | 446 |
447 FileSystemOperation* CannedSyncableFileSystem::NewOperation() { | 447 FileSystemOperation* CannedSyncableFileSystem::NewOperation() { |
448 return file_system_context_->CreateFileSystemOperation(URL(""), NULL); | 448 return file_system_context_->CreateFileSystemOperation(URL(std::string()), |
| 449 NULL); |
449 } | 450 } |
450 | 451 |
451 void CannedSyncableFileSystem::OnSyncEnabled(const FileSystemURL& url) { | 452 void CannedSyncableFileSystem::OnSyncEnabled(const FileSystemURL& url) { |
452 sync_status_observers_->Notify(&LocalFileSyncStatus::Observer::OnSyncEnabled, | 453 sync_status_observers_->Notify(&LocalFileSyncStatus::Observer::OnSyncEnabled, |
453 url); | 454 url); |
454 } | 455 } |
455 | 456 |
456 void CannedSyncableFileSystem::OnWriteEnabled(const FileSystemURL& url) { | 457 void CannedSyncableFileSystem::OnWriteEnabled(const FileSystemURL& url) { |
457 sync_status_observers_->Notify(&LocalFileSyncStatus::Observer::OnWriteEnabled, | 458 sync_status_observers_->Notify(&LocalFileSyncStatus::Observer::OnWriteEnabled, |
458 url); | 459 url); |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
597 sync_status_ = status; | 598 sync_status_ = status; |
598 MessageLoop::current()->Quit(); | 599 MessageLoop::current()->Quit(); |
599 } | 600 } |
600 | 601 |
601 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { | 602 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { |
602 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); | 603 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); |
603 file_system_context_->sync_context()->sync_status()->AddObserver(this); | 604 file_system_context_->sync_context()->sync_status()->AddObserver(this); |
604 } | 605 } |
605 | 606 |
606 } // namespace sync_file_system | 607 } // namespace sync_file_system |
OLD | NEW |