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

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

Issue 10939010: Cleanup: avoid foo ? true : false, part 1. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: rebase Created 8 years, 3 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
Index: chrome/browser/ui/views/create_application_shortcut_view.cc
===================================================================
--- chrome/browser/ui/views/create_application_shortcut_view.cc (revision 159076)
+++ chrome/browser/ui/views/create_application_shortcut_view.cc (working copy)
@@ -400,15 +400,16 @@
void CreateApplicationShortcutView::ButtonPressed(views::Button* sender,
const ui::Event& event) {
- if (sender == desktop_check_box_)
+ if (sender == desktop_check_box_) {
profile_->GetPrefs()->SetBoolean(prefs::kWebAppCreateOnDesktop,
- desktop_check_box_->checked() ? true : false);
- else if (sender == menu_check_box_)
+ desktop_check_box_->checked());
+ } else if (sender == menu_check_box_) {
profile_->GetPrefs()->SetBoolean(prefs::kWebAppCreateInAppsMenu,
- menu_check_box_->checked() ? true : false);
- else if (sender == quick_launch_check_box_)
+ menu_check_box_->checked());
+ } else if (sender == quick_launch_check_box_) {
profile_->GetPrefs()->SetBoolean(prefs::kWebAppCreateInQuickLaunchBar,
- quick_launch_check_box_->checked() ? true : false);
+ quick_launch_check_box_->checked());
+ }
// When no checkbox is checked we should not have the action button enabled.
GetDialogClientView()->UpdateDialogButtons();
« no previous file with comments | « chrome/browser/first_run/try_chrome_dialog_view.cc ('k') | chrome/browser/ui/webui/quota_internals_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698