| Index: chrome/browser/android/offline_pages/evaluation/evaluation_test_scheduler.cc
|
| diff --git a/chrome/browser/android/offline_pages/evaluation/evaluation_test_scheduler.cc b/chrome/browser/android/offline_pages/evaluation/evaluation_test_scheduler.cc
|
| index 03eabe2c009a32681cfb69e136185ccbb1f37b4e..82626edfc917bcfb4c89cb08855ec6bfec5c974d 100644
|
| --- a/chrome/browser/android/offline_pages/evaluation/evaluation_test_scheduler.cc
|
| +++ b/chrome/browser/android/offline_pages/evaluation/evaluation_test_scheduler.cc
|
| @@ -11,6 +11,7 @@
|
| #include "chrome/browser/profiles/profile_manager.h"
|
| #include "components/offline_pages/background/device_conditions.h"
|
| #include "components/offline_pages/background/request_coordinator.h"
|
| +#include "components/offline_pages/offline_event_logger.h"
|
| #include "net/base/network_change_notifier.h"
|
|
|
| namespace offline_pages {
|
| @@ -19,6 +20,8 @@ namespace android {
|
|
|
| namespace {
|
|
|
| +const char kLogTag[] = "EvaluationTestScheduler";
|
| +
|
| void StartProcessing();
|
|
|
| void ProcessingDoneCallback(bool result) {
|
| @@ -51,6 +54,16 @@ void StartProcessing() {
|
|
|
| void EvaluationTestScheduler::Schedule(
|
| const TriggerConditions& trigger_conditions) {
|
| + Profile* profile = ProfileManager::GetLastUsedProfile();
|
| + if (!coordinator_) {
|
| + coordinator_ =
|
| + RequestCoordinatorFactory::GetInstance()->GetForBrowserContext(profile);
|
| + // It's not expected that the coordinator would be nullptr since this bridge
|
| + // would only be used for testing scenario.
|
| + DCHECK(coordinator_);
|
| + }
|
| + coordinator_->GetLogger()->RecordActivity(std::string(kLogTag) +
|
| + " Start schedule!");
|
| base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
|
| base::Bind(&StartProcessing));
|
| }
|
|
|