| 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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 | 393 |
| 394 void SecurityOrigin::grantLoadLocalResources() | 394 void SecurityOrigin::grantLoadLocalResources() |
| 395 { | 395 { |
| 396 // Granting privileges to some, but not all, documents in a SecurityOrigin | 396 // Granting privileges to some, but not all, documents in a SecurityOrigin |
| 397 // is a security hazard because the documents without the privilege can | 397 // is a security hazard because the documents without the privilege can |
| 398 // obtain the privilege by injecting script into the documents that have | 398 // obtain the privilege by injecting script into the documents that have |
| 399 // been granted the privilege. | 399 // been granted the privilege. |
| 400 m_canLoadLocalResources = true; | 400 m_canLoadLocalResources = true; |
| 401 } | 401 } |
| 402 | 402 |
| 403 void SecurityOrigin::grantUniversalAccess() | 403 void SecurityOrigin::setUniversalAccess(bool allow) |
| 404 { | 404 { |
| 405 m_universalAccess = true; | 405 m_universalAccess = allow; |
| 406 } | 406 } |
| 407 | 407 |
| 408 void SecurityOrigin::enforceFilePathSeparation() | 408 void SecurityOrigin::enforceFilePathSeparation() |
| 409 { | 409 { |
| 410 ASSERT(isLocal()); | 410 ASSERT(isLocal()); |
| 411 m_enforceFilePathSeparation = true; | 411 m_enforceFilePathSeparation = true; |
| 412 } | 412 } |
| 413 | 413 |
| 414 bool SecurityOrigin::isLocal() const | 414 bool SecurityOrigin::isLocal() const |
| 415 { | 415 { |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 } | 521 } |
| 522 | 522 |
| 523 const String& SecurityOrigin::urlWithUniqueSecurityOrigin() | 523 const String& SecurityOrigin::urlWithUniqueSecurityOrigin() |
| 524 { | 524 { |
| 525 ASSERT(isMainThread()); | 525 ASSERT(isMainThread()); |
| 526 DEFINE_STATIC_LOCAL(const String, uniqueSecurityOriginURL, ("data:,")); | 526 DEFINE_STATIC_LOCAL(const String, uniqueSecurityOriginURL, ("data:,")); |
| 527 return uniqueSecurityOriginURL; | 527 return uniqueSecurityOriginURL; |
| 528 } | 528 } |
| 529 | 529 |
| 530 } // namespace blink | 530 } // namespace blink |
| OLD | NEW |