| OLD | NEW |
| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 ~WebSecurityOrigin() { reset(); } | 51 ~WebSecurityOrigin() { reset(); } |
| 52 | 52 |
| 53 WebSecurityOrigin() : m_private(0) { } | 53 WebSecurityOrigin() : m_private(0) { } |
| 54 WebSecurityOrigin(const WebSecurityOrigin& s) : m_private(0) { assign(s); } | 54 WebSecurityOrigin(const WebSecurityOrigin& s) : m_private(0) { assign(s); } |
| 55 WebSecurityOrigin& operator=(const WebSecurityOrigin& s) | 55 WebSecurityOrigin& operator=(const WebSecurityOrigin& s) |
| 56 { | 56 { |
| 57 assign(s); | 57 assign(s); |
| 58 return *this; | 58 return *this; |
| 59 } | 59 } |
| 60 | 60 |
| 61 BLINK_PLATFORM_EXPORT static WebSecurityOrigin createFromDatabaseIdentifier(
const WebString& databaseIdentifier); | |
| 62 BLINK_PLATFORM_EXPORT static WebSecurityOrigin createFromString(const WebStr
ing&); | 61 BLINK_PLATFORM_EXPORT static WebSecurityOrigin createFromString(const WebStr
ing&); |
| 63 BLINK_PLATFORM_EXPORT static WebSecurityOrigin create(const WebURL&); | 62 BLINK_PLATFORM_EXPORT static WebSecurityOrigin create(const WebURL&); |
| 64 BLINK_PLATFORM_EXPORT static WebSecurityOrigin createUnique(); | 63 BLINK_PLATFORM_EXPORT static WebSecurityOrigin createUnique(); |
| 65 | 64 |
| 66 BLINK_PLATFORM_EXPORT void reset(); | 65 BLINK_PLATFORM_EXPORT void reset(); |
| 67 BLINK_PLATFORM_EXPORT void assign(const WebSecurityOrigin&); | 66 BLINK_PLATFORM_EXPORT void assign(const WebSecurityOrigin&); |
| 68 | 67 |
| 69 bool isNull() const { return !m_private; } | 68 bool isNull() const { return !m_private; } |
| 70 | 69 |
| 71 BLINK_PLATFORM_EXPORT WebString protocol() const; | 70 BLINK_PLATFORM_EXPORT WebString protocol() const; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 95 // machine or over the network from a | 94 // machine or over the network from a |
| 96 // cryptographically-authenticated origin, as described in | 95 // cryptographically-authenticated origin, as described in |
| 97 // https://w3c.github.io/webappsec/specs/powerfulfeatures/#is-origin-trustwo
rthy. | 96 // https://w3c.github.io/webappsec/specs/powerfulfeatures/#is-origin-trustwo
rthy. |
| 98 BLINK_PLATFORM_EXPORT bool isPotentiallyTrustworthy() const; | 97 BLINK_PLATFORM_EXPORT bool isPotentiallyTrustworthy() const; |
| 99 | 98 |
| 100 // Returns a string representation of the WebSecurityOrigin. The empty | 99 // Returns a string representation of the WebSecurityOrigin. The empty |
| 101 // WebSecurityOrigin is represented by "null". The representation of a | 100 // WebSecurityOrigin is represented by "null". The representation of a |
| 102 // non-empty WebSecurityOrigin resembles a standard URL. | 101 // non-empty WebSecurityOrigin resembles a standard URL. |
| 103 BLINK_PLATFORM_EXPORT WebString toString() const; | 102 BLINK_PLATFORM_EXPORT WebString toString() const; |
| 104 | 103 |
| 105 // Returns a string representation of this WebSecurityOrigin that can | |
| 106 // be used as a file. Should be used in storage APIs only. | |
| 107 BLINK_PLATFORM_EXPORT WebString databaseIdentifier() const; | |
| 108 | |
| 109 // Returns true if this WebSecurityOrigin can access usernames and | 104 // Returns true if this WebSecurityOrigin can access usernames and |
| 110 // passwords stored in password manager. | 105 // passwords stored in password manager. |
| 111 BLINK_PLATFORM_EXPORT bool canAccessPasswordManager() const; | 106 BLINK_PLATFORM_EXPORT bool canAccessPasswordManager() const; |
| 112 | 107 |
| 113 // Allows this WebSecurityOrigin access to local resources. | 108 // Allows this WebSecurityOrigin access to local resources. |
| 114 BLINK_PLATFORM_EXPORT void grantLoadLocalResources() const; | 109 BLINK_PLATFORM_EXPORT void grantLoadLocalResources() const; |
| 115 | 110 |
| 116 #if INSIDE_BLINK | 111 #if INSIDE_BLINK |
| 117 BLINK_PLATFORM_EXPORT WebSecurityOrigin(const WTF::PassRefPtr<SecurityOrigin
>&); | 112 BLINK_PLATFORM_EXPORT WebSecurityOrigin(const WTF::PassRefPtr<SecurityOrigin
>&); |
| 118 BLINK_PLATFORM_EXPORT WebSecurityOrigin& operator=(const WTF::PassRefPtr<Sec
urityOrigin>&); | 113 BLINK_PLATFORM_EXPORT WebSecurityOrigin& operator=(const WTF::PassRefPtr<Sec
urityOrigin>&); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 147 // Present only to facilitate conversion from 'url::Origin'; this constructo
r shouldn't be used anywhere else. | 142 // Present only to facilitate conversion from 'url::Origin'; this constructo
r shouldn't be used anywhere else. |
| 148 BLINK_PLATFORM_EXPORT static WebSecurityOrigin createFromTuple(const WebStri
ng& protocol, const WebString& host, int port); | 143 BLINK_PLATFORM_EXPORT static WebSecurityOrigin createFromTuple(const WebStri
ng& protocol, const WebString& host, int port); |
| 149 | 144 |
| 150 void assign(WebSecurityOriginPrivate*); | 145 void assign(WebSecurityOriginPrivate*); |
| 151 WebSecurityOriginPrivate* m_private; | 146 WebSecurityOriginPrivate* m_private; |
| 152 }; | 147 }; |
| 153 | 148 |
| 154 } // namespace blink | 149 } // namespace blink |
| 155 | 150 |
| 156 #endif | 151 #endif |
| OLD | NEW |