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

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

Issue 1852433005: Convert //base to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after r384946 Created 4 years, 8 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') | base/test/trace_event_analyzer.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 #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
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
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
OLDNEW
« no previous file with comments | « base/test/test_support_android.cc ('k') | base/test/trace_event_analyzer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698