| OLD | NEW |
| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 { | 78 { |
| 79 ASSERT(executionContext); | 79 ASSERT(executionContext); |
| 80 | 80 |
| 81 blink::WebStorageQuotaType storageType = static_cast<blink::WebStorageQuotaT
ype>(m_type); | 81 blink::WebStorageQuotaType storageType = static_cast<blink::WebStorageQuotaT
ype>(m_type); |
| 82 if (storageType != blink::WebStorageQuotaTypeTemporary && storageType != bli
nk::WebStorageQuotaTypePersistent) { | 82 if (storageType != blink::WebStorageQuotaTypeTemporary && storageType != bli
nk::WebStorageQuotaTypePersistent) { |
| 83 // Unknown storage type is requested. | 83 // Unknown storage type is requested. |
| 84 executionContext->postTask(StorageErrorCallback::CallbackTask::create(er
rorCallback, NotSupportedError)); | 84 executionContext->postTask(StorageErrorCallback::CallbackTask::create(er
rorCallback, NotSupportedError)); |
| 85 return; | 85 return; |
| 86 } | 86 } |
| 87 | 87 |
| 88 StorageQuotaClient::from(executionContext)->requestQuota(executionContext, s
torageType, newQuotaInBytes, successCallback, errorCallback); | 88 StorageQuotaClient* client = StorageQuotaClient::from(executionContext); |
| 89 if (!client) { |
| 90 executionContext->postTask(StorageErrorCallback::CallbackTask::create(er
rorCallback, NotSupportedError)); |
| 91 return; |
| 92 } |
| 93 |
| 94 client->requestQuota(executionContext, storageType, newQuotaInBytes, success
Callback, errorCallback); |
| 89 } | 95 } |
| 90 | 96 |
| 91 DeprecatedStorageQuota::~DeprecatedStorageQuota() | 97 DeprecatedStorageQuota::~DeprecatedStorageQuota() |
| 92 { | 98 { |
| 93 } | 99 } |
| 94 | 100 |
| 95 } // namespace WebCore | 101 } // namespace WebCore |
| OLD | NEW |