Chromium Code Reviews| Index: chrome/browser/ui/views/uninstall_view.cc |
| diff --git a/chrome/browser/ui/views/uninstall_view.cc b/chrome/browser/ui/views/uninstall_view.cc |
| index 3c8e6326b465f81c2d64b983180799f135930262..f4e62fdde4ca61557ec9fd9d0b08bb1ee82aac87 100644 |
| --- a/chrome/browser/ui/views/uninstall_view.cc |
| +++ b/chrome/browser/ui/views/uninstall_view.cc |
| @@ -69,10 +69,15 @@ void UninstallView::SetupControls() { |
| l10n_util::GetStringUTF16(IDS_UNINSTALL_DELETE_PROFILE)); |
| layout->AddView(delete_profile_); |
| - // Set default browser combo box |
| + // Set default browser combo box. If the default should not or cannot be |
| + // changed, widgets are not shown. We assume here that if Chrome cannot |
| + // be set programatically as default, neither can any other browser (for |
| + // instance because the OS doesn't permit that). |
| BrowserDistribution* dist = BrowserDistribution::GetDistribution(); |
| if (dist->CanSetAsDefault() && |
| - ShellIntegration::IsDefaultBrowser()) { |
| + ShellIntegration::IsDefaultBrowser() && |
| + ShellIntegration::CanSetAsDefaultBrowser() != |
|
Peter Kasting
2012/06/08 18:37:48
Nit: I'd put parens around this condition since it
motek.
2012/06/08 18:49:18
Done.
|
| + ShellIntegration::SET_DEFAULT_INTERACTIVE) { |
| browsers_.reset(new BrowsersMap()); |
| ShellUtil::GetRegisteredBrowsers(dist, browsers_.get()); |
| if (!browsers_->empty()) { |
| @@ -129,7 +134,7 @@ string16 UninstallView::GetDialogButtonLabel(ui::DialogButton button) const { |
| void UninstallView::ButtonPressed(views::Button* sender, |
| const views::Event& event) { |
| - if (change_default_browser_ == sender) { |
| + if (change_default_browser_ && change_default_browser_ == sender) { |
|
Peter Kasting
2012/06/08 18:37:48
Nit: Why is this necessary? You won't get called
motek.
2012/06/08 18:49:18
Wasn't sure of that. And since I am pathologically
|
| // Disable the browsers combobox if the user unchecks the checkbox. |
| DCHECK(browsers_combo_); |
| browsers_combo_->SetEnabled(change_default_browser_->checked()); |