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

Unified Diff: chrome/app/app_mode_loader_mac.mm

Issue 9346013: Publish app shortcuts on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/app/app_mode_loader_mac.mm
diff --git a/chrome/app/app_mode_loader_mac.mm b/chrome/app/app_mode_loader_mac.mm
index 8ebd4f86823ee5e0430431f7286f7ea9f2efef93..dd480dcaa7776b0a01f821adf7fda260aefb83cd 100644
--- a/chrome/app/app_mode_loader_mac.mm
+++ b/chrome/app/app_mode_loader_mac.mm
@@ -66,15 +66,14 @@ int main(int argc, char** argv) {
// Get the bundle ID of the browser that created this app bundle.
NSString* cr_bundle_id = [app_bundle
- objectForInfoDictionaryKey:(NSString*)app_mode::kBrowserBundleIDKey];
+ objectForInfoDictionaryKey:app_mode::kBrowserBundleIDKey];
CHECK_MSG(cr_bundle_id, "couldn't get browser bundle ID");
// Get the browser bundle path.
// TODO(viettrungluu): more fun
- NSString* cr_bundle_path =
- [(NSString*)CFPreferencesCopyAppValue(
- app_mode::kLastRunAppBundlePathPrefsKey,
- (CFStringRef)cr_bundle_id) autorelease];
+ NSString* cr_bundle_path = [(NSString*)CFPreferencesCopyAppValue(
---DO-NOT-USE---rsesek1 2012/02/08 12:24:33 You could fix these up to use the NSToCFCast and C
sail 2012/02/08 19:09:15 Currently this code doesn't use base/*. This is fi
+ (CFStringRef)app_mode::kLastRunAppBundlePathPrefsKey,
+ (CFStringRef)cr_bundle_id) autorelease];
CHECK_MSG(cr_bundle_path, "couldn't get browser bundle path");
// Get the browser bundle.
@@ -109,17 +108,17 @@ int main(int argc, char** argv) {
CHECK_MSG(info_plist, "couldn't get loader Info.plist");
info.app_mode_id = NSStringToUTF8CString(
- [info_plist objectForKey:@"CrAppModeShortcutID"]);
+ [info_plist objectForKey:app_mode::kCrAppModeShortcutIDKey]);
CHECK_MSG(info.app_mode_id, "couldn't get app shortcut ID");
info.app_mode_short_name = NSStringToUTF8CString(
- [info_plist objectForKey:@"CrAppModeShortcutShortName"]);
+ [info_plist objectForKey:app_mode::kCrAppModeShortcutShortNameKey]);
info.app_mode_name = NSStringToUTF8CString(
- [info_plist objectForKey:@"CrAppModeShortcutName"]);
+ [info_plist objectForKey:app_mode::kCrAppModeShortcutNameKey]);
info.app_mode_url = NSStringToUTF8CString(
- [info_plist objectForKey:@"CrAppModeShortcutURL"]);
+ [info_plist objectForKey:app_mode::kCrAppModeShortcutURLKey]);
CHECK_MSG(info.app_mode_url, "couldn't get app shortcut URL");
// Get the framework path.

Powered by Google App Engine
This is Rietveld 408576698