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

Side by Side Diff: Source/WebKit/chromium/src/IDBCallbacksProxy.cpp

Issue 14267029: Prepare to eliminate WebDOMStringList (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 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) 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 WebIDBDatabaseImpl* impl = m_didCreateProxy ? 0 : new WebIDBDatabaseImpl(bac kend, m_databaseCallbacks.release()); 88 WebIDBDatabaseImpl* impl = m_didCreateProxy ? 0 : new WebIDBDatabaseImpl(bac kend, m_databaseCallbacks.release());
89 m_callbacks->onSuccess(impl, metadata); 89 m_callbacks->onSuccess(impl, metadata);
90 } 90 }
91 91
92 void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBKey> idbKey) 92 void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBKey> idbKey)
93 { 93 {
94 m_didComplete = true; 94 m_didComplete = true;
95 m_callbacks->onSuccess(WebIDBKey(idbKey)); 95 m_callbacks->onSuccess(WebIDBKey(idbKey));
96 } 96 }
97 97
98 void IDBCallbacksProxy::onSuccess(PassRefPtr<DOMStringList> domStringList) 98 void IDBCallbacksProxy::onSuccess(const Vector<String>& stringList)
99 { 99 {
100 m_didComplete = true; 100 m_didComplete = true;
101 m_callbacks->onSuccess(WebDOMStringList(domStringList)); 101 WebDOMStringList domStringList;
102 for (size_t i = 0; i < stringList.size(); ++i)
103 domStringList.append(stringList[i]);
104 m_callbacks->onSuccess(domStringList);
102 } 105 }
103 106
104 void IDBCallbacksProxy::onSuccess(PassRefPtr<SharedBuffer> value) 107 void IDBCallbacksProxy::onSuccess(PassRefPtr<SharedBuffer> value)
105 { 108 {
106 m_didComplete = true; 109 m_didComplete = true;
107 m_callbacks->onSuccess(WebData(value)); 110 m_callbacks->onSuccess(WebData(value));
108 } 111 }
109 112
110 void IDBCallbacksProxy::onSuccess(PassRefPtr<SharedBuffer> value, PassRefPtr<IDB Key> key, const IDBKeyPath& keyPath) 113 void IDBCallbacksProxy::onSuccess(PassRefPtr<SharedBuffer> value, PassRefPtr<IDB Key> key, const IDBKeyPath& keyPath)
111 { 114 {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 m_callbacks->onUpgradeNeeded(oldVersion, new WebIDBDatabaseImpl(database, m_ databaseCallbacks), metadata); 164 m_callbacks->onUpgradeNeeded(oldVersion, new WebIDBDatabaseImpl(database, m_ databaseCallbacks), metadata);
162 } 165 }
163 166
164 void IDBCallbacksProxy::setDatabaseCallbacks(PassRefPtr<IDBDatabaseCallbacksProx y> databaseCallbacks) 167 void IDBCallbacksProxy::setDatabaseCallbacks(PassRefPtr<IDBDatabaseCallbacksProx y> databaseCallbacks)
165 { 168 {
166 ASSERT(!m_databaseCallbacks); 169 ASSERT(!m_databaseCallbacks);
167 m_databaseCallbacks = databaseCallbacks; 170 m_databaseCallbacks = databaseCallbacks;
168 } 171 }
169 172
170 } // namespace WebKit 173 } // namespace WebKit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698