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

Side by Side Diff: chrome/browser/ui/webui/print_preview/print_preview_handler.cc

Issue 938193003: Add some metrics for printing with extension (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/webui/print_preview/print_preview_handler.h" 5 #include "chrome/browser/ui/webui/print_preview/print_preview_handler.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 PRINT_TO_PRINTER, 100 PRINT_TO_PRINTER,
101 PRINT_TO_PDF, 101 PRINT_TO_PDF,
102 CANCEL, 102 CANCEL,
103 FALLBACK_TO_ADVANCED_SETTINGS_DIALOG, 103 FALLBACK_TO_ADVANCED_SETTINGS_DIALOG,
104 PREVIEW_FAILED, 104 PREVIEW_FAILED,
105 PREVIEW_STARTED, 105 PREVIEW_STARTED,
106 INITIATOR_CRASHED, // UNUSED 106 INITIATOR_CRASHED, // UNUSED
107 INITIATOR_CLOSED, 107 INITIATOR_CLOSED,
108 PRINT_WITH_CLOUD_PRINT, 108 PRINT_WITH_CLOUD_PRINT,
109 PRINT_WITH_PRIVET, 109 PRINT_WITH_PRIVET,
110 PRINT_WITH_EXTENSION,
110 USERACTION_BUCKET_BOUNDARY 111 USERACTION_BUCKET_BOUNDARY
111 }; 112 };
112 113
113 enum PrintSettingsBuckets { 114 enum PrintSettingsBuckets {
114 LANDSCAPE = 0, 115 LANDSCAPE = 0,
115 PORTRAIT, 116 PORTRAIT,
116 COLOR, 117 COLOR,
117 BLACK_AND_WHITE, 118 BLACK_AND_WHITE,
118 COLLATE, 119 COLLATE,
119 SIMPLEX, 120 SIMPLEX,
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 return; 878 return;
878 } 879 }
879 880
880 PrintToPrivetPrinter( 881 PrintToPrivetPrinter(
881 printer_name, print_ticket, capabilities, gfx::Size(width, height)); 882 printer_name, print_ticket, capabilities, gfx::Size(width, height));
882 return; 883 return;
883 } 884 }
884 #endif 885 #endif
885 886
886 if (print_with_extension) { 887 if (print_with_extension) {
887 // TODO(tbarzic): Record UMA stats. 888 UMA_HISTOGRAM_COUNTS("PrintPreview.PageCount.PrintWithExtension",
889 page_count);
Ilya Sherman 2015/02/21 00:26:39 I bet that UMA_HISTOGRAM_COUNTS_100 or _10000 woul
890 ReportUserActionHistogram(PRINT_WITH_EXTENSION);
888 891
889 std::string destination_id; 892 std::string destination_id;
890 std::string print_ticket; 893 std::string print_ticket;
891 std::string capabilities; 894 std::string capabilities;
892 int width = 0; 895 int width = 0;
893 int height = 0; 896 int height = 0;
894 if (!settings->GetString(printing::kSettingDeviceName, &destination_id) || 897 if (!settings->GetString(printing::kSettingDeviceName, &destination_id) ||
895 !settings->GetString(printing::kSettingTicket, &print_ticket) || 898 !settings->GetString(printing::kSettingTicket, &print_ticket) ||
896 !settings->GetString(printing::kSettingCapabilities, &capabilities) || 899 !settings->GetString(printing::kSettingCapabilities, &capabilities) ||
897 !settings->GetInteger(printing::kSettingPageWidth, &width) || 900 !settings->GetInteger(printing::kSettingPageWidth, &width) ||
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
1711 1714
1712 void PrintPreviewHandler::UnregisterForMergeSession() { 1715 void PrintPreviewHandler::UnregisterForMergeSession() {
1713 if (reconcilor_) 1716 if (reconcilor_)
1714 reconcilor_->RemoveMergeSessionObserver(this); 1717 reconcilor_->RemoveMergeSessionObserver(this);
1715 } 1718 }
1716 1719
1717 void PrintPreviewHandler::SetPdfSavedClosureForTesting( 1720 void PrintPreviewHandler::SetPdfSavedClosureForTesting(
1718 const base::Closure& closure) { 1721 const base::Closure& closure) {
1719 pdf_file_saved_closure_ = closure; 1722 pdf_file_saved_closure_ = closure;
1720 } 1723 }
OLDNEW
« no previous file with comments | « no previous file | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698