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 4a010ec634cfb4bd8a9d0c7c614ffa34fdb74a6f..db7ced3d61235cdbfe259533db48141f667169ab 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" |
@@ -101,8 +103,8 @@ void SiteChipExtensionIcon::OnExtensionIconImageChanged( |
namespace { |
const int kEdgeThickness = 5; |
-const int k16x16IconLeadingSpacing = 3; |
-const int k16x16IconTrailingSpacing = 3; |
+const int k16x16IconLeadingSpacing = 1; |
+const int k16x16IconTrailingSpacing = 2; |
Greg Billock
2013/12/12 20:36:37
This repairs a bad merge I must have made at some
|
const int kIconTextSpacing = 3; |
const int kTrailingLabelMargin = 0; |
@@ -440,10 +442,12 @@ 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 21:09:54
Is this worthwhile if you'll have the SiteChipPres
Greg Billock
2013/12/12 21:55:31
I'm not sure. I thought the user actions just go i
|
+ content::RecordAction(content::UserMetricsAction("SiteChipPress")); |
msw
2013/12/12 21:09:54
According to the guide: https://wiki.corp.google.c
Greg Billock
2013/12/12 21:55:31
Thanks. I haven't used these user actions before.
|
toolbar_view_->location_bar()->GetOmniboxView()->SetFocus(); |
- toolbar_view_->location_bar()->GetOmniboxView()->SelectAll(true); |
toolbar_view_->location_bar()->GetOmniboxView()->model()-> |
SetCaretVisibility(true); |
+ toolbar_view_->location_bar()->GetOmniboxView()->ShowURL(); |
} |
void SiteChipView::WriteDragDataForView(View* sender, |