Chromium Code Reviews| Index: chrome/app/client_util.cc |
| diff --git a/chrome/app/client_util.cc b/chrome/app/client_util.cc |
| index d577aab2d62f149ba4c712617096d4d4a54ccef8..416d56411c89c76142baa1f4ef68b605ba4b0674 100644 |
| --- a/chrome/app/client_util.cc |
| +++ b/chrome/app/client_util.cc |
| @@ -5,6 +5,7 @@ |
| #include <windows.h> |
| #include <shlwapi.h> |
| +#include "base/base_paths.h" |
| #include "base/command_line.h" |
| #include "base/compiler_specific.h" |
| #include "base/debug/trace_event.h" |
| @@ -13,6 +14,7 @@ |
| #include "base/lazy_instance.h" |
| #include "base/logging.h" |
| #include "base/memory/scoped_ptr.h" |
| +#include "base/path_service.h" |
| #include "base/strings/string16.h" |
| #include "base/strings/string_util.h" |
| #include "base/strings/stringprintf.h" |
| @@ -30,6 +32,7 @@ |
| #include "chrome/common/chrome_result_codes.h" |
| #include "chrome/common/chrome_switches.h" |
| #include "chrome/common/env_vars.h" |
| +#include "chrome/installer/util/browser_distribution.h" |
| #include "chrome/installer/util/google_update_constants.h" |
| #include "chrome/installer/util/google_update_settings.h" |
| #include "chrome/installer/util/install_util.h" |
| @@ -186,6 +189,13 @@ int MainDllLoader::Launch(HINSTANCE instance) { |
| return chrome::RESULT_CODE_UNSUPPORTED_PARAM; |
| } |
| + base::FilePath browser_data_directory; |
|
grt (UTC plus 2)
2015/02/04 16:42:51
what do you think about making a new chrome path f
|
| + if (!PathService::Get(base::DIR_LOCAL_APP_DATA, &browser_data_directory)) |
| + return chrome::RESULT_CODE_MISSING_DATA; |
| + BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
| + browser_data_directory = |
| + browser_data_directory.Append(dist->GetInstallSubDir()); |
| + |
| // Intentionally leaked. |
| HMODULE watcher_dll = Load(&version, &file); |
| if (!watcher_dll) |
| @@ -195,7 +205,8 @@ int MainDllLoader::Launch(HINSTANCE instance) { |
| reinterpret_cast<ChromeWatcherMainFunction>( |
| ::GetProcAddress(watcher_dll, kChromeWatcherDLLEntrypoint)); |
| return watcher_main(chrome::kBrowserExitCodesRegistryPath, |
| - parent_process.Take(), on_initialized_event.Take()); |
| + parent_process.Take(), on_initialized_event.Take(), |
| + browser_data_directory.value().c_str()); |
| } |
| // Initialize the sandbox services. |