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

Unified Diff: chrome/browser/android/offline_pages/evaluation/evaluation_test_scheduler.cc

Issue 2529603004: [Offline Pages] Expanding event logger to be used by harness. (Closed)
Patch Set: comments. Created 4 years 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 side-by-side diff with in-line comments
Download patch
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..8b824c7c8645b23fdd100352de0f034631a8700c 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 {
@@ -51,6 +52,13 @@ void StartProcessing() {
void EvaluationTestScheduler::Schedule(
const TriggerConditions& trigger_conditions) {
+ Profile* profile = ProfileManager::GetLastUsedProfile();
+ if (!coordinator_) {
+ coordinator_ =
+ RequestCoordinatorFactory::GetInstance()->GetForBrowserContext(profile);
+ }
+ coordinator_->GetLogger()->RecordActivity(OFFLINE_LOG_TAG +
+ "Start schedule!");
base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
base::Bind(&StartProcessing));
}

Powered by Google App Engine
This is Rietveld 408576698