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

Side by Side Diff: chrome/browser/extensions/api/file_handlers/app_file_handler_util.cc

Issue 15658004: Split FileAPI code for common|common_child|renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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 "chrome/browser/extensions/api/file_handlers/app_file_handler_util.h" 5 #include "chrome/browser/extensions/api/file_handlers/app_file_handler_util.h"
6 6
7 #include "chrome/browser/extensions/extension_prefs.h" 7 #include "chrome/browser/extensions/extension_prefs.h"
8 #include "content/public/browser/child_process_security_policy.h" 8 #include "content/public/browser/child_process_security_policy.h"
9 #include "net/base/mime_util.h" 9 #include "net/base/mime_util.h"
10 #include "webkit/browser/fileapi/isolated_context.h" 10 #include "webkit/browser/fileapi/isolated_context.h"
11 #include "webkit/fileapi/file_system_types.h" 11 #include "webkit/common/fileapi/file_system_types.h"
12 12
13 namespace extensions { 13 namespace extensions {
14 14
15 namespace app_file_handler_util { 15 namespace app_file_handler_util {
16 16
17 namespace { 17 namespace {
18 18
19 bool FileHandlerCanHandleFileWithExtension( 19 bool FileHandlerCanHandleFileWithExtension(
20 const FileHandlerInfo& handler, 20 const FileHandlerInfo& handler,
21 const base::FilePath& path) { 21 const base::FilePath& path) {
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 // just needs the file system to have read/write access, which is granted 148 // just needs the file system to have read/write access, which is granted
149 // above if required. 149 // above if required.
150 if (!policy->CanReadFile(renderer_id, path)) 150 if (!policy->CanReadFile(renderer_id, path))
151 policy->GrantReadFile(renderer_id, path); 151 policy->GrantReadFile(renderer_id, path);
152 return result; 152 return result;
153 } 153 }
154 154
155 } // namespace app_file_handler_util 155 } // namespace app_file_handler_util
156 156
157 } // namespace extensions 157 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/devtools/devtools_file_helper.cc ('k') | chrome/browser/extensions/api/file_system/file_system_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698