OLD | NEW |
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 #ifndef GOOGLE_APIS_GCM_ENGINE_FAKE_CONNECTION_HANDLER_H_ | 5 #ifndef GOOGLE_APIS_GCM_ENGINE_FAKE_CONNECTION_HANDLER_H_ |
6 #define GOOGLE_APIS_GCM_ENGINE_FAKE_CONNECTION_HANDLER_H_ | 6 #define GOOGLE_APIS_GCM_ENGINE_FAKE_CONNECTION_HANDLER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
| 10 #include "base/macros.h" |
10 #include "google_apis/gcm/base/mcs_message.h" | 11 #include "google_apis/gcm/base/mcs_message.h" |
11 #include "google_apis/gcm/engine/connection_handler.h" | 12 #include "google_apis/gcm/engine/connection_handler.h" |
12 | 13 |
13 namespace gcm { | 14 namespace gcm { |
14 | 15 |
15 // A fake implementation of a ConnectionHandler that can arbitrarily receive | 16 // A fake implementation of a ConnectionHandler that can arbitrarily receive |
16 // messages and verify expectations for outgoing messages. | 17 // messages and verify expectations for outgoing messages. |
17 class FakeConnectionHandler : public ConnectionHandler { | 18 class FakeConnectionHandler : public ConnectionHandler { |
18 public: | 19 public: |
19 FakeConnectionHandler( | 20 FakeConnectionHandler( |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 76 |
76 // Whether an error was encountered after a successful login. | 77 // Whether an error was encountered after a successful login. |
77 bool had_error_; | 78 bool had_error_; |
78 | 79 |
79 DISALLOW_COPY_AND_ASSIGN(FakeConnectionHandler); | 80 DISALLOW_COPY_AND_ASSIGN(FakeConnectionHandler); |
80 }; | 81 }; |
81 | 82 |
82 } // namespace gcm | 83 } // namespace gcm |
83 | 84 |
84 #endif // GOOGLE_APIS_GCM_ENGINE_FAKE_CONNECTION_HANDLER_H_ | 85 #endif // GOOGLE_APIS_GCM_ENGINE_FAKE_CONNECTION_HANDLER_H_ |
OLD | NEW |