| OLD | NEW |
| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 InspectorInstrumentation::traceAsyncOperationCompleted(m_request->executionC
ontext(), m_asyncOperationId); | 67 InspectorInstrumentation::traceAsyncOperationCompleted(m_request->executionC
ontext(), m_asyncOperationId); |
| 68 } | 68 } |
| 69 | 69 |
| 70 void WebIDBCallbacksImpl::onError(const WebIDBDatabaseError& error) | 70 void WebIDBCallbacksImpl::onError(const WebIDBDatabaseError& error) |
| 71 { | 71 { |
| 72 InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsync
CallbackStarting(m_request->executionContext(), m_asyncOperationId); | 72 InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsync
CallbackStarting(m_request->executionContext(), m_asyncOperationId); |
| 73 m_request->onError(DOMError::create(error.code(), error.message())); | 73 m_request->onError(DOMError::create(error.code(), error.message())); |
| 74 InspectorInstrumentation::traceAsyncCallbackCompleted(cookie); | 74 InspectorInstrumentation::traceAsyncCallbackCompleted(cookie); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void WebIDBCallbacksImpl::onSuccess(const WebVector<blink::WebString>& webString
List) | 77 void WebIDBCallbacksImpl::onSuccess(const WebVector<WebString>& webStringList) |
| 78 { | 78 { |
| 79 Vector<String> stringList; | 79 Vector<String> stringList; |
| 80 for (size_t i = 0; i < webStringList.size(); ++i) | 80 for (size_t i = 0; i < webStringList.size(); ++i) |
| 81 stringList.append(webStringList[i]); | 81 stringList.append(webStringList[i]); |
| 82 InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsync
CallbackStarting(m_request->executionContext(), m_asyncOperationId); | 82 InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsync
CallbackStarting(m_request->executionContext(), m_asyncOperationId); |
| 83 m_request->onSuccess(stringList); | 83 m_request->onSuccess(stringList); |
| 84 InspectorInstrumentation::traceAsyncCallbackCompleted(cookie); | 84 InspectorInstrumentation::traceAsyncCallbackCompleted(cookie); |
| 85 } | 85 } |
| 86 | 86 |
| 87 void WebIDBCallbacksImpl::onSuccess(WebIDBCursor* cursor, const WebIDBKey& key,
const WebIDBKey& primaryKey, const WebData& value, const WebVector<WebBlobInfo>&
webBlobInfo) | 87 void WebIDBCallbacksImpl::onSuccess(WebIDBCursor* cursor, const WebIDBKey& key,
const WebIDBKey& primaryKey, const WebData& value, const WebVector<WebBlobInfo>&
webBlobInfo) |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 InspectorInstrumentation::traceAsyncCallbackCompleted(cookie); | 141 InspectorInstrumentation::traceAsyncCallbackCompleted(cookie); |
| 142 } | 142 } |
| 143 | 143 |
| 144 void WebIDBCallbacksImpl::onBlocked(long long oldVersion) | 144 void WebIDBCallbacksImpl::onBlocked(long long oldVersion) |
| 145 { | 145 { |
| 146 InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsync
CallbackStarting(m_request->executionContext(), m_asyncOperationId); | 146 InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsync
CallbackStarting(m_request->executionContext(), m_asyncOperationId); |
| 147 m_request->onBlocked(oldVersion); | 147 m_request->onBlocked(oldVersion); |
| 148 InspectorInstrumentation::traceAsyncCallbackCompleted(cookie); | 148 InspectorInstrumentation::traceAsyncCallbackCompleted(cookie); |
| 149 } | 149 } |
| 150 | 150 |
| 151 void WebIDBCallbacksImpl::onUpgradeNeeded(long long oldVersion, WebIDBDatabase*
database, const WebIDBMetadata& metadata, unsigned short dataLoss, blink::WebStr
ing dataLossMessage) | 151 void WebIDBCallbacksImpl::onUpgradeNeeded(long long oldVersion, WebIDBDatabase*
database, const WebIDBMetadata& metadata, unsigned short dataLoss, WebString dat
aLossMessage) |
| 152 { | 152 { |
| 153 InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsync
CallbackStarting(m_request->executionContext(), m_asyncOperationId); | 153 InspectorInstrumentationCookie cookie = InspectorInstrumentation::traceAsync
CallbackStarting(m_request->executionContext(), m_asyncOperationId); |
| 154 m_request->onUpgradeNeeded(oldVersion, adoptPtr(database), IDBDatabaseMetada
ta(metadata), static_cast<blink::WebIDBDataLoss>(dataLoss), dataLossMessage); | 154 m_request->onUpgradeNeeded(oldVersion, adoptPtr(database), IDBDatabaseMetada
ta(metadata), static_cast<WebIDBDataLoss>(dataLoss), dataLossMessage); |
| 155 InspectorInstrumentation::traceAsyncCallbackCompleted(cookie); | 155 InspectorInstrumentation::traceAsyncCallbackCompleted(cookie); |
| 156 } | 156 } |
| 157 | 157 |
| 158 } // namespace blink | 158 } // namespace blink |
| OLD | NEW |