OLD | NEW |
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.h" | 5 #include "chrome/browser/autocomplete/autocomplete.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 case ExternalProtocolHandler::BLOCK: | 213 case ExternalProtocolHandler::BLOCK: |
214 // If we don't want the user to open the URL, don't let it be navigated | 214 // If we don't want the user to open the URL, don't let it be navigated |
215 // to at all. | 215 // to at all. |
216 return QUERY; | 216 return QUERY; |
217 | 217 |
218 default: { | 218 default: { |
219 // We don't know about this scheme. It might be that the user typed a | 219 // We don't know about this scheme. It might be that the user typed a |
220 // URL of the form "username:password@foo.com". | 220 // URL of the form "username:password@foo.com". |
221 const string16 http_scheme_prefix = | 221 const string16 http_scheme_prefix = |
222 ASCIIToUTF16(std::string(chrome::kHttpScheme) + | 222 ASCIIToUTF16(std::string(chrome::kHttpScheme) + |
223 chrome::kStandardSchemeSeparator); | 223 content::kStandardSchemeSeparator); |
224 url_parse::Parsed http_parts; | 224 url_parse::Parsed http_parts; |
225 string16 http_scheme; | 225 string16 http_scheme; |
226 GURL http_canonicalized_url; | 226 GURL http_canonicalized_url; |
227 Type http_type = Parse(http_scheme_prefix + text, desired_tld, | 227 Type http_type = Parse(http_scheme_prefix + text, desired_tld, |
228 &http_parts, &http_scheme, | 228 &http_parts, &http_scheme, |
229 &http_canonicalized_url); | 229 &http_canonicalized_url); |
230 DCHECK_EQ(std::string(chrome::kHttpScheme), UTF16ToUTF8(http_scheme)); | 230 DCHECK_EQ(std::string(chrome::kHttpScheme), UTF16ToUTF8(http_scheme)); |
231 | 231 |
232 if ((http_type == URL || http_type == REQUESTED_URL) && | 232 if ((http_type == URL || http_type == REQUESTED_URL) && |
233 http_parts.username.is_nonempty() && | 233 http_parts.username.is_nonempty() && |
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1138 const AutocompleteResult& result) | 1138 const AutocompleteResult& result) |
1139 : text(text), | 1139 : text(text), |
1140 input_type(input_type), | 1140 input_type(input_type), |
1141 selected_index(selected_index), | 1141 selected_index(selected_index), |
1142 tab_id(tab_id), | 1142 tab_id(tab_id), |
1143 elapsed_time_since_user_first_modified_omnibox( | 1143 elapsed_time_since_user_first_modified_omnibox( |
1144 elapsed_time_since_user_first_modified_omnibox), | 1144 elapsed_time_since_user_first_modified_omnibox), |
1145 inline_autocompleted_length(inline_autocompleted_length), | 1145 inline_autocompleted_length(inline_autocompleted_length), |
1146 result(result) { | 1146 result(result) { |
1147 } | 1147 } |
OLD | NEW |