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

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

Issue 1155673002: Omnibox - Add About Flag to Reverse Title and URLs in the Dropdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mac and add command line flag to histograms.xml 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
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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 } 422 }
423 423
424 if (regenerate_result) 424 if (regenerate_result)
425 result_.Reset(); 425 result_.Reset();
426 426
427 AutocompleteResult last_result; 427 AutocompleteResult last_result;
428 last_result.Swap(&result_); 428 last_result.Swap(&result_);
429 429
430 for (Providers::const_iterator i(providers_.begin()); 430 for (Providers::const_iterator i(providers_.begin());
431 i != providers_.end(); ++i) 431 i != providers_.end(); ++i)
432 result_.AppendMatches((*i)->matches()); 432 result_.AppendMatches(input_, (*i)->matches());
433 433
434 // Sort the matches and trim to a small number of "best" matches. 434 // Sort the matches and trim to a small number of "best" matches.
435 result_.SortAndCull(input_, template_url_service_); 435 result_.SortAndCull(input_, template_url_service_);
436 436
437 // Need to validate before invoking CopyOldMatches as the old matches are not 437 // Need to validate before invoking CopyOldMatches as the old matches are not
438 // valid against the current input. 438 // valid against the current input.
439 #ifndef NDEBUG 439 #ifndef NDEBUG
440 result_.Validate(); 440 result_.Validate();
441 #endif 441 #endif
442 442
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
667 expire_timer_.Stop(); 667 expire_timer_.Stop();
668 stop_timer_.Stop(); 668 stop_timer_.Stop();
669 done_ = true; 669 done_ = true;
670 if (clear_result && !result_.empty()) { 670 if (clear_result && !result_.empty()) {
671 result_.Reset(); 671 result_.Reset();
672 // 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
673 // 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 :(
674 NotifyChanged(false); 674 NotifyChanged(false);
675 } 675 }
676 } 676 }
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | chrome/browser/autocomplete/autocomplete_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698