| Index: components/component_updater/component_updater_paths.cc
|
| diff --git a/components/component_updater/component_updater_paths.cc b/components/component_updater/component_updater_paths.cc
|
| index f0bca945962b51dcdec6527cf138346952c2679d..254c0097ec7926349cfeac4305e3e19565bca0cc 100644
|
| --- a/components/component_updater/component_updater_paths.cc
|
| +++ b/components/component_updater/component_updater_paths.cc
|
| @@ -13,6 +13,7 @@ namespace {
|
|
|
| // This key gives the root directory of all the component installations.
|
| static int g_components_preinstalled_root_key = -1;
|
| +static int g_components_preinstalled_root_key_alt = -1;
|
| static int g_components_user_root_key = -1;
|
|
|
| } // namespace
|
| @@ -32,6 +33,8 @@ bool PathProvider(int key, base::FilePath* result) {
|
| switch (key) {
|
| case DIR_COMPONENT_PREINSTALLED:
|
| return PathService::Get(g_components_preinstalled_root_key, result);
|
| + case DIR_COMPONENT_PREINSTALLED_ALT:
|
| + return PathService::Get(g_components_preinstalled_root_key_alt, result);
|
| case DIR_COMPONENT_USER:
|
| return PathService::Get(g_components_user_root_key, result);
|
| }
|
| @@ -64,17 +67,23 @@ bool PathProvider(int key, base::FilePath* result) {
|
| // This cannot be done as a static initializer sadly since Visual Studio will
|
| // eliminate this object file if there is no direct entry point into it.
|
| void RegisterPathProvider(int components_preinstalled_root_key,
|
| + int components_preinstalled_root_key_alt,
|
| int components_user_root_key) {
|
| DCHECK_EQ(g_components_preinstalled_root_key, -1);
|
| + DCHECK_EQ(g_components_preinstalled_root_key_alt, -1);
|
| DCHECK_EQ(g_components_user_root_key, -1);
|
| DCHECK_GT(components_preinstalled_root_key, 0);
|
| + DCHECK_GT(components_preinstalled_root_key_alt, 0);
|
| DCHECK_GT(components_user_root_key, 0);
|
| DCHECK(components_preinstalled_root_key < PATH_START ||
|
| components_preinstalled_root_key > PATH_END);
|
| + DCHECK(components_preinstalled_root_key_alt < PATH_START ||
|
| + components_preinstalled_root_key_alt > PATH_END);
|
| DCHECK(components_user_root_key < PATH_START ||
|
| components_user_root_key > PATH_END);
|
|
|
| g_components_preinstalled_root_key = components_preinstalled_root_key;
|
| + g_components_preinstalled_root_key_alt = components_preinstalled_root_key_alt;
|
| g_components_user_root_key = components_user_root_key;
|
| PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
|
| }
|
|
|