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

Unified Diff: components/search_engines/default_search_manager.h

Issue 2659353002: Fix TemplateUrl::MatchesData comparison of search_terms_replacement_key (reland) (Closed)
Patch Set: Fixed deps Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/search_engines/BUILD.gn ('k') | components/search_engines/default_search_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/search_engines/default_search_manager.h
diff --git a/components/search_engines/default_search_manager.h b/components/search_engines/default_search_manager.h
index aadc6a4648952a740881931ea7ac2c7fed629882..94c699a0f0d326eb804521e149034478ae5d690f 100644
--- a/components/search_engines/default_search_manager.h
+++ b/components/search_engines/default_search_manager.h
@@ -63,9 +63,15 @@ class DefaultSearchManager {
static const char kDisabledByPolicy[];
enum Source {
+ // Default search engine chosen either from prepopulated engines set for
+ // current country or overriden from kSearchProviderOverrides preference.
FROM_FALLBACK = 0,
+ // User selected engine.
FROM_USER,
+ // Search engine set by extension overriding default search.
FROM_EXTENSION,
+ // Search engine controlled externally through enterprise configuration
+ // management (e.g. windows group policy).
FROM_POLICY,
};
@@ -84,18 +90,21 @@ class DefaultSearchManager {
PrefValueMap* pref_value_map);
// Testing code can call this with |disabled| set to true to cause
- // GetDefaultSearchEngine() to return NULL instead of
+ // GetDefaultSearchEngine() to return nullptr instead of
// |fallback_default_search_| in cases where the DSE source is FROM_FALLBACK.
static void SetFallbackSearchEnginesDisabledForTesting(bool disabled);
// Gets a pointer to the current Default Search Engine. If NULL, indicates
// that Default Search is explicitly disabled. |source|, if not NULL, will be
// filled in with the source of the result.
- TemplateURLData* GetDefaultSearchEngine(Source* source) const;
+ const TemplateURLData* GetDefaultSearchEngine(Source* source) const;
// Gets the source of the current Default Search Engine value.
Source GetDefaultSearchEngineSource() const;
+ // Returns a pointer to the fallback engine.
+ const TemplateURLData* GetFallbackSearchEngine() const;
+
// Write default search provider data to |pref_service_|.
void SetUserSelectedDefaultSearchEngine(const TemplateURLData& data);
« no previous file with comments | « components/search_engines/BUILD.gn ('k') | components/search_engines/default_search_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698