Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2467)

Unified Diff: chrome/browser/search_engines/template_url_service.cc

Issue 10185008: Taking over issue 10006037: Moved WebDataService to ProfileKeyedService (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/search_engines/template_url_service.cc
===================================================================
--- chrome/browser/search_engines/template_url_service.cc (revision 136877)
+++ chrome/browser/search_engines/template_url_service.cc (working copy)
@@ -35,6 +35,7 @@
#include "chrome/browser/search_engines/util.h"
#include "chrome/browser/sync/api/sync_change.h"
#include "chrome/browser/sync/api/sync_error_factory.h"
+#include "chrome/browser/webdata/web_data_service_factory.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/env_vars.h"
@@ -555,8 +556,10 @@
if (loaded_ || load_handle_)
return;
- if (!service_.get())
- service_ = profile_->GetWebDataService(Profile::EXPLICIT_ACCESS);
+ if (!service_.get()) {
+ service_ = WebDataServiceFactory::GetForProfile(profile_,
+ Profile::EXPLICIT_ACCESS);
+ }
if (service_.get()) {
load_handle_ = service_->GetKeywords(this);
@@ -896,9 +899,9 @@
// . Trying to ADD a search engine that already exists.
NOTREACHED() << "Unexpected sync change state.";
error = sync_error_factory_->CreateAndUploadError(
- FROM_HERE,
- "ProcessSyncChanges failed on ChangeType " +
- SyncChange::ChangeTypeToString(iter->change_type()));
+ FROM_HERE,
+ "ProcessSyncChanges failed on ChangeType " +
+ SyncChange::ChangeTypeToString(iter->change_type()));
}
}
PreventDuplicateGUIDUpdates(&new_changes);

Powered by Google App Engine
This is Rietveld 408576698