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

Unified Diff: chrome/browser/autocomplete/autocomplete.cc

Issue 38007: Tell DNS prefetch when search URL is likely so that prewarming can be done... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/autocomplete/autocomplete.h ('k') | chrome/browser/net/dns_global.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete.cc
===================================================================
--- chrome/browser/autocomplete/autocomplete.cc (revision 43988)
+++ chrome/browser/autocomplete/autocomplete.cc (working copy)
@@ -513,6 +513,31 @@
}
}
+bool AutocompleteMatch::IsSearchType() const {
+ switch (type) {
+ case URL_WHAT_YOU_TYPED:
+ case HISTORY_URL:
+ case HISTORY_TITLE:
+ case HISTORY_BODY:
+ case HISTORY_KEYWORD:
+ case NAVSUGGEST:
+ return false;
+
+ case SEARCH_WHAT_YOU_TYPED:
+ case SEARCH_HISTORY:
+ case SEARCH_SUGGEST:
+ return true;
+
+ case SEARCH_OTHER_ENGINE:
+ case OPEN_HISTORY_PAGE:
+ return false;
+
+ default:
+ NOTREACHED();
+ return false;
+ }
+}
+
#ifndef NDEBUG
void AutocompleteMatch::Validate() const {
ValidateClassifications(contents, contents_class);
@@ -951,7 +976,7 @@
match.relevance = -match.relevance;
latest_result_.AddMatch(match);
return;
- } // else, fall through and add item.
+ } // else, fall through and add item.
}
AutocompleteMatch match(NULL, 0, false, AutocompleteMatch::OPEN_HISTORY_PAGE);
« no previous file with comments | « chrome/browser/autocomplete/autocomplete.h ('k') | chrome/browser/net/dns_global.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698