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

Unified Diff: chrome/browser/instant/instant_controller.cc

Issue 5045005: Clean-up, not returning anything in InstantController void method. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Synced Created 10 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/instant_controller.cc
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
index 591fd3b000f39b29b30c69122e10997404b1ad38..54c12dd7559d52205911d6f96e7de416eedb43d9 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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698