| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/search_engines/template_url_service_test_util.h" | 5 #include "chrome/browser/search_engines/template_url_service_test_util.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop_proxy.h" | 7 #include "base/message_loop/message_loop_proxy.h" |
| 8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
| 9 #include "chrome/browser/search_engines/chrome_template_url_service_client.h" | 9 #include "chrome/browser/search_engines/chrome_template_url_service_client.h" |
| 10 #include "chrome/test/base/testing_pref_service_syncable.h" | 10 #include "chrome/test/base/testing_pref_service_syncable.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 class TestingTemplateURLServiceClient : public ChromeTemplateURLServiceClient { | 22 class TestingTemplateURLServiceClient : public ChromeTemplateURLServiceClient { |
| 23 public: | 23 public: |
| 24 TestingTemplateURLServiceClient(Profile* profile, | 24 TestingTemplateURLServiceClient(Profile* profile, |
| 25 base::string16* search_term) | 25 base::string16* search_term) |
| 26 : ChromeTemplateURLServiceClient(profile), | 26 : ChromeTemplateURLServiceClient(profile), |
| 27 search_term_(search_term) {} | 27 search_term_(search_term) {} |
| 28 | 28 |
| 29 virtual void SetKeywordSearchTermsForURL( | 29 virtual void SetKeywordSearchTermsForURL( |
| 30 const GURL& url, | 30 const GURL& url, |
| 31 TemplateURLID id, | 31 TemplateURLID id, |
| 32 const base::string16& term) OVERRIDE { | 32 const base::string16& term) override { |
| 33 *search_term_ = term; | 33 *search_term_ = term; |
| 34 } | 34 } |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 base::string16* search_term_; | 37 base::string16* search_term_; |
| 38 | 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(TestingTemplateURLServiceClient); | 39 DISALLOW_COPY_AND_ASSIGN(TestingTemplateURLServiceClient); |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 } // namespace | 42 } // namespace |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 DefaultSearchPrefTestUtil::SetManagedPref( | 148 DefaultSearchPrefTestUtil::SetManagedPref( |
| 149 profile()->GetTestingPrefService(), | 149 profile()->GetTestingPrefService(), |
| 150 enabled, name, keyword, search_url, suggest_url, icon_url, encodings, | 150 enabled, name, keyword, search_url, suggest_url, icon_url, encodings, |
| 151 alternate_url, search_terms_replacement_key); | 151 alternate_url, search_terms_replacement_key); |
| 152 } | 152 } |
| 153 | 153 |
| 154 void TemplateURLServiceTestUtil::RemoveManagedDefaultSearchPreferences() { | 154 void TemplateURLServiceTestUtil::RemoveManagedDefaultSearchPreferences() { |
| 155 DefaultSearchPrefTestUtil::RemoveManagedPref( | 155 DefaultSearchPrefTestUtil::RemoveManagedPref( |
| 156 profile()->GetTestingPrefService()); | 156 profile()->GetTestingPrefService()); |
| 157 } | 157 } |
| OLD | NEW |