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

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

Issue 409883006: GCM: D-Bus methods for wake-on-packet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 6 years, 4 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 e431d8dcb56063034908d189293b21ce40727e17..714228d5fedd7ccb4751fb851a07b9e0ef8db9de 100644
--- a/chrome/browser/services/gcm/gcm_profile_service.cc
+++ b/chrome/browser/services/gcm/gcm_profile_service.cc
@@ -14,6 +14,9 @@
#include "components/gcm_driver/gcm_driver_android.h"
#else
#include "base/files/file_path.h"
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/services/gcm/chromeos_gcm_app_handler.h"
+#endif
#include "chrome/browser/services/gcm/gcm_desktop_utils.h"
#include "chrome/browser/signin/profile_identity_provider.h"
#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
@@ -121,6 +124,11 @@ GCMProfileService::GCMProfileService(
profile_->GetPath().Append(chrome::kGCMStoreDirname),
profile_->GetRequestContext());
+#ifdef CHROMEOS
+ chromeos_app_handler_ = new gcm::ChromeOSGCMAppHandler();
+ driver_->AddAppHandler("com.google.chrome.chromeos", chromeos_app_handler_);
fgorski 2014/08/26 22:26:08 chromeos_app_handler_.reset(new gcm::ChromeOSGCMAp
Luigi Semenzato 2014/09/05 18:02:33 Done.
+#endif
+
identity_observer_.reset(new IdentityObserver(profile, driver_.get()));
}
#endif // defined(OS_ANDROID)
@@ -160,6 +168,9 @@ void GCMProfileService::Shutdown() {
driver_->Shutdown();
driver_.reset();
}
+#ifdef CHROMEOS
+ delete chromeos_app_handler_;
fgorski 2014/08/26 22:26:08 driver_->RemoveAppHandler(kGCMChromeOSAppHandlerId
Luigi Semenzato 2014/09/05 18:02:33 Done.
+#endif
}
std::string GCMProfileService::SignedInUserName() const {

Powered by Google App Engine
This is Rietveld 408576698