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

Side by Side Diff: components/payments/core/journey_logger.h

Issue 2790253002: [Payments] Don't record CanMakePayment when in incognito mode. (Closed)
Patch Set: Nit Created 3 years, 8 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_PAYMENTS_CORE_JOURNEY_LOGGER_H_ 5 #ifndef COMPONENTS_PAYMENTS_CORE_JOURNEY_LOGGER_H_
6 #define COMPONENTS_PAYMENTS_CORE_JOURNEY_LOGGER_H_ 6 #define COMPONENTS_PAYMENTS_CORE_JOURNEY_LOGGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 COMPLETION_STATUS_MAX, 46 COMPLETION_STATUS_MAX,
47 }; 47 };
48 48
49 // Used to mesure the impact of the CanMakePayment return value on whether the 49 // Used to mesure the impact of the CanMakePayment return value on whether the
50 // Payment Request is shown to the user. 50 // Payment Request is shown to the user.
51 static const int CMP_SHOW_COULD_NOT_MAKE_PAYMENT_AND_DID_NOT_SHOW = 0; 51 static const int CMP_SHOW_COULD_NOT_MAKE_PAYMENT_AND_DID_NOT_SHOW = 0;
52 static const int CMP_SHOW_DID_SHOW = 1 << 0; 52 static const int CMP_SHOW_DID_SHOW = 1 << 0;
53 static const int CMP_SHOW_COULD_MAKE_PAYMENT_ = 1 << 1; 53 static const int CMP_SHOW_COULD_MAKE_PAYMENT_ = 1 << 1;
54 static const int CMP_SHOW_MAX = 4; 54 static const int CMP_SHOW_MAX = 4;
55 55
56 JourneyLogger(); 56 JourneyLogger(bool is_incognito);
please use gerrit instead 2017/04/04 15:27:35 explicit
sebsg 2017/04/04 15:50:37 Done.
57 ~JourneyLogger(); 57 ~JourneyLogger();
58 58
59 // Increments the number of selection adds for the specified section. 59 // Increments the number of selection adds for the specified section.
60 void IncrementSelectionAdds(Section section); 60 void IncrementSelectionAdds(Section section);
61 61
62 // Increments the number of selection changes for the specified section. 62 // Increments the number of selection changes for the specified section.
63 void IncrementSelectionChanges(Section section); 63 void IncrementSelectionChanges(Section section);
64 64
65 // Increments the number of selection edits for the specified section. 65 // Increments the number of selection edits for the specified section.
66 void IncrementSelectionEdits(Section section); 66 void IncrementSelectionEdits(Section section);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 int number_selection_changes_; 105 int number_selection_changes_;
106 int number_selection_edits_; 106 int number_selection_edits_;
107 int number_suggestions_shown_; 107 int number_suggestions_shown_;
108 bool is_requested_; 108 bool is_requested_;
109 }; 109 };
110 110
111 // Records the histograms for all the sections that were requested by the 111 // Records the histograms for all the sections that were requested by the
112 // merchant. 112 // merchant.
113 void RecordSectionSpecificStats(CompletionStatus completion_status); 113 void RecordSectionSpecificStats(CompletionStatus completion_status);
114 114
115 // Records the metrics related the the CanMakePayment method. 115 // Records the metrics related the the CanMakePayment method, if the Payment
please use gerrit instead 2017/04/04 15:27:35 "unless in incognito mode" feels more succinct tha
sebsg 2017/04/04 15:50:37 Done.
116 // Request was not done in an incognito tab.
116 void RecordCanMakePaymentStats(CompletionStatus completion_status); 117 void RecordCanMakePaymentStats(CompletionStatus completion_status);
117 118
118 // Records CanMakePayment's return value effect on whether the Payment Request 119 // Records CanMakePayment's return value effect on whether the Payment Request
119 // was shown or not. 120 // was shown or not.
120 void RecordCanMakePaymentEffectOnShow(); 121 void RecordCanMakePaymentEffectOnShow();
121 122
122 // Records the completion status depending on the the usage and return value 123 // Records the completion status depending on the the usage and return value
123 // of the CanMakePaymentMethod. 124 // of the CanMakePaymentMethod.
124 void RecordCanMakePaymentEffectOnCompletion( 125 void RecordCanMakePaymentEffectOnCompletion(
125 CompletionStatus completion_status); 126 CompletionStatus completion_status);
126 127
127 SectionStats sections_[NUMBER_OF_SECTIONS]; 128 SectionStats sections_[NUMBER_OF_SECTIONS];
128 bool was_can_make_payments_used_; 129 bool was_can_make_payments_used_;
129 bool could_make_payment_; 130 bool could_make_payment_;
130 bool was_show_called_; 131 bool was_show_called_;
132 bool is_incognito_;
131 133
132 DISALLOW_COPY_AND_ASSIGN(JourneyLogger); 134 DISALLOW_COPY_AND_ASSIGN(JourneyLogger);
133 }; 135 };
134 136
135 } // namespace payments 137 } // namespace payments
136 138
137 #endif // COMPONENTS_PAYMENTS_CORE_JOURNEY_LOGGER_H_ 139 #endif // COMPONENTS_PAYMENTS_CORE_JOURNEY_LOGGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698