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

Unified Diff: chrome/browser/ui/views/toolbar/site_chip_view.cc

Issue 110893004: [SiteChip] Add UMA, finish wiring site chip experiment up to the omnibox. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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: chrome/browser/ui/views/toolbar/site_chip_view.cc
diff --git a/chrome/browser/ui/views/toolbar/site_chip_view.cc b/chrome/browser/ui/views/toolbar/site_chip_view.cc
index 790a2dd29789ee3b6f9c3c9bd30808d38927fff6..86ade3d76f035a0dc8f3b5e4c650c6ca94e96662 100644
--- a/chrome/browser/ui/views/toolbar/site_chip_view.cc
+++ b/chrome/browser/ui/views/toolbar/site_chip_view.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/ui/views/toolbar/site_chip_view.h"
#include "base/files/file_path.h"
+#include "base/metrics/histogram.h"
#include "base/prefs/pref_service.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
@@ -29,6 +30,7 @@
#include "chrome/common/extensions/manifest_handlers/icons_handler.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
+#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/url_constants.h"
#include "extensions/common/constants.h"
@@ -440,10 +442,13 @@ void SiteChipView::OnPaint(gfx::Canvas* canvas) {
// this button.
void SiteChipView::ButtonPressed(views::Button* sender,
const ui::Event& event) {
+ UMA_HISTOGRAM_COUNTS("SiteChip.Pressed", 1);
msw 2013/12/12 00:17:49 What are you trying to record? This will do a dece
Greg Billock 2013/12/12 20:36:37 Yeah, I'll add the histograms.xml descriptor separ
+ content::RecordAction(content::UserMetricsAction("SiteChipPress"));
toolbar_view_->location_bar()->GetOmniboxView()->SetFocus();
msw 2013/12/12 00:17:49 nit: make a local OmniboxView* omnibox_view = tool
Greg Billock 2013/12/12 20:36:37 After Justin's change, we won't need SetFocus, and
- toolbar_view_->location_bar()->GetOmniboxView()->SelectAll(true);
toolbar_view_->location_bar()->GetOmniboxView()->model()->
SetCaretVisibility(true);
+ toolbar_view_->location_bar()->GetOmniboxView()->ShowURL();
+ //toolbar_view_->location_bar()->GetOmniboxView()->SelectAll(true);
msw 2013/12/12 00:17:49 Remove this.
Greg Billock 2013/12/12 20:36:37 Done.
}
void SiteChipView::WriteDragDataForView(View* sender,
« chrome/browser/ui/omnibox/omnibox_view.h ('K') | « chrome/browser/ui/omnibox/omnibox_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698