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

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

Issue 931113003: [Push] Use proper accessors for PushMessagingApplicationId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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
« no previous file with comments | « chrome/browser/services/gcm/push_messaging_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a3ad6a2e54c9539da348522329e47ba4776519b0..fb7d8cded3ea6e13b0da733e8eb19932ada6e7b0 100644
--- a/chrome/browser/services/gcm/push_messaging_service_impl.cc
+++ b/chrome/browser/services/gcm/push_messaging_service_impl.cc
@@ -191,9 +191,9 @@ void PushMessagingServiceImpl::OnMessage(
return;
}
// Drop message and unregister if |origin| has lost push permission.
- if (!HasPermission(application_id.origin)) {
- DeliverMessageCallback(app_id, application_id.origin,
- application_id.service_worker_registration_id,
+ if (!HasPermission(application_id.origin())) {
+ DeliverMessageCallback(app_id, application_id.origin(),
+ application_id.service_worker_registration_id(),
message,
content::PUSH_DELIVERY_STATUS_PERMISSION_DENIED);
return;
@@ -225,13 +225,13 @@ void PushMessagingServiceImpl::OnMessage(
content::BrowserContext::DeliverPushMessage(
profile_,
- application_id.origin,
- application_id.service_worker_registration_id,
+ application_id.origin(),
+ application_id.service_worker_registration_id(),
data,
base::Bind(&PushMessagingServiceImpl::DeliverMessageCallback,
weak_factory_.GetWeakPtr(),
- application_id.app_id_guid, application_id.origin,
- application_id.service_worker_registration_id, message));
+ application_id.app_id_guid(), application_id.origin(),
+ application_id.service_worker_registration_id(), message));
}
void PushMessagingServiceImpl::SetProfileForTesting(Profile* profile) {
@@ -550,7 +550,7 @@ void PushMessagingServiceImpl::RegisterFromWorker(
IncreasePushRegistrationCount(1, true /* is_pending */);
std::vector<std::string> sender_ids(1, sender_id);
gcm_profile_service_->driver()->Register(
- application_id.app_id_guid, sender_ids,
+ application_id.app_id_guid(), sender_ids,
base::Bind(&PushMessagingServiceImpl::DidRegister,
weak_factory_.GetWeakPtr(),
application_id, register_callback));
@@ -607,7 +607,7 @@ void PushMessagingServiceImpl::DidRequestPermission(
IncreasePushRegistrationCount(1, true /* is_pending */);
std::vector<std::string> sender_ids(1, sender_id);
gcm_profile_service_->driver()->Register(
- application_id.app_id_guid,
+ application_id.app_id_guid(),
sender_ids,
base::Bind(&PushMessagingServiceImpl::DidRegister,
weak_factory_.GetWeakPtr(),
@@ -629,7 +629,7 @@ void PushMessagingServiceImpl::Unregister(
return;
}
- Unregister(application_id.app_id_guid, retry_on_failure, callback);
+ Unregister(application_id.app_id_guid(), retry_on_failure, callback);
}
void PushMessagingServiceImpl::Unregister(
« no previous file with comments | « chrome/browser/services/gcm/push_messaging_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698