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

Side by Side Diff: content/child/indexed_db/indexed_db_dispatcher_unittest.cc

Issue 311263014: IndexedDB: Fix trivial cpplint.py errors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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 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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/message_loop/message_loop_proxy.h" 6 #include "base/message_loop/message_loop_proxy.h"
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "content/child/indexed_db/indexed_db_dispatcher.h" 8 #include "content/child/indexed_db/indexed_db_dispatcher.h"
9 #include "content/child/indexed_db/webidbcursor_impl.h" 9 #include "content/child/indexed_db/webidbcursor_impl.h"
10 #include "content/child/thread_safe_sender.h" 10 #include "content/child/thread_safe_sender.h"
(...skipping 27 matching lines...) Expand all
38 bool error_seen() const { return error_seen_; } 38 bool error_seen() const { return error_seen_; }
39 39
40 private: 40 private:
41 bool error_seen_; 41 bool error_seen_;
42 42
43 DISALLOW_COPY_AND_ASSIGN(MockCallbacks); 43 DISALLOW_COPY_AND_ASSIGN(MockCallbacks);
44 }; 44 };
45 45
46 class MockDispatcher : public IndexedDBDispatcher { 46 class MockDispatcher : public IndexedDBDispatcher {
47 public: 47 public:
48 MockDispatcher(ThreadSafeSender* sender) : IndexedDBDispatcher(sender) {} 48 explicit MockDispatcher(ThreadSafeSender* sender)
49 : IndexedDBDispatcher(sender) {}
49 50
50 virtual bool Send(IPC::Message* msg) OVERRIDE { 51 virtual bool Send(IPC::Message* msg) OVERRIDE {
51 delete msg; 52 delete msg;
52 return true; 53 return true;
53 } 54 }
54 55
55 private: 56 private:
56 DISALLOW_COPY_AND_ASSIGN(MockDispatcher); 57 DISALLOW_COPY_AND_ASSIGN(MockDispatcher);
57 }; 58 };
58 59
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 WebVector<long long>(), 127 WebVector<long long>(),
127 WebVector<WebVector<WebIDBKey> >()); 128 WebVector<WebVector<WebIDBKey> >());
128 129
129 EXPECT_TRUE(callbacks.error_seen()); 130 EXPECT_TRUE(callbacks.error_seen());
130 } 131 }
131 132
132 namespace { 133 namespace {
133 134
134 class CursorCallbacks : public WebIDBCallbacks { 135 class CursorCallbacks : public WebIDBCallbacks {
135 public: 136 public:
136 CursorCallbacks(scoped_ptr<WebIDBCursor>* cursor) : cursor_(cursor) {} 137 explicit CursorCallbacks(scoped_ptr<WebIDBCursor>* cursor)
138 : cursor_(cursor) {}
137 139
138 virtual void onSuccess(const WebData&, 140 virtual void onSuccess(const WebData&,
139 const WebVector<WebBlobInfo>&) OVERRIDE {} 141 const WebVector<WebBlobInfo>&) OVERRIDE {}
140 virtual void onSuccess(WebIDBCursor* cursor, 142 virtual void onSuccess(WebIDBCursor* cursor,
141 const WebIDBKey& key, 143 const WebIDBKey& key,
142 const WebIDBKey& primaryKey, 144 const WebIDBKey& primaryKey,
143 const WebData& value, 145 const WebData& value,
144 const WebVector<WebBlobInfo>&) OVERRIDE { 146 const WebVector<WebBlobInfo>&) OVERRIDE {
145 cursor_->reset(cursor); 147 cursor_->reset(cursor);
146 } 148 }
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 cursor1_transaction_id); 336 cursor1_transaction_id);
335 337
336 EXPECT_EQ(2, cursor1->reset_count()); 338 EXPECT_EQ(2, cursor1->reset_count());
337 EXPECT_EQ(0, cursor2->reset_count()); 339 EXPECT_EQ(0, cursor2->reset_count());
338 340
339 cursor1.reset(); 341 cursor1.reset();
340 cursor2.reset(); 342 cursor2.reset();
341 } 343 }
342 344
343 } // namespace content 345 } // namespace content
OLDNEW
« no previous file with comments | « content/child/indexed_db/indexed_db_dispatcher.cc ('k') | content/child/indexed_db/indexed_db_key_builders.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698