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

Side by Side Diff: google_apis/gcm/engine/mcs_client_unittest.cc

Issue 745123002: Link GCM heartbeat with wake on wifi preference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix missing include 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
« no previous file with comments | « google_apis/gcm/engine/mcs_client.cc ('k') | google_apis/gcm/tools/mcs_probe.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 #include "google_apis/gcm/engine/mcs_client.h" 5 #include "google_apis/gcm/engine/mcs_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 return MCSMessage(kDataMessageStanzaTag, data_message); 67 return MCSMessage(kDataMessageStanzaTag, data_message);
68 } 68 }
69 69
70 // MCSClient with overriden exposed persistent id logic. 70 // MCSClient with overriden exposed persistent id logic.
71 class TestMCSClient : public MCSClient { 71 class TestMCSClient : public MCSClient {
72 public: 72 public:
73 TestMCSClient(base::Clock* clock, 73 TestMCSClient(base::Clock* clock,
74 ConnectionFactory* connection_factory, 74 ConnectionFactory* connection_factory,
75 GCMStore* gcm_store, 75 GCMStore* gcm_store,
76 gcm::GCMStatsRecorder* recorder) 76 gcm::GCMStatsRecorder* recorder)
77 : MCSClient("", clock, connection_factory, gcm_store, recorder, 77 : MCSClient("", clock, connection_factory, gcm_store, recorder),
78 make_scoped_ptr(new base::Timer(true, false))),
79 next_id_(0) { 78 next_id_(0) {
80 } 79 }
81 80
82 std::string GetNextPersistentId() override { 81 std::string GetNextPersistentId() override {
83 return base::UintToString(++next_id_); 82 return base::UintToString(++next_id_);
84 } 83 }
85 84
86 private: 85 private:
87 uint32 next_id_; 86 uint32 next_id_;
88 }; 87 };
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
866 865
867 LoginClient(std::vector<std::string>()); 866 LoginClient(std::vector<std::string>());
868 GetFakeHandler()->ExpectOutgoingMessage(message); 867 GetFakeHandler()->ExpectOutgoingMessage(message);
869 GetFakeHandler()->ExpectOutgoingMessage(message2); 868 GetFakeHandler()->ExpectOutgoingMessage(message2);
870 PumpLoop(); 869 PumpLoop();
871 } 870 }
872 871
873 } // namespace 872 } // namespace
874 873
875 } // namespace gcm 874 } // namespace gcm
OLDNEW
« no previous file with comments | « google_apis/gcm/engine/mcs_client.cc ('k') | google_apis/gcm/tools/mcs_probe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698