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

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

Issue 1259613002: Revert of Hook up the Push API with GCM's new ability to own encryption keys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gcm-encryption
Patch Set: Created 5 years, 5 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/fake_gcm_profile_service.h" 5 #include "chrome/browser/services/gcm/fake_gcm_profile_service.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/format_macros.h" 8 #include "base/format_macros.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 const std::string& receiver_id, 44 const std::string& receiver_id,
45 const OutgoingMessage& message) override; 45 const OutgoingMessage& message) override;
46 46
47 private: 47 private:
48 FakeGCMProfileService* service_; 48 FakeGCMProfileService* service_;
49 49
50 DISALLOW_COPY_AND_ASSIGN(CustomFakeGCMDriver); 50 DISALLOW_COPY_AND_ASSIGN(CustomFakeGCMDriver);
51 }; 51 };
52 52
53 CustomFakeGCMDriver::CustomFakeGCMDriver(FakeGCMProfileService* service) 53 CustomFakeGCMDriver::CustomFakeGCMDriver(FakeGCMProfileService* service)
54 : FakeGCMDriver(base::ThreadTaskRunnerHandle::Get()), 54 : service_(service) {
55 service_(service) {
56 } 55 }
57 56
58 CustomFakeGCMDriver::~CustomFakeGCMDriver() { 57 CustomFakeGCMDriver::~CustomFakeGCMDriver() {
59 } 58 }
60 59
61 void CustomFakeGCMDriver::RegisterImpl( 60 void CustomFakeGCMDriver::RegisterImpl(
62 const std::string& app_id, 61 const std::string& app_id,
63 const std::vector<std::string>& sender_ids) { 62 const std::vector<std::string>& sender_ids) {
64 base::ThreadTaskRunnerHandle::Get()->PostTask( 63 base::ThreadTaskRunnerHandle::Get()->PostTask(
65 FROM_HERE, base::Bind(&FakeGCMProfileService::RegisterFinished, 64 FROM_HERE, base::Bind(&FakeGCMProfileService::RegisterFinished,
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 GCMClient::Result result) { 168 GCMClient::Result result) {
170 unregister_responses_.push_back(result); 169 unregister_responses_.push_back(result);
171 } 170 }
172 171
173 void FakeGCMProfileService::SetUnregisterCallback( 172 void FakeGCMProfileService::SetUnregisterCallback(
174 const UnregisterCallback& callback) { 173 const UnregisterCallback& callback) {
175 unregister_callback_ = callback; 174 unregister_callback_ = callback;
176 } 175 }
177 176
178 } // namespace gcm 177 } // namespace gcm
OLDNEW
« no previous file with comments | « chrome/browser/push_messaging/push_messaging_service_impl.cc ('k') | chrome/browser/services/gcm/gcm_profile_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698