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

Side by Side Diff: webkit/fileapi/media/native_media_file_util.cc

Issue 14352004: Split Media-related code from IsolatedMountPointProvider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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/media/native_media_file_util.h" 5 #include "webkit/fileapi/media/native_media_file_util.h"
6 6
7 #include "webkit/fileapi/file_system_operation_context.h" 7 #include "webkit/fileapi/file_system_operation_context.h"
8 #include "webkit/fileapi/isolated_mount_point_provider.h"
9 #include "webkit/fileapi/media/filtering_file_enumerator.h" 8 #include "webkit/fileapi/media/filtering_file_enumerator.h"
9 #include "webkit/fileapi/media/media_file_system_mount_point_provider.h"
10 #include "webkit/fileapi/media/media_path_filter.h" 10 #include "webkit/fileapi/media/media_path_filter.h"
11 #include "webkit/fileapi/native_file_util.h" 11 #include "webkit/fileapi/native_file_util.h"
12 12
13 using base::PlatformFile; 13 using base::PlatformFile;
14 using base::PlatformFileError; 14 using base::PlatformFileError;
15 using base::PlatformFileInfo; 15 using base::PlatformFileInfo;
16 16
17 namespace fileapi { 17 namespace fileapi {
18 18
19 namespace { 19 namespace {
20 20
21 MediaPathFilter* GetMediaPathFilter(FileSystemOperationContext* context) { 21 MediaPathFilter* GetMediaPathFilter(FileSystemOperationContext* context) {
22 return context->GetUserValue<MediaPathFilter*>( 22 return context->GetUserValue<MediaPathFilter*>(
23 IsolatedMountPointProvider::kMediaPathFilterKey); 23 MediaFileSystemMountPointProvider::kMediaPathFilterKey);
Greg Billock 2013/04/18 16:18:02 I don't understand why this fileutil would know ab
kinuko 2013/04/19 15:19:32 My assumption here is: MediaFSMountPointProvider a
Greg Billock 2013/04/19 15:27:47 No, that makes sense. I was thinking I was in nati
24 } 24 }
25 25
26 } // namespace 26 } // namespace
27 27
28 NativeMediaFileUtil::NativeMediaFileUtil() { 28 NativeMediaFileUtil::NativeMediaFileUtil() {
29 } 29 }
30 30
31 PlatformFileError NativeMediaFileUtil::CreateOrOpen( 31 PlatformFileError NativeMediaFileUtil::CreateOrOpen(
32 FileSystemOperationContext* context, 32 FileSystemOperationContext* context,
33 const FileSystemURL& url, 33 const FileSystemURL& url,
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 if (!file_info.is_directory && 217 if (!file_info.is_directory &&
218 !GetMediaPathFilter(context)->Match(file_path)) { 218 !GetMediaPathFilter(context)->Match(file_path)) {
219 return failure_error; 219 return failure_error;
220 } 220 }
221 221
222 *local_file_path = file_path; 222 *local_file_path = file_path;
223 return base::PLATFORM_FILE_OK; 223 return base::PLATFORM_FILE_OK;
224 } 224 }
225 225
226 } // namespace fileapi 226 } // namespace fileapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698