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

Unified Diff: chrome/browser/services/gcm/gcm_profile_service.cc

Issue 176823009: Show device information in chrome://gcm-internals page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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/services/gcm/gcm_profile_service.cc
diff --git a/chrome/browser/services/gcm/gcm_profile_service.cc b/chrome/browser/services/gcm/gcm_profile_service.cc
index 3f81a97eb0005fcda0f85a4e5bfa7af6f7c6d715..ff3eb81e132af0c40429bf0c48414d9b9d957062 100644
--- a/chrome/browser/services/gcm/gcm_profile_service.cc
+++ b/chrome/browser/services/gcm/gcm_profile_service.cc
@@ -272,6 +272,7 @@ class GCMProfileService::IOWorker
void Send(const std::string& app_id,
const std::string& receiver_id,
const GCMClient::OutgoingMessage& message);
+ GCMClient* GetGCMClient();
private:
friend class base::RefCountedThreadSafe<IOWorker>;
@@ -454,6 +455,10 @@ void GCMProfileService::IOWorker::Send(
gcm_client_->Send(app_id, receiver_id, message);
}
+GCMClient* GCMProfileService::IOWorker::GetGCMClient() {
+ return gcm_client_.get();
+}
+
GCMProfileService::RegistrationInfo::RegistrationInfo() {
}
@@ -680,6 +685,14 @@ void GCMProfileService::DoSend(const std::string& app_id,
message));
}
+bool GCMProfileService::IsSignedIn() {
+ return !username_.empty();
+}
+
+GCMClient* GCMProfileService::GetGCMClient() {
+ return io_worker_->GetGCMClient();
+}
+
void GCMProfileService::Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) {

Powered by Google App Engine
This is Rietveld 408576698