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

Side by Side Diff: chrome/browser/omnibox_search_hint.cc

Issue 10843071: Create chrome/browser/api directory. Move infobar delegates used by Autofill to the directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 8 years, 4 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/omnibox_search_hint.h" 5 #include "chrome/browser/omnibox_search_hint.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h"
12 #include "chrome/browser/autocomplete/autocomplete_log.h" 13 #include "chrome/browser/autocomplete/autocomplete_log.h"
13 #include "chrome/browser/autocomplete/autocomplete_match.h" 14 #include "chrome/browser/autocomplete/autocomplete_match.h"
14 #include "chrome/browser/autocomplete/autocomplete_result.h" 15 #include "chrome/browser/autocomplete/autocomplete_result.h"
15 #include "chrome/browser/infobars/infobar_tab_helper.h" 16 #include "chrome/browser/infobars/infobar_tab_helper.h"
16 #include "chrome/browser/prefs/pref_service.h" 17 #include "chrome/browser/prefs/pref_service.h"
17 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/search_engines/template_url.h" 19 #include "chrome/browser/search_engines/template_url.h"
19 #include "chrome/browser/search_engines/template_url_service.h" 20 #include "chrome/browser/search_engines/template_url_service.h"
20 #include "chrome/browser/search_engines/template_url_service_factory.h" 21 #include "chrome/browser/search_engines/template_url_service_factory.h"
21 #include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
22 #include "chrome/browser/ui/browser.h" 22 #include "chrome/browser/ui/browser.h"
23 #include "chrome/browser/ui/browser_finder.h" 23 #include "chrome/browser/ui/browser_finder.h"
24 #include "chrome/browser/ui/browser_window.h" 24 #include "chrome/browser/ui/browser_window.h"
25 #include "chrome/browser/ui/omnibox/location_bar.h" 25 #include "chrome/browser/ui/omnibox/location_bar.h"
26 #include "chrome/browser/ui/omnibox/omnibox_view.h" 26 #include "chrome/browser/ui/omnibox/omnibox_view.h"
27 #include "chrome/browser/ui/tab_contents/tab_contents.h" 27 #include "chrome/browser/ui/tab_contents/tab_contents.h"
28 #include "chrome/common/chrome_notification_types.h" 28 #include "chrome/common/chrome_notification_types.h"
29 #include "chrome/common/chrome_switches.h" 29 #include "chrome/common/chrome_switches.h"
30 #include "chrome/common/pref_names.h" 30 #include "chrome/common/pref_names.h"
31 #include "content/public/browser/navigation_details.h" 31 #include "content/public/browser/navigation_details.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 } 234 }
235 235
236 // static 236 // static
237 bool OmniboxSearchHint::IsEnabled(Profile* profile) { 237 bool OmniboxSearchHint::IsEnabled(Profile* profile) {
238 // The infobar can only be shown if the correct switch has been provided and 238 // The infobar can only be shown if the correct switch has been provided and
239 // the user did not dismiss the infobar before. 239 // the user did not dismiss the infobar before.
240 return profile->GetPrefs()->GetBoolean(prefs::kShowOmniboxSearchHint) && 240 return profile->GetPrefs()->GetBoolean(prefs::kShowOmniboxSearchHint) &&
241 CommandLine::ForCurrentProcess()->HasSwitch( 241 CommandLine::ForCurrentProcess()->HasSwitch(
242 switches::kSearchInOmniboxHint); 242 switches::kSearchInOmniboxHint);
243 } 243 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698