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

Unified Diff: apps/app_shim/chrome_main_app_mode_mac.mm

Issue 19503003: Use the shim bundle's user_data_dir instead of GetUserDataDirectoryForBrowserBundle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase Created 7 years, 5 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 | « apps/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: apps/app_shim/chrome_main_app_mode_mac.mm
diff --git a/apps/app_shim/chrome_main_app_mode_mac.mm b/apps/app_shim/chrome_main_app_mode_mac.mm
index 46df8d23e908b421839b56f3499b8c7f838ec4af..ddad52a14822ac15e92c6c9d9c53d1c9b0d91bc0 100644
--- a/apps/app_shim/chrome_main_app_mode_mac.mm
+++ b/apps/app_shim/chrome_main_app_mode_mac.mm
@@ -25,7 +25,6 @@
#include "base/threading/thread.h"
#include "chrome/common/chrome_constants.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 "grit/generated_resources.h"
@@ -107,16 +106,11 @@ void AppShimController::Init() {
SetUpMenu();
- // Open an IPC channel to Chrome and send the initial app launch message.
- 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 (!chrome::GetUserDataDirectoryForBrowserBundle(chrome_bundle,
- &user_data_dir)) {
- Close();
- return;
- }
+ // The user_data_dir for shims actually contains the app_data_path.
+ // I.e. <user_data_dir>/<profile_dir>/Web Applications/_crx_extensionid/
+ base::FilePath user_data_dir =
+ g_info->user_data_dir.DirName().DirName().DirName();
+ CHECK(!user_data_dir.empty());
base::FilePath socket_path =
user_data_dir.Append(app_mode::kAppShimSocketName);
« no previous file with comments | « apps/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698