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

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

Issue 2839683002: Logs different SaveCardPrompt histogram names depending on if user (Closed)
Patch Set: Adds DCHECK for previous save card prompt user decision. Created 3 years, 7 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
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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "components/autofill/core/browser/autofill_client.h" 15 #include "components/autofill/core/browser/autofill_client.h"
16 #include "components/autofill/core/browser/autofill_profile.h" 16 #include "components/autofill/core/browser/autofill_profile.h"
17 #include "components/autofill/core/browser/credit_card.h" 17 #include "components/autofill/core/browser/credit_card.h"
18 #include "components/autofill/core/browser/field_types.h" 18 #include "components/autofill/core/browser/field_types.h"
19 #include "components/autofill/core/common/autofill_pref_names.h"
19 #include "components/autofill/core/common/form_field_data.h" 20 #include "components/autofill/core/common/form_field_data.h"
20 21
21 namespace ukm { 22 namespace ukm {
22 class UkmService; 23 class UkmService;
23 } // namespace ukm 24 } // namespace ukm
24 25
25 namespace internal { 26 namespace internal {
26 // Name constants are exposed here so they can be referenced from tests. 27 // Name constants are exposed here so they can be referenced from tests.
27 extern const char kUKMCardUploadDecisionEntryName[]; 28 extern const char kUKMCardUploadDecisionEntryName[];
28 extern const char kUKMCardUploadDecisionMetricName[]; 29 extern const char kUKMCardUploadDecisionMetricName[];
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 int64_t MillisecondsSinceFormLoaded() const; 639 int64_t MillisecondsSinceFormLoaded() const;
639 void GetNewSourceID(); 640 void GetNewSourceID();
640 641
641 ukm::UkmService* ukm_service_; // Weak reference. 642 ukm::UkmService* ukm_service_; // Weak reference.
642 int32_t source_id_ = -1; 643 int32_t source_id_ = -1;
643 GURL url_; 644 GURL url_;
644 base::TimeTicks form_loaded_timestamp_; 645 base::TimeTicks form_loaded_timestamp_;
645 }; 646 };
646 647
647 static void LogCardUploadDecisionMetric(CardUploadDecisionMetric metric); 648 static void LogCardUploadDecisionMetric(CardUploadDecisionMetric metric);
648 static void LogCreditCardInfoBarMetric(InfoBarMetric metric, 649 static void LogCreditCardInfoBarMetric(
649 bool is_uploading); 650 InfoBarMetric metric,
651 bool is_uploading,
652 int previous_save_credit_card_prompt_user_decision);
650 static void LogCreditCardFillingInfoBarMetric(InfoBarMetric metric); 653 static void LogCreditCardFillingInfoBarMetric(InfoBarMetric metric);
651 static void LogSaveCardPromptMetric(SaveCardPromptMetric metric, 654 static void LogSaveCardPromptMetric(
652 bool is_uploading, 655 SaveCardPromptMetric metric,
653 bool is_reshow); 656 bool is_uploading,
657 bool is_reshow,
658 int previous_save_credit_card_prompt_user_decision);
654 static void LogScanCreditCardPromptMetric(ScanCreditCardPromptMetric metric); 659 static void LogScanCreditCardPromptMetric(ScanCreditCardPromptMetric metric);
655 660
656 // Should be called when credit card scan is finished. |duration| should be 661 // Should be called when credit card scan is finished. |duration| should be
657 // the time elapsed between launching the credit card scanner and getting back 662 // the time elapsed between launching the credit card scanner and getting back
658 // the result. |completed| should be true if a credit card was scanned, false 663 // the result. |completed| should be true if a credit card was scanned, false
659 // if the scan was cancelled. 664 // if the scan was cancelled.
660 static void LogScanCreditCardCompleted(const base::TimeDelta& duration, 665 static void LogScanCreditCardCompleted(const base::TimeDelta& duration,
661 bool completed); 666 bool completed);
662 667
663 static void LogDeveloperEngagementMetric(DeveloperEngagementMetric metric); 668 static void LogDeveloperEngagementMetric(DeveloperEngagementMetric metric);
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 form_interactions_ukm_logger_; // Weak reference. 885 form_interactions_ukm_logger_; // Weak reference.
881 }; 886 };
882 887
883 private: 888 private:
884 DISALLOW_IMPLICIT_CONSTRUCTORS(AutofillMetrics); 889 DISALLOW_IMPLICIT_CONSTRUCTORS(AutofillMetrics);
885 }; 890 };
886 891
887 } // namespace autofill 892 } // namespace autofill
888 893
889 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_ 894 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_METRICS_H_
OLDNEW
« no previous file with comments | « components/autofill/core/browser/autofill_manager.cc ('k') | components/autofill/core/browser/autofill_metrics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698