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

Side by Side Diff: ios/chrome/app/startup/ios_chrome_main.mm

Issue 2702253002: [ObjC ARC] Converts ios/chrome/app/startup:startup to ARC. (Closed)
Patch Set: Created 3 years, 10 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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "ios/chrome/app/startup/ios_chrome_main.h" 5 #include "ios/chrome/app/startup/ios_chrome_main.h"
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/strings/sys_string_conversions.h" 12 #include "base/strings/sys_string_conversions.h"
13 #include "base/time/time.h" 13 #include "base/time/time.h"
14 #include "ios/web/public/app/web_main_runner.h" 14 #include "ios/web/public/app/web_main_runner.h"
15 15
16 #if !defined(__has_feature) || !__has_feature(objc_arc)
17 #error "This file requires ARC support."
18 #endif
19
16 namespace { 20 namespace {
17 base::Time* g_start_time; 21 base::Time* g_start_time;
18 } // namespace 22 } // namespace
19 23
20 IOSChromeMain::IOSChromeMain() { 24 IOSChromeMain::IOSChromeMain() {
21 web_main_runner_.reset(web::WebMainRunner::Create()); 25 web_main_runner_.reset(web::WebMainRunner::Create());
22 26
23 web::WebMainParams main_params = web::WebMainParams(&main_delegate_); 27 web::WebMainParams main_params = web::WebMainParams(&main_delegate_);
24 // Copy NSProcessInfo arguments into WebMainParams in debug only, since 28 // Copy NSProcessInfo arguments into WebMainParams in debug only, since
25 // command line should be meaningless outside of developer builds. 29 // command line should be meaningless outside of developer builds.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 void IOSChromeMain::InitStartTime() { 61 void IOSChromeMain::InitStartTime() {
58 DCHECK(!g_start_time); 62 DCHECK(!g_start_time);
59 g_start_time = new base::Time(base::Time::Now()); 63 g_start_time = new base::Time(base::Time::Now());
60 } 64 }
61 65
62 // static 66 // static
63 const base::Time& IOSChromeMain::StartTime() { 67 const base::Time& IOSChromeMain::StartTime() {
64 CHECK(g_start_time); 68 CHECK(g_start_time);
65 return *g_start_time; 69 return *g_start_time;
66 } 70 }
OLDNEW
« no previous file with comments | « ios/chrome/app/startup/client_registration.mm ('k') | ios/chrome/app/startup/ios_chrome_main_delegate.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698