| 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 "components/omnibox/browser/history_url_provider.h" | 5 #include "components/omnibox/browser/history_url_provider.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 // doing this (we can't just write new data for it to read due to thread | 466 // doing this (we can't just write new data for it to read due to thread |
| 467 // safety issues). At that point it's just as fast, and easier, to simply | 467 // safety issues). At that point it's just as fast, and easier, to simply |
| 468 // re-run the query from scratch and ignore |minimal_changes|. | 468 // re-run the query from scratch and ignore |minimal_changes|. |
| 469 | 469 |
| 470 // Cancel any in-progress query. | 470 // Cancel any in-progress query. |
| 471 Stop(false, false); | 471 Stop(false, false); |
| 472 | 472 |
| 473 matches_.clear(); | 473 matches_.clear(); |
| 474 | 474 |
| 475 if (input.from_omnibox_focus() || | 475 if (input.from_omnibox_focus() || |
| 476 (input.type() == metrics::OmniboxInputType::INVALID) || | 476 (input.type() == metrics::OmniboxInputType::INVALID)) |
| 477 (input.type() == metrics::OmniboxInputType::FORCED_QUERY)) | |
| 478 return; | 477 return; |
| 479 | 478 |
| 480 // Do some fixup on the user input before matching against it, so we provide | 479 // Do some fixup on the user input before matching against it, so we provide |
| 481 // good results for local file paths, input with spaces, etc. | 480 // good results for local file paths, input with spaces, etc. |
| 482 const FixupReturn fixup_return(FixupUserInput(input)); | 481 const FixupReturn fixup_return(FixupUserInput(input)); |
| 483 if (!fixup_return.first) | 482 if (!fixup_return.first) |
| 484 return; | 483 return; |
| 485 url::Parsed parts; | 484 url::Parsed parts; |
| 486 url_formatter::SegmentURL(fixup_return.second, &parts); | 485 url_formatter::SegmentURL(fixup_return.second, &parts); |
| 487 AutocompleteInput fixed_up_input(input); | 486 AutocompleteInput fixed_up_input(input); |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1198 AutocompleteMatch::ClassifyLocationInString(base::string16::npos, 0, | 1197 AutocompleteMatch::ClassifyLocationInString(base::string16::npos, 0, |
| 1199 match.contents.length(), ACMatchClassification::URL, | 1198 match.contents.length(), ACMatchClassification::URL, |
| 1200 &match.contents_class); | 1199 &match.contents_class); |
| 1201 } | 1200 } |
| 1202 match.description = info.title(); | 1201 match.description = info.title(); |
| 1203 match.description_class = | 1202 match.description_class = |
| 1204 ClassifyDescription(params.input.text(), match.description); | 1203 ClassifyDescription(params.input.text(), match.description); |
| 1205 RecordAdditionalInfoFromUrlRow(info, &match); | 1204 RecordAdditionalInfoFromUrlRow(info, &match); |
| 1206 return match; | 1205 return match; |
| 1207 } | 1206 } |
| OLD | NEW |