Chromium Code Reviews| Index: chrome/browser/search_engines/template_url_service.cc |
| diff --git a/chrome/browser/search_engines/template_url_service.cc b/chrome/browser/search_engines/template_url_service.cc |
| index abdd54826cf44f6b6152dfdfee7c47c85b4eda7d..22813e5606ca95a02084ca938a981c8ee8d6dd16 100644 |
| --- a/chrome/browser/search_engines/template_url_service.cc |
| +++ b/chrome/browser/search_engines/template_url_service.cc |
| @@ -672,12 +672,11 @@ void TemplateURLService::OnWebDataServiceRequestDone( |
| protector::ProtectorServiceFactory::GetForProfile(profile()); |
| DCHECK(protector_service); |
| protector_service->ShowChange(change.release()); |
| - } else { |
| + } else if (service_.get()) { |
|
sky
2012/04/13 15:56:22
I don't think it's possible for service_ to be NUL
Ivan Korotkov
2012/04/13 17:19:10
You're right apparently. I was confused by another
sky
2012/04/13 21:33:39
yes
Ivan Korotkov
2012/04/13 22:06:32
Done.
|
| // Protector is turned off: set the current default search to itself |
| // to update the backup and sign it. Otherwise, change will be reported |
| // every time when keywords are loaded until a search provider is added. |
| - // Note that this saves the default search provider to prefs. |
| - SetDefaultSearchProviderNoNotify(default_search_provider_); |
| + service_->SetDefaultSearchProvider(default_search_provider_); |
| } |
| } |
| #endif |