Description
[15:18:30] johnny:~/projects/jdk9/install/install $ hg diff -U 20 src/windows/common/browsers.cpp
diff --git a/src/windows/common/browsers.cpp b/src/windows/common/browsers.cpp
--- a/src/windows/common/browsers.cpp
+++ b/src/windows/common/browsers.cpp
@@ -57,36 +57,36 @@
// check if specific browser is installed
bool isInstalled(BrowserId browser, bool is32bit) throw()
{
JDS_TRY;
Registry reg(is32bit ? Registry::LocalMachineWow64_32 : Registry::LocalMachineWow64_64,
StartMenuInternetKey, Registry::ReadOnly);
switch (browser) {
case IE:
return reg.keyExists(subkeyIE);
case FF:
return reg.keyExists(subkeyFF);
case Chrome:
{
// Google Chrome can be represented as something like "Google Chrome.LZVLRLLWNuD7JRCTX"
Registry::Names subkeys = reg.getSubkeyNames();
for (Registry::Names::const_iterator it = subkeys.begin(); it != subkeys.end(); ++it) {
// check is the name start with subkeyChrome (ignoring case)
- if (tstrings::equals(subkeyChrome, (*it).substr(0, subkeyChrome.size()), tstrings::IGNORE_CASE) == 0) {
+ if (tstrings::equals(subkeyChrome, (*it).substr(0, subkeyChrome.size()), tstrings::IGNORE_CASE)) {
return true;
}
}
return false;
}
default:
// unreachable
JDS_THROW(std::logic_error("unexpected browserId"));
}
JDS_CATCH_ALL;
// report "not installed" if an error occurs
return false;
}
} // namespace browsers
[15:18:40] johnny:~/projects/jdk9/install/install $
diff --git a/src/windows/common/browsers.cpp b/src/windows/common/browsers.cpp
--- a/src/windows/common/browsers.cpp
+++ b/src/windows/common/browsers.cpp
@@ -57,36 +57,36 @@
// check if specific browser is installed
bool isInstalled(BrowserId browser, bool is32bit) throw()
{
JDS_TRY;
Registry reg(is32bit ? Registry::LocalMachineWow64_32 : Registry::LocalMachineWow64_64,
StartMenuInternetKey, Registry::ReadOnly);
switch (browser) {
case IE:
return reg.keyExists(subkeyIE);
case FF:
return reg.keyExists(subkeyFF);
case Chrome:
{
// Google Chrome can be represented as something like "Google Chrome.LZVLRLLWNuD7JRCTX"
Registry::Names subkeys = reg.getSubkeyNames();
for (Registry::Names::const_iterator it = subkeys.begin(); it != subkeys.end(); ++it) {
// check is the name start with subkeyChrome (ignoring case)
- if (tstrings::equals(subkeyChrome, (*it).substr(0, subkeyChrome.size()), tstrings::IGNORE_CASE) == 0) {
+ if (tstrings::equals(subkeyChrome, (*it).substr(0, subkeyChrome.size()), tstrings::IGNORE_CASE)) {
return true;
}
}
return false;
}
default:
// unreachable
JDS_THROW(std::logic_error("unexpected browserId"));
}
JDS_CATCH_ALL;
// report "not installed" if an error occurs
return false;
}
} // namespace browsers
[15:18:40] johnny:~/projects/jdk9/install/install $