Chromium Code Reviews| 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..87d11738060f346dfd68607570b10c9d79f24050 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."; |
|
Nico
2013/05/30 00:14:44
Logging isn't useful. If this important enough tha
jackhou1
2013/05/30 01:43:30
It's probably not important enough. I've also chan
|
| 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, g_info->app_mode_id, |
| + !CommandLine::ForCurrentProcess()->HasSwitch(app_mode::kNoLaunchApp))); |
|
Nico
2013/05/30 00:14:44
Not clear what the bool does here. Consider using
jackhou1
2013/05/30 01:43:30
Done.
|
| } |
| 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."; |
|
Nico
2013/05/30 00:14:44
see above
jackhou1
2013/05/30 01:43:30
Done.
|
| 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(); |