Index: chrome/browser/web_applications/web_app_mac.h |
diff --git a/chrome/browser/web_applications/web_app_mac.h b/chrome/browser/web_applications/web_app_mac.h |
index 49964a300097e6587c354d7e3cb75f76563df761..845907af604c7edaa3cd77df0d9c7d8fa0cbf17c 100644 |
--- a/chrome/browser/web_applications/web_app_mac.h |
+++ b/chrome/browser/web_applications/web_app_mac.h |
@@ -11,6 +11,7 @@ |
#include "base/basictypes.h" |
#include "base/files/file_path.h" |
#include "base/gtest_prod_util.h" |
+#include "base/memory/scoped_ptr.h" |
#include "chrome/browser/web_applications/web_app.h" |
#include "extensions/common/manifest_handlers/file_handler_info.h" |
@@ -30,7 +31,7 @@ namespace web_app { |
base::FilePath GetAppInstallPath(const ShortcutInfo& shortcut_info); |
// If necessary, launch the shortcut for an app. |
-void MaybeLaunchShortcut(const ShortcutInfo& shortcut_info); |
+void MaybeLaunchShortcut(scoped_ptr<ShortcutInfo> shortcut_info); |
// Rebuild the shortcut and relaunch it. |
bool MaybeRebuildShortcut(const base::CommandLine& command_line); |
@@ -48,8 +49,10 @@ class WebAppShortcutCreator { |
// Creates a new shortcut based on information in |shortcut_info|. |
// A copy of the shortcut is placed in |app_data_dir|. |
// |chrome_bundle_id| is the CFBundleIdentifier of the Chrome browser bundle. |
+ // Retains the pointer |shortcut_info|; the ShortcutInfo object must outlive |
+ // the WebAppShortcutCreator. |
WebAppShortcutCreator(const base::FilePath& app_data_dir, |
- const ShortcutInfo& shortcut_info, |
+ const ShortcutInfo* shortcut_info, |
const extensions::FileHandlersInfo& file_handlers_info); |
virtual ~WebAppShortcutCreator(); |
@@ -117,8 +120,8 @@ class WebAppShortcutCreator { |
// ~/Library/Application Support/Chromium/Default/Web Applications/_crx_abc/ |
base::FilePath app_data_dir_; |
- // Information about the app. |
- ShortcutInfo info_; |
+ // Information about the app. Owned by the caller of the constructor. |
+ const ShortcutInfo* info_; |
// The app's file handlers. |
extensions::FileHandlersInfo file_handlers_info_; |