Chromium Code Reviews| 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 7bfa3d339bf2b0d13df6506eaca7a9e4125ea944..df9d0c19fac916012d6b8e223c5c2606d556346e 100644 |
| --- a/chrome/browser/web_applications/web_app_mac.mm |
| +++ b/chrome/browser/web_applications/web_app_mac.mm |
| @@ -47,6 +47,8 @@ |
| #include "ui/base/resource/resource_bundle.h" |
| #include "ui/gfx/image/image_family.h" |
| +bool g_app_shims_allow_update_and_launch_in_tests = false; |
| + |
| namespace { |
| // Launch Services Key to run as an agent app, which doesn't launch in the dock. |
| @@ -564,7 +566,9 @@ size_t WebAppShortcutCreator::CreateShortcutsIn( |
| return succeeded; |
| } |
| - base::mac::RemoveQuarantineAttribute(dst_path.Append(app_name)); |
| + base::mac::RemoveQuarantineAttribute( |
| + dst_path.Append(app_name) |
| + .Append("Contents").Append("MacOS").Append("app_mode_loader")); |
|
tapted
2014/06/12 05:19:22
Cool - I think this makes more sense. (although wh
Robert Sesek
2014/06/13 17:58:41
I thought the quarantine bit was set on the bundle
jackhou1
2014/06/14 01:16:37
If I comment out the RemoveQuarantineAttribute and
|
| ++succeeded; |
| } |
| @@ -863,8 +867,10 @@ base::FilePath GetAppInstallPath(const ShortcutInfo& shortcut_info) { |
| } |
| void MaybeLaunchShortcut(const ShortcutInfo& shortcut_info) { |
| - if (AppShimsDisabledForTest()) |
| + if (AppShimsDisabledForTest() && |
| + !g_app_shims_allow_update_and_launch_in_tests) { |
| return; |
| + } |
| content::BrowserThread::PostTask( |
| content::BrowserThread::FILE, FROM_HERE, |
| @@ -976,8 +982,10 @@ void UpdatePlatformShortcuts( |
| const ShortcutInfo& shortcut_info, |
| const extensions::FileHandlersInfo& file_handlers_info) { |
| DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); |
| - if (AppShimsDisabledForTest()) |
| + if (AppShimsDisabledForTest() && |
| + !g_app_shims_allow_update_and_launch_in_tests) { |
| return; |
| + } |
| WebAppShortcutCreator shortcut_creator( |
| app_data_path, shortcut_info, file_handlers_info); |