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

Unified Diff: android_webview/native/aw_metrics_switch.cc

Issue 1474483004: WebView Metrics client implementation (Chromium part) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments on address of comments from #5 Created 5 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: android_webview/native/aw_metrics_switch.cc
diff --git a/android_webview/native/aw_metrics_switch.cc b/android_webview/native/aw_metrics_switch.cc
new file mode 100644
index 0000000000000000000000000000000000000000..54c3cbacf708859d0faca2c2f7e815a091e6d447
--- /dev/null
+++ b/android_webview/native/aw_metrics_switch.cc
@@ -0,0 +1,24 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "android_webview/native/aw_metrics_switch.h"
+
+#include "android_webview/browser/aw_metrics_service_client.h"
+#include "android_webview/jni/AwMetricsServiceClient_jni.h"
+
+namespace android_webview {
+
+static void SetMetricsEnabled(
+ JNIEnv* env,
+ const base::android::JavaParamRef<jclass>& jcaller,
+ jboolean enabled) {
+ AwMetricsServiceClient::GetInstance()->SetMetricsEnabled(
+ static_cast<bool>(enabled));
sgurun-gerrit only 2015/12/21 21:47:26 static_cast is unnecessary.
paulmiller 2015/12/22 19:42:04 done
+}
+
+bool RegisterAwMetricsServiceClient(JNIEnv* env) {
+ return RegisterNativesImpl(env);
+}
+
+} // namespace android_webview

Powered by Google App Engine
This is Rietveld 408576698