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

Side by Side Diff: components/gcm_driver/gcm_client_impl_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 | « components/gcm_driver/gcm_client_impl.cc ('k') | components/gcm_driver/gcm_driver.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/gcm_driver/gcm_client_impl.h" 5 #include "components/gcm_driver/gcm_client_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 uint64 last_android_id_; 109 uint64 last_android_id_;
110 uint64 last_security_token_; 110 uint64 last_security_token_;
111 uint8 last_message_tag_; 111 uint8 last_message_tag_;
112 mcs_proto::DataMessageStanza last_data_message_stanza_; 112 mcs_proto::DataMessageStanza last_data_message_stanza_;
113 }; 113 };
114 114
115 FakeMCSClient::FakeMCSClient(base::Clock* clock, 115 FakeMCSClient::FakeMCSClient(base::Clock* clock,
116 ConnectionFactory* connection_factory, 116 ConnectionFactory* connection_factory,
117 GCMStore* gcm_store, 117 GCMStore* gcm_store,
118 GCMStatsRecorder* recorder) 118 GCMStatsRecorder* recorder)
119 : MCSClient("", clock, connection_factory, gcm_store, recorder, 119 : MCSClient("", clock, connection_factory, gcm_store, recorder),
120 make_scoped_ptr(new base::Timer(true, false))),
121 last_android_id_(0u), 120 last_android_id_(0u),
122 last_security_token_(0u), 121 last_security_token_(0u),
123 last_message_tag_(kNumProtoTypes) { 122 last_message_tag_(kNumProtoTypes) {
124 } 123 }
125 124
126 FakeMCSClient::~FakeMCSClient() { 125 FakeMCSClient::~FakeMCSClient() {
127 } 126 }
128 127
129 void FakeMCSClient::Login(uint64 android_id, uint64 security_token) { 128 void FakeMCSClient::Login(uint64 android_id, uint64 security_token) {
130 last_android_id_ = android_id; 129 last_android_id_ = android_id;
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 ASSERT_EQ(1UL, last_account_mappings().size()); 1106 ASSERT_EQ(1UL, last_account_mappings().size());
1108 const AccountMapping& actual_mapping = last_account_mappings()[0]; 1107 const AccountMapping& actual_mapping = last_account_mappings()[0];
1109 EXPECT_EQ(expected_mapping.account_id, actual_mapping.account_id); 1108 EXPECT_EQ(expected_mapping.account_id, actual_mapping.account_id);
1110 EXPECT_EQ(expected_mapping.email, actual_mapping.email); 1109 EXPECT_EQ(expected_mapping.email, actual_mapping.email);
1111 EXPECT_EQ(expected_mapping.status, actual_mapping.status); 1110 EXPECT_EQ(expected_mapping.status, actual_mapping.status);
1112 EXPECT_EQ(expected_mapping.status_change_timestamp, 1111 EXPECT_EQ(expected_mapping.status_change_timestamp,
1113 actual_mapping.status_change_timestamp); 1112 actual_mapping.status_change_timestamp);
1114 } 1113 }
1115 1114
1116 } // namespace gcm 1115 } // namespace gcm
OLDNEW
« no previous file with comments | « components/gcm_driver/gcm_client_impl.cc ('k') | components/gcm_driver/gcm_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698