| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2012 Motorola Mobility Inc. | 3 * Copyright (C) 2012 Motorola Mobility Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * | 8 * |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 m_url = url; | 55 m_url = url; |
| 56 m_input = String(); | 56 m_input = String(); |
| 57 } else { | 57 } else { |
| 58 m_url = KURL(); | 58 m_url = KURL(); |
| 59 m_input = value; | 59 m_input = value; |
| 60 } | 60 } |
| 61 } | 61 } |
| 62 | 62 |
| 63 String DOMURL::createObjectURL(ExecutionContext* executionContext, Blob* blob, E
xceptionState& exceptionState) | 63 String DOMURL::createObjectURL(ExecutionContext* executionContext, Blob* blob, E
xceptionState& exceptionState) |
| 64 { | 64 { |
| 65 ASSERT(blob); | 65 DCHECK(blob); |
| 66 if (!executionContext) | 66 if (!executionContext) |
| 67 return String(); | 67 return String(); |
| 68 if (blob->hasBeenClosed()) { | 68 if (blob->hasBeenClosed()) { |
| 69 exceptionState.throwDOMException(InvalidStateError, String(blob->isFile(
) ? "File" : "Blob") + " has been closed."); | 69 exceptionState.throwDOMException(InvalidStateError, String(blob->isFile(
) ? "File" : "Blob") + " has been closed."); |
| 70 return String(); | 70 return String(); |
| 71 } | 71 } |
| 72 return createPublicURL(executionContext, blob, blob->uuid()); | 72 return createPublicURL(executionContext, blob, blob->uuid()); |
| 73 } | 73 } |
| 74 | 74 |
| 75 String DOMURL::createPublicURL(ExecutionContext* executionContext, URLRegistrabl
e* registrable, const String& uuid) | 75 String DOMURL::createPublicURL(ExecutionContext* executionContext, URLRegistrabl
e* registrable, const String& uuid) |
| (...skipping 19 matching lines...) Expand all Loading... |
| 95 | 95 |
| 96 void DOMURL::revokeObjectUUID(ExecutionContext* executionContext, const String&
uuid) | 96 void DOMURL::revokeObjectUUID(ExecutionContext* executionContext, const String&
uuid) |
| 97 { | 97 { |
| 98 if (!executionContext) | 98 if (!executionContext) |
| 99 return; | 99 return; |
| 100 | 100 |
| 101 executionContext->publicURLManager().revoke(uuid); | 101 executionContext->publicURLManager().revoke(uuid); |
| 102 } | 102 } |
| 103 | 103 |
| 104 } // namespace blink | 104 } // namespace blink |
| OLD | NEW |