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