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

Side by Side Diff: components/autofill/core/browser/autofill_metrics.cc

Issue 1457393003: [Autofill] Guard against the initialization failure of ICU Collator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 5 years, 1 month 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/autofill/core/browser/autofill_metrics.h" 5 #include "components/autofill/core/browser/autofill_metrics.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/metrics/histogram_macros.h" 10 #include "base/metrics/histogram_macros.h"
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 UMA_HISTOGRAM_PERCENTAGE("Autofill.PayloadCompressionRatio.Query", 657 UMA_HISTOGRAM_PERCENTAGE("Autofill.PayloadCompressionRatio.Query",
658 compression_ratio); 658 compression_ratio);
659 break; 659 break;
660 case AutofillDownloadManager::REQUEST_UPLOAD: 660 case AutofillDownloadManager::REQUEST_UPLOAD:
661 UMA_HISTOGRAM_PERCENTAGE("Autofill.PayloadCompressionRatio.Upload", 661 UMA_HISTOGRAM_PERCENTAGE("Autofill.PayloadCompressionRatio.Upload",
662 compression_ratio); 662 compression_ratio);
663 break; 663 break;
664 } 664 }
665 } 665 }
666 666
667 // static
668 void AutofillMetrics::LogIcuCollatorCreationSuccess(bool success) {
669 UMA_HISTOGRAM_BOOLEAN("Autofill.IcuCollatorCreationSuccess", success);
670 }
671
667 AutofillMetrics::FormEventLogger::FormEventLogger(bool is_for_credit_card) 672 AutofillMetrics::FormEventLogger::FormEventLogger(bool is_for_credit_card)
668 : is_for_credit_card_(is_for_credit_card), 673 : is_for_credit_card_(is_for_credit_card),
669 is_server_data_available_(false), 674 is_server_data_available_(false),
670 is_local_data_available_(false), 675 is_local_data_available_(false),
671 has_logged_interacted_(false), 676 has_logged_interacted_(false),
672 has_logged_suggestions_shown_(false), 677 has_logged_suggestions_shown_(false),
673 has_logged_masked_server_card_suggestion_selected_(false), 678 has_logged_masked_server_card_suggestion_selected_(false),
674 has_logged_suggestion_filled_(false), 679 has_logged_suggestion_filled_(false),
675 has_logged_will_submit_(false), 680 has_logged_will_submit_(false),
676 has_logged_submitted_(false), 681 has_logged_submitted_(false),
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 else if (is_server_data_available_ && !is_local_data_available_) 815 else if (is_server_data_available_ && !is_local_data_available_)
811 name += ".WithOnlyServerData"; 816 name += ".WithOnlyServerData";
812 else if (!is_server_data_available_ && is_local_data_available_) 817 else if (!is_server_data_available_ && is_local_data_available_)
813 name += ".WithOnlyLocalData"; 818 name += ".WithOnlyLocalData";
814 else 819 else
815 name += ".WithBothServerAndLocalData"; 820 name += ".WithBothServerAndLocalData";
816 LogUMAHistogramEnumeration(name, event, NUM_FORM_EVENTS); 821 LogUMAHistogramEnumeration(name, event, NUM_FORM_EVENTS);
817 } 822 }
818 823
819 } // namespace autofill 824 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698