| 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 "components/infobars/core/infobar_container.h" | 5 #include "components/infobars/core/infobar_container.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/metrics/histogram_base.h" | 11 #include "base/metrics/histogram_base.h" |
| 12 #include "base/metrics/histogram_macros.h" |
| 12 #include "base/metrics/metrics_hashes.h" | 13 #include "base/metrics/metrics_hashes.h" |
| 13 #include "base/metrics/sparse_histogram.h" | |
| 14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
| 15 #include "components/infobars/core/infobar.h" | 15 #include "components/infobars/core/infobar.h" |
| 16 #include "components/infobars/core/infobar_delegate.h" | 16 #include "components/infobars/core/infobar_delegate.h" |
| 17 | 17 |
| 18 namespace infobars { | 18 namespace infobars { |
| 19 | 19 |
| 20 InfoBarContainer::Delegate::~Delegate() { | 20 InfoBarContainer::Delegate::~Delegate() { |
| 21 } | 21 } |
| 22 | 22 |
| 23 InfoBarContainer::InfoBarContainer(Delegate* delegate) | 23 InfoBarContainer::InfoBarContainer(Delegate* delegate) |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 infobar->set_container(this); | 156 infobar->set_container(this); |
| 157 infobar->Show(animate); | 157 infobar->Show(animate); |
| 158 | 158 |
| 159 // Record the infobar being displayed. | 159 // Record the infobar being displayed. |
| 160 DCHECK_NE(InfoBarDelegate::INVALID, infobar->delegate()->GetIdentifier()); | 160 DCHECK_NE(InfoBarDelegate::INVALID, infobar->delegate()->GetIdentifier()); |
| 161 UMA_HISTOGRAM_SPARSE_SLOWLY("InfoBar.Shown", | 161 UMA_HISTOGRAM_SPARSE_SLOWLY("InfoBar.Shown", |
| 162 infobar->delegate()->GetIdentifier()); | 162 infobar->delegate()->GetIdentifier()); |
| 163 } | 163 } |
| 164 | 164 |
| 165 } // namespace infobars | 165 } // namespace infobars |
| OLD | NEW |