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

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

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 #include "content/browser/indexed_db/mock_indexed_db_callbacks.h" 5 #include "content/browser/indexed_db/mock_indexed_db_callbacks.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 8
9 namespace content { 9 namespace content {
10 10
11 MockIndexedDBCallbacks::MockIndexedDBCallbacks() 11 MockIndexedDBCallbacks::MockIndexedDBCallbacks()
12 : IndexedDBCallbacks(NULL, 0, 0), expect_connection_(true) {} 12 : IndexedDBCallbacks(NULL, 0, 0), expect_connection_(true) {}
13 MockIndexedDBCallbacks::MockIndexedDBCallbacks(bool expect_connection) 13 MockIndexedDBCallbacks::MockIndexedDBCallbacks(bool expect_connection)
14 : IndexedDBCallbacks(NULL, 0, 0), expect_connection_(expect_connection) {} 14 : IndexedDBCallbacks(NULL, 0, 0), expect_connection_(expect_connection) {}
15 15
16 MockIndexedDBCallbacks::~MockIndexedDBCallbacks() { 16 MockIndexedDBCallbacks::~MockIndexedDBCallbacks() {
17 EXPECT_EQ(expect_connection_, !!connection_); 17 EXPECT_EQ(expect_connection_, !!connection_);
18 } 18 }
19 19
20 void MockIndexedDBCallbacks::OnSuccess() {} 20 void MockIndexedDBCallbacks::OnSuccess() {}
21 21
22 void MockIndexedDBCallbacks::OnSuccess(int64) {} 22 void MockIndexedDBCallbacks::OnSuccess(int64) {}
23 23
24 void MockIndexedDBCallbacks::OnSuccess(const std::vector<base::string16>&) {} 24 void MockIndexedDBCallbacks::OnSuccess(const std::vector<base::string16>&) {}
25 25
26 void MockIndexedDBCallbacks::OnSuccess(const IndexedDBKey& key) {}
27
26 void MockIndexedDBCallbacks::OnSuccess( 28 void MockIndexedDBCallbacks::OnSuccess(
27 scoped_ptr<IndexedDBConnection> connection, 29 scoped_ptr<IndexedDBConnection> connection,
28 const IndexedDBDatabaseMetadata& metadata) { 30 const IndexedDBDatabaseMetadata& metadata) {
29 connection_ = connection.Pass(); 31 connection_ = connection.Pass();
30 } 32 }
31 33
32 } // namespace content 34 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698