Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Unified Diff: components/component_updater/component_updater_paths.cc

Issue 2085583005: Allow DCI to pick up contents from Internet Plug-Ins on OS X. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clarified comments. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
}

Powered by Google App Engine
This is Rietveld 408576698