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

Side by Side Diff: chrome/browser/profile_resetter/automatic_profile_resetter_unittest.cc

Issue 660873002: Use scoped_ptr::Pass instead of scoped_ptr::PassAs<T>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
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 "chrome/browser/profile_resetter/automatic_profile_resetter.h" 5 #include "chrome/browser/profile_resetter/automatic_profile_resetter.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 if (inject_data_through_variation_params_) { 550 if (inject_data_through_variation_params_) {
551 std::map<std::string, std::string> variation_params; 551 std::map<std::string, std::string> variation_params;
552 variation_params["program"] = testing_program_; 552 variation_params["program"] = testing_program_;
553 variation_params["hash_seed"] = testing_hash_seed_; 553 variation_params["hash_seed"] = testing_hash_seed_;
554 ASSERT_TRUE(variations::AssociateVariationParams( 554 ASSERT_TRUE(variations::AssociateVariationParams(
555 kAutomaticProfileResetStudyName, 555 kAutomaticProfileResetStudyName,
556 experiment_group_name_, 556 experiment_group_name_,
557 variation_params)); 557 variation_params));
558 } 558 }
559 resetter_->Initialize(); 559 resetter_->Initialize();
560 resetter_->SetDelegateForTesting( 560 resetter_->SetDelegateForTesting(mock_delegate_owned_.Pass());
561 mock_delegate_owned_.PassAs<AutomaticProfileResetterDelegate>());
562 resetter_->SetTaskRunnerForWaitingForTesting(waiting_task_runner_); 561 resetter_->SetTaskRunnerForWaitingForTesting(waiting_task_runner_);
563 if (!inject_data_through_variation_params_) { 562 if (!inject_data_through_variation_params_) {
564 resetter_->SetProgramForTesting(testing_program_); 563 resetter_->SetProgramForTesting(testing_program_);
565 resetter_->SetHashSeedForTesting(testing_hash_seed_); 564 resetter_->SetHashSeedForTesting(testing_hash_seed_);
566 } 565 }
567 resetter_->Activate(); 566 resetter_->Activate();
568 567
569 if (waiting_task_runner_->HasPendingTask()) { 568 if (waiting_task_runner_->HasPendingTask()) {
570 ASSERT_EQ(base::TimeDelta::FromSeconds(55), 569 ASSERT_EQ(base::TimeDelta::FromSeconds(55),
571 waiting_task_runner_->NextPendingTaskDelay()); 570 waiting_task_runner_->NextPendingTaskDelay());
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
1371 mock_delegate().ExpectCallsToDependenciesSetUpMethods(); 1370 mock_delegate().ExpectCallsToDependenciesSetUpMethods();
1372 mock_delegate().ExpectCallsToGetterMethods(); 1371 mock_delegate().ExpectCallsToGetterMethods();
1373 uint32 expected_mask = 1372 uint32 expected_mask =
1374 HAS_EXPECTED_MODULE_DIGEST_1 | HAS_EXPECTED_MODULE_DIGEST_2; 1373 HAS_EXPECTED_MODULE_DIGEST_1 | HAS_EXPECTED_MODULE_DIGEST_2;
1375 EXPECT_CALL(resetter(), ReportStatistics(0x00u, expected_mask)); 1374 EXPECT_CALL(resetter(), ReportStatistics(0x00u, expected_mask));
1376 1375
1377 UnleashResetterAndWait(); 1376 UnleashResetterAndWait();
1378 } 1377 }
1379 1378
1380 } // namespace 1379 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/printing/print_view_manager_base.cc ('k') | chrome/browser/profiles/off_the_record_profile_io_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698