| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "sync/notifier/gcm_network_channel.h" |
| 6 |
| 7 #include "base/compiler_specific.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 |
| 10 namespace syncer { |
| 11 namespace { |
| 12 |
| 13 class GCMNetworkChannelTest |
| 14 : public ::testing::Test, |
| 15 public SyncNetworkChannel::Observer { |
| 16 protected: |
| 17 GCMNetworkChannelTest() |
| 18 : gcm_network_channel_(), |
| 19 last_invalidator_state_(DEFAULT_INVALIDATION_ERROR) { |
| 20 gcm_network_channel_.AddObserver(this); |
| 21 gcm_network_channel_.SetMessageReceiver( |
| 22 invalidation::NewPermanentCallback( |
| 23 this, &GCMNetworkChannelTest::OnIncomingMessage)); |
| 24 } |
| 25 |
| 26 virtual ~GCMNetworkChannelTest() { |
| 27 gcm_network_channel_.RemoveObserver(this); |
| 28 } |
| 29 |
| 30 virtual void OnNetworkChannelStateChanged( |
| 31 InvalidatorState invalidator_state) OVERRIDE { |
| 32 } |
| 33 |
| 34 void OnIncomingMessage(std::string incoming_message) { |
| 35 } |
| 36 |
| 37 GCMNetworkChannel gcm_network_channel_; |
| 38 }; |
| 39 |
| 40 } // namespace |
| 41 } // namespace syncer |
| OLD | NEW |