| Index: chrome/app/chrome_main_app_mode_mac.mm
|
| diff --git a/chrome/app/chrome_main_app_mode_mac.mm b/chrome/app/chrome_main_app_mode_mac.mm
|
| index 1de3fe5899ec42689fbbc4614cc5863a9ea4f127..23ffbe903e61876449059de302d62686421da79a 100644
|
| --- a/chrome/app/chrome_main_app_mode_mac.mm
|
| +++ b/chrome/app/chrome_main_app_mode_mac.mm
|
| @@ -66,8 +66,7 @@ class AppShimController : public IPC::Listener {
|
| DISALLOW_COPY_AND_ASSIGN(AppShimController);
|
| };
|
|
|
| -AppShimController::AppShimController() : channel_(NULL) {
|
| -}
|
| +AppShimController::AppShimController() : channel_(NULL) {}
|
|
|
| void AppShimController::Init() {
|
| DCHECK(g_io_thread);
|
| @@ -77,6 +76,7 @@ void AppShimController::Init() {
|
| base::FilePath user_data_dir;
|
| if (!chrome::GetUserDataDirectoryForBrowserBundle(chrome_bundle,
|
| &user_data_dir)) {
|
| + LOG(ERROR) << "Cannot get user data directory for browser bundle.";
|
| Quit();
|
| return;
|
| }
|
| @@ -88,7 +88,8 @@ void AppShimController::Init() {
|
| this, g_io_thread->message_loop_proxy());
|
|
|
| channel_->Send(new AppShimHostMsg_LaunchApp(
|
| - g_info->profile_dir.value(), g_info->app_mode_id));
|
| + g_info->profile_dir.value(), g_info->app_mode_id,
|
| + !CommandLine::ForCurrentProcess()->HasSwitch(app_mode::kNoLaunchApp)));
|
| }
|
|
|
| bool AppShimController::OnMessageReceived(const IPC::Message& message) {
|
| @@ -108,9 +109,11 @@ void AppShimController::OnChannelError() {
|
|
|
| void AppShimController::OnLaunchAppDone(bool success) {
|
| if (!success) {
|
| + LOG(ERROR) << "App launch failed.";
|
| Quit();
|
| return;
|
| }
|
| +
|
| [[[NSWorkspace sharedWorkspace] notificationCenter]
|
| addObserverForName:NSWorkspaceDidActivateApplicationNotification
|
| object:nil
|
| @@ -259,6 +262,8 @@ int ChromeAppModeStart(const app_mode::ChromeAppModeInfo* info);
|
| } // extern "C"
|
|
|
| int ChromeAppModeStart(const app_mode::ChromeAppModeInfo* info) {
|
| + CommandLine::Init(info->argc, info->argv);
|
| +
|
| base::mac::ScopedNSAutoreleasePool scoped_pool;
|
| base::AtExitManager exit_manager;
|
| chrome::RegisterPathProvider();
|
|
|