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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 return storageTypeMappings[i].type; | 65 return storageTypeMappings[i].type; |
66 } | 66 } |
67 ASSERT_NOT_REACHED(); | 67 ASSERT_NOT_REACHED(); |
68 return WebStorageQuotaTypeTemporary; | 68 return WebStorageQuotaTypeTemporary; |
69 } | 69 } |
70 | 70 |
71 } // namespace | 71 } // namespace |
72 | 72 |
73 StorageQuota::StorageQuota() | 73 StorageQuota::StorageQuota() |
74 { | 74 { |
75 ScriptWrappable::init(this); | |
76 } | 75 } |
77 | 76 |
78 Vector<String> StorageQuota::supportedTypes() const | 77 Vector<String> StorageQuota::supportedTypes() const |
79 { | 78 { |
80 Vector<String> types; | 79 Vector<String> types; |
81 for (size_t i = 0; i < WTF_ARRAY_LENGTH(storageTypeMappings); ++i) | 80 for (size_t i = 0; i < WTF_ARRAY_LENGTH(storageTypeMappings); ++i) |
82 types.append(storageTypeMappings[i].name); | 81 types.append(storageTypeMappings[i].name); |
83 return types; | 82 return types; |
84 } | 83 } |
85 | 84 |
(...skipping 21 matching lines...) Expand all Loading... |
107 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(s
criptState); | 106 RefPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(s
criptState); |
108 ScriptPromise promise = resolver->promise(); | 107 ScriptPromise promise = resolver->promise(); |
109 resolver->reject(DOMError::create(NotSupportedError)); | 108 resolver->reject(DOMError::create(NotSupportedError)); |
110 return promise; | 109 return promise; |
111 } | 110 } |
112 | 111 |
113 return client->requestPersistentQuota(scriptState, newQuota); | 112 return client->requestPersistentQuota(scriptState, newQuota); |
114 } | 113 } |
115 | 114 |
116 } // namespace blink | 115 } // namespace blink |
OLD | NEW |