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

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

Issue 277583002: IndexedDB: Prevent store/index deletion from racing ahead of use (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: base::Closure copies const-refs, so this is better Created 6 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_MOCK_INDEXED_DB_CALLBACKS_H_ 5 #ifndef CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_CALLBACKS_H_
6 #define CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_CALLBACKS_H_ 6 #define CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_CALLBACKS_H_
7 7
8 #include "content/browser/indexed_db/indexed_db_callbacks.h" 8 #include "content/browser/indexed_db/indexed_db_callbacks.h"
9 #include "content/browser/indexed_db/indexed_db_connection.h" 9 #include "content/browser/indexed_db/indexed_db_connection.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 class MockIndexedDBCallbacks : public IndexedDBCallbacks { 13 class MockIndexedDBCallbacks : public IndexedDBCallbacks {
14 public: 14 public:
15 MockIndexedDBCallbacks(); 15 MockIndexedDBCallbacks();
16 MockIndexedDBCallbacks(bool expect_connection); 16 MockIndexedDBCallbacks(bool expect_connection);
17 17
18 virtual void OnSuccess() OVERRIDE; 18 virtual void OnSuccess() OVERRIDE;
19 virtual void OnSuccess(int64) OVERRIDE; 19 virtual void OnSuccess(int64) OVERRIDE;
20 virtual void OnSuccess(const std::vector<base::string16>&) OVERRIDE; 20 virtual void OnSuccess(const std::vector<base::string16>&) OVERRIDE;
21 virtual void OnSuccess(const IndexedDBKey& key) OVERRIDE;
21 virtual void OnSuccess(scoped_ptr<IndexedDBConnection> connection, 22 virtual void OnSuccess(scoped_ptr<IndexedDBConnection> connection,
22 const IndexedDBDatabaseMetadata& metadata) OVERRIDE; 23 const IndexedDBDatabaseMetadata& metadata) OVERRIDE;
23 IndexedDBConnection* connection() { return connection_.get(); } 24 IndexedDBConnection* connection() { return connection_.get(); }
24 25
25 protected: 26 protected:
26 virtual ~MockIndexedDBCallbacks(); 27 virtual ~MockIndexedDBCallbacks();
27 28
28 scoped_ptr<IndexedDBConnection> connection_; 29 scoped_ptr<IndexedDBConnection> connection_;
29 30
30 private: 31 private:
31 bool expect_connection_; 32 bool expect_connection_;
32 33
33 DISALLOW_COPY_AND_ASSIGN(MockIndexedDBCallbacks); 34 DISALLOW_COPY_AND_ASSIGN(MockIndexedDBCallbacks);
34 }; 35 };
35 36
36 } // namespace content 37 } // namespace content
37 38
38 #endif // CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_CALLBACKS_H_ 39 #endif // CONTENT_BROWSER_INDEXED_DB_MOCK_INDEXED_DB_CALLBACKS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698