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

Unified Diff: content/shell/shell_web_contents_view_delegate_win.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
« no previous file with comments | « content/public/test/mock_render_thread.h ('k') | gpu/demos/framework/pepper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell_web_contents_view_delegate_win.cc
===================================================================
--- content/shell/shell_web_contents_view_delegate_win.cc (revision 159076)
+++ content/shell/shell_web_contents_view_delegate_win.cc (working copy)
@@ -117,8 +117,7 @@
}
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 @@
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 @@
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 @@
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::MenuItemSelected(int selection) {
- switch(selection) {
+ switch (selection) {
case ShellContextMenuItemCutId:
web_contents_->GetRenderViewHost()->Cut();
break;
« no previous file with comments | « content/public/test/mock_render_thread.h ('k') | gpu/demos/framework/pepper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698