Index: components/search_engines/template_url_service.cc |
diff --git a/components/search_engines/template_url_service.cc b/components/search_engines/template_url_service.cc |
index b85e4f075618964e3d31d2c6ea912cbb68ba09eb..0a736ac2b08354c529dc098d04708f9734fd86df 100644 |
--- a/components/search_engines/template_url_service.cc |
+++ b/components/search_engines/template_url_service.cc |
@@ -671,18 +671,7 @@ void TemplateURLService::RepairPrepopulatedSearchEngines() { |
default_search_manager_.ClearUserSelectedDefaultSearchEngine(); |
- if (!default_search_provider_) { |
- // If the default search provider came from a user pref we would have been |
- // notified of the new (fallback-provided) value in |
- // ClearUserSelectedDefaultSearchEngine() above. Since we are here, the |
- // value was presumably originally a fallback value (which may have been |
- // repaired). |
- DefaultSearchManager::Source source; |
- const TemplateURLData* new_dse = |
- default_search_manager_.GetDefaultSearchEngine(&source); |
- // ApplyDefaultSearchChange will notify observers once it is done. |
- ApplyDefaultSearchChange(new_dse, source); |
- } else { |
+ if (default_search_provider_) { |
// Set fallback engine as user selected, because repair is considered a user |
// action and we are expected to sync new fallback engine to other devices. |
const TemplateURLData* fallback_engine_data = |
@@ -701,6 +690,18 @@ void TemplateURLService::RepairPrepopulatedSearchEngines() { |
fallback_engine->sync_guid()); |
} |
NotifyObservers(); |
+ RequestGoogleURLTrackerServerCheckIfNecessary(); |
vasilii
2017/04/06 09:33:17
There is a behavior change here. ProfileResetter c
Peter Kasting
2017/04/06 09:43:26
I missed that.
Why did the old code set force=tru
|
+ } else { |
+ // If the default search provider came from a user pref we would have been |
+ // notified of the new (fallback-provided) value in |
+ // ClearUserSelectedDefaultSearchEngine() above. Since we are here, the |
+ // value was presumably originally a fallback value (which may have been |
+ // repaired). |
+ DefaultSearchManager::Source source; |
+ const TemplateURLData* new_dse = |
+ default_search_manager_.GetDefaultSearchEngine(&source); |
+ // ApplyDefaultSearchChange will notify observers once it is done. |
+ ApplyDefaultSearchChange(new_dse, source); |
} |
} |