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

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: Created 4 years, 1 month 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..7531ae751cb8e752471596e227b6f0e1a068533d 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,10 @@ void StartProcessing() {
void EvaluationTestScheduler::Schedule(
const TriggerConditions& trigger_conditions) {
+ Profile* profile = ProfileManager::GetLastUsedProfile();
+ RequestCoordinator* coordinator =
+ RequestCoordinatorFactory::GetInstance()->GetForBrowserContext(profile);
dougarnett 2016/11/28 23:02:44 how about getting the coordinator once and holding
romax 2016/11/30 00:15:10 Done.
+ 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