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

Side by Side Diff: chrome/browser/autocomplete/autocomplete.cc

Issue 7583012: Restrict Instant field trial to UMA opt-in users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed @jar's comments Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/instant/instant_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/autocomplete/autocomplete.h" 5 #include "chrome/browser/autocomplete/autocomplete.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 866 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 for (ACProviders::iterator i(providers_.begin()); i != providers_.end(); 877 for (ACProviders::iterator i(providers_.begin()); i != providers_.end();
878 ++i) { 878 ++i) {
879 (*i)->Start(input_, minimal_changes); 879 (*i)->Start(input_, minimal_changes);
880 if (matches_requested != AutocompleteInput::ALL_MATCHES) 880 if (matches_requested != AutocompleteInput::ALL_MATCHES)
881 DCHECK((*i)->done()); 881 DCHECK((*i)->done());
882 } 882 }
883 if (matches_requested == AutocompleteInput::ALL_MATCHES && 883 if (matches_requested == AutocompleteInput::ALL_MATCHES &&
884 (text.length() < 6)) { 884 (text.length() < 6)) {
885 base::TimeTicks end_time = base::TimeTicks::Now(); 885 base::TimeTicks end_time = base::TimeTicks::Now();
886 std::string name = "Omnibox.QueryTime." + 886 std::string name = "Omnibox.QueryTime." +
887 InstantFieldTrial::GetGroupName(profile_) + 887 InstantFieldTrial::GetGroupName(profile_) + "." +
888 base::IntToString(text.length()); 888 base::IntToString(text.length());
889 base::Histogram* counter = base::Histogram::FactoryGet( 889 base::Histogram* counter = base::Histogram::FactoryGet(
890 name, 1, 1000, 50, base::Histogram::kUmaTargetedHistogramFlag); 890 name, 1, 1000, 50, base::Histogram::kUmaTargetedHistogramFlag);
891 counter->Add(static_cast<int>((end_time - start_time).InMilliseconds())); 891 counter->Add(static_cast<int>((end_time - start_time).InMilliseconds()));
892 } 892 }
893 in_start_ = false; 893 in_start_ = false;
894 CheckIfDone(); 894 CheckIfDone();
895 UpdateResult(true); 895 UpdateResult(true);
896 896
897 if (!done_) 897 if (!done_)
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 } 1033 }
1034 } 1034 }
1035 done_ = true; 1035 done_ = true;
1036 } 1036 }
1037 1037
1038 void AutocompleteController::StartExpireTimer() { 1038 void AutocompleteController::StartExpireTimer() {
1039 if (result_.HasCopiedMatches()) 1039 if (result_.HasCopiedMatches())
1040 expire_timer_.Start(base::TimeDelta::FromMilliseconds(kExpireTimeMS), 1040 expire_timer_.Start(base::TimeDelta::FromMilliseconds(kExpireTimeMS),
1041 this, &AutocompleteController::ExpireCopiedEntries); 1041 this, &AutocompleteController::ExpireCopiedEntries);
1042 } 1042 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/instant/instant_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698