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

Side by Side Diff: google_apis/gcm/gcm_client_impl_unittest.cc

Issue 293053014: Retrieve chrome build info in GCMProfileService, instead of GCMDriver (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « google_apis/gcm/gcm_client_impl.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 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 "google_apis/gcm/gcm_client_impl.h" 5 #include "google_apis/gcm/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/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 linked_ptr<RegistrationInfo> registration(new RegistrationInfo); 437 linked_ptr<RegistrationInfo> registration(new RegistrationInfo);
438 registration->sender_ids = sender_ids; 438 registration->sender_ids = sender_ids;
439 registration->registration_id = registration_id; 439 registration->registration_id = registration_id;
440 gcm_client_->registrations_[app_id] = registration; 440 gcm_client_->registrations_[app_id] = registration;
441 } 441 }
442 442
443 void GCMClientImplTest::InitializeGCMClient() { 443 void GCMClientImplTest::InitializeGCMClient() {
444 clock()->Advance(base::TimeDelta::FromMilliseconds(1)); 444 clock()->Advance(base::TimeDelta::FromMilliseconds(1));
445 445
446 // Actual initialization. 446 // Actual initialization.
447 checkin_proto::ChromeBuildProto chrome_build_proto; 447 GCMClient::ChromeBuildInfo chrome_build_info;
448 gcm_client_->Initialize(chrome_build_proto, 448 gcm_client_->Initialize(chrome_build_info,
449 temp_directory_.path(), 449 temp_directory_.path(),
450 std::vector<std::string>(), 450 std::vector<std::string>(),
451 message_loop_.message_loop_proxy(), 451 message_loop_.message_loop_proxy(),
452 url_request_context_getter_, 452 url_request_context_getter_,
453 make_scoped_ptr<Encryptor>(new FakeEncryptor), 453 make_scoped_ptr<Encryptor>(new FakeEncryptor),
454 this); 454 this);
455 455
456 // Start loading and check-in. 456 // Start loading and check-in.
457 gcm_client_->Start(); 457 gcm_client_->Start();
458 458
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 gservices_settings().GetCheckinURL()); 771 gservices_settings().GetCheckinURL());
772 EXPECT_EQ(GURL("http://alternative.url/registration"), 772 EXPECT_EQ(GURL("http://alternative.url/registration"),
773 gservices_settings().GetRegistrationURL()); 773 gservices_settings().GetRegistrationURL());
774 EXPECT_EQ(GURL("https://alternative.gcm.host:7777"), 774 EXPECT_EQ(GURL("https://alternative.gcm.host:7777"),
775 gservices_settings().GetMCSMainEndpoint()); 775 gservices_settings().GetMCSMainEndpoint());
776 EXPECT_EQ(GURL("https://alternative.gcm.host:443"), 776 EXPECT_EQ(GURL("https://alternative.gcm.host:443"),
777 gservices_settings().GetMCSFallbackEndpoint()); 777 gservices_settings().GetMCSFallbackEndpoint());
778 } 778 }
779 779
780 } // namespace gcm 780 } // namespace gcm
OLDNEW
« no previous file with comments | « google_apis/gcm/gcm_client_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698