Chromium Code Reviews| Index: chrome/browser/services/gcm/push_messaging_service_impl.cc |
| diff --git a/chrome/browser/services/gcm/push_messaging_service_impl.cc b/chrome/browser/services/gcm/push_messaging_service_impl.cc |
| index ee49c0a12921645e09c7dcb76adb53a4cebe77ad..da1351cf20ff1717d11d13e12ecc5affbdf18d2a 100644 |
| --- a/chrome/browser/services/gcm/push_messaging_service_impl.cc |
| +++ b/chrome/browser/services/gcm/push_messaging_service_impl.cc |
| @@ -14,6 +14,7 @@ |
| #include "chrome/browser/services/gcm/gcm_profile_service.h" |
| #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" |
| #include "chrome/browser/services/gcm/push_messaging_application_id.h" |
| +#include "chrome/browser/services/gcm/push_messaging_constants.h" |
| #include "chrome/browser/services/gcm/push_messaging_permission_context.h" |
| #include "chrome/browser/services/gcm/push_messaging_permission_context_factory.h" |
| #include "chrome/common/chrome_switches.h" |
| @@ -233,7 +234,7 @@ void PushMessagingServiceImpl::RegisterEnd( |
| const content::PushMessagingService::RegisterCallback& callback, |
| const std::string& registration_id, |
| content::PushRegistrationStatus status) { |
| - GURL endpoint = GURL("https://android.googleapis.com/gcm/send"); |
| + GURL endpoint = GURL(std::string(kPushMessagingEndpoint)); |
| callback.Run(endpoint, registration_id, status); |
| if (status == content::PUSH_REGISTRATION_STATUS_SUCCESS) { |
| // TODO(johnme): Make sure the pref doesn't get out of sync after crashes. |
| @@ -255,6 +256,10 @@ void PushMessagingServiceImpl::DidRegister( |
| RegisterEnd(callback, registration_id, status); |
| } |
| +void PushMessagingServiceImpl::SetProfileForTesting(Profile* profile) { |
|
Peter Beverloo
2014/10/20 16:35:52
nit: Move this to *before* the DeliverMessageCallb
Michael van Ouwerkerk
2014/10/20 17:06:49
Done.
|
| + profile_ = profile; |
| +} |
| + |
| void PushMessagingServiceImpl::DidRequestPermission( |
| const PushMessagingApplicationId& application_id, |
| const std::string& sender_id, |