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" | |
| 9 | |
| 10 class PrefService; | |
| 11 class Profile; | |
| 12 struct TemplateURLData; | |
| 13 | |
| 14 class DefaultSearchManager { | |
| 15 public: | |
| 16 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.
| |
| 17 | |
| 18 // Sets |default_search_provider_| and updates Prefs. | |
| 19 void SetUserSelectedDefaultSearchProvider(PrefService* prefs, | |
| 20 TemplateURLData* url); | |
|
erikwright (departed)
2014/04/23 14:18:01
const ref TUData?
Cait (Slow)
2014/04/23 19:10:05
Done.
| |
| 21 | |
| 22 // Returns the default search provider. | |
| 23 TemplateURLData* GetDefaultSearchProvider(); | |
|
erikwright (departed)
2014/04/23 14:18:01
return const-ref?
Cait (Slow)
2014/04/23 19:10:05
Done.
| |
| 24 | |
| 25 // Sets |default_search_provider_|. | |
| 26 void SetDefaultSearchProvider(TemplateURLData* url); | |
|
erikwright (departed)
2014/04/23 14:18:01
const-ref?
Cait (Slow)
2014/04/23 19:10:05
Done.
| |
| 27 | |
| 28 // Read default search provider data from the pref service provided. | |
| 29 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
| |
| 30 | |
| 31 // Write default search provider data to the pref service provided. | |
| 32 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.
| |
| 33 | |
| 34 private: | |
| 35 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
| |
| 36 | |
| 37 DISALLOW_COPY_AND_ASSIGN(DefaultSearchManager); | |
| 38 }; | |
| 39 | |
| 40 #endif // CHROME_BROWSER_SEARCH_ENGINES_DEFAULT_SEARCH_MANAGER_H_ | |
| OLD | NEW |