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/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
15 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
16 #include "chrome/browser/search_engines/template_url_service_observer.h" | 16 #include "chrome/browser/search_engines/template_url_service_observer.h" |
17 #include "content/public/test/test_browser_thread_bundle.h" | 17 #include "content/public/test/test_browser_thread_bundle.h" |
18 | 18 |
19 class GURL; | 19 class GURL; |
20 class TemplateURLService; | 20 class TemplateURLService; |
21 class TestingProfile; | 21 class TestingProfile; |
22 class TestingTemplateURLService; | 22 class TestingTemplateURLService; |
23 class TestingProfile; | 23 class TestingProfile; |
24 class WebDataService; | |
25 | 24 |
26 // TemplateURLServiceTestUtilBase contains basic API to ease testing of | 25 // TemplateURLServiceTestUtilBase contains basic API to ease testing of |
27 // TemplateURLService. User should take care of the infrastructure separately. | 26 // TemplateURLService. User should take care of the infrastructure separately. |
28 class TemplateURLServiceTestUtilBase : public TemplateURLServiceObserver { | 27 class TemplateURLServiceTestUtilBase : public TemplateURLServiceObserver { |
29 public: | 28 public: |
30 TemplateURLServiceTestUtilBase(); | 29 TemplateURLServiceTestUtilBase(); |
31 virtual ~TemplateURLServiceTestUtilBase(); | 30 virtual ~TemplateURLServiceTestUtilBase(); |
32 | 31 |
33 void CreateTemplateUrlService(); | 32 void CreateTemplateUrlService(); |
34 | 33 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // Needed to make the DeleteOnUIThread trait of WebDataService work | 113 // Needed to make the DeleteOnUIThread trait of WebDataService work |
115 // properly. | 114 // properly. |
116 content::TestBrowserThreadBundle thread_bundle_; | 115 content::TestBrowserThreadBundle thread_bundle_; |
117 scoped_ptr<TestingProfile> profile_; | 116 scoped_ptr<TestingProfile> profile_; |
118 base::ScopedTempDir temp_dir_; | 117 base::ScopedTempDir temp_dir_; |
119 | 118 |
120 DISALLOW_COPY_AND_ASSIGN(TemplateURLServiceTestUtil); | 119 DISALLOW_COPY_AND_ASSIGN(TemplateURLServiceTestUtil); |
121 }; | 120 }; |
122 | 121 |
123 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_ | 122 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_ |
OLD | NEW |