summaryrefslogtreecommitdiffstats
path: root/content/shell
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-27 22:32:21 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-27 22:32:21 +0000
commita1f8c1673d5a7873769b66356c0d2f2308213dda (patch)
treef4e871590fa4f851db3d480d5bfe9cc9f21fe467 /content/shell
parentff19af783cc8f2bb6adb7adee5cb6a23f4e0115f (diff)
downloadchromium_src-a1f8c1673d5a7873769b66356c0d2f2308213dda.zip
chromium_src-a1f8c1673d5a7873769b66356c0d2f2308213dda.tar.gz
chromium_src-a1f8c1673d5a7873769b66356c0d2f2308213dda.tar.bz2
Cleanup: avoid foo ? true : false, part 1.
Review URL: https://chromiumcodereview.appspot.com/10939010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159137 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell')
-rw-r--r--content/shell/shell_web_contents_view_delegate_win.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/content/shell/shell_web_contents_view_delegate_win.cc b/content/shell/shell_web_contents_view_delegate_win.cc
index 82eac7a..2165b455 100644
--- a/content/shell/shell_web_contents_view_delegate_win.cc
+++ b/content/shell/shell_web_contents_view_delegate_win.cc
@@ -117,8 +117,7 @@ void ShellWebContentsViewDelegate::ShowContextMenu(
}
if (params_.is_editable) {
- bool cut_enabled =
- (params_.edit_flags & WebContextMenuData::CanCut) ? true : false;
+ bool cut_enabled = ((params_.edit_flags & WebContextMenuData::CanCut) != 0);
MakeContextMenuItem(sub_menu,
index++,
L"Cut",
@@ -126,7 +125,7 @@ void ShellWebContentsViewDelegate::ShowContextMenu(
cut_enabled);
bool copy_enabled =
- (params_.edit_flags & WebContextMenuData::CanCopy) ? true : false;
+ ((params_.edit_flags & WebContextMenuData::CanCopy) != 0);
MakeContextMenuItem(sub_menu,
index++,
L"Copy",
@@ -134,14 +133,14 @@ void ShellWebContentsViewDelegate::ShowContextMenu(
copy_enabled);
bool paste_enabled =
- (params_.edit_flags & WebContextMenuData::CanPaste) ? true : false;
+ ((params_.edit_flags & WebContextMenuData::CanPaste) != 0);
MakeContextMenuItem(sub_menu,
index++,
L"Paste",
ShellContextMenuItemPasteId,
paste_enabled);
bool delete_enabled =
- (params_.edit_flags & WebContextMenuData::CanDelete) ? true : false;
+ ((params_.edit_flags & WebContextMenuData::CanDelete) != 0);
MakeContextMenuItem(sub_menu,
index++,
L"Delete",
@@ -170,7 +169,7 @@ void ShellWebContentsViewDelegate::ShowContextMenu(
NOTIMPLEMENTED();
#else
gfx::Point screen_point(params.x, params.y);
- POINT point = screen_point.ToPOINT();;
+ POINT point = screen_point.ToPOINT();
ClientToScreen(web_contents_->GetView()->GetNativeView(), &point);
int selection =
@@ -187,7 +186,7 @@ void ShellWebContentsViewDelegate::ShowContextMenu(
}
void ShellWebContentsViewDelegate::MenuItemSelected(int selection) {
- switch(selection) {
+ switch (selection) {
case ShellContextMenuItemCutId:
web_contents_->GetRenderViewHost()->Cut();
break;