OLD | NEW |
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/fake_gcm_driver_for_instance_id.h" | 5 #include "components/gcm_driver/instance_id/fake_gcm_driver_for_instance_id.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/rand_util.h" | 9 #include "base/rand_util.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
11 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
12 #include "base/thread_task_runner_handle.h" | 12 #include "base/threading/thread_task_runner_handle.h" |
13 #include "components/gcm_driver/gcm_client.h" | 13 #include "components/gcm_driver/gcm_client.h" |
14 | 14 |
15 namespace instance_id { | 15 namespace instance_id { |
16 | 16 |
17 FakeGCMDriverForInstanceID::FakeGCMDriverForInstanceID() { | 17 FakeGCMDriverForInstanceID::FakeGCMDriverForInstanceID() { |
18 } | 18 } |
19 | 19 |
20 FakeGCMDriverForInstanceID::~FakeGCMDriverForInstanceID() { | 20 FakeGCMDriverForInstanceID::~FakeGCMDriverForInstanceID() { |
21 } | 21 } |
22 | 22 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 const std::string& authorized_entity, | 76 const std::string& authorized_entity, |
77 const std::string& scope, | 77 const std::string& scope, |
78 const DeleteTokenCallback& callback) { | 78 const DeleteTokenCallback& callback) { |
79 std::string key = app_id + authorized_entity + scope; | 79 std::string key = app_id + authorized_entity + scope; |
80 tokens_.erase(key); | 80 tokens_.erase(key); |
81 base::ThreadTaskRunnerHandle::Get()->PostTask( | 81 base::ThreadTaskRunnerHandle::Get()->PostTask( |
82 FROM_HERE, base::Bind(callback, gcm::GCMClient::SUCCESS)); | 82 FROM_HERE, base::Bind(callback, gcm::GCMClient::SUCCESS)); |
83 } | 83 } |
84 | 84 |
85 } // namespace instance_id | 85 } // namespace instance_id |
OLD | NEW |