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

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

Issue 15659013: Revert "Migrate the IndexedDB backend from Blink to Chromium" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/webidbfactory_impl.h"
6
7 #include "base/memory/scoped_ptr.h"
8 #include "content/browser/indexed_db/indexed_db_callbacks_wrapper.h"
9 #include "content/browser/indexed_db/indexed_db_factory.h"
10 #include "content/browser/indexed_db/indexed_db_factory_impl.h"
11 #include "third_party/WebKit/Source/Platform/chromium/public/WebIDBDatabaseCallb acks.h"
12 #include "third_party/WebKit/Source/Platform/chromium/public/WebIDBDatabaseError .h"
13
14 using WebKit::WebIDBCallbacks;
15 using WebKit::WebIDBDatabaseCallbacks;
16 using WebKit::WebIDBFactory;
17 using WebKit::WebString;
18
19 namespace content {
20
21 WebIDBFactoryImpl::WebIDBFactoryImpl()
22 : idb_factory_backend_(IndexedDBFactoryImpl::Create()) {}
23
24 WebIDBFactoryImpl::~WebIDBFactoryImpl() {}
25
26 void WebIDBFactoryImpl::getDatabaseNames(WebIDBCallbacks* callbacks,
27 const WebString& database_identifier,
28 const WebString& data_dir) {
29 idb_factory_backend_->GetDatabaseNames(
30 IndexedDBCallbacksWrapper::Create(callbacks),
31 database_identifier,
32 data_dir);
33 }
34
35 void WebIDBFactoryImpl::open(const WebString& name,
36 long long version,
37 long long transaction_id,
38 WebIDBCallbacks* callbacks,
39 WebIDBDatabaseCallbacks* database_callbacks,
40 const WebString& database_identifier,
41 const WebString& data_dir) {
42 scoped_refptr<IndexedDBCallbacksWrapper> callbacks_proxy =
43 IndexedDBCallbacksWrapper::Create(callbacks);
44 scoped_refptr<IndexedDBDatabaseCallbacksWrapper> database_callbacks_proxy =
45 IndexedDBDatabaseCallbacksWrapper::Create(database_callbacks);
46
47 callbacks_proxy->SetDatabaseCallbacks(database_callbacks_proxy);
48 idb_factory_backend_->Open(name,
49 version,
50 transaction_id,
51 callbacks_proxy.get(),
52 database_callbacks_proxy.get(),
53 database_identifier,
54 data_dir);
55 }
56
57 void WebIDBFactoryImpl::deleteDatabase(const WebString& name,
58 WebIDBCallbacks* callbacks,
59 const WebString& database_identifier,
60 const WebString& data_dir) {
61 idb_factory_backend_->DeleteDatabase(
62 name,
63 IndexedDBCallbacksWrapper::Create(callbacks),
64 database_identifier,
65 data_dir);
66 }
67
68 } // namespace WebKit
OLDNEW
« no previous file with comments | « content/browser/indexed_db/webidbfactory_impl.h ('k') | content/common/indexed_db/indexed_db_key.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698