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

Unified Diff: chrome/browser/browser.cc

Issue 3809005: Moves instant back into flags. (Closed) Base URL: http://git.chromium.org/git/chromium.git
Patch Set: Created 10 years, 2 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/browser.h ('k') | chrome/browser/instant/instant_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser.cc
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 6cb7321cbfebf609e96abf5adf5171f84e9e371d..184ccc347d06ca817cd0a8bc80848df8b5efe8e3 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -242,7 +242,6 @@ Browser::Browser(Type type, Profile* profile)
encoding_auto_detect_.Init(prefs::kWebKitUsesUniversalDetector,
profile_->GetPrefs(), NULL);
use_vertical_tabs_.Init(prefs::kUseVerticalTabs, profile_->GetPrefs(), this);
- instant_enabled_.Init(prefs::kInstantEnabled, profile_->GetPrefs(), this);
if (!TabMenuModel::AreVerticalTabsEnabled()) {
// If vertical tabs aren't enabled, explicitly turn them off. Otherwise we
// might show vertical tabs but not show an option to turn them off.
@@ -3367,15 +3366,6 @@ void Browser::Observe(NotificationType type,
UseVerticalTabsChanged();
} else if (pref_name == prefs::kPrintingEnabled) {
UpdatePrintingState(0);
- } else if (pref_name == prefs::kInstantEnabled) {
- if (!InstantController::IsEnabled(profile())) {
- if (instant()) {
- instant()->DestroyPreviewContents();
- instant_.reset(NULL);
- }
- } else {
- CreateInstantIfNecessary();
- }
} else {
NOTREACHED();
}
@@ -4283,7 +4273,7 @@ bool Browser::OpenInstant(WindowOpenDisposition disposition) {
}
void Browser::CreateInstantIfNecessary() {
- if (type() == TYPE_NORMAL && InstantController::IsEnabled(profile()) &&
+ if (type() == TYPE_NORMAL && InstantController::IsEnabled() &&
!profile()->IsOffTheRecord()) {
instant_.reset(new InstantController(this));
}
« no previous file with comments | « chrome/browser/browser.h ('k') | chrome/browser/instant/instant_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698