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

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

Issue 1139773004: [Omnibox] Clean up comment, don't ref closed bugs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_controller.h" 5 #include "chrome/browser/autocomplete/autocomplete_controller.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 9
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 const bool minimal_changes = (input_.text() == old_input_text) && 251 const bool minimal_changes = (input_.text() == old_input_text) &&
252 (input_.want_asynchronous_matches() == old_want_asynchronous_matches); 252 (input_.want_asynchronous_matches() == old_want_asynchronous_matches);
253 253
254 expire_timer_.Stop(); 254 expire_timer_.Stop();
255 stop_timer_.Stop(); 255 stop_timer_.Stop();
256 256
257 // Start the new query. 257 // Start the new query.
258 in_start_ = true; 258 in_start_ = true;
259 base::TimeTicks start_time = base::TimeTicks::Now(); 259 base::TimeTicks start_time = base::TimeTicks::Now();
260 for (Providers::iterator i(providers_.begin()); i != providers_.end(); ++i) { 260 for (Providers::iterator i(providers_.begin()); i != providers_.end(); ++i) {
261 // TODO(mpearson): Remove timing code once bugs 178705 / 237703 / 168933 261 // TODO(mpearson): Remove timing code once bug 178705 is resolved.
262 // are resolved.
263 base::TimeTicks provider_start_time = base::TimeTicks::Now(); 262 base::TimeTicks provider_start_time = base::TimeTicks::Now();
264 (*i)->Start(input_, minimal_changes, false); 263 (*i)->Start(input_, minimal_changes, false);
265 if (!input.want_asynchronous_matches()) 264 if (!input.want_asynchronous_matches())
266 DCHECK((*i)->done()); 265 DCHECK((*i)->done());
267 base::TimeTicks provider_end_time = base::TimeTicks::Now(); 266 base::TimeTicks provider_end_time = base::TimeTicks::Now();
268 std::string name = std::string("Omnibox.ProviderTime.") + (*i)->GetName(); 267 std::string name = std::string("Omnibox.ProviderTime.") + (*i)->GetName();
269 base::HistogramBase* counter = base::Histogram::FactoryGet( 268 base::HistogramBase* counter = base::Histogram::FactoryGet(
270 name, 1, 5000, 20, base::Histogram::kUmaTargetedHistogramFlag); 269 name, 1, 5000, 20, base::Histogram::kUmaTargetedHistogramFlag);
271 counter->Add(static_cast<int>( 270 counter->Add(static_cast<int>(
272 (provider_end_time - provider_start_time).InMilliseconds())); 271 (provider_end_time - provider_start_time).InMilliseconds()));
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
668 expire_timer_.Stop(); 667 expire_timer_.Stop();
669 stop_timer_.Stop(); 668 stop_timer_.Stop();
670 done_ = true; 669 done_ = true;
671 if (clear_result && !result_.empty()) { 670 if (clear_result && !result_.empty()) {
672 result_.Reset(); 671 result_.Reset();
673 // NOTE: We pass in false since we're trying to only clear the popup, not 672 // NOTE: We pass in false since we're trying to only clear the popup, not
674 // touch the edit... this is all a mess and should be cleaned up :( 673 // touch the edit... this is all a mess and should be cleaned up :(
675 NotifyChanged(false); 674 NotifyChanged(false);
676 } 675 }
677 } 676 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698