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

Side by Side Diff: jingle/glue/thread_wrapper_unittest.cc

Issue 11419224: Add missing (and remove superfluous) 'explicit' from constructors. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + remove non-straightforward changes Created 7 years, 11 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
« no previous file with comments | « jingle/glue/thread_wrapper.cc ('k') | jingle/notifier/listener/non_blocking_push_client.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/bind.h" 5 #include "base/bind.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "base/threading/thread.h" 8 #include "base/threading/thread.h"
9 #include "jingle/glue/thread_wrapper.h" 9 #include "jingle/glue/thread_wrapper.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 28 matching lines...) Expand all
39 arg->pdata == data; 39 arg->pdata == data;
40 } 40 }
41 41
42 ACTION(DeleteMessageData) { 42 ACTION(DeleteMessageData) {
43 delete arg0->pdata; 43 delete arg0->pdata;
44 } 44 }
45 45
46 // Helper class used in the Dispose test. 46 // Helper class used in the Dispose test.
47 class DeletableObject { 47 class DeletableObject {
48 public: 48 public:
49 DeletableObject(bool* deleted) 49 explicit DeletableObject(bool* deleted)
50 : deleted_(deleted) { 50 : deleted_(deleted) {
51 *deleted = false; 51 *deleted = false;
52 } 52 }
53 53
54 ~DeletableObject() { 54 ~DeletableObject() {
55 *deleted_ = true; 55 *deleted_ = true;
56 } 56 }
57 57
58 private: 58 private:
59 bool* deleted_; 59 bool* deleted_;
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 297
298 TEST_F(ThreadWrapperTest, Dispose) { 298 TEST_F(ThreadWrapperTest, Dispose) {
299 bool deleted_; 299 bool deleted_;
300 thread_->Dispose(new DeletableObject(&deleted_)); 300 thread_->Dispose(new DeletableObject(&deleted_));
301 EXPECT_FALSE(deleted_); 301 EXPECT_FALSE(deleted_);
302 message_loop_.RunUntilIdle(); 302 message_loop_.RunUntilIdle();
303 EXPECT_TRUE(deleted_); 303 EXPECT_TRUE(deleted_);
304 } 304 }
305 305
306 } // namespace jingle_glue 306 } // namespace jingle_glue
OLDNEW
« no previous file with comments | « jingle/glue/thread_wrapper.cc ('k') | jingle/notifier/listener/non_blocking_push_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698