| 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 CHROME_BROWSER_SERVICES_GCM_FAKE_GCM_PROFILE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SERVICES_GCM_FAKE_GCM_PROFILE_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SERVICES_GCM_FAKE_GCM_PROFILE_SERVICE_H_ | 6 #define CHROME_BROWSER_SERVICES_GCM_FAKE_GCM_PROFILE_SERVICE_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 } | 57 } |
| 58 | 58 |
| 59 void set_collect(bool collect) { | 59 void set_collect(bool collect) { |
| 60 collect_ = collect; | 60 collect_ = collect; |
| 61 } | 61 } |
| 62 | 62 |
| 63 private: | 63 private: |
| 64 // Indicates whether the service will collect paramters of the calls for | 64 // Indicates whether the service will collect paramters of the calls for |
| 65 // furter verification in tests. | 65 // furter verification in tests. |
| 66 bool collect_; | 66 bool collect_; |
| 67 // Used to give each registration a unique registration id. Does not decrease |
| 68 // when unregister is called. |
| 69 int registration_count_; |
| 67 std::string last_registered_app_id_; | 70 std::string last_registered_app_id_; |
| 68 std::vector<std::string> last_registered_sender_ids_; | 71 std::vector<std::string> last_registered_sender_ids_; |
| 69 std::list<GCMClient::Result> unregister_responses_; | 72 std::list<GCMClient::Result> unregister_responses_; |
| 70 GCMClient::OutgoingMessage last_sent_message_; | 73 GCMClient::OutgoingMessage last_sent_message_; |
| 71 std::string last_receiver_id_; | 74 std::string last_receiver_id_; |
| 72 UnregisterCallback unregister_callback_; | 75 UnregisterCallback unregister_callback_; |
| 73 | 76 |
| 74 DISALLOW_COPY_AND_ASSIGN(FakeGCMProfileService); | 77 DISALLOW_COPY_AND_ASSIGN(FakeGCMProfileService); |
| 75 }; | 78 }; |
| 76 | 79 |
| 77 } // namespace gcm | 80 } // namespace gcm |
| 78 | 81 |
| 79 #endif // CHROME_BROWSER_SERVICES_GCM_FAKE_GCM_PROFILE_SERVICE_H_ | 82 #endif // CHROME_BROWSER_SERVICES_GCM_FAKE_GCM_PROFILE_SERVICE_H_ |
| OLD | NEW |