diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-29 08:08:21 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-29 08:08:21 +0000 |
commit | c1cd7cd71b0d659692e22f49bcf55cc6869cf28b (patch) | |
tree | 46b3e2974998669c964e80d562effabeb2099b0e /chrome/common/mac | |
parent | eb991359d73ae171a2ef50aa18f3ec34fd8a9949 (diff) | |
download | chromium_src-c1cd7cd71b0d659692e22f49bcf55cc6869cf28b.zip chromium_src-c1cd7cd71b0d659692e22f49bcf55cc6869cf28b.tar.gz chromium_src-c1cd7cd71b0d659692e22f49bcf55cc6869cf28b.tar.bz2 |
Mac: Generate App Mode Loader bundle + cleanup
* Revised the .gyp files so that the app mode loader is built as a bundle "template".
* Add new data to loader Info.plist and fill it in.
* Improve unit tests and disable them for now (fix will be in a followup CL).
* Various small cleanup tasks all over Mac app mode loader code.
BUG=112651
TEST=Covered by existing tests (which when enabled, will test this).
Review URL: http://codereview.chromium.org/9416012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@124151 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/mac')
-rw-r--r-- | chrome/common/mac/app_mode_common.h | 17 | ||||
-rw-r--r-- | chrome/common/mac/app_mode_common.mm | 5 |
2 files changed, 16 insertions, 6 deletions
diff --git a/chrome/common/mac/app_mode_common.h b/chrome/common/mac/app_mode_common.h index 930d22d..b8bc539 100644 --- a/chrome/common/mac/app_mode_common.h +++ b/chrome/common/mac/app_mode_common.h @@ -20,10 +20,6 @@ namespace app_mode { // app mode launcher bundle's Info.plist. extern NSString* const kBrowserBundleIDKey; -// The key under which to record the path to the (user-visible) application -// bundle; this key is recorded under the ID given by |kAppPrefsID|. -extern NSString* const kLastRunAppBundlePathPrefsKey; - // Key for the shortcut ID. extern NSString* const kCrAppModeShortcutIDKey; @@ -42,6 +38,14 @@ extern NSString* const kCrAppModeUserDataDirKey; // Key for the app's extension path. extern NSString* const kCrAppModeExtensionPathKey; +// When the Chrome browser is run, it stores it's location in the defaults +// system using this key. +extern NSString* const kLastRunAppBundlePathPrefsKey; + +// Placeholder used in the Info.plist, meant to be replaced by the extension +// shortcut ID. +extern NSString* const kShortcutIdPlaceholder; + // Current major/minor version numbers of |ChromeAppModeInfo| (defined below). const unsigned kCurrentChromeAppModeInfoMajorVersion = 1; const unsigned kCurrentChromeAppModeInfoMinorVersion = 0; @@ -68,9 +72,12 @@ struct ChromeAppModeInfo { // Versioned path to the browser which is being loaded. FilePath chrome_versioned_path; // Required: v1.0 + // Path to Chrome app bundle. + FilePath chrome_outer_bundle_path; // Required: v1.0 + // Information about the App Mode shortcut: - // Path to the App Mode Loader application bundle originally run. + // Path to the App Mode Loader application bundle that launched the process. FilePath app_mode_bundle_path; // Optional: v1.0 // Short ID string, preferably derived from |app_mode_short_name|. Should be diff --git a/chrome/common/mac/app_mode_common.mm b/chrome/common/mac/app_mode_common.mm index 48bf38e..bb8c267 100644 --- a/chrome/common/mac/app_mode_common.mm +++ b/chrome/common/mac/app_mode_common.mm @@ -7,7 +7,6 @@ namespace app_mode { NSString* const kBrowserBundleIDKey = @"CrBundleIdentifier"; -NSString* const kLastRunAppBundlePathPrefsKey = @"LastRunAppBundlePath"; NSString* const kCrAppModeShortcutIDKey = @"CrAppModeShortcutID"; NSString* const kCrAppModeShortcutShortNameKey = @"CrAppModeShortcutShortName"; NSString* const kCrAppModeShortcutNameKey = @"CrAppModeShortcutName"; @@ -15,6 +14,10 @@ NSString* const kCrAppModeShortcutURLKey = @"CrAppModeShortcutURL"; NSString* const kCrAppModeUserDataDirKey = @"CrAppModeUserDataDir"; NSString* const kCrAppModeExtensionPathKey = @"CrAppModeExtensionPath"; +NSString* const kLastRunAppBundlePathPrefsKey = @"LastRunAppBundlePath"; + +NSString* const kShortcutIdPlaceholder = @"APP_MODE_SHORTCUT_ID"; + ChromeAppModeInfo::ChromeAppModeInfo() : major_version(0), minor_version(0), |