OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "components/search_engines/default_search_pref_migration.h" | 5 #include "components/search_engines/default_search_pref_migration.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 std::string image_url_post_params; | 72 std::string image_url_post_params; |
73 std::string icon_url; | 73 std::string icon_url; |
74 std::string encodings; | 74 std::string encodings; |
75 std::string short_name; | 75 std::string short_name; |
76 std::string keyword; | 76 std::string keyword; |
77 std::string id_string; | 77 std::string id_string; |
78 std::string prepopulate_id; | 78 std::string prepopulate_id; |
79 base::ListValue alternate_urls; | 79 base::ListValue alternate_urls; |
80 std::string search_terms_replacement_key; | 80 std::string search_terms_replacement_key; |
81 if (t_url) { | 81 if (t_url) { |
82 DCHECK_EQ(TemplateURL::NORMAL, t_url->GetType()); | 82 DCHECK_EQ(TemplateURL::NORMAL, t_url->type()); |
83 enabled = true; | 83 enabled = true; |
84 search_url = t_url->url(); | 84 search_url = t_url->url(); |
85 suggest_url = t_url->suggestions_url(); | 85 suggest_url = t_url->suggestions_url(); |
86 instant_url = t_url->instant_url(); | 86 instant_url = t_url->instant_url(); |
87 image_url = t_url->image_url(); | 87 image_url = t_url->image_url(); |
88 new_tab_url = t_url->new_tab_url(); | 88 new_tab_url = t_url->new_tab_url(); |
89 search_url_post_params = t_url->search_url_post_params(); | 89 search_url_post_params = t_url->search_url_post_params(); |
90 suggest_url_post_params = t_url->suggestions_url_post_params(); | 90 suggest_url_post_params = t_url->suggestions_url_post_params(); |
91 instant_url_post_params = t_url->instant_url_post_params(); | 91 instant_url_post_params = t_url->instant_url_post_params(); |
92 image_url_post_params = t_url->image_url_post_params(); | 92 image_url_post_params = t_url->image_url_post_params(); |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 // Store a value in the legacy location. | 225 // Store a value in the legacy location. |
226 SaveDefaultSearchProviderToLegacyPrefs(&prepopulated_turl); | 226 SaveDefaultSearchProviderToLegacyPrefs(&prepopulated_turl); |
227 | 227 |
228 // Run the migration. | 228 // Run the migration. |
229 ConfigureDefaultSearchPrefMigrationToDictionaryValue(pref_service()); | 229 ConfigureDefaultSearchPrefMigrationToDictionaryValue(pref_service()); |
230 | 230 |
231 // Test that the legacy value is not migrated, as it is not user-selected. | 231 // Test that the legacy value is not migrated, as it is not user-selected. |
232 default_search_manager()->GetDefaultSearchEngine(&source); | 232 default_search_manager()->GetDefaultSearchEngine(&source); |
233 EXPECT_EQ(DefaultSearchManager::FROM_FALLBACK, source); | 233 EXPECT_EQ(DefaultSearchManager::FROM_FALLBACK, source); |
234 } | 234 } |
OLD | NEW |