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

Side by Side Diff: webkit/fileapi/syncable/canned_syncable_file_system.cc

Issue 14096022: Make MountPointProvider pluggable from outside webkit/fileapi (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix etc 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 | Annotate | Revision Log
« no previous file with comments | « webkit/fileapi/sandbox_quota_observer.cc ('k') | webkit/fileapi/test_mount_point_provider.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 (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"
11 #include "base/run_loop.h" 11 #include "base/run_loop.h"
12 #include "base/single_thread_task_runner.h" 12 #include "base/single_thread_task_runner.h"
13 #include "base/task_runner_util.h" 13 #include "base/task_runner_util.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 #include "webkit/blob/mock_blob_url_request_context.h" 15 #include "webkit/blob/mock_blob_url_request_context.h"
16 #include "webkit/fileapi/external_mount_points.h" 16 #include "webkit/fileapi/external_mount_points.h"
17 #include "webkit/fileapi/file_system_context.h" 17 #include "webkit/fileapi/file_system_context.h"
18 #include "webkit/fileapi/file_system_mount_point_provider.h"
18 #include "webkit/fileapi/file_system_operation_context.h" 19 #include "webkit/fileapi/file_system_operation_context.h"
19 #include "webkit/fileapi/file_system_task_runners.h" 20 #include "webkit/fileapi/file_system_task_runners.h"
20 #include "webkit/fileapi/local_file_system_operation.h" 21 #include "webkit/fileapi/local_file_system_operation.h"
21 #include "webkit/fileapi/mock_file_system_options.h" 22 #include "webkit/fileapi/mock_file_system_options.h"
22 #include "webkit/fileapi/sandbox_mount_point_provider.h" 23 #include "webkit/fileapi/sandbox_mount_point_provider.h"
23 #include "webkit/fileapi/syncable/local_file_change_tracker.h" 24 #include "webkit/fileapi/syncable/local_file_change_tracker.h"
24 #include "webkit/fileapi/syncable/local_file_sync_context.h" 25 #include "webkit/fileapi/syncable/local_file_sync_context.h"
25 #include "webkit/fileapi/syncable/syncable_file_system_util.h" 26 #include "webkit/fileapi/syncable/syncable_file_system_util.h"
26 #include "webkit/quota/mock_special_storage_policy.h" 27 #include "webkit/quota/mock_special_storage_policy.h"
27 #include "webkit/quota/quota_manager.h" 28 #include "webkit/quota/quota_manager.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 storage_policy); 207 storage_policy);
207 208
208 file_system_context_ = new FileSystemContext( 209 file_system_context_ = new FileSystemContext(
209 make_scoped_ptr(new fileapi::FileSystemTaskRunners( 210 make_scoped_ptr(new fileapi::FileSystemTaskRunners(
210 io_task_runner_, 211 io_task_runner_,
211 file_task_runner_, 212 file_task_runner_,
212 file_task_runner_)), 213 file_task_runner_)),
213 fileapi::ExternalMountPoints::CreateRefCounted().get(), 214 fileapi::ExternalMountPoints::CreateRefCounted().get(),
214 storage_policy, 215 storage_policy,
215 quota_manager_->proxy(), 216 quota_manager_->proxy(),
217 ScopedVector<fileapi::FileSystemMountPointProvider>(),
216 data_dir_.path(), 218 data_dir_.path(),
217 fileapi::CreateAllowFileAccessOptions()); 219 fileapi::CreateAllowFileAccessOptions());
218 220
219 // In testing we override this setting to support directory operations 221 // In testing we override this setting to support directory operations
220 // by default. 222 // by default.
221 SetEnableSyncDirectoryOperation(true); 223 SetEnableSyncDirectoryOperation(true);
222 224
223 is_filesystem_set_up_ = true; 225 is_filesystem_set_up_ = true;
224 } 226 }
225 227
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 sync_status_ = status; 595 sync_status_ = status;
594 MessageLoop::current()->Quit(); 596 MessageLoop::current()->Quit();
595 } 597 }
596 598
597 void CannedSyncableFileSystem::InitializeSyncStatusObserver() { 599 void CannedSyncableFileSystem::InitializeSyncStatusObserver() {
598 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread()); 600 ASSERT_TRUE(io_task_runner_->RunsTasksOnCurrentThread());
599 file_system_context_->sync_context()->sync_status()->AddObserver(this); 601 file_system_context_->sync_context()->sync_status()->AddObserver(this);
600 } 602 }
601 603
602 } // namespace sync_file_system 604 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « webkit/fileapi/sandbox_quota_observer.cc ('k') | webkit/fileapi/test_mount_point_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698