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..2bb40e8b7f2fe1143b7bb562dedd84431fae810e |
--- /dev/null |
+++ b/chrome/browser/search_engines/default_search_manager.h |
@@ -0,0 +1,40 @@ |
+// 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" |
+ |
+class PrefService; |
+class Profile; |
+struct TemplateURLData; |
+ |
+class DefaultSearchManager { |
+ public: |
+ DefaultSearchManager(); |
erikwright (departed)
2014/04/23 14:18:01
I think this constructor should take a PrefService
Cait (Slow)
2014/04/23 19:10:05
Done.
|
+ |
+ // Sets |default_search_provider_| and updates Prefs. |
+ void SetUserSelectedDefaultSearchProvider(PrefService* prefs, |
+ TemplateURLData* url); |
erikwright (departed)
2014/04/23 14:18:01
const ref TUData?
Cait (Slow)
2014/04/23 19:10:05
Done.
|
+ |
+ // Returns the default search provider. |
+ TemplateURLData* GetDefaultSearchProvider(); |
erikwright (departed)
2014/04/23 14:18:01
return const-ref?
Cait (Slow)
2014/04/23 19:10:05
Done.
|
+ |
+ // Sets |default_search_provider_|. |
+ void SetDefaultSearchProvider(TemplateURLData* url); |
erikwright (departed)
2014/04/23 14:18:01
const-ref?
Cait (Slow)
2014/04/23 19:10:05
Done.
|
+ |
+ // Read default search provider data from the pref service provided. |
+ bool ReadFromPrefService(PrefService* prefs, TemplateURLData* url); |
erikwright (departed)
2014/04/23 14:18:01
With the existing implementation there is a concep
erikwright (departed)
2014/04/23 14:18:01
I don't think there's a good reason to have separa
Cait (Slow)
2014/04/23 17:26:30
Hmm.. I'm not sure what the best way to handle the
|
+ |
+ // Write default search provider data to the pref service provided. |
+ void SaveToPrefService(PrefService* prefs, const TemplateURLData* data); |
erikwright (departed)
2014/04/23 14:18:01
const-ref?
Cait (Slow)
2014/04/23 19:10:05
Done.
|
+ |
+ private: |
+ TemplateURLData* default_search_provider_; |
erikwright (departed)
2014/04/23 14:18:01
scoped_ptr?
Cait (Slow)
2014/04/23 19:10:05
Removing this altogether until there is an explici
|
+ |
+ DISALLOW_COPY_AND_ASSIGN(DefaultSearchManager); |
+}; |
+ |
+#endif // CHROME_BROWSER_SEARCH_ENGINES_DEFAULT_SEARCH_MANAGER_H_ |