Skip to content

Commit

Permalink
Change to pass by const reference for a couple GCMDriverDesktop methods
Browse files Browse the repository at this point in the history
BUG=none

Review URL: https://codereview.chromium.org/301243019

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274453 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
jianli@chromium.org committed Jun 3, 2014
1 parent dce1d3a commit 2590835
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions components/gcm_driver/gcm_driver_desktop.cc
Original file line number Diff line number Diff line change
Expand Up @@ -746,8 +746,9 @@ void GCMDriverDesktop::SendFinished(const std::string& app_id,
callback.Run(message_id, result);
}

void GCMDriverDesktop::MessageReceived(const std::string& app_id,
GCMClient::IncomingMessage message) {
void GCMDriverDesktop::MessageReceived(
const std::string& app_id,
const GCMClient::IncomingMessage& message) {
DCHECK(ui_thread_->RunsTasksOnCurrentThread());

// Drop the event if signed out.
Expand Down Expand Up @@ -790,7 +791,7 @@ void GCMDriverDesktop::GCMClientReady() {
}

void GCMDriverDesktop::GetGCMStatisticsFinished(
GCMClient::GCMStatistics stats) {
const GCMClient::GCMStatistics& stats) {
DCHECK(ui_thread_->RunsTasksOnCurrentThread());

// Normally request_gcm_statistics_callback_ would not be null.
Expand Down
4 changes: 2 additions & 2 deletions components/gcm_driver/gcm_driver_desktop.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ class GCMDriverDesktop : public GCMDriver, public IdentityProvider::Observer {
const std::string& message_id,
GCMClient::Result result);
void MessageReceived(const std::string& app_id,
GCMClient::IncomingMessage message);
const GCMClient::IncomingMessage& message);
void MessagesDeleted(const std::string& app_id);
void MessageSendError(const std::string& app_id,
const GCMClient::SendErrorDetails& send_error_details);
void GCMClientReady();

void GetGCMStatisticsFinished(GCMClient::GCMStatistics stats);
void GetGCMStatisticsFinished(const GCMClient::GCMStatistics& stats);

// Flag to indicate if GCM is enabled.
bool gcm_enabled_;
Expand Down

0 comments on commit 2590835

Please sign in to comment.