[content shell] implement testRunner.overridePreference
[chromium-blink-merge.git] / content / browser / in_process_webkit / indexed_db_transaction_callbacks.cc
blobd72f117b261e2ea714f3bb37820f2d97e5e09000
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/browser/in_process_webkit/indexed_db_transaction_callbacks.h"
7 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h"
8 #include "content/common/indexed_db/indexed_db_messages.h"
10 namespace content {
12 IndexedDBTransactionCallbacks::IndexedDBTransactionCallbacks(
13 IndexedDBDispatcherHost* dispatcher_host,
14 int ipc_thread_id,
15 int ipc_transaction_id)
16 : dispatcher_host_(dispatcher_host),
17 ipc_thread_id_(ipc_thread_id),
18 ipc_transaction_id_(ipc_transaction_id) {
21 IndexedDBTransactionCallbacks::~IndexedDBTransactionCallbacks() {
24 void IndexedDBTransactionCallbacks::onAbort(
25 const WebKit::WebIDBDatabaseError& error) {
26 dispatcher_host_->Send(
27 new IndexedDBMsg_TransactionCallbacksAbort(
28 ipc_thread_id_, ipc_transaction_id_, error.code(), error.message()));
31 void IndexedDBTransactionCallbacks::onComplete() {
32 dispatcher_host_->TransactionComplete(ipc_transaction_id_);
33 dispatcher_host_->Send(
34 new IndexedDBMsg_TransactionCallbacksComplete(ipc_thread_id_,
35 ipc_transaction_id_));
38 } // namespace content