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

Side by Side Diff: base/message_loop/message_loop_unittest.cc

Issue 185413019: Used scoped_ptr in InitMessagePumpForUIFactory and CreateMessagePumpForType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes in accordance to build fail for linux chromeos Created 6 years, 9 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 | « base/message_loop/message_loop.cc ('k') | base/test/test_support_android.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 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 <vector> 5 #include <vector>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 18 matching lines...) Expand all
29 #include "base/win/scoped_handle.h" 29 #include "base/win/scoped_handle.h"
30 #endif 30 #endif
31 31
32 namespace base { 32 namespace base {
33 33
34 // TODO(darin): Platform-specific MessageLoop tests should be grouped together 34 // TODO(darin): Platform-specific MessageLoop tests should be grouped together
35 // to avoid chopping this file up with so many #ifdefs. 35 // to avoid chopping this file up with so many #ifdefs.
36 36
37 namespace { 37 namespace {
38 38
39 MessagePump* TypeDefaultMessagePumpFactory() { 39 scoped_ptr<MessagePump> TypeDefaultMessagePumpFactory() {
40 return MessageLoop::CreateMessagePumpForType(MessageLoop::TYPE_DEFAULT); 40 return MessageLoop::CreateMessagePumpForType(MessageLoop::TYPE_DEFAULT);
41 } 41 }
42 42
43 MessagePump* TypeIOMessagePumpFactory() { 43 scoped_ptr<MessagePump> TypeIOMessagePumpFactory() {
44 return MessageLoop::CreateMessagePumpForType(MessageLoop::TYPE_IO); 44 return MessageLoop::CreateMessagePumpForType(MessageLoop::TYPE_IO);
45 } 45 }
46 46
47 MessagePump* TypeUIMessagePumpFactory() { 47 scoped_ptr<MessagePump> TypeUIMessagePumpFactory() {
48 return MessageLoop::CreateMessagePumpForType(MessageLoop::TYPE_UI); 48 return MessageLoop::CreateMessagePumpForType(MessageLoop::TYPE_UI);
49 } 49 }
50 50
51 class Foo : public RefCounted<Foo> { 51 class Foo : public RefCounted<Foo> {
52 public: 52 public:
53 Foo() : test_count_(0) { 53 Foo() : test_count_(0) {
54 } 54 }
55 55
56 void Test0() { 56 void Test0() {
57 ++test_count_; 57 ++test_count_;
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 1040
1041 ASSERT_TRUE(PostMessage(message_hwnd, kSignalMsg, 0, 1)); 1041 ASSERT_TRUE(PostMessage(message_hwnd, kSignalMsg, 0, 1));
1042 1042
1043 loop.Run(); 1043 loop.Run();
1044 1044
1045 ASSERT_TRUE(UnregisterClass(MAKEINTATOM(atom), instance)); 1045 ASSERT_TRUE(UnregisterClass(MAKEINTATOM(atom), instance));
1046 } 1046 }
1047 #endif // defined(OS_WIN) 1047 #endif // defined(OS_WIN)
1048 1048
1049 } // namespace base 1049 } // namespace base
OLDNEW
« no previous file with comments | « base/message_loop/message_loop.cc ('k') | base/test/test_support_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698