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