| Index: chrome/browser/profile_resetter/profile_resetter.cc
|
| diff --git a/chrome/browser/profile_resetter/profile_resetter.cc b/chrome/browser/profile_resetter/profile_resetter.cc
|
| index 2528754e54cd862b11263556b1dcaddd7be86fc1..72b25465201118497322c4b932b310d5222f6c2d 100644
|
| --- a/chrome/browser/profile_resetter/profile_resetter.cc
|
| +++ b/chrome/browser/profile_resetter/profile_resetter.cc
|
| @@ -5,12 +5,16 @@
|
| #include "chrome/browser/profile_resetter/profile_resetter.h"
|
|
|
| #include "chrome/browser/profiles/profile.h"
|
| +#include "chrome/browser/search_engines/template_url_prepopulate_data.h"
|
| +#include "chrome/browser/search_engines/template_url_service.h"
|
| +#include "chrome/browser/search_engines/template_url_service_factory.h"
|
| #include "content/public/browser/browser_thread.h"
|
|
|
| ProfileResetter::ProfileResetter(Profile* profile)
|
| : profile_(profile),
|
| pending_reset_flags_(0) {
|
| DCHECK(CalledOnValidThread());
|
| + DCHECK(profile_);
|
| }
|
|
|
| ProfileResetter::~ProfileResetter() {}
|
| @@ -75,8 +79,14 @@ void ProfileResetter::MarkAsDone(Resettable resettable) {
|
|
|
| void ProfileResetter::ResetDefaultSearchEngine() {
|
| DCHECK(CalledOnValidThread());
|
| - NOTIMPLEMENTED();
|
| - // TODO(battre/vabr): Implement
|
| +
|
| + TemplateURLPrepopulateData::ClearPrepopulatedEnginesInPrefs(profile_);
|
| + TemplateURLService* template_url_service =
|
| + TemplateURLServiceFactory::GetForProfile(profile_);
|
| + DCHECK(template_url_service);
|
| + template_url_service->ClearDefaultProviderFromPrefs();
|
| + template_url_service->ResetNonExtensionURLs();
|
| +
|
| MarkAsDone(DEFAULT_SEARCH_ENGINE);
|
| }
|
|
|
|
|