Index: chrome/browser/autocomplete/autocomplete_result.cc |
diff --git a/chrome/browser/autocomplete/autocomplete_result.cc b/chrome/browser/autocomplete/autocomplete_result.cc |
index 664384b1624ed159fc9725c13c5ee9f15976f479..8f2c52701b8f6d7ddf2de8c2bf510dfd45acdf72 100644 |
--- a/chrome/browser/autocomplete/autocomplete_result.cc |
+++ b/chrome/browser/autocomplete/autocomplete_result.cc |
@@ -7,6 +7,7 @@ |
#include <algorithm> |
#include <iterator> |
+#include "base/i18n/case_conversion.h" |
#include "base/logging.h" |
#include "base/metrics/histogram.h" |
#include "base/strings/utf_string_conversions.h" |
@@ -264,6 +265,13 @@ void AutocompleteResult::SortAndCull( |
} else { |
DCHECK_NE(metrics::OmniboxInputType::FORCED_QUERY, input.type()) |
<< debug_info; |
+ // If the user explicitly typed a scheme, the default match should |
+ // have the same scheme. |
+ if ((input.type() == metrics::OmniboxInputType::URL) && |
+ input.parts().scheme.is_nonempty()) { |
+ DCHECK_EQ(base::UTF16ToUTF8(base::i18n::ToLower(input.scheme())), |
Peter Kasting
2014/07/09 22:36:00
This isn't already lowercased for us?
Mark P
2014/07/09 23:12:23
Right you are. Done.
|
+ default_match_->destination_url.scheme()); |
+ } |
} |
} |
} |