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

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

Issue 2923243003: Merge-60 [Payments] Move the RequestedInformation metric to native. (Closed)
Patch Set: Created 3 years, 6 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 161
162 // Records the fact that the Payment Request was shown to the user. 162 // Records the fact that the Payment Request was shown to the user.
163 void SetShowCalled(); 163 void SetShowCalled();
164 164
165 // Records that an event occurred. 165 // Records that an event occurred.
166 void SetEventOccurred(Event event); 166 void SetEventOccurred(Event event);
167 167
168 // Records the payment method that was used to complete the Payment Request. 168 // Records the payment method that was used to complete the Payment Request.
169 void SetSelectedPaymentMethod(SelectedPaymentMethod payment_method); 169 void SetSelectedPaymentMethod(SelectedPaymentMethod payment_method);
170 170
171 // Records the user information requested by the merchant.
172 void SetRequestedInformation(bool requested_shipping,
173 bool requested_email,
174 bool requested_phone,
175 bool requested_name);
176
171 // Records that the Payment Request was completed successfully, and starts the 177 // Records that the Payment Request was completed successfully, and starts the
172 // logging of all the journey metrics. 178 // logging of all the journey metrics.
173 void SetCompleted(); 179 void SetCompleted();
174 180
175 // Records that the Payment Request was aborted along with the reason. Also 181 // Records that the Payment Request was aborted along with the reason. Also
176 // starts the logging of all the journey metrics. 182 // starts the logging of all the journey metrics.
177 void SetAborted(AbortReason reason); 183 void SetAborted(AbortReason reason);
178 184
179 #ifdef OS_ANDROID 185 #ifdef OS_ANDROID
180 // Records that the Payment Request was not shown to the user, along with the 186 // Records that the Payment Request was not shown to the user, along with the
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // either been completed or aborted. 221 // either been completed or aborted.
216 void RecordJourneyStatsHistograms(CompletionStatus completion_status); 222 void RecordJourneyStatsHistograms(CompletionStatus completion_status);
217 223
218 // Records the histograms for all the steps of a complete checkout flow that 224 // Records the histograms for all the steps of a complete checkout flow that
219 // were reached. 225 // were reached.
220 void RecordCheckoutFlowMetrics(); 226 void RecordCheckoutFlowMetrics();
221 227
222 // Records the metric about the selected payment method. 228 // Records the metric about the selected payment method.
223 void RecordPaymentMethodMetric(); 229 void RecordPaymentMethodMetric();
224 230
231 // Records the user information that the merchant requested.
232 void RecordRequestedInformationMetrics();
233
225 // Records the histograms for all the sections that were requested by the 234 // Records the histograms for all the sections that were requested by the
226 // merchant. 235 // merchant.
227 void RecordSectionSpecificStats(CompletionStatus completion_status); 236 void RecordSectionSpecificStats(CompletionStatus completion_status);
228 237
229 // Records the metrics related the the CanMakePayment method unless in 238 // Records the metrics related the the CanMakePayment method unless in
230 // incognito mode. 239 // incognito mode.
231 void RecordCanMakePaymentStats(CompletionStatus completion_status); 240 void RecordCanMakePaymentStats(CompletionStatus completion_status);
232 241
233 // Records CanMakePayment's return value effect on whether the Payment Request 242 // Records CanMakePayment's return value effect on whether the Payment Request
234 // was shown or not. 243 // was shown or not.
(...skipping 13 matching lines...) Expand all
248 bool could_make_payment_ = false; 257 bool could_make_payment_ = false;
249 bool was_show_called_ = false; 258 bool was_show_called_ = false;
250 bool is_incognito_; 259 bool is_incognito_;
251 260
252 // Accumulates the many events that have happened during the Payment Request. 261 // Accumulates the many events that have happened during the Payment Request.
253 int events_; 262 int events_;
254 263
255 // To keep track of the selected payment method. 264 // To keep track of the selected payment method.
256 SelectedPaymentMethod payment_method_ = SELECTED_PAYMENT_METHOD_MAX; 265 SelectedPaymentMethod payment_method_ = SELECTED_PAYMENT_METHOD_MAX;
257 266
267 // Keeps track of the user information requested by the merchant.
268 int requested_information_ = REQUESTED_INFORMATION_MAX;
269
258 const GURL url_; 270 const GURL url_;
259 271
260 // Not owned, will outlive this object. 272 // Not owned, will outlive this object.
261 ukm::UkmRecorder* ukm_recorder_; 273 ukm::UkmRecorder* ukm_recorder_;
262 274
263 DISALLOW_COPY_AND_ASSIGN(JourneyLogger); 275 DISALLOW_COPY_AND_ASSIGN(JourneyLogger);
264 }; 276 };
265 277
266 } // namespace payments 278 } // namespace payments
267 279
268 #endif // COMPONENTS_PAYMENTS_CORE_JOURNEY_LOGGER_H_ 280 #endif // COMPONENTS_PAYMENTS_CORE_JOURNEY_LOGGER_H_
OLDNEW
« no previous file with comments | « chrome/browser/payments/android/journey_logger_android.cc ('k') | components/payments/core/journey_logger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698