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

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 build 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 757ac24cb78fae72d5ecab504ef39f105010898b..210482efcda3de5d028d02349f3d81084052f2e1 100644
--- a/chrome/browser/web_applications/web_app_mac.mm
+++ b/chrome/browser/web_applications/web_app_mac.mm
@@ -39,8 +39,10 @@ NSBitmapImageRep* SkBitmapToImageRep(const SkBitmap& bitmap) {
namespace web_app {
WebAppShortcutCreator::WebAppShortcutCreator(
+ const FilePath& user_data_dir,
const ShellIntegration::ShortcutInfo& shortcut_info)
- : info_(shortcut_info) {
+ : user_data_dir_(user_data_dir),
+ info_(shortcut_info) {
}
WebAppShortcutCreator::~WebAppShortcutCreator() {
@@ -113,6 +115,8 @@ bool WebAppShortcutCreator::UpdatePlist(const FilePath& app_path) const {
forKey:app_mode::kCrAppModeShortcutNameKey];
[dict setObject:base::SysUTF8ToNSString(info_.url.spec())
forKey:app_mode::kCrAppModeShortcutURLKey];
+ [dict setObject:base::mac::FilePathToNSString(user_data_dir_)
+ forKey:app_mode::kCrAppModeUserDataDirKey];
return [dict writeToFile:plist_path atomically:YES];
}
@@ -155,7 +159,7 @@ void CreateShortcutTask(const FilePath& web_app_path,
const FilePath& profile_path,
const ShellIntegration::ShortcutInfo& shortcut_info) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
- WebAppShortcutCreator shortcut_creator(shortcut_info);
+ WebAppShortcutCreator shortcut_creator(web_app_path, shortcut_info);
shortcut_creator.CreateShortcut();
}
« no previous file with comments | « chrome/browser/web_applications/web_app_mac.h ('k') | chrome/browser/web_applications/web_app_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698