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 513aad296aa0d27ea86caa1548f30b512ffe3cf9..fd445fddd3e2dd90765830cbf4dbbb987277899e 100644 |
--- a/chrome/app/chrome_main_app_mode_mac.mm |
+++ b/chrome/app/chrome_main_app_mode_mac.mm |
@@ -19,7 +19,7 @@ |
#include "base/path_service.h" |
#include "base/sys_string_conversions.h" |
#include "base/threading/thread.h" |
-#include "chrome/common/chrome_paths.h" |
+#include "chrome/common/chrome_paths_internal.h" |
#include "chrome/common/chrome_switches.h" |
#include "chrome/common/mac/app_mode_common.h" |
#include "ipc/ipc_channel_proxy.h" |
@@ -68,11 +68,15 @@ AppShimController::AppShimController() : channel_(NULL) { |
void AppShimController::Init() { |
DCHECK(g_io_thread); |
+ NSString* chrome_bundle_path = |
+ base::SysUTF8ToNSString(g_info->chrome_outer_bundle_path.value()); |
+ NSBundle* chrome_bundle = [NSBundle bundleWithPath:chrome_bundle_path]; |
base::FilePath user_data_dir; |
- if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) { |
+ if (!chrome::GetUserDataDirectoryForBundle(chrome_bundle, &user_data_dir)) { |
Mark Mentovai
2013/03/22 18:08:41
It’s more cumbersome, but …ForBrowserAppBundle wou
jeremya
2013/04/01 23:30:22
I went for "...ForBrowserBundle". I think that's s
|
Quit(); |
return; |
} |
+ |
base::FilePath socket_path = |
user_data_dir.Append(app_mode::kAppShimSocketName); |
IPC::ChannelHandle handle(socket_path.value()); |
@@ -253,7 +257,6 @@ int ChromeAppModeStart(const app_mode::ChromeAppModeInfo* info); |
int ChromeAppModeStart(const app_mode::ChromeAppModeInfo* info) { |
base::mac::ScopedNSAutoreleasePool scoped_pool; |
base::AtExitManager exit_manager; |
- chrome::RegisterPathProvider(); |
Mark Mentovai
2013/03/22 18:08:41
As long as we’re positive that nothing else needs
jeremya
2013/04/01 23:30:22
Actually we might still need it for DIR_APP_DATA
|
if (info->major_version < app_mode::kCurrentChromeAppModeInfoMajorVersion) { |
RAW_LOG(ERROR, "App Mode Loader too old."); |