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

Side by Side Diff: extensions/browser/value_store/leveldb_value_store.h

Issue 1428843002: LeveldbValueStore: Deleting db when open fails due to corruption. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: base::File::DeleteFile -> base::DeleteFile Created 5 years, 1 month 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 EXTENSIONS_BROWSER_VALUE_STORE_LEVELDB_VALUE_STORE_H_ 5 #ifndef EXTENSIONS_BROWSER_VALUE_STORE_LEVELDB_VALUE_STORE_H_
6 #define EXTENSIONS_BROWSER_VALUE_STORE_LEVELDB_VALUE_STORE_H_ 6 #define EXTENSIONS_BROWSER_VALUE_STORE_LEVELDB_VALUE_STORE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 // Returns whether the database is empty. 91 // Returns whether the database is empty.
92 bool IsEmpty(); 92 bool IsEmpty();
93 93
94 // The location of the leveldb backend. 94 // The location of the leveldb backend.
95 const base::FilePath db_path_; 95 const base::FilePath db_path_;
96 96
97 // leveldb backend. 97 // leveldb backend.
98 scoped_ptr<leveldb::DB> db_; 98 scoped_ptr<leveldb::DB> db_;
99 base::HistogramBase* open_histogram_; 99 base::HistogramBase* open_histogram_;
100 base::HistogramBase* corruption_recovery_histogram_;
100 101
101 DISALLOW_COPY_AND_ASSIGN(LeveldbValueStore); 102 DISALLOW_COPY_AND_ASSIGN(LeveldbValueStore);
102 }; 103 };
103 104
104 #endif // EXTENSIONS_BROWSER_VALUE_STORE_LEVELDB_VALUE_STORE_H_ 105 #endif // EXTENSIONS_BROWSER_VALUE_STORE_LEVELDB_VALUE_STORE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698