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

Side by Side Diff: chrome/browser/services/gcm/gcm_service.cc

Issue 276833003: [GCM] Don't attempt to run a null callback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698