diff options
author | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-11 17:29:41 +0000 |
---|---|---|
committer | msw@chromium.org <msw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-11 17:29:41 +0000 |
commit | 711bafc45ac608401c49d75bc940c22a6012ad8a (patch) | |
tree | 361ea830855f4f7d24fb104ced6d5e659f017806 /chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller.mm | |
parent | 5b47ac32b7c1a6b0fd95b0622163fc4546eee3c1 (diff) | |
download | chromium_src-711bafc45ac608401c49d75bc940c22a6012ad8a.zip chromium_src-711bafc45ac608401c49d75bc940c22a6012ad8a.tar.gz chromium_src-711bafc45ac608401c49d75bc940c22a6012ad8a.tar.bz2 |
Add Chrome To Mobile metrics reporting.
Add an enum for Chrome To Mobile histogram counts.
Add ChromeToMobileService::LogMetric utility function.
Log metrics for actions of interest (in service and bubbles).
This change depends on the src-internal issue (4270012).
BUG=102709,121005
TEST=New histogram data available for Chrome To Mobile use.
Review URL: http://codereview.chromium.org/10014034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131792 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller.mm')
-rw-r--r-- | chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller.mm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller.mm b/chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller.mm index 8ac3fb6..c816c69 100644 --- a/chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller.mm +++ b/chrome/browser/ui/cocoa/chrome_to_mobile_bubble_controller.mm @@ -95,6 +95,8 @@ void ChromeToMobileBubbleNotificationBridge::OnSendComplete(bool success) { // Override -[BaseBubbleController showWindow:] to set up UI elements. - (void)showWindow:(id)sender { + service_->LogMetric(ChromeToMobileService::BUBBLE_SHOWN); + // Force load the NIB. NSWindow* window = [self window]; @@ -185,10 +187,12 @@ void ChromeToMobileBubbleNotificationBridge::OnSendComplete(bool success) { snapshotPath_ = path; NSString* text = nil; if (bytes > 0) { + service_->LogMetric(ChromeToMobileService::SNAPSHOT_GENERATED); [sendCopy_ setEnabled:YES]; text = l10n_util::GetNSStringF(IDS_CHROME_TO_MOBILE_BUBBLE_SEND_COPY, ui::FormatBytes(bytes)); } else { + service_->LogMetric(ChromeToMobileService::SNAPSHOT_ERROR); text = l10n_util::GetNSString(IDS_CHROME_TO_MOBILE_BUBBLE_SEND_COPY_FAILED); } [sendCopy_ setTitle:text]; |