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

Unified Diff: google_apis/gcm/gcm_client.cc

Issue 135903005: [GCM] Reland: Introduce GCMClientFactory to create GCMClient for GCMProfileService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to land Created 6 years, 11 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 | « google_apis/gcm/gcm_client.h ('k') | google_apis/gcm/gcm_client_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/gcm/gcm_client.cc
diff --git a/google_apis/gcm/gcm_client.cc b/google_apis/gcm/gcm_client.cc
index 316e58f822c146dadbddb3abe5e7a7beefda6340..33098f87c5cd9cad1fd5ab4d4d8a42debeaf67b9 100644
--- a/google_apis/gcm/gcm_client.cc
+++ b/google_apis/gcm/gcm_client.cc
@@ -4,20 +4,8 @@
#include "google_apis/gcm/gcm_client.h"
-#include "base/lazy_instance.h"
-#include "google_apis/gcm/gcm_client_impl.h"
-
namespace gcm {
-namespace {
-
-static base::LazyInstance<GCMClientImpl>::Leaky g_gcm_client =
- LAZY_INSTANCE_INITIALIZER;
-static GCMClient::TestingFactoryFunction g_gcm_client_factory = NULL;
-static GCMClient* g_gcm_client_override = NULL;
-
-} // namespace
-
GCMClient::OutgoingMessage::OutgoingMessage()
: time_to_live(0) {
}
@@ -31,24 +19,10 @@ GCMClient::IncomingMessage::IncomingMessage() {
GCMClient::IncomingMessage::~IncomingMessage() {
}
-// static
-GCMClient* GCMClient::Get() {
- if (g_gcm_client_override)
- return g_gcm_client_override;
- if (g_gcm_client_factory) {
- g_gcm_client_override = g_gcm_client_factory();
- return g_gcm_client_override;
- }
- return g_gcm_client.Pointer();
+GCMClient::GCMClient() {
}
-// static
-void GCMClient::SetTestingFactory(TestingFactoryFunction factory) {
- if (g_gcm_client_override) {
- delete g_gcm_client_override;
- g_gcm_client_override = NULL;
- }
- g_gcm_client_factory = factory;
+GCMClient::~GCMClient() {
}
} // namespace gcm
« no previous file with comments | « google_apis/gcm/gcm_client.h ('k') | google_apis/gcm/gcm_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698