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

Unified Diff: chrome/browser/ui/gtk/download/download_shelf_gtk.cc

Issue 8008021: Add new UMA stats to get a handle on Downloads UI Usage (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: merge Created 9 years, 2 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: chrome/browser/ui/gtk/download/download_shelf_gtk.cc
diff --git a/chrome/browser/ui/gtk/download/download_shelf_gtk.cc b/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
index a857606fe1ac1c1d889fca9c04c6cfb1afa4f4a3..cc7f0a198e94004bd5a5ff634218b0f6acca94b8 100644
--- a/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
+++ b/chrome/browser/ui/gtk/download/download_shelf_gtk.cc
@@ -19,6 +19,7 @@
#include "chrome/browser/ui/gtk/gtk_util.h"
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/download/download_item.h"
+#include "content/browser/download/download_stats.h"
#include "content/common/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
@@ -195,6 +196,13 @@ void DownloadShelfGtk::Close() {
gdk_window_raise(shelf_.get()->window);
slide_widget_->Close();
browser_->UpdateDownloadShelfVisibility(false);
+ int num_in_progress = 0;
+ for (size_t i = 0; i < download_items_.size(); ++i) {
+ if (download_items_[i]->get_download()->IsInProgress())
+ ++num_in_progress;
+ }
+ download_stats::RecordShelfClose(
+ download_items_.size(), num_in_progress, close_on_mouse_out_);
SetCloseOnMouseOut(false);
}
« no previous file with comments | « chrome/browser/ui/cocoa/download/download_shelf_controller.mm ('k') | chrome/browser/ui/views/download/download_shelf_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698