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

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

Issue 8477004: Have content/ create and destroy its own threads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More IWYU, missing link-time dependency for Chrome Frame. Created 9 years, 1 month 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) 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/omnibox_search_hint.h" 5 #include "chrome/browser/omnibox_search_hint.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop.h"
8 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
9 #include "base/task.h" 10 #include "base/task.h"
10 // TODO(avi): remove when conversions not needed any more 11 // TODO(avi): remove when conversions not needed any more
11 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
12 #include "chrome/browser/autocomplete/autocomplete.h" 13 #include "chrome/browser/autocomplete/autocomplete.h"
13 #include "chrome/browser/autocomplete/autocomplete_edit.h" 14 #include "chrome/browser/autocomplete/autocomplete_edit.h"
14 #include "chrome/browser/autocomplete/autocomplete_match.h" 15 #include "chrome/browser/autocomplete/autocomplete_match.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"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 } 228 }
228 229
229 // static 230 // static
230 bool OmniboxSearchHint::IsEnabled(Profile* profile) { 231 bool OmniboxSearchHint::IsEnabled(Profile* profile) {
231 // The infobar can only be shown if the correct switch has been provided and 232 // The infobar can only be shown if the correct switch has been provided and
232 // the user did not dismiss the infobar before. 233 // the user did not dismiss the infobar before.
233 return profile->GetPrefs()->GetBoolean(prefs::kShowOmniboxSearchHint) && 234 return profile->GetPrefs()->GetBoolean(prefs::kShowOmniboxSearchHint) &&
234 CommandLine::ForCurrentProcess()->HasSwitch( 235 CommandLine::ForCurrentProcess()->HasSwitch(
235 switches::kSearchInOmniboxHint); 236 switches::kSearchInOmniboxHint);
236 } 237 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698