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

Side by Side Diff: public/web/WebSecurityOrigin.h

Issue 452793002: Export WebSecurityOrigin's secure origin check. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 // Returns true if this WebSecurityOrigin can read content retrieved from 81 // Returns true if this WebSecurityOrigin can read content retrieved from
82 // the given URL. For example, call this function before allowing script 82 // the given URL. For example, call this function before allowing script
83 // from a given security origin to receive contents from a given URL. 83 // from a given security origin to receive contents from a given URL.
84 BLINK_EXPORT bool canRequest(const WebURL&) const; 84 BLINK_EXPORT bool canRequest(const WebURL&) const;
85 85
86 // A "secure origin" as defined by [1] are those that load resources either 86 // A "secure origin" as defined by [1] are those that load resources either
87 // from the local machine (necessarily trusted) or over the network from a 87 // from the local machine (necessarily trusted) or over the network from a
88 // cryptographically-authenticated server. 88 // cryptographically-authenticated server.
89 // 89 //
90 // [1] http://www.chromium.org/Home/chromium-security/security-faq#TOC-Which -origins-are-secure- 90 // [1] http://www.chromium.org/Home/chromium-security/security-faq#TOC-Which -origins-are-secure-
91 bool canAccessFeatureRequiringSecureOrigin(WebString& errorMessage) const; 91 BLINK_EXPORT bool canAccessFeatureRequiringSecureOrigin(WebString& errorMess age) const;
92 92
93 // Returns a string representation of the WebSecurityOrigin. The empty 93 // Returns a string representation of the WebSecurityOrigin. The empty
94 // WebSecurityOrigin is represented by "null". The representation of a 94 // WebSecurityOrigin is represented by "null". The representation of a
95 // non-empty WebSecurityOrigin resembles a standard URL. 95 // non-empty WebSecurityOrigin resembles a standard URL.
96 BLINK_EXPORT WebString toString() const; 96 BLINK_EXPORT WebString toString() const;
97 97
98 // Returns a string representation of this WebSecurityOrigin that can 98 // Returns a string representation of this WebSecurityOrigin that can
99 // be used as a file. Should be used in storage APIs only. 99 // be used as a file. Should be used in storage APIs only.
100 BLINK_EXPORT WebString databaseIdentifier() const; 100 BLINK_EXPORT WebString databaseIdentifier() const;
101 101
(...skipping 12 matching lines...) Expand all
114 #endif 114 #endif
115 115
116 private: 116 private:
117 void assign(WebSecurityOriginPrivate*); 117 void assign(WebSecurityOriginPrivate*);
118 WebSecurityOriginPrivate* m_private; 118 WebSecurityOriginPrivate* m_private;
119 }; 119 };
120 120
121 } // namespace blink 121 } // namespace blink
122 122
123 #endif 123 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698