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

Unified Diff: chrome/browser/ui/search/instant_controller.cc

Issue 2888553002: Instant: small cleanups (Closed)
Patch Set: . Created 3 years, 7 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 | « chrome/browser/ui/search/instant_controller.h ('k') | chrome/browser/ui/search/instant_tab.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/instant_controller.cc
diff --git a/chrome/browser/ui/search/instant_controller.cc b/chrome/browser/ui/search/instant_controller.cc
index 24b2059411be652d25c5becc1cd44e9ad13e8107..58598d188d37a8ea724894c77f4a900f3c30b071 100644
--- a/chrome/browser/ui/search/instant_controller.cc
+++ b/chrome/browser/ui/search/instant_controller.cc
@@ -9,7 +9,6 @@
#include "base/location.h"
#include "base/strings/stringprintf.h"
-#include "base/threading/thread_task_runner_handle.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search/instant_service.h"
#include "chrome/browser/search/instant_service_factory.h"
@@ -27,11 +26,9 @@ bool IsContentsFrom(const InstantTab* page,
} // namespace
InstantController::InstantController(BrowserInstantController* browser)
- : browser_(browser) {
-}
+ : browser_(browser) {}
-InstantController::~InstantController() {
-}
+InstantController::~InstantController() = default;
void InstantController::SearchModeChanged(const SearchMode& old_mode,
const SearchMode& new_mode) {
@@ -67,9 +64,12 @@ void InstantController::InstantTabAboutToNavigateMainFrame(
const GURL& url) {
DCHECK(IsContentsFrom(instant_tab_.get(), contents));
- // The Instant tab navigated. Send it the data it needs to display
- // properly.
- // TODO(treib): Doesn't seem to be necessary. crbug.com/627747
+ // The Instant tab navigated (which means it had instant support both before
+ // and after the navigation). This may cause it to be assigned to a new
+ // renderer process, which doesn't have the most visited/theme data yet, so
+ // send it now.
+ // TODO(treib): This seems unnecessarily convoluted and fragile. Can't we just
+ // send this when the Instant process is created?
UpdateInfoForInstantTab();
}
« no previous file with comments | « chrome/browser/ui/search/instant_controller.h ('k') | chrome/browser/ui/search/instant_tab.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698