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

Side by Side Diff: content/browser/fileapi/browser_file_system_helper.cc

Issue 14247034: Move Media Galleries FileAPI code out of webkit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cr-14352004
Patch Set: Add android ifdef. Created 7 years, 7 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
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | content/content_tests.gypi » ('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 "content/browser/fileapi/browser_file_system_helper.h" 5 #include "content/browser/fileapi/browser_file_system_helper.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 pool->GetNamedSequenceToken(fileapi::kMediaTaskRunnerName); 57 pool->GetNamedSequenceToken(fileapi::kMediaTaskRunnerName);
58 58
59 scoped_ptr<fileapi::FileSystemTaskRunners> task_runners( 59 scoped_ptr<fileapi::FileSystemTaskRunners> task_runners(
60 new fileapi::FileSystemTaskRunners( 60 new fileapi::FileSystemTaskRunners(
61 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), 61 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO),
62 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE), 62 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE),
63 pool->GetSequencedTaskRunner(media_sequence_token))); 63 pool->GetSequencedTaskRunner(media_sequence_token)));
64 64
65 // Setting up additional mount point providers. 65 // Setting up additional mount point providers.
66 ScopedVector<fileapi::FileSystemMountPointProvider> additional_providers; 66 ScopedVector<fileapi::FileSystemMountPointProvider> additional_providers;
67 GetContentClient()->browser()->GetAdditionalFileSystemMountPointProviders(
68 profile_path, &additional_providers);
69
67 return new fileapi::FileSystemContext( 70 return new fileapi::FileSystemContext(
68 task_runners.Pass(), 71 task_runners.Pass(),
69 external_mount_points, 72 external_mount_points,
70 special_storage_policy, 73 special_storage_policy,
71 quota_manager_proxy, 74 quota_manager_proxy,
72 ScopedVector<fileapi::FileSystemMountPointProvider>(), 75 additional_providers.Pass(),
73 profile_path, 76 profile_path,
74 CreateBrowserFileSystemOptions(is_incognito)); 77 CreateBrowserFileSystemOptions(is_incognito));
75 } 78 }
76 79
77 bool CheckFileSystemPermissionsForProcess( 80 bool CheckFileSystemPermissionsForProcess(
78 fileapi::FileSystemContext* context, int process_id, 81 fileapi::FileSystemContext* context, int process_id,
79 const fileapi::FileSystemURL& url, int permissions, 82 const fileapi::FileSystemURL& url, int permissions,
80 base::PlatformFileError* error) { 83 base::PlatformFileError* error) {
81 DCHECK(error); 84 DCHECK(error);
82 *error = base::PLATFORM_FILE_OK; 85 *error = base::PLATFORM_FILE_OK;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 // for the file. (We first need to check if it can already be read not to 164 // for the file. (We first need to check if it can already be read not to
162 // overwrite existing permissions) 165 // overwrite existing permissions)
163 if (!ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile( 166 if (!ChildProcessSecurityPolicyImpl::GetInstance()->CanReadFile(
164 process_id, *platform_path)) { 167 process_id, *platform_path)) {
165 ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadFile( 168 ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadFile(
166 process_id, *platform_path); 169 process_id, *platform_path);
167 } 170 }
168 } 171 }
169 172
170 } // namespace content 173 } // namespace content
OLDNEW
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698