| 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..52e8ac1895e017f24481dfc2ae382ed6e41560a5 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"
|
| @@ -171,18 +170,12 @@ void BrowserInstantController::TabDeactivated(TabContents* contents) {
|
| // BrowserInstantController, private:
|
|
|
| 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_));
|
| - } else {
|
| - instant_.reset();
|
| - instant_unload_handler_.reset();
|
| - }
|
| + instant_.reset(!browser_shutdown::ShuttingDownWithoutClosingBrowsers() &&
|
| + browser_->is_type_tabbed() ?
|
| + InstantController::GetInstance(browser_->profile(), this) :
|
| + NULL);
|
| + instant_unload_handler_.reset(instant() ? new InstantUnloadHandler(browser_) :
|
| + NULL);
|
| }
|
|
|
| } // namespace chrome
|
|
|