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

Unified Diff: chrome/browser/ui/webui/gcm_internals_ui.cc

Issue 286213003: Make GCMProfileService own GCMDriver, instead of deriving from it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync Created 6 years, 7 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
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | google_apis/gcm/gcm_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/gcm_internals_ui.cc
diff --git a/chrome/browser/ui/webui/gcm_internals_ui.cc b/chrome/browser/ui/webui/gcm_internals_ui.cc
index bc560a8a15702802302e122055b8aeef50b96c5c..7f63accb06ae0a4ba371969c60a7b14530e631be 100644
--- a/chrome/browser/ui/webui/gcm_internals_ui.cc
+++ b/chrome/browser/ui/webui/gcm_internals_ui.cc
@@ -14,6 +14,7 @@
#include "base/strings/stringprintf.h"
#include "base/values.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/services/gcm/gcm_driver.h"
#include "chrome/browser/services/gcm/gcm_profile_service.h"
#include "chrome/browser/services/gcm/gcm_profile_service_factory.h"
#include "chrome/common/url_constants.h"
@@ -161,9 +162,9 @@ void GcmInternalsUIMessageHandler::ReturnResults(
gcm::GCMProfileService::GetGCMEnabledState(profile)));
if (profile_service) {
device_info->SetString("signedInUserName",
- profile_service->SignedInUserName());
+ profile_service->driver()->SignedInUserName());
device_info->SetBoolean("gcmClientReady",
- profile_service->IsGCMClientReady());
+ profile_service->driver()->IsGCMClientReady());
}
if (stats) {
results.SetBoolean("isRecording", stats->is_recording);
@@ -234,10 +235,10 @@ void GcmInternalsUIMessageHandler::RequestAllInfo(
if (!profile_service) {
ReturnResults(profile, NULL, NULL);
- } else if (profile_service->SignedInUserName().empty()) {
+ } else if (profile_service->driver()->SignedInUserName().empty()) {
ReturnResults(profile, profile_service, NULL);
} else {
- profile_service->GetGCMStatistics(
+ profile_service->driver()->GetGCMStatistics(
base::Bind(&GcmInternalsUIMessageHandler::RequestGCMStatisticsFinished,
weak_ptr_factory_.GetWeakPtr()),
clear_logs);
@@ -263,12 +264,12 @@ void GcmInternalsUIMessageHandler::SetRecording(const base::ListValue* args) {
ReturnResults(profile, NULL, NULL);
return;
}
- if (profile_service->SignedInUserName().empty()) {
+ if (profile_service->driver()->SignedInUserName().empty()) {
ReturnResults(profile, profile_service, NULL);
return;
}
// Get fresh stats after changing recording setting.
- profile_service->SetGCMRecording(
+ profile_service->driver()->SetGCMRecording(
base::Bind(
&GcmInternalsUIMessageHandler::RequestGCMStatisticsFinished,
weak_ptr_factory_.GetWeakPtr()),
« no previous file with comments | « chrome/browser/sync/profile_sync_service.cc ('k') | google_apis/gcm/gcm_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698