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

Side by Side Diff: ios/chrome/app/chrome_exe_main.mm

Issue 2623713002: Followup to clang formatting (Closed)
Patch Set: Created 3 years, 11 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 | « no previous file | ios/chrome/browser/native_app_launcher/native_app_navigation_controller_unittest.mm » ('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 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 #import <UIKit/UIKit.h> 5 #import <UIKit/UIKit.h>
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/debug/crash_logging.h" 8 #include "base/debug/crash_logging.h"
9 #include "components/crash/core/common/crash_keys.h" 9 #include "components/crash/core/common/crash_keys.h"
10 #include "ios/chrome/app/startup/ios_chrome_main.h" 10 #include "ios/chrome/app/startup/ios_chrome_main.h"
(...skipping 16 matching lines...) Expand all
27 } // namespace 27 } // namespace
28 28
29 int main(int argc, char* argv[]) { 29 int main(int argc, char* argv[]) {
30 IOSChromeMain::InitStartTime(); 30 IOSChromeMain::InitStartTime();
31 NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; 31 NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
32 32
33 NSUserDefaults* standardDefaults = [NSUserDefaults standardUserDefaults]; 33 NSUserDefaults* standardDefaults = [NSUserDefaults standardUserDefaults];
34 34
35 // Set NSUserDefaults keys to force pseudo-RTL if needed. 35 // Set NSUserDefaults keys to force pseudo-RTL if needed.
36 if ([standardDefaults boolForKey:@"EnablePseudoRTL"]) { 36 if ([standardDefaults boolForKey:@"EnablePseudoRTL"]) {
37 NSDictionary* pseudoDict = [NSDictionary 37 NSDictionary* pseudoDict = [NSDictionary
sdefresne 2017/01/10 09:28:30 Can you change this to @{} syntax? NSDictionary
38 dictionaryWithObjectsAndKeys:@"YES", @"AppleTextDirection", @"YES", 38 dictionaryWithObjectsAndKeys:@"YES", @"AppleTextDirection", nil];
39 @"NSForceRightToLeftWritingDirection",
40 nil];
41 [standardDefaults registerDefaults:pseudoDict]; 39 [standardDefaults registerDefaults:pseudoDict];
42 } 40 }
43 41
44 // Create this here since it's needed to start the crash handler. 42 // Create this here since it's needed to start the crash handler.
45 base::AtExitManager at_exit; 43 base::AtExitManager at_exit;
46 44
47 // The Crash Controller is started here even if the user opted out since we 45 // The Crash Controller is started here even if the user opted out since we
48 // don't have yet preferences. Later on it is stopped if the user opted out. 46 // don't have yet preferences. Later on it is stopped if the user opted out.
49 // In any case reports are not sent if the user opted out. 47 // In any case reports are not sent if the user opted out.
50 StartCrashController(); 48 StartCrashController();
51 49
52 // Always ignore SIGPIPE. We check the return value of write(). 50 // Always ignore SIGPIPE. We check the return value of write().
53 CHECK_NE(SIG_ERR, signal(SIGPIPE, SIG_IGN)); 51 CHECK_NE(SIG_ERR, signal(SIGPIPE, SIG_IGN));
54 52
55 // Purging the pool to prevent autorelease objects created by the previous 53 // Purging the pool to prevent autorelease objects created by the previous
56 // calls to live forever. 54 // calls to live forever.
57 [pool release]; 55 [pool release];
58 pool = [[NSAutoreleasePool alloc] init]; 56 pool = [[NSAutoreleasePool alloc] init];
59 57
60 // Part of code that requires us to specify which UIApplication delegate class 58 // Part of code that requires us to specify which UIApplication delegate class
61 // to use by adding "UIApplicationDelegate" key to Info.plist file. 59 // to use by adding "UIApplicationDelegate" key to Info.plist file.
62 NSString* delegateClassName = [[NSBundle mainBundle] 60 NSString* delegateClassName = [[NSBundle mainBundle]
63 objectForInfoDictionaryKey:kUIApplicationDelegateInfoKey]; 61 objectForInfoDictionaryKey:kUIApplicationDelegateInfoKey];
64 CHECK(delegateClassName); 62 CHECK(delegateClassName);
65 63
66 int retVal = UIApplicationMain(argc, argv, nil, delegateClassName); 64 int retVal = UIApplicationMain(argc, argv, nil, delegateClassName);
67 [pool release]; 65 [pool release];
68 return retVal; 66 return retVal;
69 } 67 }
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/native_app_launcher/native_app_navigation_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698