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