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

Side by Side Diff: components/omnibox/search_provider.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: remove extra blank line 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "components/omnibox/search_provider.h" 5 #include "components/omnibox/search_provider.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after
1437 (match.inline_autocompletion.empty() || 1437 (match.inline_autocompletion.empty() ||
1438 (!input_.prevent_inline_autocomplete() && !trimmed_whitespace)); 1438 (!input_.prevent_inline_autocomplete() && !trimmed_whitespace));
1439 match.EnsureUWYTIsAllowedToBeDefault( 1439 match.EnsureUWYTIsAllowedToBeDefault(
1440 input_.canonicalized_url(), providers_.template_url_service()); 1440 input_.canonicalized_url(), providers_.template_url_service());
1441 1441
1442 match.contents = navigation.match_contents(); 1442 match.contents = navigation.match_contents();
1443 match.contents_class = navigation.match_contents_class(); 1443 match.contents_class = navigation.match_contents_class();
1444 match.description = navigation.description(); 1444 match.description = navigation.description();
1445 AutocompleteMatch::ClassifyMatchInString(input, match.description, 1445 AutocompleteMatch::ClassifyMatchInString(input, match.description,
1446 ACMatchClassification::NONE, &match.description_class); 1446 ACMatchClassification::NONE, &match.description_class);
1447 match.PossiblySwapContentsAndDescriptionForURLSuggestion(input_);
1447 1448
1448 match.RecordAdditionalInfo( 1449 match.RecordAdditionalInfo(
1449 kRelevanceFromServerKey, 1450 kRelevanceFromServerKey,
1450 navigation.relevance_from_server() ? kTrue : kFalse); 1451 navigation.relevance_from_server() ? kTrue : kFalse);
1451 match.RecordAdditionalInfo(kShouldPrefetchKey, kFalse); 1452 match.RecordAdditionalInfo(kShouldPrefetchKey, kFalse);
1452 1453
1453 return match; 1454 return match;
1454 } 1455 }
1455 1456
1456 void SearchProvider::UpdateDone() { 1457 void SearchProvider::UpdateDone() {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
1512 for (MatchMap::const_iterator i(map.begin()); i != map.end(); ++i) 1513 for (MatchMap::const_iterator i(map.begin()); i != map.end(); ++i)
1513 matches.push_back(i->second); 1514 matches.push_back(i->second);
1514 std::sort(matches.begin(), matches.end(), &AutocompleteMatch::MoreRelevant); 1515 std::sort(matches.begin(), matches.end(), &AutocompleteMatch::MoreRelevant);
1515 1516
1516 // If there is a top scoring entry, find the corresponding answer. 1517 // If there is a top scoring entry, find the corresponding answer.
1517 if (!matches.empty()) 1518 if (!matches.empty())
1518 return answers_cache_.GetTopAnswerEntry(matches[0].contents); 1519 return answers_cache_.GetTopAnswerEntry(matches[0].contents);
1519 1520
1520 return AnswersQueryData(); 1521 return AnswersQueryData();
1521 } 1522 }
OLDNEW
« components/omnibox/omnibox_switches.cc ('K') | « components/omnibox/omnibox_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698