summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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