| 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/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 Loading... |
| 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 |
| OLD | NEW |