| 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 11ee4a4719c9c90ba16263e5de6be1bd750f1ee6..050a59c9352e0f198e113d5ce63777b512be2c0c 100644
|
| --- a/chrome/browser/search_engines/template_url_service.h
|
| +++ b/chrome/browser/search_engines/template_url_service.h
|
| @@ -31,7 +31,7 @@ class SearchHostToURLsMap;
|
| class SearchTermsData;
|
| class TemplateURLServiceObserver;
|
|
|
| -namespace csync {
|
| +namespace syncer {
|
| class SyncData;
|
| class SyncErrorFactory;
|
| }
|
| @@ -68,13 +68,13 @@ struct URLVisitedDetails;
|
| class TemplateURLService : public WebDataServiceConsumer,
|
| public ProfileKeyedService,
|
| public content::NotificationObserver,
|
| - public csync::SyncableService {
|
| + public syncer::SyncableService {
|
| public:
|
| typedef std::map<std::string, std::string> QueryTerms;
|
| typedef std::vector<TemplateURL*> TemplateURLVector;
|
| // Type for a static function pointer that acts as a time source.
|
| typedef base::Time(TimeProvider)();
|
| - typedef std::map<std::string, csync::SyncData> SyncDataMap;
|
| + typedef std::map<std::string, syncer::SyncData> SyncDataMap;
|
|
|
| // Struct used for initializing the data store with fake data.
|
| // Each initializer is mapped to a TemplateURL.
|
| @@ -265,26 +265,26 @@ class TemplateURLService : public WebDataServiceConsumer,
|
| const content::NotificationSource& source,
|
| const content::NotificationDetails& details) OVERRIDE;
|
|
|
| - // csync::SyncableService implementation.
|
| + // syncer::SyncableService implementation.
|
|
|
| // Returns all syncable TemplateURLs from this model as SyncData. This should
|
| // include every search engine and no Extension keywords.
|
| - virtual csync::SyncDataList GetAllSyncData(
|
| + virtual syncer::SyncDataList GetAllSyncData(
|
| syncable::ModelType type) const OVERRIDE;
|
| // Process new search engine changes from Sync, merging them into our local
|
| // data. This may send notifications if local search engines are added,
|
| // updated or removed.
|
| - virtual csync::SyncError ProcessSyncChanges(
|
| + virtual syncer::SyncError ProcessSyncChanges(
|
| const tracked_objects::Location& from_here,
|
| - const csync::SyncChangeList& change_list) OVERRIDE;
|
| + const syncer::SyncChangeList& change_list) OVERRIDE;
|
| // Merge initial search engine data from Sync and push any local changes up
|
| // to Sync. This may send notifications if local search engines are added,
|
| // updated or removed.
|
| - virtual csync::SyncError MergeDataAndStartSyncing(
|
| + virtual syncer::SyncError MergeDataAndStartSyncing(
|
| syncable::ModelType type,
|
| - const csync::SyncDataList& initial_sync_data,
|
| - scoped_ptr<csync::SyncChangeProcessor> sync_processor,
|
| - scoped_ptr<csync::SyncErrorFactory> sync_error_factory) OVERRIDE;
|
| + const syncer::SyncDataList& initial_sync_data,
|
| + scoped_ptr<syncer::SyncChangeProcessor> sync_processor,
|
| + scoped_ptr<syncer::SyncErrorFactory> sync_error_factory) OVERRIDE;
|
| virtual void StopSyncing(syncable::ModelType type) OVERRIDE;
|
|
|
| // Processes a local TemplateURL change for Sync. |turl| is the TemplateURL
|
| @@ -293,13 +293,14 @@ class TemplateURLService : public WebDataServiceConsumer,
|
| // associated with Sync, or if this is triggered by a Sync change, then this
|
| // does nothing.
|
| void ProcessTemplateURLChange(const TemplateURL* turl,
|
| - csync::SyncChange::SyncChangeType type);
|
| + syncer::SyncChange::SyncChangeType type);
|
|
|
| Profile* profile() const { return profile_; }
|
|
|
| // Returns a SyncData with a sync representation of the search engine data
|
| // from |turl|.
|
| - static csync::SyncData CreateSyncDataFromTemplateURL(const TemplateURL& turl);
|
| + static syncer::SyncData CreateSyncDataFromTemplateURL(
|
| + const TemplateURL& turl);
|
|
|
| // Creates a new heap-allocated TemplateURL* which is populated by overlaying
|
| // |sync_data| atop |existing_turl|. |existing_turl| may be NULL; if not it
|
| @@ -312,12 +313,12 @@ class TemplateURLService : public WebDataServiceConsumer,
|
| static TemplateURL* CreateTemplateURLFromTemplateURLAndSyncData(
|
| Profile* profile,
|
| TemplateURL* existing_turl,
|
| - const csync::SyncData& sync_data,
|
| - csync::SyncChangeList* change_list);
|
| + const syncer::SyncData& sync_data,
|
| + syncer::SyncChangeList* change_list);
|
|
|
| - // Returns a map mapping Sync GUIDs to pointers to csync::SyncData.
|
| + // Returns a map mapping Sync GUIDs to pointers to syncer::SyncData.
|
| static SyncDataMap CreateGUIDToSyncDataMap(
|
| - const csync::SyncDataList& sync_data);
|
| + const syncer::SyncDataList& sync_data);
|
|
|
| #if defined(UNIT_TEST)
|
| // Set a different time provider function, such as
|
| @@ -539,7 +540,7 @@ class TemplateURLService : public WebDataServiceConsumer,
|
| // * Otherwise |sync_turl| is better.
|
| // Then resolves the conflict:
|
| // * If the "worse" entry is |sync_turl|, and it is replaceable, add a
|
| - // csync::SyncChange to delete it, and return false.
|
| + // syncer::SyncChange to delete it, and return false.
|
| // * If the "worse" entry is |local_turl|, and it is replaceable, remove it
|
| // from the service and return true.
|
| // * Otherwise, uniquify the keyword of the "worse" entry. If it is
|
| @@ -557,7 +558,7 @@ class TemplateURLService : public WebDataServiceConsumer,
|
| // extension- vs. non-extension-based TemplateURLs with the same keyword.
|
| bool ResolveSyncKeywordConflict(TemplateURL* sync_turl,
|
| TemplateURL* local_turl,
|
| - csync::SyncChangeList* change_list);
|
| + syncer::SyncChangeList* change_list);
|
|
|
| // Returns a TemplateURL from the service that has the same keyword and search
|
| // URL as |sync_turl|, if it exists.
|
| @@ -572,7 +573,7 @@ class TemplateURLService : public WebDataServiceConsumer,
|
| // newer, so the caller must release it if need be.
|
| void MergeSyncAndLocalURLDuplicates(TemplateURL* sync_turl,
|
| TemplateURL* local_turl,
|
| - csync::SyncChangeList* change_list);
|
| + syncer::SyncChangeList* change_list);
|
|
|
| // Checks a newly added TemplateURL from Sync by its sync_guid and sets it as
|
| // the default search provider if we were waiting for it.
|
| @@ -657,11 +658,11 @@ class TemplateURLService : public WebDataServiceConsumer,
|
| // true, we ignore any local search engine changes, since we triggered them.
|
| bool processing_syncer_changes_;
|
|
|
| - // Sync's csync::SyncChange handler. We push all our changes through this.
|
| - scoped_ptr<csync::SyncChangeProcessor> sync_processor_;
|
| + // Sync's syncer::SyncChange handler. We push all our changes through this.
|
| + scoped_ptr<syncer::SyncChangeProcessor> sync_processor_;
|
|
|
| // Sync's error handler. We use it to create a sync error.
|
| - scoped_ptr<csync::SyncErrorFactory> sync_error_factory_;
|
| + scoped_ptr<syncer::SyncErrorFactory> sync_error_factory_;
|
|
|
| // Whether or not we are waiting on the default search provider to come in
|
| // from Sync. This is to facilitate the fact that changes to the value of
|
|
|