Index: chrome/browser/chromeos/system/ash_system_tray_delegate.cc |
diff --git a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc |
index f4762fe3d5c7c8dd7fabe58e4ff7bf69774af481..0a438ea0b93ec5b0fe2b81fa365cc0aeeb99ae94 100644 |
--- a/chrome/browser/chromeos/system/ash_system_tray_delegate.cc |
+++ b/chrome/browser/chromeos/system/ash_system_tray_delegate.cc |
@@ -53,7 +53,6 @@ |
#include "chrome/browser/chromeos/system/timezone_settings.h" |
#include "chrome/browser/chromeos/system_key_event_listener.h" |
#include "chrome/browser/google_apis/gdata_util.h" |
-#include "chrome/browser/google_apis/operation_registry.h" |
#include "chrome/browser/lifetime/application_lifetime.h" |
#include "chrome/browser/prefs/pref_service.h" |
#include "chrome/browser/profiles/profile_manager.h" |
@@ -78,7 +77,6 @@ |
using gdata::DriveSystemService; |
using gdata::DriveSystemServiceFactory; |
-using gdata::OperationRegistry; |
namespace chromeos { |
@@ -108,10 +106,9 @@ void ExtractIMEInfo(const input_method::InputMethodDescriptor& ime, |
} |
ash::DriveOperationStatusList GetDriveStatusList( |
- const std::vector<OperationRegistry::ProgressStatus>& list) { |
+ const gdata::OperationProgressStatusList& list) { |
ash::DriveOperationStatusList results; |
- for (OperationRegistry::ProgressStatusList::const_iterator it = |
- list.begin(); |
+ for (gdata::OperationProgressStatusList::const_iterator it = list.begin(); |
it != list.end(); ++it) { |
ash::DriveOperationStatus status; |
status.file_path = it->file_path; |
@@ -152,7 +149,7 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, |
public NetworkLibrary::NetworkManagerObserver, |
public NetworkLibrary::NetworkObserver, |
public NetworkLibrary::CellularDataPlanObserver, |
- public gdata::OperationRegistry::Observer, |
+ public gdata::DriveServiceObserver, |
public content::NotificationObserver, |
public input_method::InputMethodManager::Observer, |
public system::TimezoneSettings::Observer, |
@@ -242,8 +239,7 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, |
// Stop observing gdata operations. |
DriveSystemService* system_service = FindDriveSystemService(); |
if (system_service) { |
- system_service->drive_service()->operation_registry()-> |
- RemoveObserver(this); |
+ system_service->drive_service()->RemoveObserver(this); |
} |
} |
@@ -449,8 +445,7 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, |
if (!system_service) |
return; |
- system_service->drive_service()->operation_registry()->CancelForFilePath( |
- file_path); |
+ system_service->drive_service()->CancelForFilePath(file_path); |
} |
virtual void GetDriveOperationStatusList( |
@@ -460,8 +455,7 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, |
return; |
*list = GetDriveStatusList( |
- system_service->drive_service()->operation_registry()-> |
- GetProgressStatusList()); |
+ system_service->drive_service()->GetProgressStatusList()); |
} |
@@ -725,7 +719,7 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, |
if (!system_service) |
return; |
- system_service->drive_service()->operation_registry()->AddObserver(this); |
+ system_service->drive_service()->AddObserver(this); |
} |
void UpdateClockType(PrefService* service) { |
@@ -1096,9 +1090,9 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, |
NotifyRefreshIME(false); |
} |
- // gdata::OperationRegistry::Observer overrides. |
+ // gdata::DriveServiceObserver overrides. |
virtual void OnProgressUpdate( |
- const OperationRegistry::ProgressStatusList& list) { |
+ const gdata::OperationProgressStatusList& list) OVERRIDE { |
std::vector<ash::DriveOperationStatus> ui_list = GetDriveStatusList(list); |
NotifyRefreshDrive(ui_list); |
@@ -1107,15 +1101,11 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, |
// raise events that will let us properly clear the uber tray state. |
if (list.size() > 0) { |
bool has_in_progress_items = false; |
- for (OperationRegistry::ProgressStatusList::const_iterator it = |
- list.begin(); |
+ for (gdata::OperationProgressStatusList::const_iterator it = list.begin(); |
it != list.end(); ++it) { |
- if (it->transfer_state == |
- OperationRegistry::OPERATION_STARTED || |
- it->transfer_state == |
- OperationRegistry::OPERATION_IN_PROGRESS || |
- it->transfer_state == |
- OperationRegistry::OPERATION_SUSPENDED) { |
+ if (it->transfer_state == gdata::OPERATION_STARTED || |
+ it->transfer_state == gdata::OPERATION_IN_PROGRESS || |
+ it->transfer_state == gdata::OPERATION_SUSPENDED) { |
has_in_progress_items = true; |
break; |
} |
@@ -1142,8 +1132,7 @@ class SystemTrayDelegate : public ash::SystemTrayDelegate, |
if (!system_service) |
return; |
- OnProgressUpdate(system_service->drive_service()->operation_registry()-> |
- GetProgressStatusList()); |
+ OnProgressUpdate(system_service->drive_service()->GetProgressStatusList()); |
} |
DriveSystemService* FindDriveSystemService() { |