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

Unified Diff: chrome/browser/ui/views/uninstall_view.cc

Issue 10453048: Remove widgets related to restoring the default browser from uninstall view when default settings c… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Modified comments addressing reviewer's remarks. Created 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698