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

Unified Diff: components/dom_distiller/content/dom_distiller_viewer_source.cc

Issue 502653002: Add UMA metric for "View Original" link clicks in distilled page viewer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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: 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 3d26eb889426306f885df9b1b1dd52c839bf7873..ed51c47c83ceb4f5af9747c81dd8b545f918aa59 100644
--- a/components/dom_distiller/content/dom_distiller_viewer_source.cc
+++ b/components/dom_distiller/content/dom_distiller_viewer_source.cc
@@ -11,6 +11,7 @@
#include "base/memory/ref_counted_memory.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
+#include "base/metrics/user_metrics.h"
#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"
@@ -21,6 +22,7 @@
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_view_host.h"
+#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
#include "net/base/url_util.h"
@@ -284,6 +286,11 @@ void DomDistillerViewerSource::StartDataRequest(
callback.Run(base::RefCountedString::TakeString(&js));
return;
}
+ if (kViewerViewOriginalPath == path) {
+ content::RecordAction(base::UserMetricsAction("DomDistiller_ViewOriginal"));
nyquist 2014/08/25 01:13:03 Would this ever be needed on iOS? I.e., should it
Yaron 2014/08/25 19:41:23 I think this is simple enough to leave.
+ callback.Run(NULL);
+ return;
+ }
content::WebContents* web_contents =
content::WebContents::FromRenderFrameHost(
content::RenderFrameHost::FromID(render_process_id,

Powered by Google App Engine
This is Rietveld 408576698