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

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

Issue 785983002: Have FakeGCMProfileService return different registration IDs each time (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use IntToString instead of UintToString Created 6 years 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
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_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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698