summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/autocomplete.cc
diff options
context:
space:
mode:
authordominich@chromium.org <dominich@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-28 20:10:36 +0000
committerdominich@chromium.org <dominich@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-28 20:10:36 +0000
commit2380b9a98b17983b0b018eba85d862631c58bc68 (patch)
tree3d1d21febe45308a57beaed9c417192f9d57ec95 /chrome/browser/autocomplete/autocomplete.cc
parente1429bf81fb01c05cb5a385fec718208740c2d97 (diff)
downloadchromium_src-2380b9a98b17983b0b018eba85d862631c58bc68.zip
chromium_src-2380b9a98b17983b0b018eba85d862631c58bc68.tar.gz
chromium_src-2380b9a98b17983b0b018eba85d862631c58bc68.tar.bz2
See http://codereview.chromium.org/7337007.
This is a continuation with a fix for the failing tests. BUG=90745,90837 TEST=none Review URL: http://codereview.chromium.org/7465051 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94537 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete.cc')
-rw-r--r--chrome/browser/autocomplete/autocomplete.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/autocomplete/autocomplete.cc b/chrome/browser/autocomplete/autocomplete.cc
index 48e7dd6..6a87b83 100644
--- a/chrome/browser/autocomplete/autocomplete.cc
+++ b/chrome/browser/autocomplete/autocomplete.cc
@@ -25,6 +25,7 @@
#include "chrome/browser/autocomplete/shortcuts_provider.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/external_protocol/external_protocol_handler.h"
+#include "chrome/browser/instant/instant_field_trial.h"
#include "chrome/browser/net/url_fixer_upper.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
@@ -793,7 +794,8 @@ AutocompleteController::AutocompleteController(
AutocompleteControllerDelegate* delegate)
: delegate_(delegate),
done_(true),
- in_start_(false) {
+ in_start_(false),
+ profile_(profile) {
search_provider_ = new SearchProvider(this, profile);
providers_.push_back(search_provider_);
// TODO(mrossetti): Remove the following and permanently modify the
@@ -839,6 +841,7 @@ void AutocompleteController::SetProfile(Profile* profile) {
(*i)->SetProfile(profile);
input_.Clear(); // Ensure we don't try to do a "minimal_changes" query on a
// different profile.
+ profile_ = profile;
}
void AutocompleteController::Start(
@@ -880,7 +883,9 @@ void AutocompleteController::Start(
if (matches_requested == AutocompleteInput::ALL_MATCHES &&
(text.length() < 6)) {
base::TimeTicks end_time = base::TimeTicks::Now();
- std::string name = "Omnibox.QueryTime." + base::IntToString(text.length());
+ std::string name = "Omnibox.QueryTime." +
+ InstantFieldTrial::GetGroupName(profile_) +
+ base::IntToString(text.length());
base::Histogram* counter = base::Histogram::FactoryGet(
name, 1, 1000, 50, base::Histogram::kUmaTargetedHistogramFlag);
counter->Add(static_cast<int>((end_time - start_time).InMilliseconds()));