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

Side by Side Diff: content/browser/indexed_db/indexed_db_database_callbacks_wrapper.cc

Issue 18224002: IndexedDB: Eliminate IndexedDBDatabaseCallbacksWrapper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Include fix for win Created 7 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
(Empty)
1 // Copyright (c) 2013 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.
4
5 #include "content/browser/indexed_db/indexed_db_database_callbacks.h"
6 #include "content/browser/indexed_db/indexed_db_database_callbacks_wrapper.h"
7
8 namespace content {
9
10 IndexedDBDatabaseCallbacksWrapper::IndexedDBDatabaseCallbacksWrapper(
11 IndexedDBDatabaseCallbacks* callbacks)
12 : callbacks_(callbacks) {}
13 IndexedDBDatabaseCallbacksWrapper::~IndexedDBDatabaseCallbacksWrapper() {}
14
15 void IndexedDBDatabaseCallbacksWrapper::OnForcedClose() {
16 if (!callbacks_)
17 return;
18 callbacks_->onForcedClose();
19 callbacks_.reset();
20 }
21 void IndexedDBDatabaseCallbacksWrapper::OnVersionChange(int64 old_version,
22 int64 new_version) {
23 if (!callbacks_)
24 return;
25 callbacks_->onVersionChange(old_version, new_version);
26 }
27
28 void IndexedDBDatabaseCallbacksWrapper::OnAbort(
29 int64 transaction_id,
30 const IndexedDBDatabaseError& error) {
31 if (!callbacks_)
32 return;
33 callbacks_->onAbort(transaction_id, error);
34 }
35 void IndexedDBDatabaseCallbacksWrapper::OnComplete(int64 transaction_id) {
36 if (!callbacks_)
37 return;
38 callbacks_->onComplete(transaction_id);
39 }
40
41 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698