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

Side by Side Diff: components/gcm_driver/instance_id/instance_id.cc

Issue 1128123003: Implement InstanceID API functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test Created 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/gcm_driver/instance_id/instance_id.h" 5 #include "components/gcm_driver/instance_id/instance_id.h"
6 6
7 namespace instance_id { 7 namespace instance_id {
8 8
9 InstanceID::InstanceID(const std::string& app_id) 9 InstanceID::InstanceID(const std::string& app_id)
10 : app_id_(app_id) { 10 : app_id_(app_id) {
11 } 11 }
12 12
13 InstanceID::~InstanceID() { 13 InstanceID::~InstanceID() {
14 } 14 }
15 15
16 void InstanceID::SetTokenRefreshCallback(const TokenRefreshCallback& callback) { 16 void InstanceID::SetTokenRefreshCallback(const TokenRefreshCallback& callback) {
17 token_refresh_callback_ = callback; 17 token_refresh_callback_ = callback;
18 } 18 }
19 19
20 void InstanceID::NotifyTokenRefresh(bool update_id) { 20 void InstanceID::NotifyTokenRefresh(bool update_id) {
21 if (!token_refresh_callback_.is_null()) 21 if (!token_refresh_callback_.is_null())
22 token_refresh_callback_.Run(this, update_id); 22 token_refresh_callback_.Run(app_id_, update_id);
23 } 23 }
24 24
25 } // namespace instance_id 25 } // namespace instance_id
OLDNEW
« no previous file with comments | « components/gcm_driver/instance_id/instance_id.h ('k') | components/gcm_driver/instance_id/instance_id_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698