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

Side by Side Diff: google_apis/gcm/tools/mcs_probe.cc

Issue 171513004: [GCM] Adding a list of accounts present on the client to checkin request (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix to android test issue Created 6 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 | « google_apis/gcm/gcm_client_impl_unittest.cc ('k') | no next file » | 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 // A standalone tool for testing MCS connections and the MCS client on their 5 // A standalone tool for testing MCS connections and the MCS client on their
6 // own. 6 // own.
7 7
8 #include <cstddef> 8 #include <cstddef>
9 #include <cstdio> 9 #include <cstdio>
10 #include <string> 10 #include <string>
11 #include <vector>
11 12
12 #include "base/at_exit.h" 13 #include "base/at_exit.h"
13 #include "base/command_line.h" 14 #include "base/command_line.h"
14 #include "base/compiler_specific.h" 15 #include "base/compiler_specific.h"
15 #include "base/logging.h" 16 #include "base/logging.h"
16 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
17 #include "base/memory/scoped_ptr.h" 18 #include "base/memory/scoped_ptr.h"
18 #include "base/message_loop/message_loop.h" 19 #include "base/message_loop/message_loop.h"
19 #include "base/run_loop.h" 20 #include "base/run_loop.h"
20 #include "base/strings/string_number_conversions.h" 21 #include "base/strings/string_number_conversions.h"
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 checkin_proto::ChromeBuildProto::PLATFORM_LINUX); 420 checkin_proto::ChromeBuildProto::PLATFORM_LINUX);
420 chrome_build_proto.set_channel( 421 chrome_build_proto.set_channel(
421 checkin_proto::ChromeBuildProto::CHANNEL_CANARY); 422 checkin_proto::ChromeBuildProto::CHANNEL_CANARY);
422 chrome_build_proto.set_chrome_version(kChromeVersion); 423 chrome_build_proto.set_chrome_version(kChromeVersion);
423 checkin_request_.reset(new CheckinRequest( 424 checkin_request_.reset(new CheckinRequest(
424 base::Bind(&MCSProbe::OnCheckInCompleted, base::Unretained(this)), 425 base::Bind(&MCSProbe::OnCheckInCompleted, base::Unretained(this)),
425 kDefaultBackoffPolicy, 426 kDefaultBackoffPolicy,
426 chrome_build_proto, 427 chrome_build_proto,
427 0, 428 0,
428 0, 429 0,
430 std::vector<std::string>(),
429 url_request_context_getter_.get())); 431 url_request_context_getter_.get()));
430 checkin_request_->Start(); 432 checkin_request_->Start();
431 } 433 }
432 434
433 void MCSProbe::OnCheckInCompleted(uint64 android_id, uint64 secret) { 435 void MCSProbe::OnCheckInCompleted(uint64 android_id, uint64 secret) {
434 LOG(INFO) << "Check-in request completion " 436 LOG(INFO) << "Check-in request completion "
435 << (android_id ? "success!" : "failure!"); 437 << (android_id ? "success!" : "failure!");
436 if (!android_id || !secret) 438 if (!android_id || !secret)
437 return; 439 return;
438 android_id_ = android_id; 440 android_id_ = android_id;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 479
478 return 0; 480 return 0;
479 } 481 }
480 482
481 } // namespace 483 } // namespace
482 } // namespace gcm 484 } // namespace gcm
483 485
484 int main(int argc, char* argv[]) { 486 int main(int argc, char* argv[]) {
485 return gcm::MCSProbeMain(argc, argv); 487 return gcm::MCSProbeMain(argc, argv);
486 } 488 }
OLDNEW
« no previous file with comments | « google_apis/gcm/gcm_client_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698