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

Unified Diff: chrome/service/cloud_print/cloud_print_proxy_backend.cc

Issue 10413014: [Sync] Turn notifier::PushClient into an interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to head Created 8 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 | « no previous file | jingle/jingle.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/service/cloud_print/cloud_print_proxy_backend.cc
diff --git a/chrome/service/cloud_print/cloud_print_proxy_backend.cc b/chrome/service/cloud_print/cloud_print_proxy_backend.cc
index e318c1a1f41a207884729571185959b124cbad05..e14e33b3a584abe4ee3c9c49de4389f8a4b49449 100644
--- a/chrome/service/cloud_print/cloud_print_proxy_backend.cc
+++ b/chrome/service/cloud_print/cloud_print_proxy_backend.cc
@@ -26,6 +26,7 @@
#include "grit/generated_resources.h"
#include "jingle/notifier/base/notifier_options.h"
#include "jingle/notifier/listener/push_client.h"
+#include "jingle/notifier/listener/push_client_observer.h"
#include "ui/base/l10n/l10n_util.h"
// The real guts of CloudPrintProxyBackend, to keep the public client API clean.
@@ -33,7 +34,7 @@ class CloudPrintProxyBackend::Core
: public base::RefCountedThreadSafe<CloudPrintProxyBackend::Core>,
public CloudPrintAuth::Client,
public CloudPrintConnector::Client,
- public notifier::PushClient::Observer {
+ public notifier::PushClientObserver {
public:
// It is OK for print_server_url to be empty. In this case system should
// use system default (local) print server.
@@ -86,7 +87,7 @@ class CloudPrintProxyBackend::Core
// CloudPrintConnector::Client implementation.
virtual void OnAuthFailed() OVERRIDE;
- // notifier::PushClient::Delegate implementation.
+ // notifier::PushClientObserver implementation.
virtual void OnNotificationStateChange(
bool notifications_enabled) OVERRIDE;
virtual void OnIncomingNotification(
@@ -390,7 +391,7 @@ void CloudPrintProxyBackend::Core::InitNotifications(
notifier_options.request_context_getter =
g_service_process->GetServiceURLRequestContextGetter();
notifier_options.auth_mechanism = "X-OAUTH2";
- push_client_.reset(new notifier::PushClient(notifier_options));
+ push_client_ = notifier::PushClient::CreateDefault(notifier_options);
push_client_->AddObserver(this);
notifier::Subscription subscription;
subscription.channel = kCloudPrintPushNotificationsSource;
« no previous file with comments | « no previous file | jingle/jingle.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698