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 fe1cc1bd45c2eada466250960fd566e6f61aa770..869f5d27c58fd21a92eea57bac14c40292a599a6 100644 |
--- a/chrome/browser/ui/search/instant_controller.cc |
+++ b/chrome/browser/ui/search/instant_controller.cc |
@@ -1591,7 +1591,8 @@ void InstantController::ResetNTP(const std::string& instant_url) { |
// Instant NTP is only used in extended mode so we should always have a |
// non-empty URL to use. |
DCHECK(!instant_url.empty()); |
- ntp_.reset(new InstantNTP(this, instant_url)); |
+ ntp_.reset(new InstantNTP(this, instant_url, |
+ browser_->profile()->IsOffTheRecord())); |
ntp_->InitContents(profile(), browser_->GetActiveWebContents(), |
base::Bind(&InstantController::ReloadStaleNTP, |
base::Unretained(this))); |
@@ -1632,7 +1633,8 @@ void InstantController::ResetOverlay(const std::string& instant_url) { |
if (!active_tab || instant_url.empty()) { |
overlay_.reset(); |
} else { |
- overlay_.reset(new InstantOverlay(this, instant_url)); |
+ overlay_.reset(new InstantOverlay(this, instant_url, |
+ browser_->profile()->IsOffTheRecord())); |
overlay_->InitContents(browser_->profile(), active_tab); |
} |
LOG_INSTANT_DEBUG_EVENT(this, base::StringPrintf( |
@@ -1662,13 +1664,11 @@ InstantController::ShouldSwitchToLocalOverlay() const { |
} |
void InstantController::ResetInstantTab() { |
- // Do not wire up the InstantTab in Incognito, to prevent it from sending data |
- // to the page. |
- if (!search_mode_.is_origin_default() && |
- !browser_->profile()->IsOffTheRecord()) { |
+ if (!search_mode_.is_origin_default()) { |
content::WebContents* active_tab = browser_->GetActiveWebContents(); |
if (!instant_tab_ || active_tab != instant_tab_->contents()) { |
- instant_tab_.reset(new InstantTab(this)); |
+ instant_tab_.reset( |
+ new InstantTab(this, browser_->profile()->IsOffTheRecord())); |
instant_tab_->Init(active_tab); |
UpdateInfoForInstantTab(); |
use_tab_for_suggestions_ = true; |