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