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

Unified Diff: chrome/installer/util/shell_util.cc

Issue 174194: Re-apply r23841 "During uninstall if Chrome is set as default" (Closed)
Patch Set: update for combobox model changes Created 11 years, 4 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
« no previous file with comments | « chrome/installer/util/shell_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/shell_util.cc
diff --git a/chrome/installer/util/shell_util.cc b/chrome/installer/util/shell_util.cc
index 88674dcf89607a7630e401339e196976083bba87..f21aeab67fb66dbc2d8309d210412e5fe93925da 100644
--- a/chrome/installer/util/shell_util.cc
+++ b/chrome/installer/util/shell_util.cc
@@ -583,6 +583,32 @@ bool ShellUtil::GetQuickLaunchPath(bool system_level, std::wstring* path) {
return true;
}
+void ShellUtil::GetRegisteredBrowsers(std::map<std::wstring,
+ std::wstring>* browsers) {
+ std::wstring base_key(ShellUtil::kRegStartMenuInternet);
+ HKEY root = HKEY_LOCAL_MACHINE;
+ for (RegistryKeyIterator iter(root, base_key.c_str()); iter.Valid(); ++iter) {
+ std::wstring key = base_key + L"\\" + iter.Name();
+ RegKey capabilities(root, (key + L"\\Capabilities").c_str());
+ std::wstring name;
+ if (!capabilities.Valid() ||
+ !capabilities.ReadValue(L"ApplicationName", &name)) {
+ RegKey base_key(root, key.c_str());
+ if (!base_key.ReadValue(L"", &name))
+ continue;
+ }
+ RegKey install_info(root, (key + L"\\InstallInfo").c_str());
+ std::wstring command;
+ if (!install_info.Valid() ||
+ !install_info.ReadValue(L"ReinstallCommand", &command))
+ continue;
+ BrowserDistribution* dist = BrowserDistribution::GetDistribution();
+ if (!name.empty() && !command.empty() &&
+ name.find(dist->GetApplicationName()) == std::wstring::npos)
+ (*browsers)[name] = command;
+ }
+}
+
bool ShellUtil::GetUserSpecificDefaultBrowserSuffix(std::wstring* entry) {
wchar_t user_name[256];
DWORD size = _countof(user_name);
« no previous file with comments | « chrome/installer/util/shell_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698