OLD | NEW |
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_CONTENT_BROWSER_AUTOCHECKOUT_STATISTIC_H__ | 5 #ifndef COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_STATISTIC_H__ |
6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_STATISTIC_H__ | 6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_STATISTIC_H__ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/time.h" | 11 #include "base/time/time.h" |
12 #include "components/autofill/content/browser/autocheckout_steps.h" | 12 #include "components/autofill/content/browser/autocheckout_steps.h" |
13 | 13 |
14 namespace base { | 14 namespace base { |
15 class DictionaryValue; | 15 class DictionaryValue; |
16 } | 16 } |
17 | 17 |
18 namespace autofill { | 18 namespace autofill { |
19 | 19 |
20 // Per page statistics gathered in Autocheckout flow. | 20 // Per page statistics gathered in Autocheckout flow. |
21 struct AutocheckoutStatistic { | 21 struct AutocheckoutStatistic { |
22 AutocheckoutStatistic(); | 22 AutocheckoutStatistic(); |
23 ~AutocheckoutStatistic(); | 23 ~AutocheckoutStatistic(); |
24 | 24 |
25 // Page number for which this statistic is being recorded. | 25 // Page number for which this statistic is being recorded. |
26 int page_number; | 26 int page_number; |
27 | 27 |
28 // Autocheckout steps that are part of |page_number|. | 28 // Autocheckout steps that are part of |page_number|. |
29 std::vector<AutocheckoutStepType> steps; | 29 std::vector<AutocheckoutStepType> steps; |
30 | 30 |
31 // Time taken for performing |steps|, used for measuring latency. | 31 // Time taken for performing |steps|, used for measuring latency. |
32 base::TimeDelta time_taken; | 32 base::TimeDelta time_taken; |
33 | 33 |
34 // Helper method to convert AutocheckoutStatistic to json representation. | 34 // Helper method to convert AutocheckoutStatistic to json representation. |
35 scoped_ptr<base::DictionaryValue> ToDictionary() const; | 35 scoped_ptr<base::DictionaryValue> ToDictionary() const; |
36 }; | 36 }; |
37 | 37 |
38 } // namespace autofill | 38 } // namespace autofill |
39 | 39 |
40 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_STATISTIC_H__ | 40 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_AUTOCHECKOUT_STATISTIC_H__ |
OLD | NEW |