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

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

Issue 343523003: Remove AutocompleteInput Type and PageClassification. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 6 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
OLDNEW
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/ui/views/frame/browser_root_view.h" 5 #include "chrome/browser/ui/views/frame/browser_root_view.h"
6 6
7 #include "chrome/browser/autocomplete/autocomplete_classifier.h" 7 #include "chrome/browser/autocomplete/autocomplete_classifier.h"
8 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h" 8 #include "chrome/browser/autocomplete/autocomplete_classifier_factory.h"
9 #include "chrome/browser/autocomplete/autocomplete_input.h"
10 #include "chrome/browser/autocomplete/autocomplete_match.h" 9 #include "chrome/browser/autocomplete/autocomplete_match.h"
11 #include "chrome/browser/defaults.h" 10 #include "chrome/browser/defaults.h"
12 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/ui/browser_commands.h" 12 #include "chrome/browser/ui/browser_commands.h"
14 #include "chrome/browser/ui/tabs/tab_strip_model.h" 13 #include "chrome/browser/ui/tabs/tab_strip_model.h"
15 #include "chrome/browser/ui/views/frame/browser_frame.h" 14 #include "chrome/browser/ui/views/frame/browser_frame.h"
16 #include "chrome/browser/ui/views/frame/browser_view.h" 15 #include "chrome/browser/ui/views/frame/browser_view.h"
17 #include "chrome/browser/ui/views/tabs/tab_strip.h" 16 #include "chrome/browser/ui/views/tabs/tab_strip.h"
18 #include "chrome/browser/ui/views/touch_uma/touch_uma.h" 17 #include "chrome/browser/ui/views/touch_uma/touch_uma.h"
18 #include "components/metrics/proto/omnibox_event.pb.h"
19 #include "ui/base/dragdrop/drag_drop_types.h" 19 #include "ui/base/dragdrop/drag_drop_types.h"
20 #include "ui/base/dragdrop/os_exchange_data.h" 20 #include "ui/base/dragdrop/os_exchange_data.h"
21 #include "ui/base/hit_test.h" 21 #include "ui/base/hit_test.h"
22 22
23 // static 23 // static
24 const char BrowserRootView::kViewClassName[] = 24 const char BrowserRootView::kViewClassName[] =
25 "browser/ui/views/frame/BrowserRootView"; 25 "browser/ui/views/frame/BrowserRootView";
26 26
27 BrowserRootView::BrowserRootView(BrowserView* browser_view, 27 BrowserRootView::BrowserRootView(BrowserView* browser_view,
28 views::Widget* widget) 28 views::Widget* widget)
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 return false; 192 return false;
193 193
194 base::string16 text; 194 base::string16 text;
195 if (!data.GetString(&text) || text.empty()) 195 if (!data.GetString(&text) || text.empty())
196 return false; 196 return false;
197 text = AutocompleteMatch::SanitizeString(text); 197 text = AutocompleteMatch::SanitizeString(text);
198 198
199 AutocompleteMatch match; 199 AutocompleteMatch match;
200 AutocompleteClassifierFactory::GetForProfile( 200 AutocompleteClassifierFactory::GetForProfile(
201 browser_view_->browser()->profile())->Classify( 201 browser_view_->browser()->profile())->Classify(
202 text, false, false, AutocompleteInput::INVALID_SPEC, &match, NULL); 202 text, false, false, metrics::OmniboxEventProto::INVALID_SPEC, &match,
203 NULL);
203 if (!match.destination_url.is_valid()) 204 if (!match.destination_url.is_valid())
204 return false; 205 return false;
205 206
206 if (url) 207 if (url)
207 *url = match.destination_url; 208 *url = match.destination_url;
208 return true; 209 return true;
209 } 210 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698