Index: components/dom_distiller/content/dom_distiller_viewer_source.cc |
diff --git a/components/dom_distiller/content/dom_distiller_viewer_source.cc b/components/dom_distiller/content/dom_distiller_viewer_source.cc |
index 4b4a7ce4b18c8dca384a81bc54c3b45a983a7824..b478ce2212d63c471d24d39a2f507301abbcb8ce 100644 |
--- a/components/dom_distiller/content/dom_distiller_viewer_source.cc |
+++ b/components/dom_distiller/content/dom_distiller_viewer_source.cc |
@@ -8,7 +8,6 @@ |
#include <string> |
#include <vector> |
-#include "base/logging.h" |
#include "base/memory/ref_counted_memory.h" |
#include "base/memory/scoped_ptr.h" |
#include "base/message_loop/message_loop.h" |
@@ -16,6 +15,7 @@ |
#include "base/strings/utf_string_conversions.h" |
#include "components/dom_distiller/core/distilled_page_prefs.h" |
#include "components/dom_distiller/core/dom_distiller_service.h" |
+#include "components/dom_distiller/core/feedback_reporter.h" |
#include "components/dom_distiller/core/task_tracker.h" |
#include "components/dom_distiller/core/url_constants.h" |
#include "components/dom_distiller/core/viewer.h" |
@@ -308,16 +308,20 @@ void DomDistillerViewerSource::StartDataRequest( |
std::string css = viewer::GetCss(); |
callback.Run(base::RefCountedString::TakeString(&css)); |
return; |
- } |
- if (kViewerJsPath == path) { |
+ } else if (kViewerJsPath == path) { |
std::string js = viewer::GetJavaScript(); |
callback.Run(base::RefCountedString::TakeString(&js)); |
return; |
- } |
- if (kViewerViewOriginalPath == path) { |
+ } else if (kViewerViewOriginalPath == path) { |
content::RecordAction(base::UserMetricsAction("DomDistiller_ViewOriginal")); |
callback.Run(NULL); |
return; |
+ } else if (kFeedbackBad == path) { |
+ FeedbackReporter::ReportQuality(false); |
wychen
2015/04/27 21:18:49
Do we need "callback.Run(NULL)" like kViewerViewOr
cjhopman
2015/04/27 21:22:57
Yeah, probably. Otherwise these gets will just be
mdjones
2015/04/27 22:09:02
CL fixing this issue: https://codereview.chromium.
|
+ return; |
+ } else if (kFeedbackGood == path) { |
+ FeedbackReporter::ReportQuality(true); |
+ return; |
} |
content::WebContents* web_contents = |
content::WebContents::FromRenderFrameHost(render_frame_host); |