OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 | 375 |
376 return true; | 376 return true; |
377 } | 377 } |
378 | 378 |
379 bool SecurityOrigin::canAccessFeatureRequiringSecureOrigin(String& errorMessage)
const | 379 bool SecurityOrigin::canAccessFeatureRequiringSecureOrigin(String& errorMessage)
const |
380 { | 380 { |
381 ASSERT(m_protocol != "data"); | 381 ASSERT(m_protocol != "data"); |
382 if (SchemeRegistry::shouldTreatURLSchemeAsSecure(m_protocol) || isLocal() ||
isLocalhost()) | 382 if (SchemeRegistry::shouldTreatURLSchemeAsSecure(m_protocol) || isLocal() ||
isLocalhost()) |
383 return true; | 383 return true; |
384 | 384 |
385 errorMessage = "Only secure origins are allowed. http://goo.gl/lq4gCo"; | 385 errorMessage = "Only secure origins are allowed (see: https://goo.gl/Y0ZkNV)
."; |
386 return false; | 386 return false; |
387 } | 387 } |
388 | 388 |
389 SecurityOrigin::Policy SecurityOrigin::canShowNotifications() const | 389 SecurityOrigin::Policy SecurityOrigin::canShowNotifications() const |
390 { | 390 { |
391 if (m_universalAccess) | 391 if (m_universalAccess) |
392 return AlwaysAllow; | 392 return AlwaysAllow; |
393 if (isUnique()) | 393 if (isUnique()) |
394 return AlwaysDeny; | 394 return AlwaysDeny; |
395 return Ask; | 395 return Ask; |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 } | 532 } |
533 | 533 |
534 void SecurityOrigin::transferPrivilegesFrom(const SecurityOrigin& origin) | 534 void SecurityOrigin::transferPrivilegesFrom(const SecurityOrigin& origin) |
535 { | 535 { |
536 m_universalAccess = origin.m_universalAccess; | 536 m_universalAccess = origin.m_universalAccess; |
537 m_canLoadLocalResources = origin.m_canLoadLocalResources; | 537 m_canLoadLocalResources = origin.m_canLoadLocalResources; |
538 m_enforceFilePathSeparation = origin.m_enforceFilePathSeparation; | 538 m_enforceFilePathSeparation = origin.m_enforceFilePathSeparation; |
539 } | 539 } |
540 | 540 |
541 } // namespace blink | 541 } // namespace blink |
OLD | NEW |