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

Unified Diff: chrome/browser/ui/webui/chromeos/drive_internals_ui.cc

Issue 13891016: Merge ChromeOS and SyncFS XMPP Notification into one class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix includes for windows compile Created 7 years, 8 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/ui/webui/chromeos/drive_internals_ui.cc
diff --git a/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc b/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc
index 4b4d011c3472a4f544e5c15ed78405518f4a1feb..cc23d8c8638d8f66bdede1a0443ed695b9c57f41 100644
--- a/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc
@@ -24,6 +24,8 @@
#include "chrome/browser/google_apis/auth_service.h"
#include "chrome/browser/google_apis/drive_api_parser.h"
#include "chrome/browser/google_apis/drive_api_util.h"
+#include "chrome/browser/google_apis/drive_notification_manager.h"
+#include "chrome/browser/google_apis/drive_notification_manager_factory.h"
#include "chrome/browser/google_apis/drive_service_interface.h"
#include "chrome/browser/google_apis/drive_switches.h"
#include "chrome/browser/google_apis/gdata_errorcode.h"
@@ -514,13 +516,16 @@ void DriveInternalsWebUIHandler::UpdateDeltaUpdateStatusSection() {
void DriveInternalsWebUIHandler::OnGetFilesystemMetadataForDeltaUpdate(
const drive::DriveFileSystemMetadata& metadata) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- drive::DriveSystemService* const system_service = GetSystemService();
- if (!system_service)
+ Profile* profile = Profile::FromWebUI(web_ui());
+ google_apis::DriveNotificationManager* drive_notification_manager =
+ google_apis::DriveNotificationManagerFactory::GetForProfile(profile);
+ if (!drive_notification_manager)
return;
base::DictionaryValue delta_update_status;
- delta_update_status.SetBoolean("push-notification-enabled",
- system_service->PushNotificationEnabled());
+ delta_update_status.SetBoolean(
+ "push-notification-enabled",
+ drive_notification_manager->IsPushNotificationEnabled());
delta_update_status.SetString(
"last-update-check-time",
google_apis::util::FormatTimeAsStringLocaltime(

Powered by Google App Engine
This is Rietveld 408576698