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

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

Issue 2529603004: [Offline Pages] Expanding event logger to be used by harness. (Closed)
Patch Set: more 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/offline_page_evaluation_bridge.cc
diff --git a/chrome/browser/android/offline_pages/evaluation/offline_page_evaluation_bridge.cc b/chrome/browser/android/offline_pages/evaluation/offline_page_evaluation_bridge.cc
index 1ca6516a2e8c1f0e5413c997d7674596f81beb92..004dc9cc49b4750312ed095ab4a904fa67c4b62e 100644
--- a/chrome/browser/android/offline_pages/evaluation/offline_page_evaluation_bridge.cc
+++ b/chrome/browser/android/offline_pages/evaluation/offline_page_evaluation_bridge.cc
@@ -47,6 +47,7 @@ namespace offline_pages {
namespace android {
namespace {
+const char kNativeTag[] = "OPNative";
void ToJavaOfflinePageList(JNIEnv* env,
jobject j_result_obj,
@@ -214,6 +215,8 @@ OfflinePageEvaluationBridge::OfflinePageEvaluationBridge(
NotifyIfDoneLoading();
offline_page_model_->AddObserver(this);
request_coordinator_->AddObserver(this);
+ offline_page_model_->GetLogger()->SetClient(this);
+ request_coordinator_->GetLogger()->SetClient(this);
}
OfflinePageEvaluationBridge::~OfflinePageEvaluationBridge() {
@@ -258,6 +261,13 @@ void OfflinePageEvaluationBridge::OnChanged(const SavePageRequest& request) {
env, java_ref_, ToJavaSavePageRequest(env, request));
}
+void OfflinePageEvaluationBridge::CustomLog(const std::string& message) {
+ JNIEnv* env = base::android::AttachCurrentThread();
+ Java_OfflinePageEvaluationBridge_log(env, java_ref_,
+ ConvertUTF8ToJavaString(env, kNativeTag),
+ ConvertUTF8ToJavaString(env, message));
+}
+
void OfflinePageEvaluationBridge::GetAllPages(
JNIEnv* env,
const JavaParamRef<jobject>& obj,
« no previous file with comments | « chrome/browser/android/offline_pages/evaluation/offline_page_evaluation_bridge.h ('k') | components/offline_pages/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698