Chromium Code Reviews| Index: chrome/browser/ui/browser_instant_controller.cc |
| diff --git a/chrome/browser/ui/browser_instant_controller.cc b/chrome/browser/ui/browser_instant_controller.cc |
| index d1213257908088bf8bfd24274f510f91bc4ebbd8..f0afc885130f658defbb67287942e879ba2b2869 100644 |
| --- a/chrome/browser/ui/browser_instant_controller.cc |
| +++ b/chrome/browser/ui/browser_instant_controller.cc |
| @@ -14,7 +14,6 @@ |
| #include "chrome/browser/ui/browser_tabstrip.h" |
| #include "chrome/browser/ui/browser_window.h" |
| #include "chrome/browser/ui/omnibox/location_bar.h" |
| -#include "chrome/browser/ui/search/search.h" |
| #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| #include "chrome/browser/ui/tab_contents/tab_contents.h" |
| #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h" |
| @@ -172,15 +171,15 @@ void BrowserInstantController::TabDeactivated(TabContents* contents) { |
| void BrowserInstantController::ResetInstant() { |
| if (!browser_shutdown::ShuttingDownWithoutClosingBrowsers() && |
| - InstantController::IsEnabled(browser_->profile()) && |
| - browser_->is_type_tabbed() && !browser_->profile()->IsOffTheRecord()) { |
| - InstantController::Mode mode = InstantController::INSTANT; |
| - if (chrome::search::IsInstantExtendedAPIEnabled(browser_->profile())) |
| - mode = InstantController::EXTENDED; |
| - instant_.reset(new InstantController(this, mode)); |
| - instant_unload_handler_.reset(new InstantUnloadHandler(browser_)); |
| + browser_->is_type_tabbed()) { |
|
Peter Kasting
2012/08/31 01:51:19
Nit: No {} (2 places).
Another option: Use "XXX ?
sreeram
2012/09/04 17:42:16
Done.
|
| + instant_.reset(InstantController::CreateInstant(browser_->profile(), this)); |
| } else { |
| instant_.reset(); |
| + } |
| + |
| + if (instant()) { |
| + instant_unload_handler_.reset(new InstantUnloadHandler(browser_)); |
| + } else { |
| instant_unload_handler_.reset(); |
| } |
| } |