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

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: Created 7 years, 9 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') | chrome/common/chrome_paths_internal.h » ('J')
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 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.");
« no previous file with comments | « no previous file | chrome/common/chrome_paths_internal.h » ('j') | chrome/common/chrome_paths_internal.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698