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

Unified Diff: chrome/browser/android/dom_distiller/external_feedback_reporter_android.cc

Issue 1386043002: Open distiller UI setting through JavaScript (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment nits Created 5 years, 2 months 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/dom_distiller/external_feedback_reporter_android.cc
diff --git a/chrome/browser/android/dom_distiller/external_feedback_reporter_android.cc b/chrome/browser/android/dom_distiller/external_feedback_reporter_android.cc
deleted file mode 100644
index 04cf18ae96735b39ccd78a42dd3bd8251ebeb287..0000000000000000000000000000000000000000
--- a/chrome/browser/android/dom_distiller/external_feedback_reporter_android.cc
+++ /dev/null
@@ -1,49 +0,0 @@
-// 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 "chrome/browser/android/dom_distiller/external_feedback_reporter_android.h"
-
-#include "base/android/jni_string.h"
-#include "chrome/browser/ui/android/window_android_helper.h"
-#include "components/dom_distiller/core/url_utils.h"
-#include "content/public/browser/web_contents.h"
-#include "jni/DomDistillerFeedbackReporter_jni.h"
-#include "ui/android/window_android.h"
-#include "url/gurl.h"
-
-namespace dom_distiller {
-
-namespace android {
-
-// ExternalFeedbackReporter implementation.
-void ExternalFeedbackReporterAndroid::ReportExternalFeedback(
- content::WebContents* web_contents,
- const GURL& url,
- const bool good) {
- if (!web_contents)
- return;
- WindowAndroidHelper* helper =
- content::WebContentsUserData<WindowAndroidHelper>::FromWebContents(
- web_contents);
- DCHECK(helper);
-
- ui::WindowAndroid* window = helper->GetWindowAndroid();
- DCHECK(window);
-
- JNIEnv* env = base::android::AttachCurrentThread();
- ScopedJavaLocalRef<jstring> jurl = base::android::ConvertUTF8ToJavaString(
- env, url_utils::GetOriginalUrlFromDistillerUrl(url).spec());
-
- Java_DomDistillerFeedbackReporter_reportFeedbackWithWindow(
- env, window->GetJavaObject().obj(), jurl.obj(), good);
-}
-
-// static
-bool RegisterFeedbackReporter(JNIEnv* env) {
- return RegisterNativesImpl(env);
-}
-
-} // namespace android
-
-} // namespace dom_distiller

Powered by Google App Engine
This is Rietveld 408576698