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

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

Issue 356463008: Cleanup IndexedDBIO unit tests using GoogleMock. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: not exporting MockLevelDBFactory Created 6 years, 5 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
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_backing_store.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_INDEXED_DB_BACKING_STORE_H_ 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 namespace net { 44 namespace net {
45 class URLRequestContext; 45 class URLRequestContext;
46 } 46 }
47 47
48 namespace content { 48 namespace content {
49 49
50 class IndexedDBFactory; 50 class IndexedDBFactory;
51 class LevelDBComparator; 51 class LevelDBComparator;
52 class LevelDBDatabase; 52 class LevelDBDatabase;
53 class LevelDBFactory;
53 struct IndexedDBValue; 54 struct IndexedDBValue;
54 55
55 class LevelDBFactory {
56 public:
57 virtual ~LevelDBFactory() {}
58 virtual leveldb::Status OpenLevelDB(const base::FilePath& file_name,
59 const LevelDBComparator* comparator,
60 scoped_ptr<LevelDBDatabase>* db,
61 bool* is_disk_full) = 0;
62 virtual leveldb::Status DestroyLevelDB(const base::FilePath& file_name) = 0;
63 };
64
65 class CONTENT_EXPORT IndexedDBBackingStore 56 class CONTENT_EXPORT IndexedDBBackingStore
66 : public base::RefCounted<IndexedDBBackingStore> { 57 : public base::RefCounted<IndexedDBBackingStore> {
67 public: 58 public:
68 class CONTENT_EXPORT Transaction; 59 class CONTENT_EXPORT Transaction;
69 60
70 class CONTENT_EXPORT Comparator : public LevelDBComparator { 61 class CONTENT_EXPORT Comparator : public LevelDBComparator {
71 public: 62 public:
72 virtual int Compare(const base::StringPiece& a, 63 virtual int Compare(const base::StringPiece& a,
73 const base::StringPiece& b) const OVERRIDE; 64 const base::StringPiece& b) const OVERRIDE;
74 virtual const char* Name() const OVERRIDE; 65 virtual const char* Name() const OVERRIDE;
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 // will hold a reference to this backing store. 579 // will hold a reference to this backing store.
589 IndexedDBActiveBlobRegistry active_blob_registry_; 580 IndexedDBActiveBlobRegistry active_blob_registry_;
590 base::OneShotTimer<IndexedDBBackingStore> close_timer_; 581 base::OneShotTimer<IndexedDBBackingStore> close_timer_;
591 582
592 DISALLOW_COPY_AND_ASSIGN(IndexedDBBackingStore); 583 DISALLOW_COPY_AND_ASSIGN(IndexedDBBackingStore);
593 }; 584 };
594 585
595 } // namespace content 586 } // namespace content
596 587
597 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_ 588 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_BACKING_STORE_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_backing_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698