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_GCM_FAKE_GCM_PROFILE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_GCM_FAKE_GCM_PROFILE_SERVICE_H_ |
6 #define CHROME_BROWSER_GCM_FAKE_GCM_PROFILE_SERVICE_H_ | 6 #define CHROME_BROWSER_GCM_FAKE_GCM_PROFILE_SERVICE_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
(...skipping 17 matching lines...) Expand all Loading... |
28 // Helper function to be used with | 28 // Helper function to be used with |
29 // KeyedService::SetTestingFactory(). | 29 // KeyedService::SetTestingFactory(). |
30 static std::unique_ptr<KeyedService> Build(content::BrowserContext* context); | 30 static std::unique_ptr<KeyedService> Build(content::BrowserContext* context); |
31 | 31 |
32 explicit FakeGCMProfileService(Profile* profile); | 32 explicit FakeGCMProfileService(Profile* profile); |
33 ~FakeGCMProfileService() override; | 33 ~FakeGCMProfileService() override; |
34 | 34 |
35 void AddExpectedUnregisterResponse(GCMClient::Result result); | 35 void AddExpectedUnregisterResponse(GCMClient::Result result); |
36 | 36 |
37 void DispatchMessage(const std::string& app_id, | 37 void DispatchMessage(const std::string& app_id, |
38 const IncomingMessage& message); | 38 const IncomingMessage& message, |
| 39 const MessageReceiptCallback& optional_receipt_callback); |
39 | 40 |
40 const OutgoingMessage& last_sent_message() const { | 41 const OutgoingMessage& last_sent_message() const { |
41 return last_sent_message_; | 42 return last_sent_message_; |
42 } | 43 } |
43 | 44 |
44 const std::string& last_receiver_id() const { | 45 const std::string& last_receiver_id() const { |
45 return last_receiver_id_; | 46 return last_receiver_id_; |
46 } | 47 } |
47 | 48 |
48 const std::string& last_registered_app_id() const { | 49 const std::string& last_registered_app_id() const { |
(...skipping 24 matching lines...) Expand all Loading... |
73 std::list<GCMClient::Result> unregister_responses_; | 74 std::list<GCMClient::Result> unregister_responses_; |
74 OutgoingMessage last_sent_message_; | 75 OutgoingMessage last_sent_message_; |
75 std::string last_receiver_id_; | 76 std::string last_receiver_id_; |
76 | 77 |
77 DISALLOW_COPY_AND_ASSIGN(FakeGCMProfileService); | 78 DISALLOW_COPY_AND_ASSIGN(FakeGCMProfileService); |
78 }; | 79 }; |
79 | 80 |
80 } // namespace gcm | 81 } // namespace gcm |
81 | 82 |
82 #endif // CHROME_BROWSER_GCM_FAKE_GCM_PROFILE_SERVICE_H_ | 83 #endif // CHROME_BROWSER_GCM_FAKE_GCM_PROFILE_SERVICE_H_ |
OLD | NEW |