| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/metrics/metrics_log.h" | 5 #include "chrome/browser/metrics/metrics_log.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 namespace { | 77 namespace { |
| 78 | 78 |
| 79 // Returns the date at which the current metrics client ID was created as | 79 // Returns the date at which the current metrics client ID was created as |
| 80 // a string containing seconds since the epoch, or "0" if none was found. | 80 // a string containing seconds since the epoch, or "0" if none was found. |
| 81 std::string GetMetricsEnabledDate(PrefService* pref) { | 81 std::string GetMetricsEnabledDate(PrefService* pref) { |
| 82 if (!pref) { | 82 if (!pref) { |
| 83 NOTREACHED(); | 83 NOTREACHED(); |
| 84 return "0"; | 84 return "0"; |
| 85 } | 85 } |
| 86 | 86 |
| 87 return pref->GetString(prefs::kMetricsClientIDTimestamp); | 87 return pref->GetString(prefs::kMetricsReportingEnabledTimestamp); |
| 88 } | 88 } |
| 89 | 89 |
| 90 OmniboxEventProto::InputType AsOmniboxEventInputType( | 90 OmniboxEventProto::InputType AsOmniboxEventInputType( |
| 91 AutocompleteInput::Type type) { | 91 AutocompleteInput::Type type) { |
| 92 switch (type) { | 92 switch (type) { |
| 93 case AutocompleteInput::INVALID: | 93 case AutocompleteInput::INVALID: |
| 94 return OmniboxEventProto::INVALID; | 94 return OmniboxEventProto::INVALID; |
| 95 case AutocompleteInput::UNKNOWN: | 95 case AutocompleteInput::UNKNOWN: |
| 96 return OmniboxEventProto::UNKNOWN; | 96 return OmniboxEventProto::UNKNOWN; |
| 97 case AutocompleteInput::URL: | 97 case AutocompleteInput::URL: |
| (...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 ProductDataToProto(google_update_metrics.google_update_data, | 892 ProductDataToProto(google_update_metrics.google_update_data, |
| 893 google_update->mutable_google_update_status()); | 893 google_update->mutable_google_update_status()); |
| 894 } | 894 } |
| 895 | 895 |
| 896 if (!google_update_metrics.product_data.version.empty()) { | 896 if (!google_update_metrics.product_data.version.empty()) { |
| 897 ProductDataToProto(google_update_metrics.product_data, | 897 ProductDataToProto(google_update_metrics.product_data, |
| 898 google_update->mutable_client_status()); | 898 google_update->mutable_client_status()); |
| 899 } | 899 } |
| 900 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) | 900 #endif // defined(GOOGLE_CHROME_BUILD) && defined(OS_WIN) |
| 901 } | 901 } |
| OLD | NEW |