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

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

Issue 6263008: Move ResourceBundle, DataPack to ui/base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h"
9 #include "base/command_line.h" 8 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
11 #include "base/task.h" 10 #include "base/task.h"
12 // TODO(avi): remove when conversions not needed any more 11 // TODO(avi): remove when conversions not needed any more
13 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
14 #include "chrome/browser/autocomplete/autocomplete.h" 13 #include "chrome/browser/autocomplete/autocomplete.h"
15 #include "chrome/browser/autocomplete/autocomplete_edit.h" 14 #include "chrome/browser/autocomplete/autocomplete_edit.h"
16 #include "chrome/browser/autocomplete/autocomplete_edit_view.h" 15 #include "chrome/browser/autocomplete/autocomplete_edit_view.h"
17 #include "chrome/browser/autocomplete/autocomplete_match.h" 16 #include "chrome/browser/autocomplete/autocomplete_match.h"
18 #include "chrome/browser/browser_list.h" 17 #include "chrome/browser/browser_list.h"
19 #include "chrome/browser/browser_window.h" 18 #include "chrome/browser/browser_window.h"
20 #include "chrome/browser/prefs/pref_service.h" 19 #include "chrome/browser/prefs/pref_service.h"
21 #include "chrome/browser/profiles/profile.h" 20 #include "chrome/browser/profiles/profile.h"
22 #include "chrome/browser/search_engines/template_url.h" 21 #include "chrome/browser/search_engines/template_url.h"
23 #include "chrome/browser/search_engines/template_url_model.h" 22 #include "chrome/browser/search_engines/template_url_model.h"
24 #include "chrome/browser/tab_contents/infobar_delegate.h" 23 #include "chrome/browser/tab_contents/infobar_delegate.h"
25 #include "chrome/browser/tab_contents/tab_contents.h" 24 #include "chrome/browser/tab_contents/tab_contents.h"
26 #include "chrome/browser/ui/omnibox/location_bar.h" 25 #include "chrome/browser/ui/omnibox/location_bar.h"
27 #include "chrome/common/chrome_switches.h" 26 #include "chrome/common/chrome_switches.h"
28 #include "chrome/common/notification_details.h" 27 #include "chrome/common/notification_details.h"
29 #include "chrome/common/notification_source.h" 28 #include "chrome/common/notification_source.h"
30 #include "chrome/common/notification_type.h" 29 #include "chrome/common/notification_type.h"
31 #include "chrome/common/pref_names.h" 30 #include "chrome/common/pref_names.h"
32 #include "grit/generated_resources.h" 31 #include "grit/generated_resources.h"
33 #include "grit/theme_resources.h" 32 #include "grit/theme_resources.h"
33 #include "ui/base/resource/resource_bundle.h"
34 34
35 // The URLs of search engines for which we want to trigger the infobar. 35 // The URLs of search engines for which we want to trigger the infobar.
36 const char* kSearchEngineURLs[] = { 36 const char* kSearchEngineURLs[] = {
37 "http://www.google.com/", 37 "http://www.google.com/",
38 "http://www.yahoo.com/", 38 "http://www.yahoo.com/",
39 "http://www.bing.com/", 39 "http://www.bing.com/",
40 "http://www.altavista.com/", 40 "http://www.altavista.com/",
41 "http://www.ask.com/", 41 "http://www.ask.com/",
42 "http://www.wolframalpha.com/", 42 "http://www.wolframalpha.com/",
43 }; 43 };
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 } 203 }
204 204
205 // static 205 // static
206 bool OmniboxSearchHint::IsEnabled(Profile* profile) { 206 bool OmniboxSearchHint::IsEnabled(Profile* profile) {
207 // The infobar can only be shown if the correct switch has been provided and 207 // The infobar can only be shown if the correct switch has been provided and
208 // the user did not dismiss the infobar before. 208 // the user did not dismiss the infobar before.
209 return profile->GetPrefs()->GetBoolean(prefs::kShowOmniboxSearchHint) && 209 return profile->GetPrefs()->GetBoolean(prefs::kShowOmniboxSearchHint) &&
210 CommandLine::ForCurrentProcess()->HasSwitch( 210 CommandLine::ForCurrentProcess()->HasSwitch(
211 switches::kSearchInOmniboxHint); 211 switches::kSearchInOmniboxHint);
212 } 212 }
OLDNEW
« no previous file with comments | « chrome/browser/notifications/desktop_notification_service.cc ('k') | chrome/browser/page_info_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698