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

Side by Side Diff: chrome/browser/media_galleries/fileapi/media_file_system_backend.cc

Issue 18668003: SyncFS: Introduce SyncFileSystemBackend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: lazy initialization 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "chrome/browser/media_galleries/fileapi/media_file_system_backend.h" 5 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 // We never allow opening a new isolated FileSystem via usual OpenFileSystem. 112 // We never allow opening a new isolated FileSystem via usual OpenFileSystem.
113 base::MessageLoopProxy::current()->PostTask( 113 base::MessageLoopProxy::current()->PostTask(
114 FROM_HERE, 114 FROM_HERE,
115 base::Bind(callback, 115 base::Bind(callback,
116 GetFileSystemRootURI(origin_url, type), 116 GetFileSystemRootURI(origin_url, type),
117 GetFileSystemName(origin_url, type), 117 GetFileSystemName(origin_url, type),
118 base::PLATFORM_FILE_ERROR_SECURITY)); 118 base::PLATFORM_FILE_ERROR_SECURITY));
119 } 119 }
120 120
121 fileapi::FileSystemFileUtil* MediaFileSystemBackend::GetFileUtil( 121 fileapi::FileSystemFileUtil* MediaFileSystemBackend::GetFileUtil(
122 fileapi::FileSystemType type) { 122 fileapi::FileSystemType type,
123 const fileapi::FileSystemContext* context) {
123 NOTREACHED(); 124 NOTREACHED();
124 return NULL; 125 return NULL;
125 } 126 }
126 127
127 fileapi::AsyncFileUtil* MediaFileSystemBackend::GetAsyncFileUtil( 128 fileapi::AsyncFileUtil* MediaFileSystemBackend::GetAsyncFileUtil(
128 fileapi::FileSystemType type) { 129 fileapi::FileSystemType type,
130 const fileapi::FileSystemContext* context) {
129 switch (type) { 131 switch (type) {
130 case fileapi::kFileSystemTypeNativeMedia: 132 case fileapi::kFileSystemTypeNativeMedia:
131 return native_media_file_util_.get(); 133 return native_media_file_util_.get();
132 case fileapi::kFileSystemTypeDeviceMedia: 134 case fileapi::kFileSystemTypeDeviceMedia:
133 return device_media_async_file_util_.get(); 135 return device_media_async_file_util_.get();
134 #if defined(OS_WIN) || defined(OS_MACOSX) 136 #if defined(OS_WIN) || defined(OS_MACOSX)
135 case fileapi::kFileSystemTypeItunes: 137 case fileapi::kFileSystemTypeItunes:
136 return itunes_file_util_.get(); 138 return itunes_file_util_.get();
137 case fileapi::kFileSystemTypePicasa: 139 case fileapi::kFileSystemTypePicasa:
138 return picasa_file_util_.get(); 140 return picasa_file_util_.get();
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 url.path(), offset)); 208 url.path(), offset));
207 } 209 }
208 210
209 fileapi::FileSystemQuotaUtil* 211 fileapi::FileSystemQuotaUtil*
210 MediaFileSystemBackend::GetQuotaUtil() { 212 MediaFileSystemBackend::GetQuotaUtil() {
211 // No quota support. 213 // No quota support.
212 return NULL; 214 return NULL;
213 } 215 }
214 216
215 } // namespace chrome 217 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698