Commit 52ab5178 authored by Leonard Grey's avatar Leonard Grey Committed by Commit Bot

Mac: move chrome/app_shim to modern ObjC

Result of running:
tools/mac/rewrite_modern_objc.py out/gn ../../chrome/app_shim

NB: The above currently needs a locally compiled clang with the rewriting
functionality turned on. Since thakis@ walked me through this and there
were some hiccups, I'm going to refrain from giving instructions on how
to do this until I understand it better.

Bug: 324079
Change-Id: I323ce73f8e8b9c4b51f8572849c9d60984d0d754
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2041877Reviewed-by: default avatarccameron <ccameron@chromium.org>
Commit-Queue: Leonard Grey <lgrey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#739447}
parent 8e92b17e
......@@ -109,20 +109,20 @@ int LoadFrameworkAndStart(int argc, char** argv) {
NSDictionary* info_plist = [app_bundle infoDictionary];
CHECK(info_plist) << "couldn't get loader Info.plist";
const std::string app_mode_id = SysNSStringToUTF8(
[info_plist objectForKey:app_mode::kCrAppModeShortcutIDKey]);
const std::string app_mode_id =
SysNSStringToUTF8(info_plist[app_mode::kCrAppModeShortcutIDKey]);
CHECK(app_mode_id.size()) << "couldn't get app shortcut ID";
const std::string app_mode_name = SysNSStringToUTF8(
[info_plist objectForKey:app_mode::kCrAppModeShortcutNameKey]);
const std::string app_mode_url = SysNSStringToUTF8(
[info_plist objectForKey:app_mode::kCrAppModeShortcutURLKey]);
const std::string app_mode_name =
SysNSStringToUTF8(info_plist[app_mode::kCrAppModeShortcutNameKey]);
const std::string app_mode_url =
SysNSStringToUTF8(info_plist[app_mode::kCrAppModeShortcutURLKey]);
base::FilePath plist_user_data_dir = base::mac::NSStringToFilePath(
[info_plist objectForKey:app_mode::kCrAppModeUserDataDirKey]);
info_plist[app_mode::kCrAppModeUserDataDirKey]);
base::FilePath profile_dir = base::mac::NSStringToFilePath(
[info_plist objectForKey:app_mode::kCrAppModeProfileDirKey]);
info_plist[app_mode::kCrAppModeProfileDirKey]);
// ** 5: Open the framework.
StartFun ChromeAppModeStart = NULL;
......
......@@ -47,12 +47,12 @@
@interface ProfileMenuTarget : NSObject {
AppShimController* _controller;
}
- (id)initWithController:(AppShimController*)controller;
- (instancetype)initWithController:(AppShimController*)controller;
- (void)clearController;
@end
@implementation ProfileMenuTarget
- (id)initWithController:(AppShimController*)controller {
- (instancetype)initWithController:(AppShimController*)controller {
if (self = [super init])
_controller = controller;
return self;
......
......@@ -19,7 +19,7 @@ class AppShimController;
@private
AppShimController* _appShimController; // Weak, owns |this|
}
- (id)initWithController:(AppShimController*)controller;
- (instancetype)initWithController:(AppShimController*)controller;
@end
#endif // CHROME_APP_SHIM_APP_SHIM_DELEGATE_H_
......@@ -9,7 +9,7 @@
@implementation AppShimDelegate
- (id)initWithController:(AppShimController*)controller {
- (instancetype)initWithController:(AppShimController*)controller {
if (self = [super init])
_appShimController = controller;
return self;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment