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

Side by Side Diff: content/browser/indexed_db/leveldb/leveldb_database.h

Issue 312093005: IndexedDB: Sprinkle DISALLOW_COPY_AND_ASSIGN where appropriate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Whitespace fixes Created 6 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
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 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 CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_DATABASE_H_ 5 #ifndef CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_DATABASE_H_
6 #define CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_DATABASE_H_ 6 #define CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_DATABASE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 21 matching lines...) Expand all
32 class LevelDBSnapshot { 32 class LevelDBSnapshot {
33 private: 33 private:
34 friend class LevelDBDatabase; 34 friend class LevelDBDatabase;
35 friend class LevelDBTransaction; 35 friend class LevelDBTransaction;
36 36
37 explicit LevelDBSnapshot(LevelDBDatabase* db); 37 explicit LevelDBSnapshot(LevelDBDatabase* db);
38 ~LevelDBSnapshot(); 38 ~LevelDBSnapshot();
39 39
40 leveldb::DB* db_; 40 leveldb::DB* db_;
41 const leveldb::Snapshot* snapshot_; 41 const leveldb::Snapshot* snapshot_;
42
43 DISALLOW_COPY_AND_ASSIGN(LevelDBSnapshot);
42 }; 44 };
43 45
44 class CONTENT_EXPORT LevelDBLock { 46 class CONTENT_EXPORT LevelDBLock {
45 public: 47 public:
48 LevelDBLock() {}
46 virtual ~LevelDBLock() {} 49 virtual ~LevelDBLock() {}
50
51 private:
52 DISALLOW_COPY_AND_ASSIGN(LevelDBLock);
47 }; 53 };
48 54
49 class CONTENT_EXPORT LevelDBDatabase { 55 class CONTENT_EXPORT LevelDBDatabase {
50 public: 56 public:
51 class ComparatorAdapter : public leveldb::Comparator { 57 class ComparatorAdapter : public leveldb::Comparator {
52 public: 58 public:
53 explicit ComparatorAdapter(const LevelDBComparator* comparator); 59 explicit ComparatorAdapter(const LevelDBComparator* comparator);
54 60
55 virtual int Compare(const leveldb::Slice& a, 61 virtual int Compare(const leveldb::Slice& a,
56 const leveldb::Slice& b) const OVERRIDE; 62 const leveldb::Slice& b) const OVERRIDE;
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 103
98 scoped_ptr<leveldb::Env> env_; 104 scoped_ptr<leveldb::Env> env_;
99 scoped_ptr<leveldb::Comparator> comparator_adapter_; 105 scoped_ptr<leveldb::Comparator> comparator_adapter_;
100 scoped_ptr<leveldb::DB> db_; 106 scoped_ptr<leveldb::DB> db_;
101 const LevelDBComparator* comparator_; 107 const LevelDBComparator* comparator_;
102 }; 108 };
103 109
104 } // namespace content 110 } // namespace content
105 111
106 #endif // CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_DATABASE_H_ 112 #endif // CONTENT_BROWSER_INDEXED_DB_LEVELDB_LEVELDB_DATABASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698