OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // Creates a new TemplateURLService. | 70 // Creates a new TemplateURLService. |
71 void ResetModel(bool verify_load); | 71 void ResetModel(bool verify_load); |
72 | 72 |
73 // Returns the search term from the last invocation of | 73 // Returns the search term from the last invocation of |
74 // TemplateURLService::SetKeywordSearchTermsForURL and clears the search term. | 74 // TemplateURLService::SetKeywordSearchTermsForURL and clears the search term. |
75 string16 GetAndClearSearchTerm(); | 75 string16 GetAndClearSearchTerm(); |
76 | 76 |
77 // Set the google base url. | 77 // Set the google base url. |
78 void SetGoogleBaseURL(const std::string& base_url) const; | 78 void SetGoogleBaseURL(const std::string& base_url) const; |
79 | 79 |
80 // Returns the WebDataService. | |
81 WebDataService* GetWebDataService(); | |
82 | |
83 // Returns the TemplateURLService. | 80 // Returns the TemplateURLService. |
84 TemplateURLService* model() const; | 81 TemplateURLService* model() const; |
85 | 82 |
86 // Returns the TestingProfile. | 83 // Returns the TestingProfile. |
87 TestingProfile* profile() const; | 84 TestingProfile* profile() const; |
88 | 85 |
89 // Starts an I/O thread. | 86 // Starts an I/O thread. |
90 void StartIOThread(); | 87 void StartIOThread(); |
91 | 88 |
92 private: | 89 private: |
93 MessageLoopForUI message_loop_; | 90 MessageLoopForUI message_loop_; |
94 // Needed to make the DeleteOnUIThread trait of WebDataService work | 91 // Needed to make the DeleteOnUIThread trait of WebDataService work |
95 // properly. | 92 // properly. |
96 content::TestBrowserThread ui_thread_; | 93 content::TestBrowserThread ui_thread_; |
97 scoped_ptr<TemplateURLServiceTestingProfile> profile_; | 94 scoped_ptr<TemplateURLServiceTestingProfile> profile_; |
98 scoped_ptr<TestingTemplateURLService> model_; | 95 scoped_ptr<TestingTemplateURLService> model_; |
99 int changed_count_; | 96 int changed_count_; |
100 | 97 |
101 DISALLOW_COPY_AND_ASSIGN(TemplateURLServiceTestUtil); | 98 DISALLOW_COPY_AND_ASSIGN(TemplateURLServiceTestUtil); |
102 }; | 99 }; |
103 | 100 |
104 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_ | 101 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_ |
OLD | NEW |