summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorjackhou@chromium.org <jackhou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-31 06:22:35 +0000
committerjackhou@chromium.org <jackhou@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-31 06:22:35 +0000
commit13877ef9972916ef05091e296c2a5b558bb10e70 (patch)
tree22e3f3f2d24866a5003f3fcbcbd40a3f6c270f1e /apps
parent0ef197f2002fee958f78f44e3e7fb6d8fa3662b4 (diff)
downloadchromium_src-13877ef9972916ef05091e296c2a5b558bb10e70.zip
chromium_src-13877ef9972916ef05091e296c2a5b558bb10e70.tar.gz
chromium_src-13877ef9972916ef05091e296c2a5b558bb10e70.tar.bz2
Use the shim bundle's user_data_dir instead of GetUserDataDirectoryForBrowserBundle.
Currently app shims have no support for --user-data-dir, and can only ever connect to the default user_data_dir for a particular Chrome product (e.g. Canary/Chromium). This allows shims made by Chrome running in a different user_data_dir to start and connect with the correct Chrome. BUG=168080 Review URL: https://chromiumcodereview.appspot.com/19503003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214582 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps')
-rw-r--r--apps/DEPS1
-rw-r--r--apps/app_shim/chrome_main_app_mode_mac.mm16
2 files changed, 5 insertions, 12 deletions
diff --git a/apps/DEPS b/apps/DEPS
index d7a2560..eda580a 100644
--- a/apps/DEPS
+++ b/apps/DEPS
@@ -26,7 +26,6 @@ include_rules = [
"+chrome/browser/web_applications/web_app_mac.h",
"+chrome/common/chrome_constants.h",
"+chrome/common/chrome_paths.h",
- "+chrome/common/chrome_paths_internal.h",
"+chrome/common/chrome_switches.h",
"+chrome/common/extensions",
"+chrome/common/mac/app_mode_common.h",
diff --git a/apps/app_shim/chrome_main_app_mode_mac.mm b/apps/app_shim/chrome_main_app_mode_mac.mm
index 46df8d2..ddad52a 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);