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

Side by Side Diff: components/leveldb/leveldb_service_impl.h

Issue 2625873004: Delete and try to recreate localstorage database on invalid schema version. (Closed)
Patch Set: fix windows build Created 3 years, 11 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #ifndef COMPONENTS_LEVELDB_LEVELDB_SERVICE_IMPL_H_ 5 #ifndef COMPONENTS_LEVELDB_LEVELDB_SERVICE_IMPL_H_
6 #define COMPONENTS_LEVELDB_LEVELDB_SERVICE_IMPL_H_ 6 #define COMPONENTS_LEVELDB_LEVELDB_SERVICE_IMPL_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "components/leveldb/leveldb_mojo_proxy.h" 9 #include "components/leveldb/leveldb_mojo_proxy.h"
10 #include "components/leveldb/public/interfaces/leveldb.mojom.h" 10 #include "components/leveldb/public/interfaces/leveldb.mojom.h"
(...skipping 12 matching lines...) Expand all
23 const std::string& dbname, 23 const std::string& dbname,
24 leveldb::mojom::LevelDBDatabaseRequest database, 24 leveldb::mojom::LevelDBDatabaseRequest database,
25 const OpenCallback& callback) override; 25 const OpenCallback& callback) override;
26 void OpenWithOptions(leveldb::mojom::OpenOptionsPtr open_options, 26 void OpenWithOptions(leveldb::mojom::OpenOptionsPtr open_options,
27 filesystem::mojom::DirectoryPtr directory, 27 filesystem::mojom::DirectoryPtr directory,
28 const std::string& dbname, 28 const std::string& dbname,
29 leveldb::mojom::LevelDBDatabaseRequest database, 29 leveldb::mojom::LevelDBDatabaseRequest database,
30 const OpenCallback& callback) override; 30 const OpenCallback& callback) override;
31 void OpenInMemory(leveldb::mojom::LevelDBDatabaseRequest database, 31 void OpenInMemory(leveldb::mojom::LevelDBDatabaseRequest database,
32 const OpenInMemoryCallback& callback) override; 32 const OpenInMemoryCallback& callback) override;
33 void Destroy(filesystem::mojom::DirectoryPtr directory,
34 const std::string& dbname,
35 const DestroyCallback& callback) override;
33 36
34 private: 37 private:
35 // Thread to own the mojo message pipe. Because leveldb spawns multiple 38 // Thread to own the mojo message pipe. Because leveldb spawns multiple
36 // threads that want to call file stuff, we create a dedicated thread to send 39 // threads that want to call file stuff, we create a dedicated thread to send
37 // and receive mojo message calls. 40 // and receive mojo message calls.
38 scoped_refptr<LevelDBMojoProxy> thread_; 41 scoped_refptr<LevelDBMojoProxy> thread_;
39 42
40 DISALLOW_COPY_AND_ASSIGN(LevelDBServiceImpl); 43 DISALLOW_COPY_AND_ASSIGN(LevelDBServiceImpl);
41 }; 44 };
42 45
43 } // namespace leveldb 46 } // namespace leveldb
44 47
45 #endif // COMPONENTS_LEVELDB_LEVELDB_SERVICE_IMPL_H_ 48 #endif // COMPONENTS_LEVELDB_LEVELDB_SERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | components/leveldb/leveldb_service_impl.cc » ('j') | components/leveldb/public/interfaces/leveldb.mojom » ('J')

Powered by Google App Engine
This is Rietveld 408576698