| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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/browser/autocheckout_manager.h" | 5 #include "components/autofill/browser/autocheckout_manager.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "components/autofill/browser/autocheckout_request_manager.h" | 10 #include "components/autofill/browser/autocheckout_request_manager.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 case MISSING_CLICK_ELEMENT_BEFORE_FORM_FILLING: | 89 case MISSING_CLICK_ELEMENT_BEFORE_FORM_FILLING: |
| 90 return AutofillMetrics:: | 90 return AutofillMetrics:: |
| 91 AUTOCHECKOUT_BUY_FLOW_MISSING_CLICK_ELEMENT_BEFORE_FORM_FILLING; | 91 AUTOCHECKOUT_BUY_FLOW_MISSING_CLICK_ELEMENT_BEFORE_FORM_FILLING; |
| 92 case MISSING_CLICK_ELEMENT_AFTER_FORM_FILLING: | 92 case MISSING_CLICK_ELEMENT_AFTER_FORM_FILLING: |
| 93 return AutofillMetrics:: | 93 return AutofillMetrics:: |
| 94 AUTOCHECKOUT_BUY_FLOW_MISSING_CLICK_ELEMENT_AFTER_FORM_FILLING; | 94 AUTOCHECKOUT_BUY_FLOW_MISSING_CLICK_ELEMENT_AFTER_FORM_FILLING; |
| 95 case MISSING_ADVANCE: | 95 case MISSING_ADVANCE: |
| 96 return AutofillMetrics::AUTOCHECKOUT_BUY_FLOW_MISSING_ADVANCE_ELEMENT; | 96 return AutofillMetrics::AUTOCHECKOUT_BUY_FLOW_MISSING_ADVANCE_ELEMENT; |
| 97 case CANNOT_PROCEED: | 97 case CANNOT_PROCEED: |
| 98 return AutofillMetrics::AUTOCHECKOUT_BUY_FLOW_CANNOT_PROCEED; | 98 return AutofillMetrics::AUTOCHECKOUT_BUY_FLOW_CANNOT_PROCEED; |
| 99 case AUTOCHECKOUT_STATUS_NUM_STATUS: |
| 100 NOTREACHED(); |
| 99 } | 101 } |
| 100 | 102 |
| 101 NOTREACHED(); | 103 NOTREACHED(); |
| 102 return AutofillMetrics::NUM_AUTOCHECKOUT_BUY_FLOW_METRICS; | 104 return AutofillMetrics::NUM_AUTOCHECKOUT_BUY_FLOW_METRICS; |
| 103 } | 105 } |
| 104 | 106 |
| 105 // Callback for retrieving Google Account cookies. |callback| is passed the | 107 // Callback for retrieving Google Account cookies. |callback| is passed the |
| 106 // retrieved cookies and posted back to the UI thread. |cookies| is any Google | 108 // retrieved cookies and posted back to the UI thread. |cookies| is any Google |
| 107 // Account cookies. | 109 // Account cookies. |
| 108 void GetGoogleCookiesCallback( | 110 void GetGoogleCookiesCallback( |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 google_transaction_id_); | 474 google_transaction_id_); |
| 473 | 475 |
| 474 // Log the result of this Autocheckout flow to UMA. | 476 // Log the result of this Autocheckout flow to UMA. |
| 475 metric_logger_->LogAutocheckoutBuyFlowMetric( | 477 metric_logger_->LogAutocheckoutBuyFlowMetric( |
| 476 AutocheckoutStatusToUmaMetric(status)); | 478 AutocheckoutStatusToUmaMetric(status)); |
| 477 | 479 |
| 478 google_transaction_id_ = kTransactionIdNotSet; | 480 google_transaction_id_ = kTransactionIdNotSet; |
| 479 } | 481 } |
| 480 | 482 |
| 481 } // namespace autofill | 483 } // namespace autofill |
| OLD | NEW |