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

Unified Diff: chrome/browser/web_applications/web_app_mac.mm

Issue 9423048: Add user data dir field to Mac platform apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo 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/browser/web_applications/web_app_mac.mm
diff --git a/chrome/browser/web_applications/web_app_mac.mm b/chrome/browser/web_applications/web_app_mac.mm
index f8381486c47d9fd998e9278faa7039c4846776f0..68c5b6b525d3e6f51cdff5c8521ba59ebf0023aa 100644
--- a/chrome/browser/web_applications/web_app_mac.mm
+++ b/chrome/browser/web_applications/web_app_mac.mm
@@ -72,9 +72,11 @@ NSBitmapImageRep* SkBitmapToRGBAImageRep(const SkBitmap& bitmap) {
namespace web_app {
WebAppShortcutCreator::WebAppShortcutCreator(
+ const FilePath& web_app_path,
const ShellIntegration::ShortcutInfo& shortcut_info,
const string16& chrome_bundle_id)
- : info_(shortcut_info),
+ : web_app_path_(web_app_path),
+ info_(shortcut_info),
chrome_bundle_id_(chrome_bundle_id) {
}
@@ -171,6 +173,8 @@ bool WebAppShortcutCreator::UpdatePlist(const FilePath& app_path) const {
// 2. Fill in other values.
[plist setObject:GetBundleIdentifier(plist)
forKey:base::mac::CFToNSCast(kCFBundleIdentifierKey)];
+ [plist setObject:base::mac::FilePathToNSString(web_app_path_)
+ forKey:app_mode::kCrAppModeUserDataDirKey];
jeremy 2012/02/21 12:17:59 Can we fill this in using the variable loop as abo
sail 2012/02/22 22:10:08 I don't it makes sense to make this a template in
return [plist writeToFile:plist_path atomically:YES];
}
@@ -235,7 +239,8 @@ void CreateShortcutTask(const FilePath& web_app_path,
const ShellIntegration::ShortcutInfo& shortcut_info) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
string16 bundle_id = UTF8ToUTF16(base::mac::BaseBundleID());
- WebAppShortcutCreator shortcut_creator(shortcut_info, bundle_id);
+ WebAppShortcutCreator shortcut_creator(
+ web_app_path, shortcut_info, bundle_id);
shortcut_creator.CreateShortcut();
}

Powered by Google App Engine
This is Rietveld 408576698