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

Side by Side Diff: components/leveldb_proto/leveldb_database.h

Issue 1420003004: Wipe out offline page data on clearing cookie and site data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address more feedback 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 COMPONENTS_LEVELDB_PROTO_LEVELDB_DATABASE_H_ 5 #ifndef COMPONENTS_LEVELDB_PROTO_LEVELDB_DATABASE_H_
6 #define COMPONENTS_LEVELDB_PROTO_LEVELDB_DATABASE_H_ 6 #define COMPONENTS_LEVELDB_PROTO_LEVELDB_DATABASE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 26 matching lines...) Expand all
37 explicit LevelDB(const char* client_name); 37 explicit LevelDB(const char* client_name);
38 virtual ~LevelDB(); 38 virtual ~LevelDB();
39 39
40 virtual bool InitWithOptions(const base::FilePath& database_dir, 40 virtual bool InitWithOptions(const base::FilePath& database_dir,
41 const leveldb::Options& options); 41 const leveldb::Options& options);
42 virtual bool Init(const base::FilePath& database_dir); 42 virtual bool Init(const base::FilePath& database_dir);
43 virtual bool Save(const base::StringPairs& pairs_to_save, 43 virtual bool Save(const base::StringPairs& pairs_to_save,
44 const std::vector<std::string>& keys_to_remove); 44 const std::vector<std::string>& keys_to_remove);
45 virtual bool Load(std::vector<std::string>* entries); 45 virtual bool Load(std::vector<std::string>* entries);
46 46
47 static bool Destroy(const base::FilePath& database_dir);
48
47 private: 49 private:
48 DFAKE_MUTEX(thread_checker_); 50 DFAKE_MUTEX(thread_checker_);
49 51
50 // The declaration order of these members matters: |db_| depends on |env_| and 52 // The declaration order of these members matters: |db_| depends on |env_| and
51 // therefore has to be destructed first. 53 // therefore has to be destructed first.
52 scoped_ptr<leveldb::Env> env_; 54 scoped_ptr<leveldb::Env> env_;
53 scoped_ptr<leveldb::DB> db_; 55 scoped_ptr<leveldb::DB> db_;
54 base::HistogramBase* open_histogram_; 56 base::HistogramBase* open_histogram_;
55 57
56 DISALLOW_COPY_AND_ASSIGN(LevelDB); 58 DISALLOW_COPY_AND_ASSIGN(LevelDB);
57 }; 59 };
58 60
59 } // namespace leveldb_proto 61 } // namespace leveldb_proto
60 62
61 #endif // COMPONENTS_LEVELDB_PROTO_LEVELDB_DATABASE_H_ 63 #endif // COMPONENTS_LEVELDB_PROTO_LEVELDB_DATABASE_H_
OLDNEW
« no previous file with comments | « chrome/browser/browsing_data/browsing_data_remover.cc ('k') | components/leveldb_proto/leveldb_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698