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

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

Issue 422593002: Revert 285661 "Remove some dead app host code." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 5 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 | « trunk/src/chrome/browser/ui/views/uninstall_view.h ('k') | trunk/src/chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/chrome/browser/ui/views/uninstall_view.cc
===================================================================
--- trunk/src/chrome/browser/ui/views/uninstall_view.cc (revision 285705)
+++ trunk/src/chrome/browser/ui/views/uninstall_view.cc (working copy)
@@ -23,8 +23,10 @@
#include "ui/views/widget/widget.h"
UninstallView::UninstallView(int* user_selection,
- const base::Closure& quit_closure)
+ const base::Closure& quit_closure,
+ bool show_delete_profile)
: confirm_label_(NULL),
+ show_delete_profile_(show_delete_profile),
delete_profile_(NULL),
change_default_browser_(NULL),
browsers_combo_(NULL),
@@ -62,15 +64,17 @@
layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing);
// The "delete profile" check box.
- ++column_set_id;
- column_set = layout->AddColumnSet(column_set_id);
- column_set->AddPaddingColumn(0, views::kPanelHorizIndentation);
- column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0,
- GridLayout::USE_PREF, 0, 0);
- layout->StartRow(0, column_set_id);
- delete_profile_ = new views::Checkbox(
- l10n_util::GetStringUTF16(IDS_UNINSTALL_DELETE_PROFILE));
- layout->AddView(delete_profile_);
+ if (show_delete_profile_) {
+ ++column_set_id;
+ column_set = layout->AddColumnSet(column_set_id);
+ column_set->AddPaddingColumn(0, views::kPanelHorizIndentation);
+ column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0,
+ GridLayout::USE_PREF, 0, 0);
+ layout->StartRow(0, column_set_id);
+ delete_profile_ = new views::Checkbox(
+ l10n_util::GetStringUTF16(IDS_UNINSTALL_DELETE_PROFILE));
+ layout->AddView(delete_profile_);
+ }
// 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
@@ -111,7 +115,7 @@
bool UninstallView::Accept() {
user_selection_ = content::RESULT_CODE_NORMAL_EXIT;
- if (delete_profile_->checked())
+ if (show_delete_profile_ && delete_profile_->checked())
user_selection_ = chrome::RESULT_CODE_UNINSTALL_DELETE_PROFILE;
if (change_default_browser_ && change_default_browser_->checked()) {
BrowsersMap::const_iterator i = browsers_->begin();
@@ -163,7 +167,7 @@
namespace chrome {
-int ShowUninstallBrowserPrompt() {
+int ShowUninstallBrowserPrompt(bool show_delete_profile) {
DCHECK(base::MessageLoopForUI::IsCurrent());
int result = content::RESULT_CODE_NORMAL_EXIT;
@@ -178,7 +182,8 @@
base::RunLoop run_loop;
UninstallView* view = new UninstallView(&result,
- run_loop.QuitClosure());
+ run_loop.QuitClosure(),
+ show_delete_profile);
views::DialogDelegate::CreateDialogWidget(view, NULL, NULL)->Show();
run_loop.Run();
return result;
« no previous file with comments | « trunk/src/chrome/browser/ui/views/uninstall_view.h ('k') | trunk/src/chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698