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

Side by Side Diff: Source/modules/indexeddb/WebIDBCallbacksImpl.cpp

Issue 266583002: Switch WebIDBDatabase::put over to the version with blobs. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Even better! Created 6 years, 7 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
« no previous file with comments | « Source/modules/indexeddb/WebIDBCallbacksImpl.h ('k') | public/platform/WebIDBCallbacks.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 * 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 * 10 *
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 } 82 }
83 83
84 void WebIDBCallbacksImpl::onSuccess(const WebVector<blink::WebString>& webString List) 84 void WebIDBCallbacksImpl::onSuccess(const WebVector<blink::WebString>& webString List)
85 { 85 {
86 Vector<String> stringList; 86 Vector<String> stringList;
87 for (size_t i = 0; i < webStringList.size(); ++i) 87 for (size_t i = 0; i < webStringList.size(); ++i)
88 stringList.append(webStringList[i]); 88 stringList.append(webStringList[i]);
89 m_request->onSuccess(stringList); 89 m_request->onSuccess(stringList);
90 } 90 }
91 91
92 void WebIDBCallbacksImpl::onSuccess(WebIDBCursor* cursor, const WebIDBKey& key, const WebIDBKey& primaryKey, const WebData& value)
93 {
94 OwnPtr<Vector<blink::WebBlobInfo> > blobInfo(adoptPtr(new Vector<blink::WebB lobInfo>()));
95 m_request->onSuccess(adoptPtr(cursor), key, primaryKey, value, blobInfo.rele ase());
96 }
97
98 void WebIDBCallbacksImpl::onSuccess(WebIDBCursor* cursor, const WebIDBKey& key, const WebIDBKey& primaryKey, const WebData& value, const WebVector<WebBlobInfo>& webBlobInfo) 92 void WebIDBCallbacksImpl::onSuccess(WebIDBCursor* cursor, const WebIDBKey& key, const WebIDBKey& primaryKey, const WebData& value, const WebVector<WebBlobInfo>& webBlobInfo)
99 { 93 {
100 m_request->onSuccess(adoptPtr(cursor), key, primaryKey, value, ConvertBlobIn fo(webBlobInfo)); 94 m_request->onSuccess(adoptPtr(cursor), key, primaryKey, value, ConvertBlobIn fo(webBlobInfo));
101 } 95 }
102 96
103 void WebIDBCallbacksImpl::onSuccess(WebIDBDatabase* backend, const WebIDBMetadat a& metadata) 97 void WebIDBCallbacksImpl::onSuccess(WebIDBDatabase* backend, const WebIDBMetadat a& metadata)
104 { 98 {
105 m_request->onSuccess(adoptPtr(backend), metadata); 99 m_request->onSuccess(adoptPtr(backend), metadata);
106 } 100 }
107 101
108 void WebIDBCallbacksImpl::onSuccess(const WebIDBKey& key) 102 void WebIDBCallbacksImpl::onSuccess(const WebIDBKey& key)
109 { 103 {
110 m_request->onSuccess(key); 104 m_request->onSuccess(key);
111 } 105 }
112 106
113 void WebIDBCallbacksImpl::onSuccess(const WebData& value)
114 {
115 OwnPtr<Vector<blink::WebBlobInfo> > blobInfo(adoptPtr(new Vector<blink::WebB lobInfo>()));
116 m_request->onSuccess(value, blobInfo.release());
117 }
118
119 void WebIDBCallbacksImpl::onSuccess(const WebData& value, const WebVector<WebBlo bInfo>& webBlobInfo) 107 void WebIDBCallbacksImpl::onSuccess(const WebData& value, const WebVector<WebBlo bInfo>& webBlobInfo)
120 { 108 {
121 m_request->onSuccess(value, ConvertBlobInfo(webBlobInfo)); 109 m_request->onSuccess(value, ConvertBlobInfo(webBlobInfo));
122 } 110 }
123 111
124 void WebIDBCallbacksImpl::onSuccess(const WebData& value, const WebIDBKey& key, const WebIDBKeyPath& keyPath)
125 {
126 OwnPtr<Vector<blink::WebBlobInfo> > blobInfo(adoptPtr(new Vector<blink::WebB lobInfo>()));
127 m_request->onSuccess(value, blobInfo.release(), key, keyPath);
128 }
129
130 void WebIDBCallbacksImpl::onSuccess(const WebData& value, const WebVector<WebBlo bInfo>& webBlobInfo, const WebIDBKey& key, const WebIDBKeyPath& keyPath) 112 void WebIDBCallbacksImpl::onSuccess(const WebData& value, const WebVector<WebBlo bInfo>& webBlobInfo, const WebIDBKey& key, const WebIDBKeyPath& keyPath)
131 { 113 {
132 m_request->onSuccess(value, ConvertBlobInfo(webBlobInfo), key, keyPath); 114 m_request->onSuccess(value, ConvertBlobInfo(webBlobInfo), key, keyPath);
133 } 115 }
134 116
135 void WebIDBCallbacksImpl::onSuccess(long long value) 117 void WebIDBCallbacksImpl::onSuccess(long long value)
136 { 118 {
137 m_request->onSuccess(value); 119 m_request->onSuccess(value);
138 } 120 }
139 121
140 void WebIDBCallbacksImpl::onSuccess() 122 void WebIDBCallbacksImpl::onSuccess()
141 { 123 {
142 m_request->onSuccess(); 124 m_request->onSuccess();
143 } 125 }
144 126
145 void WebIDBCallbacksImpl::onSuccess(const WebIDBKey& key, const WebIDBKey& prima ryKey, const WebData& value)
146 {
147 OwnPtr<Vector<blink::WebBlobInfo> > blobInfo(adoptPtr(new Vector<blink::WebB lobInfo>()));
148 m_request->onSuccess(key, primaryKey, value, blobInfo.release());
149 }
150
151 void WebIDBCallbacksImpl::onSuccess(const WebIDBKey& key, const WebIDBKey& prima ryKey, const WebData& value, const WebVector<WebBlobInfo>& webBlobInfo) 127 void WebIDBCallbacksImpl::onSuccess(const WebIDBKey& key, const WebIDBKey& prima ryKey, const WebData& value, const WebVector<WebBlobInfo>& webBlobInfo)
152 { 128 {
153 m_request->onSuccess(key, primaryKey, value, ConvertBlobInfo(webBlobInfo)); 129 m_request->onSuccess(key, primaryKey, value, ConvertBlobInfo(webBlobInfo));
154 } 130 }
155 131
156 void WebIDBCallbacksImpl::onBlocked(long long oldVersion) 132 void WebIDBCallbacksImpl::onBlocked(long long oldVersion)
157 { 133 {
158 m_request->onBlocked(oldVersion); 134 m_request->onBlocked(oldVersion);
159 } 135 }
160 136
161 void WebIDBCallbacksImpl::onUpgradeNeeded(long long oldVersion, WebIDBDatabase* database, const WebIDBMetadata& metadata, unsigned short dataLoss, blink::WebStr ing dataLossMessage) 137 void WebIDBCallbacksImpl::onUpgradeNeeded(long long oldVersion, WebIDBDatabase* database, const WebIDBMetadata& metadata, unsigned short dataLoss, blink::WebStr ing dataLossMessage)
162 { 138 {
163 m_request->onUpgradeNeeded(oldVersion, adoptPtr(database), metadata, static_ cast<blink::WebIDBDataLoss>(dataLoss), dataLossMessage); 139 m_request->onUpgradeNeeded(oldVersion, adoptPtr(database), metadata, static_ cast<blink::WebIDBDataLoss>(dataLoss), dataLossMessage);
164 } 140 }
165 141
166 } // namespace blink 142 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/indexeddb/WebIDBCallbacksImpl.h ('k') | public/platform/WebIDBCallbacks.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698