| Index: chrome/browser/sync_file_system/drive_file_sync_service.cc
|
| diff --git a/chrome/browser/sync_file_system/drive_file_sync_service.cc b/chrome/browser/sync_file_system/drive_file_sync_service.cc
|
| index c7a12a71ac23981eb08db43801ebdfccd40e0642..0380b877d33f6724c9660d174bb935136c94261c 100644
|
| --- a/chrome/browser/sync_file_system/drive_file_sync_service.cc
|
| +++ b/chrome/browser/sync_file_system/drive_file_sync_service.cc
|
| @@ -18,9 +18,9 @@
|
| #include "base/values.h"
|
| #include "chrome/browser/extensions/extension_service.h"
|
| #include "chrome/browser/extensions/extension_system.h"
|
| +#include "chrome/browser/invalidation_service.h"
|
| +#include "chrome/browser/invalidation_service_factory.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| -#include "chrome/browser/sync/profile_sync_service.h"
|
| -#include "chrome/browser/sync/profile_sync_service_factory.h"
|
| #include "chrome/browser/sync_file_system/conflict_resolution_policy.h"
|
| #include "chrome/browser/sync_file_system/drive_file_sync_client.h"
|
| #include "chrome/browser/sync_file_system/drive_file_sync_util.h"
|
| @@ -331,9 +331,9 @@ DriveFileSyncService::~DriveFileSyncService() {
|
| token_.reset();
|
|
|
| // Unregister for Drive notifications.
|
| - ProfileSyncService* profile_sync_service =
|
| - ProfileSyncServiceFactory::GetForProfile(profile_);
|
| - if (!profile_sync_service || !push_notification_registered_) {
|
| + InvalidationService* invalidation_service =
|
| + InvalidationServiceFactory::GetForProfile(profile_);
|
| + if (!invalidation_service || !push_notification_registered_) {
|
| return;
|
| }
|
|
|
| @@ -343,9 +343,9 @@ DriveFileSyncService::~DriveFileSyncService() {
|
| // Once DriveSystemService gets started / stopped at runtime, this ID needs to
|
| // be unregistered *before* the handler is unregistered
|
| // as ID persists across browser restarts.
|
| - profile_sync_service->UpdateRegisteredInvalidationIds(
|
| + invalidation_service->UpdateRegisteredInvalidationIds(
|
| this, syncer::ObjectIdSet());
|
| - profile_sync_service->UnregisterInvalidationHandler(this);
|
| + invalidation_service->UnregisterInvalidationHandler(this);
|
| }
|
|
|
| // static
|
| @@ -2372,19 +2372,19 @@ void DriveFileSyncService::RegisterDriveNotifications() {
|
| if (!IsDriveNotificationSupported() || push_notification_registered_)
|
| return;
|
|
|
| - ProfileSyncService* profile_sync_service =
|
| - ProfileSyncServiceFactory::GetForProfile(profile_);
|
| - if (!profile_sync_service)
|
| + InvalidationService* invalidation_service =
|
| + InvalidationServiceFactory::GetForProfile(profile_);
|
| + if (!invalidation_service)
|
| return;
|
|
|
| - profile_sync_service->RegisterInvalidationHandler(this);
|
| + invalidation_service->RegisterInvalidationHandler(this);
|
| syncer::ObjectIdSet ids;
|
| ids.insert(invalidation::ObjectId(
|
| ipc::invalidation::ObjectSource::COSMO_CHANGELOG,
|
| kDriveInvalidationObjectId));
|
| - profile_sync_service->UpdateRegisteredInvalidationIds(this, ids);
|
| + invalidation_service->UpdateRegisteredInvalidationIds(this, ids);
|
| push_notification_registered_ = true;
|
| - SetPushNotificationEnabled(profile_sync_service->GetInvalidatorState());
|
| + SetPushNotificationEnabled(invalidation_service->GetInvalidatorState());
|
| }
|
|
|
| void DriveFileSyncService::SetPushNotificationEnabled(
|
|
|