OLD | NEW |
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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 172 |
173 coverage_util::FlushCoverageDataIfNecessary(); | 173 coverage_util::FlushCoverageDataIfNecessary(); |
174 | 174 |
175 exit(exitStatus); | 175 exit(exitStatus); |
176 } | 176 } |
177 | 177 |
178 @end | 178 @end |
179 | 179 |
180 namespace { | 180 namespace { |
181 | 181 |
182 scoped_ptr<base::MessagePump> CreateMessagePumpForUIForTests() { | 182 std::unique_ptr<base::MessagePump> CreateMessagePumpForUIForTests() { |
183 // A default MessagePump will do quite nicely in tests. | 183 // A default MessagePump will do quite nicely in tests. |
184 return scoped_ptr<base::MessagePump>(new base::MessagePumpDefault()); | 184 return std::unique_ptr<base::MessagePump>(new base::MessagePumpDefault()); |
185 } | 185 } |
186 | 186 |
187 } // namespace | 187 } // namespace |
188 | 188 |
189 namespace base { | 189 namespace base { |
190 | 190 |
191 void InitIOSTestMessageLoop() { | 191 void InitIOSTestMessageLoop() { |
192 MessageLoop::InitMessagePumpForUIFactory(&CreateMessagePumpForUIForTests); | 192 MessageLoop::InitMessagePumpForUIFactory(&CreateMessagePumpForUIForTests); |
193 } | 193 } |
194 | 194 |
(...skipping 16 matching lines...) Expand all Loading... |
211 if (!ran_hook) { | 211 if (!ran_hook) { |
212 ran_hook = true; | 212 ran_hook = true; |
213 mac::ScopedNSAutoreleasePool pool; | 213 mac::ScopedNSAutoreleasePool pool; |
214 int exit_status = UIApplicationMain(g_argc, g_argv, nil, | 214 int exit_status = UIApplicationMain(g_argc, g_argv, nil, |
215 @"ChromeUnitTestDelegate"); | 215 @"ChromeUnitTestDelegate"); |
216 exit(exit_status); | 216 exit(exit_status); |
217 } | 217 } |
218 } | 218 } |
219 | 219 |
220 } // namespace base | 220 } // namespace base |
OLD | NEW |