Index: chrome/browser/search_engines/default_search_manager.h |
diff --git a/chrome/browser/search_engines/default_search_manager.h b/chrome/browser/search_engines/default_search_manager.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6882bd600fd043ebefa9ac01bb3d2365b08322df |
--- /dev/null |
+++ b/chrome/browser/search_engines/default_search_manager.h |
@@ -0,0 +1,37 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_SEARCH_ENGINES_DEFAULT_SEARCH_MANAGER_H_ |
+#define CHROME_BROWSER_SEARCH_ENGINES_DEFAULT_SEARCH_MANAGER_H_ |
+ |
+#include "base/basictypes.h" |
erikwright (departed)
2014/04/23 20:48:53
replace with base/macros.h
Cait (Slow)
2014/04/23 23:26:55
Done.
|
+ |
+namespace user_prefs { |
+class PrefRegistrySyncable; |
+} |
+ |
+class PrefService; |
+struct TemplateURLData; |
+ |
+class DefaultSearchManager { |
erikwright (departed)
2014/04/23 20:48:53
Some comments are required here.
Cait (Slow)
2014/04/23 23:26:55
Done.
|
+ public: |
+ explicit DefaultSearchManager(PrefService* pref_service); |
+ ~DefaultSearchManager(); |
+ |
+ // Register prefs needed for tracking the default search provider. |
+ static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
+ |
+ // Read default search provider data from |pref_service_|. |
+ bool ReadFromPrefService(TemplateURLData* url); |
gab
2014/04/23 20:00:18
I think the fact that it reads/saves to PrefServic
erikwright (departed)
2014/04/23 20:48:53
Agreed, but Save -> Set, and I don't think Data is
Cait (Slow)
2014/04/23 23:26:55
Done.
|
+ |
+ // Write default search provider data to |pref_service_|. |
+ void SaveToPrefService(const TemplateURLData& data); |
+ |
+ private: |
+ PrefService* pref_service_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(DefaultSearchManager); |
+}; |
+ |
+#endif // CHROME_BROWSER_SEARCH_ENGINES_DEFAULT_SEARCH_MANAGER_H_ |