| 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/sync/test/integration/search_engines_helper.h" | 5 #include "chrome/browser/sync/test/integration/search_engines_helper.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| 11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 14 #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/sync/test/integration/profile_sync_service_harness.h" | 15 #include "chrome/browser/sync/test/integration/profile_sync_service_harness.h" |
| 17 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" | 16 #include "chrome/browser/sync/test/integration/sync_datatype_helper.h" |
| 18 #include "chrome/browser/sync/test/integration/sync_test.h" | 17 #include "chrome/browser/sync/test/integration/sync_test.h" |
| 19 #include "components/search_engines/template_url.h" | 18 #include "components/search_engines/template_url.h" |
| 19 #include "components/search_engines/template_url_service.h" |
| 20 | 20 |
| 21 using sync_datatype_helper::test; | 21 using sync_datatype_helper::test; |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 GUIDToTURLMap CreateGUIDToTURLMap(TemplateURLService* service) { | 25 GUIDToTURLMap CreateGUIDToTURLMap(TemplateURLService* service) { |
| 26 CHECK(service); | 26 CHECK(service); |
| 27 | 27 |
| 28 GUIDToTURLMap map; | 28 GUIDToTURLMap map; |
| 29 TemplateURLService::TemplateURLVector turls = service->GetTemplateURLs(); | 29 TemplateURLService::TemplateURLVector turls = service->GetTemplateURLs(); |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 service->SetUserSelectedDefaultSearchProvider(turl); | 259 service->SetUserSelectedDefaultSearchProvider(turl); |
| 260 if (test()->use_verifier()) { | 260 if (test()->use_verifier()) { |
| 261 TemplateURL* verifier_turl = | 261 TemplateURL* verifier_turl = |
| 262 GetVerifierService()->GetTemplateURLForKeyword(CreateKeyword(seed)); | 262 GetVerifierService()->GetTemplateURLForKeyword(CreateKeyword(seed)); |
| 263 ASSERT_TRUE(verifier_turl); | 263 ASSERT_TRUE(verifier_turl); |
| 264 GetVerifierService()->SetUserSelectedDefaultSearchProvider(verifier_turl); | 264 GetVerifierService()->SetUserSelectedDefaultSearchProvider(verifier_turl); |
| 265 } | 265 } |
| 266 } | 266 } |
| 267 | 267 |
| 268 } // namespace search_engines_helper | 268 } // namespace search_engines_helper |
| OLD | NEW |