Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(473)

Side by Side Diff: third_party/WebKit/Source/web/StorageQuotaClientImpl.cpp

Issue 2656343002: Replace [CallWith=ExecutionContext] with [CallWith=ScriptState] (Closed)
Patch Set: Few more Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/web/StorageQuotaClientImpl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "public/web/WebFrameClient.h" 47 #include "public/web/WebFrameClient.h"
48 #include "web/WebLocalFrameImpl.h" 48 #include "web/WebLocalFrameImpl.h"
49 #include "wtf/Threading.h" 49 #include "wtf/Threading.h"
50 50
51 namespace blink { 51 namespace blink {
52 52
53 StorageQuotaClientImpl::StorageQuotaClientImpl() {} 53 StorageQuotaClientImpl::StorageQuotaClientImpl() {}
54 54
55 StorageQuotaClientImpl::~StorageQuotaClientImpl() {} 55 StorageQuotaClientImpl::~StorageQuotaClientImpl() {}
56 56
57 void StorageQuotaClientImpl::requestQuota(ExecutionContext* executionContext, 57 void StorageQuotaClientImpl::requestQuota(ScriptState* scriptState,
58 WebStorageQuotaType storageType, 58 WebStorageQuotaType storageType,
59 unsigned long long newQuotaInBytes, 59 unsigned long long newQuotaInBytes,
60 StorageQuotaCallback* successCallback, 60 StorageQuotaCallback* successCallback,
61 StorageErrorCallback* errorCallback) { 61 StorageErrorCallback* errorCallback) {
62 ExecutionContext* executionContext = scriptState->getExecutionContext();
62 DCHECK(executionContext); 63 DCHECK(executionContext);
63 64
64 if (executionContext->isDocument()) { 65 if (executionContext->isDocument()) {
65 Document* document = toDocument(executionContext); 66 Document* document = toDocument(executionContext);
66 WebLocalFrameImpl* webFrame = 67 WebLocalFrameImpl* webFrame =
67 WebLocalFrameImpl::fromFrame(document->frame()); 68 WebLocalFrameImpl::fromFrame(document->frame());
68 StorageQuotaCallbacks* callbacks = 69 StorageQuotaCallbacks* callbacks =
69 DeprecatedStorageQuotaCallbacksImpl::create(successCallback, 70 DeprecatedStorageQuotaCallbacksImpl::create(successCallback,
70 errorCallback); 71 errorCallback);
71 webFrame->client()->requestStorageQuota(storageType, newQuotaInBytes, 72 webFrame->client()->requestStorageQuota(storageType, newQuotaInBytes,
(...skipping 22 matching lines...) Expand all
94 newQuotaInBytes, callbacks); 95 newQuotaInBytes, callbacks);
95 } else { 96 } else {
96 // Requesting quota in Worker is not supported. 97 // Requesting quota in Worker is not supported.
97 resolver->reject(DOMError::create(NotSupportedError)); 98 resolver->reject(DOMError::create(NotSupportedError));
98 } 99 }
99 100
100 return promise; 101 return promise;
101 } 102 }
102 103
103 } // namespace blink 104 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/StorageQuotaClientImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698