| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ios/chrome/browser/ui/contextual_search/contextual_search_metrics.h" | 5 #include "ios/chrome/browser/ui/contextual_search/contextual_search_metrics.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/metrics/user_metrics.h" | 10 #include "base/metrics/user_metrics.h" |
| 11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
| 12 | 12 |
| 13 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 14 #error "This file requires ARC support." |
| 15 #endif |
| 16 |
| 13 using ContextualSearch::PanelState; | 17 using ContextualSearch::PanelState; |
| 14 using ContextualSearch::StateChangeReason; | 18 using ContextualSearch::StateChangeReason; |
| 15 | 19 |
| 16 // TODO(crbug.com/546238): Convert this into a class that is injected into | 20 // TODO(crbug.com/546238): Convert this into a class that is injected into |
| 17 // CSController so it can be mocked and tested. | 21 // CSController so it can be mocked and tested. |
| 18 | 22 |
| 19 #define VLOG_UMA_HISTOGRAM_ENUMERATION(log_level, name, sample) \ | 23 #define VLOG_UMA_HISTOGRAM_ENUMERATION(log_level, name, sample) \ |
| 20 DVLOG(log_level) << (name) << ": " << (sample); | 24 DVLOG(log_level) << (name) << ": " << (sample); |
| 21 | 25 |
| 22 #define VLOG_UMA_HISTOGRAM_TIMES(log_level, name, sample) \ | 26 #define VLOG_UMA_HISTOGRAM_TIMES(log_level, name, sample) \ |
| (...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 EXIT_MAXIMIZED_TO_OTHER), | 786 EXIT_MAXIMIZED_TO_OTHER), |
| 783 EXIT_MAXIMIZED_TO_COUNT, 1); | 787 EXIT_MAXIMIZED_TO_COUNT, 1); |
| 784 break; | 788 break; |
| 785 default: | 789 default: |
| 786 NOTREACHED() << "RecordFirstStateExit for unexpected state " << to_state; | 790 NOTREACHED() << "RecordFirstStateExit for unexpected state " << to_state; |
| 787 break; | 791 break; |
| 788 } | 792 } |
| 789 } | 793 } |
| 790 | 794 |
| 791 } // namespace ContextualSearch | 795 } // namespace ContextualSearch |
| OLD | NEW |