| 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/search_engines/chrome_template_url_service_client.h" | 11 #include "chrome/browser/search_engines/chrome_template_url_service_client.h" |
| 12 #include "chrome/browser/search_engines/template_url_service.h" |
| 12 #include "chrome/browser/search_engines/template_url_service_factory.h" | 13 #include "chrome/browser/search_engines/template_url_service_factory.h" |
| 13 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h" | 14 #include "chrome/browser/search_engines/ui_thread_search_terms_data.h" |
| 14 #include "chrome/browser/webdata/web_data_service_factory.h" | 15 #include "chrome/browser/webdata/web_data_service_factory.h" |
| 15 #include "chrome/test/base/testing_pref_service_syncable.h" | 16 #include "chrome/test/base/testing_pref_service_syncable.h" |
| 16 #include "chrome/test/base/testing_profile.h" | 17 #include "chrome/test/base/testing_profile.h" |
| 17 #include "components/google/core/browser/google_url_tracker.h" | 18 #include "components/google/core/browser/google_url_tracker.h" |
| 18 #include "components/search_engines/default_search_manager.h" | 19 #include "components/search_engines/default_search_manager.h" |
| 19 #include "components/search_engines/template_url_service.h" | |
| 20 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
| 21 | 21 |
| 22 #if defined(OS_CHROMEOS) | 22 #if defined(OS_CHROMEOS) |
| 23 #include "chrome/browser/google/google_brand_chromeos.h" | 23 #include "chrome/browser/google/google_brand_chromeos.h" |
| 24 #endif | 24 #endif |
| 25 | 25 |
| 26 // Trivial subclass of TemplateURLService that records the last invocation of | 26 // Trivial subclass of TemplateURLService that records the last invocation of |
| 27 // SetKeywordSearchTermsForURL. | 27 // SetKeywordSearchTermsForURL. |
| 28 class TestingTemplateURLService : public TemplateURLService { | 28 class TestingTemplateURLService : public TemplateURLService { |
| 29 public: | 29 public: |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 | 233 |
| 234 UIThreadSearchTermsData::SetGoogleBaseURL(std::string()); | 234 UIThreadSearchTermsData::SetGoogleBaseURL(std::string()); |
| 235 | 235 |
| 236 // Flush the message loop to make application verifiers happy. | 236 // Flush the message loop to make application verifiers happy. |
| 237 base::RunLoop().RunUntilIdle(); | 237 base::RunLoop().RunUntilIdle(); |
| 238 } | 238 } |
| 239 | 239 |
| 240 TestingProfile* TemplateURLServiceTestUtil::profile() const { | 240 TestingProfile* TemplateURLServiceTestUtil::profile() const { |
| 241 return profile_.get(); | 241 return profile_.get(); |
| 242 } | 242 } |
| OLD | NEW |