| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/fileapi/URLFileAPI.h" | 5 #include "core/fileapi/URLFileAPI.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
| 8 #include "bindings/core/v8/ScriptState.h" | |
| 9 #include "core/dom/DOMURL.h" | 8 #include "core/dom/DOMURL.h" |
| 10 #include "core/dom/ExecutionContext.h" | 9 #include "core/dom/ExecutionContext.h" |
| 11 #include "core/fileapi/Blob.h" | 10 #include "core/fileapi/Blob.h" |
| 12 #include "core/frame/UseCounter.h" | 11 #include "core/frame/UseCounter.h" |
| 13 #include "core/html/PublicURLManager.h" | 12 #include "core/html/PublicURLManager.h" |
| 13 #include "platform/bindings/ScriptState.h" |
| 14 | 14 |
| 15 namespace blink { | 15 namespace blink { |
| 16 | 16 |
| 17 // static | 17 // static |
| 18 String URLFileAPI::createObjectURL(ScriptState* script_state, | 18 String URLFileAPI::createObjectURL(ScriptState* script_state, |
| 19 Blob* blob, | 19 Blob* blob, |
| 20 ExceptionState& exception_state) { | 20 ExceptionState& exception_state) { |
| 21 DCHECK(blob); | 21 DCHECK(blob); |
| 22 ExecutionContext* execution_context = ExecutionContext::From(script_state); | 22 ExecutionContext* execution_context = ExecutionContext::From(script_state); |
| 23 DCHECK(execution_context); | 23 DCHECK(execution_context); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 40 const String& url_string) { | 40 const String& url_string) { |
| 41 ExecutionContext* execution_context = ExecutionContext::From(script_state); | 41 ExecutionContext* execution_context = ExecutionContext::From(script_state); |
| 42 DCHECK(execution_context); | 42 DCHECK(execution_context); |
| 43 | 43 |
| 44 KURL url(KURL(), url_string); | 44 KURL url(KURL(), url_string); |
| 45 execution_context->RemoveURLFromMemoryCache(url); | 45 execution_context->RemoveURLFromMemoryCache(url); |
| 46 execution_context->GetPublicURLManager().Revoke(url); | 46 execution_context->GetPublicURLManager().Revoke(url); |
| 47 } | 47 } |
| 48 | 48 |
| 49 } // namespace blink | 49 } // namespace blink |
| OLD | NEW |