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

Side by Side Diff: Source/WebKit/chromium/src/WebIDBCallbacksImpl.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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 { 53 {
54 } 54 }
55 55
56 void WebIDBCallbacksImpl::onError(const WebIDBDatabaseError& error) 56 void WebIDBCallbacksImpl::onError(const WebIDBDatabaseError& error)
57 { 57 {
58 m_callbacks->onError(error); 58 m_callbacks->onError(error);
59 } 59 }
60 60
61 void WebIDBCallbacksImpl::onSuccess(const WebDOMStringList& domStringList) 61 void WebIDBCallbacksImpl::onSuccess(const WebDOMStringList& domStringList)
62 { 62 {
63 m_callbacks->onSuccess(domStringList); 63 Vector<String> stringList(domStringList.length());
64 for (size_t i = 0; i < domStringList.length(); ++i)
65 stringList.append(domStringList.item(i));
66 m_callbacks->onSuccess(stringList);
67 }
68
69 void WebIDBCallbacksImpl::onSuccess(const WebVector<WebString>& webStringList)
70 {
71 Vector<String> stringList(webStringList.size());
72 for (size_t i = 0; i < webStringList.size(); ++i)
73 stringList.append(webStringList[i]);
74 m_callbacks->onSuccess(stringList);
64 } 75 }
65 76
66 void WebIDBCallbacksImpl::onSuccess(WebIDBCursor* cursor, const WebIDBKey& key, const WebIDBKey& primaryKey, const WebData& value) 77 void WebIDBCallbacksImpl::onSuccess(WebIDBCursor* cursor, const WebIDBKey& key, const WebIDBKey& primaryKey, const WebData& value)
67 { 78 {
68 m_callbacks->onSuccess(IDBCursorBackendProxy::create(adoptPtr(cursor)), key, primaryKey, value); 79 m_callbacks->onSuccess(IDBCursorBackendProxy::create(adoptPtr(cursor)), key, primaryKey, value);
69 } 80 }
70 81
71 void WebIDBCallbacksImpl::onSuccess(WebIDBDatabase* webKitInstance, const WebIDB Metadata& metadata) 82 void WebIDBCallbacksImpl::onSuccess(WebIDBDatabase* webKitInstance, const WebIDB Metadata& metadata)
72 { 83 {
73 if (m_databaseProxy) { 84 if (m_databaseProxy) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 m_callbacks->onBlocked(oldVersion); 124 m_callbacks->onBlocked(oldVersion);
114 } 125 }
115 126
116 void WebIDBCallbacksImpl::onUpgradeNeeded(long long oldVersion, WebIDBDatabase* database, const WebIDBMetadata& metadata) 127 void WebIDBCallbacksImpl::onUpgradeNeeded(long long oldVersion, WebIDBDatabase* database, const WebIDBMetadata& metadata)
117 { 128 {
118 m_databaseProxy = IDBDatabaseBackendProxy::create(adoptPtr(database)); 129 m_databaseProxy = IDBDatabaseBackendProxy::create(adoptPtr(database));
119 m_callbacks->onUpgradeNeeded(oldVersion, m_databaseProxy, metadata); 130 m_callbacks->onUpgradeNeeded(oldVersion, m_databaseProxy, metadata);
120 } 131 }
121 132
122 } // namespace WebKit 133 } // namespace WebKit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698