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

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: add display:none 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
« no previous file with comments | « no previous file | components/dom_distiller/content/resources/dom_distiller_viewer.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"));
+ callback.Run(NULL);
+ return;
+ }
content::WebContents* web_contents =
content::WebContents::FromRenderFrameHost(
content::RenderFrameHost::FromID(render_process_id,
« no previous file with comments | « no previous file | components/dom_distiller/content/resources/dom_distiller_viewer.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698