| 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 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_ | 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_ |
| 6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_ | 6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/files/scoped_temp_dir.h" | 11 #include "base/files/scoped_temp_dir.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "components/search_engines/template_url_service_observer.h" | 14 #include "components/search_engines/template_url_service_observer.h" |
| 15 #include "content/public/test/test_browser_thread_bundle.h" | 15 #include "content/public/test/test_browser_thread_bundle.h" |
| 16 | 16 |
| 17 class GURL; | 17 class GURL; |
| 18 class TemplateURLService; | 18 class TemplateURLService; |
| 19 class TestingProfile; | 19 class TestingProfile; |
| 20 class TestingSearchTermsData; |
| 20 class TestingTemplateURLService; | 21 class TestingTemplateURLService; |
| 21 | 22 |
| 22 class TemplateURLServiceTestUtil : public TemplateURLServiceObserver { | 23 class TemplateURLServiceTestUtil : public TemplateURLServiceObserver { |
| 23 public: | 24 public: |
| 24 TemplateURLServiceTestUtil(); | 25 TemplateURLServiceTestUtil(); |
| 25 virtual ~TemplateURLServiceTestUtil(); | 26 virtual ~TemplateURLServiceTestUtil(); |
| 26 | 27 |
| 27 // TemplateURLServiceObserver implemementation. | 28 // TemplateURLServiceObserver implemementation. |
| 28 virtual void OnTemplateURLServiceChanged() OVERRIDE; | 29 virtual void OnTemplateURLServiceChanged() OVERRIDE; |
| 29 | 30 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 TemplateURLService* model(); | 77 TemplateURLService* model(); |
| 77 | 78 |
| 78 // Returns the TestingProfile. | 79 // Returns the TestingProfile. |
| 79 TestingProfile* profile() { return profile_.get(); } | 80 TestingProfile* profile() { return profile_.get(); } |
| 80 | 81 |
| 81 private: | 82 private: |
| 82 content::TestBrowserThreadBundle thread_bundle_; | 83 content::TestBrowserThreadBundle thread_bundle_; |
| 83 scoped_ptr<TestingProfile> profile_; | 84 scoped_ptr<TestingProfile> profile_; |
| 84 base::ScopedTempDir temp_dir_; | 85 base::ScopedTempDir temp_dir_; |
| 85 int changed_count_; | 86 int changed_count_; |
| 87 TestingSearchTermsData* search_terms_data_; |
| 86 scoped_ptr<TestingTemplateURLService> model_; | 88 scoped_ptr<TestingTemplateURLService> model_; |
| 87 | 89 |
| 88 DISALLOW_COPY_AND_ASSIGN(TemplateURLServiceTestUtil); | 90 DISALLOW_COPY_AND_ASSIGN(TemplateURLServiceTestUtil); |
| 89 }; | 91 }; |
| 90 | 92 |
| 91 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_ | 93 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_ |
| OLD | NEW |