Chromium Code Reviews| Index: chrome/browser/autocomplete/autocomplete.cc |
| diff --git a/chrome/browser/autocomplete/autocomplete.cc b/chrome/browser/autocomplete/autocomplete.cc |
| index 48e7dd65caa0d29e68a62ef6f280df94d18f94e8..6a87b839bd3047cacac29e08ba73a21b281314ea 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()); |
|
jar (doing other things)
2011/07/22 01:42:17
I'm not fully clear on the value of distinguishing
sreeram
2011/07/22 14:31:16
I am not sure, but that's something that exists cu
|
| base::Histogram* counter = base::Histogram::FactoryGet( |
| name, 1, 1000, 50, base::Histogram::kUmaTargetedHistogramFlag); |
|
jar (doing other things)
2011/07/22 01:42:17
You probably want a much larger dynamic range than
sreeram
2011/07/22 14:31:16
I think 1s is enough. This is a measure of the res
|
| counter->Add(static_cast<int>((end_time - start_time).InMilliseconds())); |