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

Side by Side Diff: Source/modules/quota/DeprecatedStorageQuota.cpp

Issue 540283003: bindings: Retires ScriptWrappable::init, etc. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed a review comment. Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/modules/quota/DeprecatedStorageInfo.cpp ('k') | Source/modules/quota/StorageInfo.cpp » ('j') | 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "platform/weborigin/SecurityOrigin.h" 42 #include "platform/weborigin/SecurityOrigin.h"
43 #include "public/platform/Platform.h" 43 #include "public/platform/Platform.h"
44 #include "public/platform/WebStorageQuotaCallbacks.h" 44 #include "public/platform/WebStorageQuotaCallbacks.h"
45 #include "public/platform/WebStorageQuotaType.h" 45 #include "public/platform/WebStorageQuotaType.h"
46 46
47 namespace blink { 47 namespace blink {
48 48
49 DeprecatedStorageQuota::DeprecatedStorageQuota(Type type) 49 DeprecatedStorageQuota::DeprecatedStorageQuota(Type type)
50 : m_type(type) 50 : m_type(type)
51 { 51 {
52 ScriptWrappable::init(this);
53 } 52 }
54 53
55 void DeprecatedStorageQuota::queryUsageAndQuota(ExecutionContext* executionConte xt, PassOwnPtrWillBeRawPtr<StorageUsageCallback> successCallback, PassOwnPtrWill BeRawPtr<StorageErrorCallback> errorCallback) 54 void DeprecatedStorageQuota::queryUsageAndQuota(ExecutionContext* executionConte xt, PassOwnPtrWillBeRawPtr<StorageUsageCallback> successCallback, PassOwnPtrWill BeRawPtr<StorageErrorCallback> errorCallback)
56 { 55 {
57 ASSERT(executionContext); 56 ASSERT(executionContext);
58 57
59 WebStorageQuotaType storageType = static_cast<WebStorageQuotaType>(m_type); 58 WebStorageQuotaType storageType = static_cast<WebStorageQuotaType>(m_type);
60 if (storageType != WebStorageQuotaTypeTemporary && storageType != WebStorage QuotaTypePersistent) { 59 if (storageType != WebStorageQuotaTypeTemporary && storageType != WebStorage QuotaTypePersistent) {
61 // Unknown storage type is requested. 60 // Unknown storage type is requested.
62 executionContext->postTask(StorageErrorCallback::CallbackTask::create(er rorCallback, NotSupportedError)); 61 executionContext->postTask(StorageErrorCallback::CallbackTask::create(er rorCallback, NotSupportedError));
(...skipping 25 matching lines...) Expand all
88 StorageQuotaClient* client = StorageQuotaClient::from(executionContext); 87 StorageQuotaClient* client = StorageQuotaClient::from(executionContext);
89 if (!client) { 88 if (!client) {
90 executionContext->postTask(StorageErrorCallback::CallbackTask::create(er rorCallback, NotSupportedError)); 89 executionContext->postTask(StorageErrorCallback::CallbackTask::create(er rorCallback, NotSupportedError));
91 return; 90 return;
92 } 91 }
93 92
94 client->requestQuota(executionContext, storageType, newQuotaInBytes, success Callback, errorCallback); 93 client->requestQuota(executionContext, storageType, newQuotaInBytes, success Callback, errorCallback);
95 } 94 }
96 95
97 } // namespace blink 96 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/quota/DeprecatedStorageInfo.cpp ('k') | Source/modules/quota/StorageInfo.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698