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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/run_loop.h" | 8 #include "base/run_loop.h" |
9 #include "base/strings/string_split.h" | 9 #include "base/strings/string_split.h" |
10 #include "base/threading/thread.h" | 10 #include "base/threading/thread.h" |
11 #include "chrome/browser/google/google_url_tracker.h" | |
12 #include "chrome/browser/search_engines/default_search_manager.h" | 11 #include "chrome/browser/search_engines/default_search_manager.h" |
13 #include "chrome/browser/search_engines/search_terms_data.h" | 12 #include "chrome/browser/search_engines/search_terms_data.h" |
14 #include "chrome/browser/search_engines/template_url_service.h" | 13 #include "chrome/browser/search_engines/template_url_service.h" |
15 #include "chrome/browser/search_engines/template_url_service_factory.h" | 14 #include "chrome/browser/search_engines/template_url_service_factory.h" |
16 #include "chrome/browser/webdata/web_data_service_factory.h" | 15 #include "chrome/browser/webdata/web_data_service_factory.h" |
17 #include "chrome/test/base/testing_pref_service_syncable.h" | 16 #include "chrome/test/base/testing_pref_service_syncable.h" |
18 #include "chrome/test/base/testing_profile.h" | 17 #include "chrome/test/base/testing_profile.h" |
| 18 #include "components/google/core/browser/google_url_tracker.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 | 20 |
21 #if defined(OS_CHROMEOS) | 21 #if defined(OS_CHROMEOS) |
22 #include "chrome/browser/google/google_brand_chromeos.h" | 22 #include "chrome/browser/google/google_brand_chromeos.h" |
23 #endif | 23 #endif |
24 | 24 |
25 // Trivial subclass of TemplateURLService that records the last invocation of | 25 // Trivial subclass of TemplateURLService that records the last invocation of |
26 // SetKeywordSearchTermsForURL. | 26 // SetKeywordSearchTermsForURL. |
27 class TestingTemplateURLService : public TemplateURLService { | 27 class TestingTemplateURLService : public TemplateURLService { |
28 public: | 28 public: |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 | 223 |
224 UIThreadSearchTermsData::SetGoogleBaseURL(std::string()); | 224 UIThreadSearchTermsData::SetGoogleBaseURL(std::string()); |
225 | 225 |
226 // Flush the message loop to make application verifiers happy. | 226 // Flush the message loop to make application verifiers happy. |
227 base::RunLoop().RunUntilIdle(); | 227 base::RunLoop().RunUntilIdle(); |
228 } | 228 } |
229 | 229 |
230 TestingProfile* TemplateURLServiceTestUtil::profile() const { | 230 TestingProfile* TemplateURLServiceTestUtil::profile() const { |
231 return profile_.get(); | 231 return profile_.get(); |
232 } | 232 } |
OLD | NEW |