| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/views/frame/browser_root_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_root_view.h" |
| 6 | 6 |
| 7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
| 8 #include "chrome/browser/autocomplete/autocomplete.h" | 8 #include "chrome/browser/autocomplete/autocomplete.h" |
| 9 #include "chrome/browser/autocomplete/autocomplete_classifier.h" | 9 #include "chrome/browser/autocomplete/autocomplete_classifier.h" |
| 10 #include "chrome/browser/autocomplete/autocomplete_match.h" | 10 #include "chrome/browser/autocomplete/autocomplete_match.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 GURL* url) { | 144 GURL* url) { |
| 145 if (!data.HasString()) | 145 if (!data.HasString()) |
| 146 return false; | 146 return false; |
| 147 | 147 |
| 148 string16 text; | 148 string16 text; |
| 149 if (!data.GetString(&text) || text.empty()) | 149 if (!data.GetString(&text) || text.empty()) |
| 150 return false; | 150 return false; |
| 151 | 151 |
| 152 AutocompleteMatch match; | 152 AutocompleteMatch match; |
| 153 browser_view_->browser()->profile()->GetAutocompleteClassifier()->Classify( | 153 browser_view_->browser()->profile()->GetAutocompleteClassifier()->Classify( |
| 154 text, string16(), false, &match, NULL); | 154 text, string16(), false, false, &match, NULL); |
| 155 if (!match.destination_url.is_valid()) | 155 if (!match.destination_url.is_valid()) |
| 156 return false; | 156 return false; |
| 157 | 157 |
| 158 if (url) | 158 if (url) |
| 159 *url = match.destination_url; | 159 *url = match.destination_url; |
| 160 return true; | 160 return true; |
| 161 } | 161 } |
| OLD | NEW |