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

Side by Side Diff: chrome/browser/renderer_security_policy.h

Issue 3149: Porting changes in chrome/{browser,common}, also enabling more unit tests.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years, 3 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 CHROME_BROWSER_RENDERER_SECURITY_POLICY_H__ 5 #ifndef CHROME_BROWSER_RENDERER_SECURITY_POLICY_H__
6 #define CHROME_BROWSER_RENDERER_SECURITY_POLICY_H__ 6 #define CHROME_BROWSER_RENDERER_SECURITY_POLICY_H__
7 7
8 #include <string> 8 #include <string>
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 bool HasDOMUIBindings(int renderer_id); 87 bool HasDOMUIBindings(int renderer_id);
88 88
89 private: 89 private:
90 class SecurityState; 90 class SecurityState;
91 91
92 typedef std::set<std::string> SchemeSet; 92 typedef std::set<std::string> SchemeSet;
93 typedef std::map<int, SecurityState*> SecurityStateMap; 93 typedef std::map<int, SecurityState*> SecurityStateMap;
94 94
95 // Obtain an instance of RendererSecurityPolicy via GetInstance(). 95 // Obtain an instance of RendererSecurityPolicy via GetInstance().
96 RendererSecurityPolicy(); 96 RendererSecurityPolicy();
97 friend DefaultSingletonTraits<RendererSecurityPolicy>; 97 friend class DefaultSingletonTraits<RendererSecurityPolicy>;
98 98
99 // You must acquire this lock before reading or writing any members of this 99 // You must acquire this lock before reading or writing any members of this
100 // class. You must not block while holding this lock. 100 // class. You must not block while holding this lock.
101 Lock lock_; 101 Lock lock_;
102 102
103 // These schemes are white-listed for all renderers. This set is protected 103 // These schemes are white-listed for all renderers. This set is protected
104 // by |lock_|. 104 // by |lock_|.
105 SchemeSet web_safe_schemes_; 105 SchemeSet web_safe_schemes_;
106 106
107 // These schemes do not actually represent retrievable URLs. For example, 107 // These schemes do not actually represent retrievable URLs. For example,
108 // the the URLs in the "about" scheme are aliases to other URLs. This set is 108 // the the URLs in the "about" scheme are aliases to other URLs. This set is
109 // protected by |lock_|. 109 // protected by |lock_|.
110 SchemeSet pseudo_schemes_; 110 SchemeSet pseudo_schemes_;
111 111
112 // This map holds a SecurityState for each renderer process. The key for the 112 // This map holds a SecurityState for each renderer process. The key for the
113 // map is the ID of the RenderProcessHost. The SecurityState objects are 113 // map is the ID of the RenderProcessHost. The SecurityState objects are
114 // owned by this object and are protected by |lock_|. References to them must 114 // owned by this object and are protected by |lock_|. References to them must
115 // not escape this class. 115 // not escape this class.
116 SecurityStateMap security_state_; 116 SecurityStateMap security_state_;
117 117
118 DISALLOW_EVIL_CONSTRUCTORS(RendererSecurityPolicy); 118 DISALLOW_EVIL_CONSTRUCTORS(RendererSecurityPolicy);
119 }; 119 };
120 120
121 #endif // CHROME_BROWSER_RENDERER_SECURITY_POLICY_H__ 121 #endif // CHROME_BROWSER_RENDERER_SECURITY_POLICY_H__
122 122
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698