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

Unified Diff: chrome/app/chrome_main_app_mode_mac.mm

Issue 12663023: [mac] Make app shims look in the correct user data dir on Canary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile again Created 7 years, 8 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
« no previous file with comments | « no previous file | chrome/common/chrome_paths_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e7ab65a7ee315ec071a35820fc5352470ebc9c32..b028c39f85980edb3a1a82cf8fb8e019ff73f2cc 100644
--- a/chrome/app/chrome_main_app_mode_mac.mm
+++ b/chrome/app/chrome_main_app_mode_mac.mm
@@ -20,6 +20,7 @@
#include "base/strings/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 +69,16 @@ 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::GetUserDataDirectoryForBrowserBundle(chrome_bundle,
+ &user_data_dir)) {
Quit();
return;
}
+
base::FilePath socket_path =
user_data_dir.Append(app_mode::kAppShimSocketName);
IPC::ChannelHandle handle(socket_path.value());
« no previous file with comments | « no previous file | chrome/common/chrome_paths_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698