| OLD | NEW |
| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 for (size_t i = 0; i < WTF_ARRAY_LENGTH(storageTypeMappings); ++i) { | 63 for (size_t i = 0; i < WTF_ARRAY_LENGTH(storageTypeMappings); ++i) { |
| 64 if (storageTypeMappings[i].name == type) | 64 if (storageTypeMappings[i].name == type) |
| 65 return storageTypeMappings[i].type; | 65 return storageTypeMappings[i].type; |
| 66 } | 66 } |
| 67 ASSERT_NOT_REACHED(); | 67 ASSERT_NOT_REACHED(); |
| 68 return blink::WebStorageQuotaTypeTemporary; | 68 return blink::WebStorageQuotaTypeTemporary; |
| 69 } | 69 } |
| 70 | 70 |
| 71 } // namespace | 71 } // namespace |
| 72 | 72 |
| 73 DEFINE_GC_INFO(StorageQuota); | |
| 74 | |
| 75 StorageQuota::StorageQuota() | 73 StorageQuota::StorageQuota() |
| 76 { | 74 { |
| 77 ScriptWrappable::init(this); | 75 ScriptWrappable::init(this); |
| 78 } | 76 } |
| 79 | 77 |
| 80 Vector<String> StorageQuota::supportedTypes() const | 78 Vector<String> StorageQuota::supportedTypes() const |
| 81 { | 79 { |
| 82 Vector<String> types; | 80 Vector<String> types; |
| 83 for (size_t i = 0; i < WTF_ARRAY_LENGTH(storageTypeMappings); ++i) | 81 for (size_t i = 0; i < WTF_ARRAY_LENGTH(storageTypeMappings); ++i) |
| 84 types.append(storageTypeMappings[i].name); | 82 types.append(storageTypeMappings[i].name); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 109 ASSERT(executionContext); | 107 ASSERT(executionContext); |
| 110 | 108 |
| 111 return StorageQuotaClient::from(executionContext)->requestPersistentQuota(ex
ecutionContext, newQuota); | 109 return StorageQuotaClient::from(executionContext)->requestPersistentQuota(ex
ecutionContext, newQuota); |
| 112 } | 110 } |
| 113 | 111 |
| 114 StorageQuota::~StorageQuota() | 112 StorageQuota::~StorageQuota() |
| 115 { | 113 { |
| 116 } | 114 } |
| 117 | 115 |
| 118 } // namespace WebCore | 116 } // namespace WebCore |
| OLD | NEW |