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

Side by Side Diff: base/test/test_support_ios.mm

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/test/test_support_android.cc ('k') | content/shell/browser/shell_layout_tests_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 (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 #import <UIKit/UIKit.h> 5 #import <UIKit/UIKit.h>
6 6
7 #include "base/debug/debugger.h" 7 #include "base/debug/debugger.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/mac/scoped_nsautorelease_pool.h" 9 #include "base/mac/scoped_nsautorelease_pool.h"
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 UIApplication* application = [UIApplication sharedApplication]; 144 UIApplication* application = [UIApplication sharedApplication];
145 [application _terminateWithStatus:exitStatus]; 145 [application _terminateWithStatus:exitStatus];
146 146
147 exit(exitStatus); 147 exit(exitStatus);
148 } 148 }
149 149
150 @end 150 @end
151 151
152 namespace { 152 namespace {
153 153
154 base::MessagePump* CreateMessagePumpForUIForTests() { 154 scoped_ptr<base::MessagePump> CreateMessagePumpForUIForTests() {
155 // A default MessagePump will do quite nicely in tests. 155 // A default MessagePump will do quite nicely in tests.
156 return new base::MessagePumpDefault(); 156 return scoped_ptr<base::MessagePump>(new base::MessagePumpDefault());
157 } 157 }
158 158
159 } // namespace 159 } // namespace
160 160
161 namespace base { 161 namespace base {
162 162
163 void InitIOSTestMessageLoop() { 163 void InitIOSTestMessageLoop() {
164 MessageLoop::InitMessagePumpForUIFactory(&CreateMessagePumpForUIForTests); 164 MessageLoop::InitMessagePumpForUIFactory(&CreateMessagePumpForUIForTests);
165 } 165 }
166 166
(...skipping 16 matching lines...) Expand all
183 if (!ran_hook) { 183 if (!ran_hook) {
184 ran_hook = true; 184 ran_hook = true;
185 mac::ScopedNSAutoreleasePool pool; 185 mac::ScopedNSAutoreleasePool pool;
186 int exit_status = UIApplicationMain(g_argc, g_argv, nil, 186 int exit_status = UIApplicationMain(g_argc, g_argv, nil,
187 @"ChromeUnitTestDelegate"); 187 @"ChromeUnitTestDelegate");
188 exit(exit_status); 188 exit(exit_status);
189 } 189 }
190 } 190 }
191 191
192 } // namespace base 192 } // namespace base
OLDNEW
« no previous file with comments | « base/test/test_support_android.cc ('k') | content/shell/browser/shell_layout_tests_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698