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

Side by Side Diff: Source/modules/quota/StorageQuota.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
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/modules/quota/StorageInfo.cpp ('k') | Source/modules/screen_orientation/ScreenOrientation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698