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

Unified Diff: chrome/browser/instant/instant_controller.cc

Issue 8588003: Add a new field trial for Instant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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/instant/instant_browsertest.cc ('k') | chrome/browser/instant/instant_field_trial.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/instant/instant_controller.cc
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
index b1292b5d21f1eadc82c1bb97db53943c276040d4..8a84e05d161ebf285a341f0a7dff4f7295cb6af9 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -424,7 +424,7 @@ void InstantController::SetSuggestedTextFor(
const string16& text,
InstantCompleteBehavior behavior) {
if (!is_out_of_date_ &&
- !InstantFieldTrial::IsHiddenExperiment(tab_contents_->profile())) {
+ InstantFieldTrial::ShouldSetSuggestedText(tab_contents_->profile())) {
delegate_->SetSuggestedText(text, behavior);
}
}
@@ -497,14 +497,13 @@ void InstantController::UpdateLoader(const TemplateURL* template_url,
bool verbatim,
string16* suggested_text) {
is_out_of_date_ = false;
- bool hidden = InstantFieldTrial::IsHiddenExperiment(tab_contents_->profile());
- if (!hidden)
+ if (!InstantFieldTrial::IsHiddenExperiment(tab_contents_->profile()))
loader_->SetOmniboxBounds(omnibox_bounds_);
loader_->Update(tab_contents_, template_url, url, transition_type, user_text,
verbatim, suggested_text);
UpdateIsDisplayable();
// For the HIDDEN and SILENT field trials, don't send back suggestions.
- if (hidden)
+ if (!InstantFieldTrial::ShouldSetSuggestedText(tab_contents_->profile()))
suggested_text->clear();
}
« no previous file with comments | « chrome/browser/instant/instant_browsertest.cc ('k') | chrome/browser/instant/instant_field_trial.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698