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

Side by Side Diff: chrome/browser/ui/views/frame/browser_root_view.cc

Issue 6995032: Fix a browser crash involving omnibox extension keywords. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: latest Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/tabs/tab_strip_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698