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

Side by Side Diff: content/browser/child_process_security_policy_impl.h

Issue 2067493003: Moving (Can|Grant)AccessFilesOfPageState into RenderFrameHostImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@grant-file-access-after-transfer
Patch Set: Rebasing... Created 4 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
« no previous file with comments | « no previous file | content/browser/child_process_security_policy_impl.cc » ('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 #ifndef CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ 5 #ifndef CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_
6 #define CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ 6 #define CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 #include <vector>
11 12
12 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
13 #include "base/gtest_prod_util.h" 14 #include "base/gtest_prod_util.h"
14 #include "base/macros.h" 15 #include "base/macros.h"
15 #include "base/memory/singleton.h" 16 #include "base/memory/singleton.h"
16 #include "base/synchronization/lock.h" 17 #include "base/synchronization/lock.h"
17 #include "content/public/browser/child_process_security_policy.h" 18 #include "content/public/browser/child_process_security_policy.h"
18 #include "content/public/common/resource_type.h" 19 #include "content/public/common/resource_type.h"
19 #include "storage/common/fileapi/file_system_types.h" 20 #include "storage/common/fileapi/file_system_types.h"
20 21
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 bool CanReadWriteFileSystem(int child_id, 71 bool CanReadWriteFileSystem(int child_id,
71 const std::string& filesystem_id) override; 72 const std::string& filesystem_id) override;
72 bool CanCopyIntoFileSystem(int child_id, 73 bool CanCopyIntoFileSystem(int child_id,
73 const std::string& filesystem_id) override; 74 const std::string& filesystem_id) override;
74 bool CanDeleteFromFileSystem(int child_id, 75 bool CanDeleteFromFileSystem(int child_id,
75 const std::string& filesystem_id) override; 76 const std::string& filesystem_id) override;
76 bool HasWebUIBindings(int child_id) override; 77 bool HasWebUIBindings(int child_id) override;
77 void GrantSendMidiSysExMessage(int child_id) override; 78 void GrantSendMidiSysExMessage(int child_id) override;
78 bool CanAccessDataForOrigin(int child_id, const GURL& url) override; 79 bool CanAccessDataForOrigin(int child_id, const GURL& url) override;
79 80
81 // Returns if |child_id| can read all of the |files|.
82 bool CanReadAllFiles(int child_id, const std::vector<base::FilePath>& files);
83
80 // Pseudo schemes are treated differently than other schemes because they 84 // Pseudo schemes are treated differently than other schemes because they
81 // cannot be requested like normal URLs. There is no mechanism for revoking 85 // cannot be requested like normal URLs. There is no mechanism for revoking
82 // pseudo schemes. 86 // pseudo schemes.
83 void RegisterPseudoScheme(const std::string& scheme); 87 void RegisterPseudoScheme(const std::string& scheme);
84 88
85 // Returns true iff |scheme| has been registered as pseudo scheme. 89 // Returns true iff |scheme| has been registered as pseudo scheme.
86 bool IsPseudoScheme(const std::string& scheme); 90 bool IsPseudoScheme(const std::string& scheme);
87 91
88 // Upon creation, child processes should register themselves by calling this 92 // Upon creation, child processes should register themselves by calling this
89 // this method exactly once. 93 // this method exactly once.
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 WorkerToMainProcessMap worker_map_; 250 WorkerToMainProcessMap worker_map_;
247 251
248 FileSystemPermissionPolicyMap file_system_policy_map_; 252 FileSystemPermissionPolicyMap file_system_policy_map_;
249 253
250 DISALLOW_COPY_AND_ASSIGN(ChildProcessSecurityPolicyImpl); 254 DISALLOW_COPY_AND_ASSIGN(ChildProcessSecurityPolicyImpl);
251 }; 255 };
252 256
253 } // namespace content 257 } // namespace content
254 258
255 #endif // CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_ 259 #endif // CONTENT_BROWSER_CHILD_PROCESS_SECURITY_POLICY_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/child_process_security_policy_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698