| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "modules/quota/StorageManager.h" | 5 #include "modules/quota/StorageManager.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/ScriptPromiseResolver.h" | 7 #include "bindings/core/v8/ScriptPromiseResolver.h" |
| 8 #include "bindings/modules/v8/V8StorageEstimate.h" | 8 #include "bindings/modules/v8/V8StorageEstimate.h" |
| 9 #include "core/dom/DOMException.h" | 9 #include "core/dom/DOMException.h" |
| 10 #include "core/dom/Document.h" | 10 #include "core/dom/Document.h" |
| 11 #include "core/dom/ExceptionCode.h" | 11 #include "core/dom/ExceptionCode.h" |
| 12 #include "modules/permissions/PermissionUtils.h" | 12 #include "modules/permissions/PermissionUtils.h" |
| 13 #include "modules/quota/StorageEstimate.h" | 13 #include "modules/quota/StorageEstimate.h" |
| 14 #include "platform/StorageQuotaCallbacks.h" | 14 #include "platform/StorageQuotaCallbacks.h" |
| 15 #include "platform/UserGestureIndicator.h" | 15 #include "platform/UserGestureIndicator.h" |
| 16 #include "platform/wtf/Functional.h" |
| 16 #include "public/platform/Platform.h" | 17 #include "public/platform/Platform.h" |
| 17 #include "wtf/Functional.h" | |
| 18 | 18 |
| 19 namespace blink { | 19 namespace blink { |
| 20 | 20 |
| 21 using mojom::blink::PermissionName; | 21 using mojom::blink::PermissionName; |
| 22 using mojom::blink::PermissionService; | 22 using mojom::blink::PermissionService; |
| 23 using mojom::blink::PermissionStatus; | 23 using mojom::blink::PermissionStatus; |
| 24 | 24 |
| 25 namespace { | 25 namespace { |
| 26 | 26 |
| 27 const char kUniqueOriginErrorMessage[] = | 27 const char kUniqueOriginErrorMessage[] = |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 159 |
| 160 void StorageManager::PermissionRequestComplete(ScriptPromiseResolver* resolver, | 160 void StorageManager::PermissionRequestComplete(ScriptPromiseResolver* resolver, |
| 161 PermissionStatus status) { | 161 PermissionStatus status) { |
| 162 if (!resolver->GetExecutionContext() || | 162 if (!resolver->GetExecutionContext() || |
| 163 resolver->GetExecutionContext()->IsContextDestroyed()) | 163 resolver->GetExecutionContext()->IsContextDestroyed()) |
| 164 return; | 164 return; |
| 165 resolver->Resolve(status == PermissionStatus::GRANTED); | 165 resolver->Resolve(status == PermissionStatus::GRANTED); |
| 166 } | 166 } |
| 167 | 167 |
| 168 } // namespace blink | 168 } // namespace blink |
| OLD | NEW |