OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/services/gcm/gcm_service.h" | 5 #include "chrome/browser/services/gcm/gcm_service.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 845 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
846 | 846 |
847 std::map<std::string, GCMAppHandler*>::const_iterator iter = | 847 std::map<std::string, GCMAppHandler*>::const_iterator iter = |
848 app_handlers_.find(app_id); | 848 app_handlers_.find(app_id); |
849 return iter == app_handlers_.end() ? &default_app_handler_ : iter->second; | 849 return iter == app_handlers_.end() ? &default_app_handler_ : iter->second; |
850 } | 850 } |
851 | 851 |
852 void GCMService::GetGCMStatisticsFinished( | 852 void GCMService::GetGCMStatisticsFinished( |
853 GCMClient::GCMStatistics stats) { | 853 GCMClient::GCMStatistics stats) { |
854 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); | 854 DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)); |
855 request_gcm_statistics_callback_.Run(stats); | 855 if (!request_gcm_statistics_callback_.is_null()) |
| 856 request_gcm_statistics_callback_.Run(stats); |
856 } | 857 } |
857 | 858 |
858 } // namespace gcm | 859 } // namespace gcm |
OLD | NEW |