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 <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 const syncer::SyncDataList& sync_data); | 367 const syncer::SyncDataList& sync_data); |
368 | 368 |
369 #if defined(UNIT_TEST) | 369 #if defined(UNIT_TEST) |
370 // Sets a different time provider function, such as | 370 // Sets a different time provider function, such as |
371 // base::MockTimeProvider::StaticNow, for testing calls to base::Time::Now. | 371 // base::MockTimeProvider::StaticNow, for testing calls to base::Time::Now. |
372 void set_time_provider(TimeProvider* time_provider) { | 372 void set_time_provider(TimeProvider* time_provider) { |
373 time_provider_ = time_provider; | 373 time_provider_ = time_provider; |
374 } | 374 } |
375 #endif | 375 #endif |
376 | 376 |
377 protected: | |
378 // Cover method for the method of the same name on the HistoryService. | |
379 // url is the one that was visited with the given search terms. | |
380 // | |
381 // This exists and is virtual for testing. | |
382 virtual void SetKeywordSearchTermsForURL(const TemplateURL* t_url, | |
383 const GURL& url, | |
384 const base::string16& term); | |
385 | |
386 private: | 377 private: |
387 FRIEND_TEST_ALL_PREFIXES(TemplateURLServiceTest, TestManagedDefaultSearch); | 378 FRIEND_TEST_ALL_PREFIXES(TemplateURLServiceTest, TestManagedDefaultSearch); |
388 FRIEND_TEST_ALL_PREFIXES(TemplateURLServiceTest, | 379 FRIEND_TEST_ALL_PREFIXES(TemplateURLServiceTest, |
389 UpdateKeywordSearchTermsForURL); | 380 UpdateKeywordSearchTermsForURL); |
390 FRIEND_TEST_ALL_PREFIXES(TemplateURLServiceTest, | 381 FRIEND_TEST_ALL_PREFIXES(TemplateURLServiceTest, |
391 DontUpdateKeywordSearchForNonReplaceable); | 382 DontUpdateKeywordSearchForNonReplaceable); |
392 FRIEND_TEST_ALL_PREFIXES(TemplateURLServiceTest, ChangeGoogleBaseValue); | 383 FRIEND_TEST_ALL_PREFIXES(TemplateURLServiceTest, ChangeGoogleBaseValue); |
393 FRIEND_TEST_ALL_PREFIXES(TemplateURLServiceTest, MergeDeletesUnusedProviders); | 384 FRIEND_TEST_ALL_PREFIXES(TemplateURLServiceTest, MergeDeletesUnusedProviders); |
394 FRIEND_TEST_ALL_PREFIXES(TemplateURLServiceSyncTest, UniquifyKeyword); | 385 FRIEND_TEST_ALL_PREFIXES(TemplateURLServiceSyncTest, UniquifyKeyword); |
395 FRIEND_TEST_ALL_PREFIXES(TemplateURLServiceSyncTest, | 386 FRIEND_TEST_ALL_PREFIXES(TemplateURLServiceSyncTest, |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
751 | 742 |
752 // Helper class to manage the default search engine. | 743 // Helper class to manage the default search engine. |
753 DefaultSearchManager default_search_manager_; | 744 DefaultSearchManager default_search_manager_; |
754 | 745 |
755 scoped_ptr<GoogleURLTracker::Subscription> google_url_updated_subscription_; | 746 scoped_ptr<GoogleURLTracker::Subscription> google_url_updated_subscription_; |
756 | 747 |
757 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); | 748 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); |
758 }; | 749 }; |
759 | 750 |
760 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ | 751 #endif // COMPONENTS_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ |
OLD | NEW |