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

Side by Side Diff: content/browser/in_process_webkit/indexed_db_callbacks.cc

Issue 10803062: Chrome-side intVersion changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more plumbing Created 8 years, 5 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/in_process_webkit/indexed_db_callbacks.h" 5 #include "content/browser/in_process_webkit/indexed_db_callbacks.h"
6 6
7 #include "content/common/indexed_db/indexed_db_messages.h" 7 #include "content/common/indexed_db/indexed_db_messages.h"
8 #include "webkit/quota/quota_manager.h" 8 #include "webkit/quota/quota_manager.h"
9 9
10 using content::IndexedDBKey; 10 using content::IndexedDBKey;
11 using content::IndexedDBKeyPath; 11 using content::IndexedDBKeyPath;
12 using content::SerializedScriptValue; 12 using content::SerializedScriptValue;
13 13
14 IndexedDBCallbacksBase::IndexedDBCallbacksBase( 14 IndexedDBCallbacksBase::IndexedDBCallbacksBase(
15 IndexedDBDispatcherHost* dispatcher_host, 15 IndexedDBDispatcherHost* dispatcher_host,
16 int32 thread_id, 16 int32 thread_id,
17 int32 response_id) 17 int32 response_id)
18 : dispatcher_host_(dispatcher_host), 18 : dispatcher_host_(dispatcher_host),
19 response_id_(response_id), 19 response_id_(response_id),
20 thread_id_(thread_id) { 20 thread_id_(thread_id) {
21 } 21 }
22 22
23 IndexedDBCallbacksBase::~IndexedDBCallbacksBase() {} 23 IndexedDBCallbacksBase::~IndexedDBCallbacksBase() {}
24 24
25 void IndexedDBCallbacksBase::onError(const WebKit::WebIDBDatabaseError& error) { 25 void IndexedDBCallbacksBase::onError(const WebKit::WebIDBDatabaseError& error) {
26 dispatcher_host_->Send(new IndexedDBMsg_CallbacksError( 26 dispatcher_host_->Send(new IndexedDBMsg_CallbacksError(
27 thread_id_, response_id_, error.code(), error.message())); 27 thread_id_, response_id_, error.code(), error.message()));
28 } 28 }
29 29
30 void IndexedDBCallbacksBase::onBlocked(int64_t existing_version) {
31 dispatcher_host_->Send(new IndexedDBMsg_CallbacksIntBlocked(
32 thread_id_, response_id_, existing_version));
33 }
34
30 void IndexedDBCallbacksBase::onBlocked() { 35 void IndexedDBCallbacksBase::onBlocked() {
31 dispatcher_host_->Send(new IndexedDBMsg_CallbacksBlocked(thread_id_, 36 dispatcher_host_->Send(new IndexedDBMsg_CallbacksBlocked(thread_id_,
32 response_id_)); 37 response_id_));
33 } 38 }
34 39
35 void IndexedDBCallbacks<WebKit::WebIDBCursor>::onSuccess( 40 void IndexedDBCallbacks<WebKit::WebIDBCursor>::onSuccess(
36 WebKit::WebIDBCursor* idb_object) { 41 WebKit::WebIDBCursor* idb_object) {
37 int32 object_id = dispatcher_host()->Add(idb_object); 42 int32 object_id = dispatcher_host()->Add(idb_object);
38 IndexedDBMsg_CallbacksSuccessIDBCursor_Params params; 43 IndexedDBMsg_CallbacksSuccessIDBCursor_Params params;
39 params.thread_id = thread_id(); 44 params.thread_id = thread_id();
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 132
128 void IndexedDBCallbacks<WebKit::WebSerializedScriptValue>::onSuccess( 133 void IndexedDBCallbacks<WebKit::WebSerializedScriptValue>::onSuccess(
129 const WebKit::WebSerializedScriptValue& value, 134 const WebKit::WebSerializedScriptValue& value,
130 const WebKit::WebIDBKey& primaryKey, 135 const WebKit::WebIDBKey& primaryKey,
131 const WebKit::WebIDBKeyPath& keyPath) { 136 const WebKit::WebIDBKeyPath& keyPath) {
132 dispatcher_host()->Send( 137 dispatcher_host()->Send(
133 new IndexedDBMsg_CallbacksSuccessSerializedScriptValueWithKey( 138 new IndexedDBMsg_CallbacksSuccessSerializedScriptValueWithKey(
134 thread_id(), response_id(), SerializedScriptValue(value), 139 thread_id(), response_id(), SerializedScriptValue(value),
135 IndexedDBKey(primaryKey), IndexedDBKeyPath(keyPath))); 140 IndexedDBKey(primaryKey), IndexedDBKeyPath(keyPath)));
136 } 141 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698