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

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

Issue 2805913002: [Payments] Move JourneyLogger unit tests from Java to C++. (Closed)
Patch Set: 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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 COMPLETION_STATUS_COMPLETED = 0, 43 COMPLETION_STATUS_COMPLETED = 0,
44 COMPLETION_STATUS_USER_ABORTED = 1, 44 COMPLETION_STATUS_USER_ABORTED = 1,
45 COMPLETION_STATUS_OTHER_ABORTED = 2, 45 COMPLETION_STATUS_OTHER_ABORTED = 2,
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 explicit JourneyLogger(bool is_incognito); 56 explicit JourneyLogger(bool is_incognito);
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);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 bool could_make_payment_; 130 bool could_make_payment_;
131 bool was_show_called_; 131 bool was_show_called_;
132 bool is_incognito_; 132 bool is_incognito_;
133 133
134 DISALLOW_COPY_AND_ASSIGN(JourneyLogger); 134 DISALLOW_COPY_AND_ASSIGN(JourneyLogger);
135 }; 135 };
136 136
137 } // namespace payments 137 } // namespace payments
138 138
139 #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