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

Side by Side Diff: extensions/browser/info_map.h

Issue 1207363002: Simplify permission-related code for Web Notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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') | extensions/browser/info_map.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 EXTENSIONS_BROWSER_INFO_MAP_H_ 5 #ifndef EXTENSIONS_BROWSER_INFO_MAP_H_
6 #define EXTENSIONS_BROWSER_INFO_MAP_H_ 6 #define EXTENSIONS_BROWSER_INFO_MAP_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 void RegisterExtensionProcess(const std::string& extension_id, 64 void RegisterExtensionProcess(const std::string& extension_id,
65 int process_id, 65 int process_id,
66 int site_instance_id); 66 int site_instance_id);
67 67
68 // Removes an entry from process_map_. 68 // Removes an entry from process_map_.
69 void UnregisterExtensionProcess(const std::string& extension_id, 69 void UnregisterExtensionProcess(const std::string& extension_id,
70 int process_id, 70 int process_id,
71 int site_instance_id); 71 int site_instance_id);
72 void UnregisterAllExtensionsInProcess(int process_id); 72 void UnregisterAllExtensionsInProcess(int process_id);
73 73
74 // Returns the subset of extensions which has the same |origin| in
75 // |process_id| with the specified |permission|.
76 void GetExtensionsWithAPIPermissionForSecurityOrigin(
77 const GURL& origin,
78 int process_id,
79 extensions::APIPermission::ID permission,
80 ExtensionSet* extensions) const;
81
82 // Returns true if there is exists an extension with the same origin as 74 // Returns true if there is exists an extension with the same origin as
83 // |origin| in |process_id| with |permission|. 75 // |origin| in |process_id| with |permission|.
84 bool SecurityOriginHasAPIPermission(const GURL& origin, 76 bool SecurityOriginHasAPIPermission(const GURL& origin,
85 int process_id, 77 int process_id,
86 extensions::APIPermission::ID permission) 78 extensions::APIPermission::ID permission)
87 const; 79 const;
88 80
89 // Maps a |file_url| to a |file_path| on the local filesystem, including 81 // Maps a |file_url| to a |file_path| on the local filesystem, including
90 // resources in extensions. Returns true on success. See NaClBrowserDelegate 82 // resources in extensions. Returns true on success. See NaClBrowserDelegate
91 // for full details. 83 // for full details.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 119
128 // Assignment of extensions to renderer processes. 120 // Assignment of extensions to renderer processes.
129 extensions::ProcessMap process_map_; 121 extensions::ProcessMap process_map_;
130 122
131 scoped_refptr<ContentVerifier> content_verifier_; 123 scoped_refptr<ContentVerifier> content_verifier_;
132 }; 124 };
133 125
134 } // namespace extensions 126 } // namespace extensions
135 127
136 #endif // EXTENSIONS_BROWSER_INFO_MAP_H_ 128 #endif // EXTENSIONS_BROWSER_INFO_MAP_H_
OLDNEW
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | extensions/browser/info_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698