Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ | 5 #ifndef COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ |
| 6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ | 6 #define COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <list> | 10 #include <list> |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 281 // revved: all existing prepopulated entries are checked against the current | 281 // revved: all existing prepopulated entries are checked against the current |
| 282 // prepopulate data, any now-extraneous safe_for_autoreplace() entries are | 282 // prepopulate data, any now-extraneous safe_for_autoreplace() entries are |
| 283 // removed, any existing engines are reset to the provided data (except for | 283 // removed, any existing engines are reset to the provided data (except for |
| 284 // user-edited names or keywords), and any new prepopulated engines are | 284 // user-edited names or keywords), and any new prepopulated engines are |
| 285 // added. | 285 // added. |
| 286 // | 286 // |
| 287 // After this, the default search engine is reset to the default entry in the | 287 // After this, the default search engine is reset to the default entry in the |
| 288 // prepopulate data. | 288 // prepopulate data. |
| 289 void RepairPrepopulatedSearchEngines(); | 289 void RepairPrepopulatedSearchEngines(); |
| 290 | 290 |
| 291 // Updates the last_visited time of TemplateURL to the current time. | |
| 292 bool UpdateTemplateURLVisitTime(TemplateURL* url); | |
|
Peter Kasting
2016/12/01 07:38:25
This is only public due to being used in a test.
ltian
2016/12/01 10:02:58
Sorry I totally misunderstood of your thought. Wil
| |
| 293 | |
| 291 // Observers used to listen for changes to the model. | 294 // Observers used to listen for changes to the model. |
| 292 // TemplateURLService does NOT delete the observers when deleted. | 295 // TemplateURLService does NOT delete the observers when deleted. |
| 293 void AddObserver(TemplateURLServiceObserver* observer); | 296 void AddObserver(TemplateURLServiceObserver* observer); |
| 294 void RemoveObserver(TemplateURLServiceObserver* observer); | 297 void RemoveObserver(TemplateURLServiceObserver* observer); |
| 295 | 298 |
| 296 // Loads the keywords. This has no effect if the keywords have already been | 299 // Loads the keywords. This has no effect if the keywords have already been |
| 297 // loaded. | 300 // loaded. |
| 298 // Observers are notified when loading completes via the method | 301 // Observers are notified when loading completes via the method |
| 299 // OnTemplateURLServiceChanged. | 302 // OnTemplateURLServiceChanged. |
| 300 void Load(); | 303 void Load(); |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 821 // Helper class to manage the default search engine. | 824 // Helper class to manage the default search engine. |
| 822 DefaultSearchManager default_search_manager_; | 825 DefaultSearchManager default_search_manager_; |
| 823 | 826 |
| 824 std::unique_ptr<GoogleURLTracker::Subscription> | 827 std::unique_ptr<GoogleURLTracker::Subscription> |
| 825 google_url_updated_subscription_; | 828 google_url_updated_subscription_; |
| 826 | 829 |
| 827 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); | 830 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); |
| 828 }; | 831 }; |
| 829 | 832 |
| 830 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ | 833 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ |
| OLD | NEW |