summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhuanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-19 20:26:38 +0000
committerhuanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-19 20:26:38 +0000
commitfc9023fa5d45af40509a20263142ad7191620e00 (patch)
tree57e7cda3d2a78b68eba260a4d98f221e4c151c79
parent7541206c7a5160f3489d563b97f1c841c853dc22 (diff)
downloadchromium_src-fc9023fa5d45af40509a20263142ad7191620e00.zip
chromium_src-fc9023fa5d45af40509a20263142ad7191620e00.tar.gz
chromium_src-fc9023fa5d45af40509a20263142ad7191620e00.tar.bz2
Fixing Default User Data Directory for SxS install.
TEST=SxS install can run together with normal install. BUG=35574 Review URL: http://codereview.chromium.org/639002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39487 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-xchrome/chrome.gyp2
-rw-r--r--chrome/common/chrome_paths_win.cc7
-rw-r--r--chrome/installer/util/browser_distribution.cc3
3 files changed, 8 insertions, 4 deletions
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index dbb2eb9..14e6be9 100755
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -37,6 +37,7 @@
'nacl_win64_dependencies': [
'common_nacl_win64',
'common_constants_win64',
+ 'installer/installer.gyp:installer_util_nacl_win64',
],
'allocator_target': '../base/allocator/allocator.gyp:allocator',
'grit_out_dir': '<(SHARED_INTERMEDIATE_DIR)/chrome',
@@ -1464,6 +1465,7 @@
'msvs_guid': '89C1C190-A5D1-4EC4-BD6A-67FF2195C7CC',
'dependencies': [
'common_constants',
+ 'installer/installer.gyp:installer_util',
'../base/base.gyp:base',
'../breakpad/breakpad.gyp:breakpad_handler',
'../breakpad/breakpad.gyp:breakpad_sender',
diff --git a/chrome/common/chrome_paths_win.cc b/chrome/common/chrome_paths_win.cc
index 40ef825..4d7709d 100644
--- a/chrome/common/chrome_paths_win.cc
+++ b/chrome/common/chrome_paths_win.cc
@@ -15,16 +15,15 @@
#include "base/path_service.h"
#include "base/scoped_comptr_win.h"
#include "chrome/common/chrome_constants.h"
+#include "chrome/installer/util/browser_distribution.h"
namespace chrome {
bool GetDefaultUserDataDirectory(FilePath* result) {
if (!PathService::Get(base::DIR_LOCAL_APP_DATA, result))
return false;
-#if defined(GOOGLE_CHROME_BUILD)
- *result = result->Append(FILE_PATH_LITERAL("Google"));
-#endif
- *result = result->Append(chrome::kBrowserAppName);
+ BrowserDistribution* dist = BrowserDistribution::GetDistribution();
+ *result = result->Append(dist->GetInstallSubDir());
*result = result->Append(chrome::kUserDataDirname);
return true;
}
diff --git a/chrome/installer/util/browser_distribution.cc b/chrome/installer/util/browser_distribution.cc
index aced1fb..27bb8d6 100644
--- a/chrome/installer/util/browser_distribution.cc
+++ b/chrome/installer/util/browser_distribution.cc
@@ -10,6 +10,7 @@
#include "chrome/installer/util/browser_distribution.h"
#include "base/command_line.h"
+#include "base/lock.h"
#include "base/registry.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/env_vars.h"
@@ -27,6 +28,8 @@ BrowserDistribution* BrowserDistribution::GetDistribution() {
BrowserDistribution* BrowserDistribution::GetDistribution(bool chrome_frame) {
static BrowserDistribution* dist = NULL;
+ static Lock dist_lock;
+ AutoLock lock(dist_lock);
if (dist == NULL) {
if (chrome_frame) {
// TODO(robertshield): Make one of these for Google Chrome vs