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

Side by Side Diff: content/browser/indexed_db/indexed_db_factory.h

Issue 15564008: Migrate the IndexedDB backend from Blink to Chromium (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Accessor naming, use LevelDBSlice ctor explicitly Created 7 years, 7 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 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "base/string16.h"
10
11 namespace content {
12
13 class IndexedDBCallbacksWrapper;
14 class IndexedDBDatabase;
15 class IndexedDBDatabaseCallbacksWrapper;
16 class ScriptExecutionContext;
17
18 typedef int ExceptionCode;
19
20 // This class is shared by IndexedDBFactory (async) and IndexedDBFactorySync
21 // (sync).
22 // This is implemented by IndexedDBFactoryImpl and optionally others (in order
23 // to proxy
24 // calls across process barriers). All calls to these classes should be
25 // non-blocking and
26 // trigger work on a background thread if necessary.
27 class IndexedDBFactory : public base::RefCounted<IndexedDBFactory> {
28 public:
29 static scoped_refptr<IndexedDBFactory> Create();
30
31 virtual void GetDatabaseNames(scoped_refptr<IndexedDBCallbacksWrapper>,
32 const string16& database_identifier,
33 ScriptExecutionContext*,
34 const string16& data_dir) = 0;
35 virtual void Open(const string16& name,
36 int64_t version,
37 int64_t transaction_id,
38 scoped_refptr<IndexedDBCallbacksWrapper>,
39 scoped_refptr<IndexedDBDatabaseCallbacksWrapper>,
40 const string16& database_identifier,
41 ScriptExecutionContext*,
42 const string16& data_dir) = 0;
43 virtual void DeleteDatabase(const string16& name,
44 scoped_refptr<IndexedDBCallbacksWrapper>,
45 const string16& database_identifier,
46 ScriptExecutionContext*,
47 const string16& data_dir) = 0;
48
49 protected:
50 virtual ~IndexedDBFactory() {}
51 friend class base::RefCounted<IndexedDBFactory>;
52 };
53
54 } // namespace content
55
56 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698