OLD | NEW |
---|---|
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 #if !defined(__has_feature) || !__has_feature(objc_arc) | 5 #if !defined(__has_feature) || !__has_feature(objc_arc) |
6 #error "This file requires ARC support." | 6 #error "This file requires ARC support." |
7 #endif | 7 #endif |
8 | 8 |
9 #import <UIKit/UIKit.h> | 9 #import <UIKit/UIKit.h> |
10 | 10 |
11 #include "base/at_exit.h" | 11 #include "base/at_exit.h" |
12 #include "base/command_line.h" | 12 #include "remoting/ios/app/app_initializer.h" |
nicholss
2017/06/14 15:37:59
I think this is too complicated. If there needs to
Yuwei
2017/06/15 07:02:08
Removed.
| |
13 #include "base/i18n/icu_util.h" | 13 |
14 #import "remoting/ios/app/app_delegate.h" | 14 #import "remoting/ios/app/app_delegate.h" |
15 #import "remoting/ios/app/remoting_resource_factory_external.h" | |
15 | 16 |
16 int main(int argc, char* argv[]) { | 17 int main(int argc, char* argv[]) { |
17 // This class is designed to fulfill the dependents needs when it goes out of | 18 // This class is designed to fulfill the dependents needs when it goes out of |
18 // scope and gets destructed. | 19 // scope and gets destructed. |
19 base::AtExitManager exitManager; | 20 base::AtExitManager exitManager; |
20 | 21 |
21 // Publicize the CommandLine. | 22 remoting::InitializeIosClient(argc, argv); |
22 base::CommandLine::Init(argc, argv); | |
23 | |
24 // Required to find the ICU data file, used by some file_util routines. | |
25 base::i18n::InitializeICU(); | |
26 | |
27 #ifdef DEBUG | |
28 // Set min log level for debug builds. For some reason this has to be | |
29 // negative. | |
30 logging::SetMinLogLevel(-1); | |
31 #endif | |
32 | 23 |
33 @autoreleasepool { | 24 @autoreleasepool { |
25 RemotingResourceFactory.defaultFactory = | |
26 [[RemotingResourceFactoryExternal alloc] init]; | |
34 return UIApplicationMain( | 27 return UIApplicationMain( |
35 argc, argv, nil, NSStringFromClass([AppDelegate class])); | 28 argc, argv, nil, NSStringFromClass([AppDelegate class])); |
36 } | 29 } |
37 } | 30 } |
OLD | NEW |