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

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

Issue 11648027: Extract external file systems handling from isolated context. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 11 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 (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/syncable_file_system_util.h" 5 #include "webkit/fileapi/syncable/syncable_file_system_util.h"
6 6
7 #include "webkit/fileapi/external_mount_points.h"
7 #include "webkit/fileapi/file_observers.h" 8 #include "webkit/fileapi/file_observers.h"
8 #include "webkit/fileapi/file_system_context.h" 9 #include "webkit/fileapi/file_system_context.h"
9 #include "webkit/fileapi/file_system_util.h" 10 #include "webkit/fileapi/file_system_util.h"
10 #include "webkit/fileapi/isolated_context.h"
11 #include "webkit/fileapi/sandbox_mount_point_provider.h" 11 #include "webkit/fileapi/sandbox_mount_point_provider.h"
12 12
13 namespace fileapi { 13 namespace fileapi {
14 14
15 bool RegisterSyncableFileSystem(const std::string& service_name) { 15 bool RegisterSyncableFileSystem(const std::string& service_name) {
16 return IsolatedContext::GetInstance()->RegisterExternalFileSystem( 16 return ExternalMountPoints::GetSystemInstance()->RegisterFileSystem(
17 service_name, kFileSystemTypeSyncable, FilePath()); 17 service_name, kFileSystemTypeSyncable, FilePath());
18 } 18 }
19 19
20 bool RevokeSyncableFileSystem(const std::string& service_name) { 20 bool RevokeSyncableFileSystem(const std::string& service_name) {
21 return IsolatedContext::GetInstance()->RevokeFileSystem(service_name); 21 return ExternalMountPoints::GetSystemInstance()->RevokeFileSystem(
22 service_name);
22 } 23 }
23 24
24 GURL GetSyncableFileSystemRootURI(const GURL& origin, 25 GURL GetSyncableFileSystemRootURI(const GURL& origin,
25 const std::string& service_name) { 26 const std::string& service_name) {
26 const GURL url = GetFileSystemRootURI(origin, kFileSystemTypeExternal); 27 const GURL url = GetFileSystemRootURI(origin, kFileSystemTypeExternal);
27 const std::string path = service_name + "/"; 28 const std::string path = service_name + "/";
28 url_canon::Replacements<char> replacements; 29 url_canon::Replacements<char> replacements;
29 replacements.SetPath(path.c_str(), url_parse::Component(0, path.length())); 30 replacements.SetPath(path.c_str(), url_parse::Component(0, path.length()));
30 return url.ReplaceComponents(replacements); 31 return url.ReplaceComponents(replacements);
31 } 32 }
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 } 65 }
65 66
66 LocalFileSystemOperation* 67 LocalFileSystemOperation*
67 CreateFileSystemOperationForSync(FileSystemContext* file_system_context) { 68 CreateFileSystemOperationForSync(FileSystemContext* file_system_context) {
68 DCHECK(file_system_context); 69 DCHECK(file_system_context);
69 return file_system_context->sandbox_provider()-> 70 return file_system_context->sandbox_provider()->
70 CreateFileSystemOperationForSync(file_system_context); 71 CreateFileSystemOperationForSync(file_system_context);
71 } 72 }
72 73
73 } // namespace fileapi 74 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698