summaryrefslogtreecommitdiffstats
path: root/chrome/browser/instant
diff options
context:
space:
mode:
authorjcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-17 01:33:27 +0000
committerjcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-17 01:33:27 +0000
commit5a85751b02917b6c5a9e01de0873e39011c9ffed (patch)
tree9cf09f163e97f3b5056c551d43d1539199956860 /chrome/browser/instant
parent07f452e2d7568739e620a64f325ed47d83b32a5b (diff)
downloadchromium_src-5a85751b02917b6c5a9e01de0873e39011c9ffed.zip
chromium_src-5a85751b02917b6c5a9e01de0873e39011c9ffed.tar.gz
chromium_src-5a85751b02917b6c5a9e01de0873e39011c9ffed.tar.bz2
Clean-up, not returning anything in void returning method.
BUG=NONE TEST=None Review URL: http://codereview.chromium.org/5045005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66360 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/instant')
-rw-r--r--chrome/browser/instant/instant_controller.cc23
1 files changed, 15 insertions, 8 deletions
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
index 591fd3b..54c12dd 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -252,8 +252,10 @@ void InstantController::OnAutocompleteLostFocus(
RenderWidgetHostView* rwhv =
GetPreviewContents()->GetRenderWidgetHostView();
- if (!view_gaining_focus || !rwhv)
- return DestroyPreviewContents();
+ if (!view_gaining_focus || !rwhv) {
+ DestroyPreviewContents();
+ return;
+ }
gfx::NativeView tab_view = GetPreviewContents()->GetNativeView();
// Focus is going to the renderer.
@@ -262,17 +264,20 @@ void InstantController::OnAutocompleteLostFocus(
if (!IsMouseDownFromActivate()) {
// If the mouse is not down, focus is not going to the renderer. Someone
// else moved focus and we shouldn't commit.
- return DestroyPreviewContents();
+ DestroyPreviewContents();
+ return;
}
if (IsShowingInstant()) {
// We're showing instant results. As instant results may shift when
// committing we commit on the mouse up. This way a slow click still
// works fine.
- return SetCommitOnMouseUp();
+ SetCommitOnMouseUp();
+ return;
}
- return CommitCurrentPreview(INSTANT_COMMIT_FOCUS_LOST);
+ CommitCurrentPreview(INSTANT_COMMIT_FOCUS_LOST);
+ return;
}
// Walk up the view hierarchy. If the view gaining focus is a subview of the
@@ -286,10 +291,12 @@ void InstantController::OnAutocompleteLostFocus(
platform_util::GetParent(view_gaining_focus_ancestor);
}
- if (view_gaining_focus_ancestor)
- return CommitCurrentPreview(INSTANT_COMMIT_FOCUS_LOST);
+ if (view_gaining_focus_ancestor) {
+ CommitCurrentPreview(INSTANT_COMMIT_FOCUS_LOST);
+ return;
+ }
- return DestroyPreviewContents();
+ DestroyPreviewContents();
}
TabContents* InstantController::ReleasePreviewContents(InstantCommitType type) {