Index: chrome/browser/services/gcm/gcm_service.cc |
diff --git a/chrome/browser/services/gcm/gcm_service.cc b/chrome/browser/services/gcm/gcm_service.cc |
index 59f18ef3062b5e68be269b5f9b77ff1a8743d3a8..6b515d4f786529c8de5aa5c53c24b8030a23fc61 100644 |
--- a/chrome/browser/services/gcm/gcm_service.cc |
+++ b/chrome/browser/services/gcm/gcm_service.cc |
@@ -472,7 +472,7 @@ void GCMService::RemoveAppHandler(const std::string& app_id) { |
void GCMService::Register(const std::string& app_id, |
const std::vector<std::string>& sender_ids, |
- RegisterCallback callback) { |
+ const RegisterCallback& callback) { |
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
DCHECK(!app_id.empty()); |
DCHECK(!sender_ids.empty()); |
@@ -528,7 +528,7 @@ void GCMService::DoRegister(const std::string& app_id, |
} |
void GCMService::Unregister(const std::string& app_id, |
- UnregisterCallback callback) { |
+ const UnregisterCallback& callback) { |
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
DCHECK(!app_id.empty()); |
DCHECK(!callback.is_null()); |
@@ -575,7 +575,7 @@ void GCMService::DoUnregister(const std::string& app_id) { |
void GCMService::Send(const std::string& app_id, |
const std::string& receiver_id, |
const GCMClient::OutgoingMessage& message, |
- SendCallback callback) { |
+ const SendCallback& callback) { |
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
DCHECK(!app_id.empty()); |
DCHECK(!receiver_id.empty()); |
@@ -638,7 +638,7 @@ bool GCMService::IsGCMClientReady() const { |
return gcm_client_ready_; |
} |
-void GCMService::GetGCMStatistics(GetGCMStatisticsCallback callback, |
+void GCMService::GetGCMStatistics(const GetGCMStatisticsCallback& callback, |
bool clear_logs) { |
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
DCHECK(!callback.is_null()); |
@@ -652,7 +652,7 @@ void GCMService::GetGCMStatistics(GetGCMStatisticsCallback callback, |
clear_logs)); |
} |
-void GCMService::SetGCMRecording(GetGCMStatisticsCallback callback, |
+void GCMService::SetGCMRecording(const GetGCMStatisticsCallback& callback, |
bool recording) { |
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
@@ -849,10 +849,10 @@ GCMAppHandler* GCMService::GetAppHandler(const std::string& app_id) { |
return iter == app_handlers_.end() ? &default_app_handler_ : iter->second; |
} |
-void GCMService::GetGCMStatisticsFinished( |
- GCMClient::GCMStatistics stats) { |
+void GCMService::GetGCMStatisticsFinished(GCMClient::GCMStatistics stats) { |
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
- request_gcm_statistics_callback_.Run(stats); |
+ if (!request_gcm_statistics_callback_.is_null()) |
+ request_gcm_statistics_callback_.Run(stats); |
} |
Roger Tawa OOO till Jul 10th
2014/05/09 11:51:00
A lot of crashes were reported yesterday about thi
Ilya Sherman
2014/05/09 20:16:56
Sorry, this was an unrelated change that I acciden
|
} // namespace gcm |