| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/ui/webui/log_web_ui_url.h" | 5 #include "chrome/browser/ui/webui/log_web_ui_url.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/hash.h" | 9 #include "base/hash.h" |
| 10 #include "base/metrics/histogram_base.h" | 10 #include "base/metrics/histogram_base.h" |
| 11 #include "base/metrics/sparse_histogram.h" | 11 #include "base/metrics/histogram_macros.h" |
| 12 #include "chrome/common/url_constants.h" | 12 #include "chrome/common/url_constants.h" |
| 13 #include "content/public/common/url_constants.h" | 13 #include "content/public/common/url_constants.h" |
| 14 #include "url/gurl.h" | 14 #include "url/gurl.h" |
| 15 | 15 |
| 16 #if defined(ENABLE_EXTENSIONS) | 16 #if defined(ENABLE_EXTENSIONS) |
| 17 #include "chrome/common/extensions/extension_constants.h" | 17 #include "chrome/common/extensions/extension_constants.h" |
| 18 #include "extensions/common/constants.h" | 18 #include "extensions/common/constants.h" |
| 19 #endif | 19 #endif |
| 20 | 20 |
| 21 namespace webui { | 21 namespace webui { |
| (...skipping 12 matching lines...) Expand all Loading... |
| 34 if (should_log) { | 34 if (should_log) { |
| 35 uint32_t hash = base::Hash(web_ui_url.GetOrigin().spec()); | 35 uint32_t hash = base::Hash(web_ui_url.GetOrigin().spec()); |
| 36 UMA_HISTOGRAM_SPARSE_SLOWLY(kWebUICreatedForUrl, | 36 UMA_HISTOGRAM_SPARSE_SLOWLY(kWebUICreatedForUrl, |
| 37 static_cast<base::HistogramBase::Sample>(hash)); | 37 static_cast<base::HistogramBase::Sample>(hash)); |
| 38 } | 38 } |
| 39 | 39 |
| 40 return should_log; | 40 return should_log; |
| 41 } | 41 } |
| 42 | 42 |
| 43 } // namespace webui | 43 } // namespace webui |
| OLD | NEW |