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

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

Issue 355573008: Split keyword related parts of WebDataService as KeywordWebDataService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add OWNERS Created 6 years, 6 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.h
diff --git a/chrome/browser/search_engines/template_url_service.h b/chrome/browser/search_engines/template_url_service.h
index a6e994807bb6eaf4baba05d5e857bc0c975ac71d..e65c07db829410d1a80e2fa1b4d140eaf7683347 100644
--- a/chrome/browser/search_engines/template_url_service.h
+++ b/chrome/browser/search_engines/template_url_service.h
@@ -16,11 +16,13 @@
#include "base/memory/scoped_ptr.h"
#include "base/observer_list.h"
#include "base/prefs/pref_change_registrar.h"
-#include "chrome/browser/webdata/web_data_service.h"
+#include "chrome/browser/webdata/keyword_web_data_service.h"
#include "components/google/core/browser/google_url_tracker.h"
#include "components/keyed_service/core/keyed_service.h"
#include "components/search_engines/default_search_manager.h"
+#include "components/search_engines/template_url.h"
#include "components/search_engines/template_url_id.h"
+#include "components/webdata/common/web_data_service_consumer.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "sync/api/sync_change.h"
@@ -48,10 +50,10 @@ struct URLVisitedDetails;
// KeywordAutocomplete.
//
// TemplateURLService stores a vector of TemplateURLs. The TemplateURLs are
-// persisted to the database maintained by WebDataService. *ALL* mutations
-// to the TemplateURLs must funnel through TemplateURLService. This allows
-// TemplateURLService to notify listeners of changes as well as keep the
-// database in sync.
+// persisted to the database maintained by KeywordWebDataService.
+// *ALL* mutations to the TemplateURLs must funnel through TemplateURLService.
+// This allows TemplateURLService to notify listeners of changes as well as keep
+// the database in sync.
//
// There is a TemplateURLService per Profile.
//
@@ -62,8 +64,8 @@ struct URLVisitedDetails;
// the Load method.
//
// TemplateURLService takes ownership of any TemplateURL passed to it. If there
-// is a WebDataService, deletion is handled by WebDataService, otherwise
-// TemplateURLService handles deletion.
+// is a KeywordWebDataService, deletion is handled by KeywordWebDataService,
+// otherwise TemplateURLService handles deletion.
class TemplateURLService : public WebDataServiceConsumer,
public KeyedService,
@@ -282,7 +284,7 @@ class TemplateURLService : public WebDataServiceConsumer,
// This is invoked from WebDataService, and should not be directly
// invoked.
virtual void OnWebDataServiceRequestDone(
- WebDataService::Handle h,
+ KeywordWebDataService::Handle h,
const WDTypedResult* result) OVERRIDE;
// Returns the locale-direction-adjusted short name for the given keyword.
@@ -685,10 +687,10 @@ class TemplateURLService : public WebDataServiceConsumer,
bool load_failed_;
// If non-zero, we're waiting on a load.
- WebDataService::Handle load_handle_;
+ KeywordWebDataService::Handle load_handle_;
// Service used to store entries.
- scoped_refptr<WebDataService> service_;
+ scoped_refptr<KeywordWebDataService> web_data_service_;
// All visits that occurred before we finished loading. Once loaded
// UpdateKeywordSearchTermsForURL is invoked for each element of the vector.
@@ -729,7 +731,8 @@ class TemplateURLService : public WebDataServiceConsumer,
scoped_ptr<syncer::SyncErrorFactory> sync_error_factory_;
// A set of sync GUIDs denoting TemplateURLs that have been removed from this
- // model or the underlying WebDataService prior to MergeDataAndStartSyncing.
+ // model or the underlying KeywordWebDataService prior to
+ // MergeDataAndStartSyncing.
// This set is used to determine what entries from the server we want to
// ignore locally and return a delete command for.
std::set<std::string> pre_sync_deletes_;

Powered by Google App Engine
This is Rietveld 408576698