Chromium Code Reviews| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 128 ASSERT(m_private); | 128 ASSERT(m_private); |
| 129 return createDatabaseIdentifierFromSecurityOrigin(m_private); | 129 return createDatabaseIdentifierFromSecurityOrigin(m_private); |
| 130 } | 130 } |
| 131 | 131 |
| 132 bool WebSecurityOrigin::canAccessPasswordManager() const | 132 bool WebSecurityOrigin::canAccessPasswordManager() const |
| 133 { | 133 { |
| 134 ASSERT(m_private); | 134 ASSERT(m_private); |
| 135 return m_private->canAccessPasswordManager(); | 135 return m_private->canAccessPasswordManager(); |
| 136 } | 136 } |
| 137 | 137 |
| 138 WebSecurityOrigin::WebSecurityOrigin(SecurityOrigin* origin) | |
| 139 : m_private(static_cast<WebSecurityOriginPrivate*>(origin->isolatedCopy().le akRef())) | |
|
Mike West
2015/07/10 14:02:31
This feels a little ugly. If you have suggestions,
Peter Beverloo
2015/07/10 14:27:03
The obvious option would be for ExecutionContext::
| |
| 140 { | |
| 141 } | |
| 142 | |
| 138 WebSecurityOrigin::WebSecurityOrigin(const WTF::PassRefPtr<SecurityOrigin>& orig in) | 143 WebSecurityOrigin::WebSecurityOrigin(const WTF::PassRefPtr<SecurityOrigin>& orig in) |
| 139 : m_private(static_cast<WebSecurityOriginPrivate*>(origin.leakRef())) | 144 : m_private(static_cast<WebSecurityOriginPrivate*>(origin.leakRef())) |
| 140 { | 145 { |
| 141 } | 146 } |
| 142 | 147 |
| 143 WebSecurityOrigin& WebSecurityOrigin::operator=(const WTF::PassRefPtr<SecurityOr igin>& origin) | 148 WebSecurityOrigin& WebSecurityOrigin::operator=(const WTF::PassRefPtr<SecurityOr igin>& origin) |
| 144 { | 149 { |
| 145 assign(static_cast<WebSecurityOriginPrivate*>(origin.leakRef())); | 150 assign(static_cast<WebSecurityOriginPrivate*>(origin.leakRef())); |
| 146 return *this; | 151 return *this; |
| 147 } | 152 } |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 163 m_private->deref(); | 168 m_private->deref(); |
| 164 m_private = p; | 169 m_private = p; |
| 165 } | 170 } |
| 166 | 171 |
| 167 void WebSecurityOrigin::grantLoadLocalResources() const | 172 void WebSecurityOrigin::grantLoadLocalResources() const |
| 168 { | 173 { |
| 169 get()->grantLoadLocalResources(); | 174 get()->grantLoadLocalResources(); |
| 170 } | 175 } |
| 171 | 176 |
| 172 } // namespace blink | 177 } // namespace blink |
| OLD | NEW |