Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_DEFAULT_SEARCH_MANAGER_H_ | |
| 6 #define CHROME_BROWSER_SEARCH_ENGINES_DEFAULT_SEARCH_MANAGER_H_ | |
| 7 | |
| 8 #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.
| |
| 9 | |
| 10 namespace user_prefs { | |
| 11 class PrefRegistrySyncable; | |
| 12 } | |
| 13 | |
| 14 class PrefService; | |
| 15 struct TemplateURLData; | |
| 16 | |
| 17 class DefaultSearchManager { | |
|
erikwright (departed)
2014/04/23 20:48:53
Some comments are required here.
Cait (Slow)
2014/04/23 23:26:55
Done.
| |
| 18 public: | |
| 19 explicit DefaultSearchManager(PrefService* pref_service); | |
| 20 ~DefaultSearchManager(); | |
| 21 | |
| 22 // Register prefs needed for tracking the default search provider. | |
| 23 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | |
| 24 | |
| 25 // Read default search provider data from |pref_service_|. | |
| 26 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.
| |
| 27 | |
| 28 // Write default search provider data to |pref_service_|. | |
| 29 void SaveToPrefService(const TemplateURLData& data); | |
| 30 | |
| 31 private: | |
| 32 PrefService* pref_service_; | |
| 33 | |
| 34 DISALLOW_COPY_AND_ASSIGN(DefaultSearchManager); | |
| 35 }; | |
| 36 | |
| 37 #endif // CHROME_BROWSER_SEARCH_ENGINES_DEFAULT_SEARCH_MANAGER_H_ | |
| OLD | NEW |