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

Side by Side Diff: ios/showcase/core/main.mm

Issue 2651833002: [ios showcase]Configures Resource Bundle and adds Toolbar Coordinator (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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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
7 #include "base/at_exit.h"
8 #include "ios/chrome/app/startup/ios_chrome_main.h"
6 #import "ios/showcase/core/app_delegate.h" 9 #import "ios/showcase/core/app_delegate.h"
7 10
8 #if !defined(__has_feature) || !__has_feature(objc_arc) 11 #if !defined(__has_feature) || !__has_feature(objc_arc)
9 #error "This file requires ARC support." 12 #error "This file requires ARC support."
10 #endif 13 #endif
11 14
12 int main(int argc, char* argv[]) { 15 int main(int argc, char* argv[]) {
16 // Create the AtExitManager for the application before the crash controller
17 // is started. This needs to be stack allocated and live for the lifetime of
marq (ping after 24h) 2017/01/24 09:49:07 None of this is needed; we should keep the Showcas
sczs 2017/01/24 18:32:21 Removed everything but the AtExitManager, without
18 // the app.
19 base::AtExitManager at_exit;
20
21 IOSChromeMain::InitStartTime();
22
23 // Pre-launch actions are in their own autorelease pool so they get cleaned
24 // up before the main app starts.
25 @autoreleasepool {
26 NSUserDefaults* standardDefaults = [NSUserDefaults standardUserDefaults];
27
28 // Set NSUserDefaults keys to force pseudo-RTL if needed.
29 if ([standardDefaults boolForKey:@"EnablePseudoRTL"]) {
30 NSDictionary* pseudoDict = @{ @"YES" : @"AppleTextDirection" };
31 [standardDefaults registerDefaults:pseudoDict];
32 }
33
34 // Always ignore SIGPIPE. Chrome should always check the return value of
35 // write() instead of relying on this signal.
36 CHECK_NE(SIG_ERR, signal(SIGPIPE, SIG_IGN));
37 }
38
13 @autoreleasepool { 39 @autoreleasepool {
14 return UIApplicationMain(argc, argv, nil, 40 return UIApplicationMain(argc, argv, nil,
15 NSStringFromClass([AppDelegate class])); 41 NSStringFromClass([AppDelegate class]));
16 } 42 }
17 } 43 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698