diff options
Diffstat (limited to 'components/gcm_driver/instance_id/instance_id.cc')
-rw-r--r-- | components/gcm_driver/instance_id/instance_id.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/components/gcm_driver/instance_id/instance_id.cc b/components/gcm_driver/instance_id/instance_id.cc new file mode 100644 index 0000000..b83b15f --- /dev/null +++ b/components/gcm_driver/instance_id/instance_id.cc @@ -0,0 +1,25 @@ +// Copyright 2015 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/gcm_driver/instance_id/instance_id.h" + +namespace instance_id { + +InstanceID::InstanceID(const std::string& app_id) + : app_id_(app_id) { +} + +InstanceID::~InstanceID() { +} + +void InstanceID::SetTokenRefreshCallback(const TokenRefreshCallback& callback) { + token_refresh_callback_ = callback; +} + +void InstanceID::NotifyTokenRefresh(bool update_id) { + if (!token_refresh_callback_.is_null()) + token_refresh_callback_.Run(this, update_id); +} + +} // namespace instance_id |