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

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

Issue 270873002: Extract GCMClient data types into separate gcm_types.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Reupload Created 6 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
Index: chrome/browser/services/gcm/fake_gcm_profile_service.cc
diff --git a/chrome/browser/services/gcm/fake_gcm_profile_service.cc b/chrome/browser/services/gcm/fake_gcm_profile_service.cc
index ef9e39d5f754cedfb564365517b7f02d5569dd33..a24b74b4df9732bc47f963da01a7d0e3e50abfeb 100644
--- a/chrome/browser/services/gcm/fake_gcm_profile_service.cc
+++ b/chrome/browser/services/gcm/fake_gcm_profile_service.cc
@@ -45,7 +45,7 @@ void FakeGCMProfileService::RegisterFinished(
last_registered_sender_ids_ = sender_ids;
}
- callback.Run(base::UintToString(sender_ids.size()), GCMClient::SUCCESS);
+ callback.Run(base::UintToString(sender_ids.size()), RESULT_SUCCESS);
}
void FakeGCMProfileService::Unregister(const std::string& app_id,
@@ -56,7 +56,7 @@ void FakeGCMProfileService::Unregister(const std::string& app_id,
void FakeGCMProfileService::Send(const std::string& app_id,
const std::string& receiver_id,
- const GCMClient::OutgoingMessage& message,
+ const OutgoingMessage& message,
SendCallback callback) {
base::MessageLoop::current()->PostTask(
FROM_HERE,
@@ -71,25 +71,25 @@ void FakeGCMProfileService::Send(const std::string& app_id,
void FakeGCMProfileService::SendFinished(
const std::string& app_id,
const std::string& receiver_id,
- const GCMClient::OutgoingMessage& message,
+ const OutgoingMessage& message,
SendCallback callback) {
if (collect_) {
last_sent_message_ = message;
last_receiver_id_ = receiver_id;
}
- callback.Run(message.id, GCMClient::SUCCESS);
+ callback.Run(message.id, RESULT_SUCCESS);
}
void FakeGCMProfileService::AddExpectedUnregisterResponse(
- GCMClient::Result result) {
+ Result result) {
unregister_responses_.push_back(result);
}
-GCMClient::Result FakeGCMProfileService::GetNextExpectedUnregisterResponse() {
+Result FakeGCMProfileService::GetNextExpectedUnregisterResponse() {
if (unregister_responses_.empty())
- return GCMClient::SUCCESS;
- GCMClient::Result response = *unregister_responses_.begin();
+ return RESULT_SUCCESS;
+ Result response = *unregister_responses_.begin();
unregister_responses_.erase(unregister_responses_.begin());
return response;
}
« no previous file with comments | « chrome/browser/services/gcm/fake_gcm_profile_service.h ('k') | chrome/browser/services/gcm/gcm_app_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698