| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |