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

Side by Side Diff: chrome/browser/gcm/fake_gcm_profile_service.h

Issue 2578583002: Provide a mechanism for the GCM driver to send message receipts to GCM.
Patch Set: Fix issue with rebase Created 3 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/gcm/fake_gcm_profile_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/gcm/fake_gcm_profile_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698