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

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

Issue 10082002: Add FileSystemMountPointProvider::CreateFileReader() which returns appropriate Reader instance (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 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/file_system_context.h ('k') | webkit/fileapi/file_system_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/file_system_context.h" 5 #include "webkit/fileapi/file_system_context.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 if (!CrackFileSystemURL(url, &origin_url, &file_system_type, &file_path)) 183 if (!CrackFileSystemURL(url, &origin_url, &file_system_type, &file_path))
184 return NULL; 184 return NULL;
185 FileSystemMountPointProvider* mount_point_provider = 185 FileSystemMountPointProvider* mount_point_provider =
186 GetMountPointProvider(file_system_type); 186 GetMountPointProvider(file_system_type);
187 if (!mount_point_provider) 187 if (!mount_point_provider)
188 return NULL; 188 return NULL;
189 return mount_point_provider->CreateFileSystemOperation( 189 return mount_point_provider->CreateFileSystemOperation(
190 origin_url, file_system_type, file_path, file_proxy, this); 190 origin_url, file_system_type, file_path, file_proxy, this);
191 } 191 }
192 192
193 webkit_blob::FileReader* FileSystemContext::CreateFileReader(
194 const GURL& url,
195 int64 offset,
196 base::MessageLoopProxy* file_proxy) {
197 GURL origin_url;
198 FileSystemType file_system_type = kFileSystemTypeUnknown;
199 FilePath file_path;
200 if (!CrackFileSystemURL(url, &origin_url, &file_system_type, &file_path))
201 return NULL;
202 FileSystemMountPointProvider* mount_point_provider =
203 GetMountPointProvider(file_system_type);
204 if (!mount_point_provider)
205 return NULL;
206 return mount_point_provider->CreateFileReader(url, offset, file_proxy, this);
207 }
208
193 } // namespace fileapi 209 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/file_system_context.h ('k') | webkit/fileapi/file_system_mount_point_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698