OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_about_handler.h" | 5 #include "chrome/browser/browser_about_handler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 it.Advance(); | 842 it.Advance(); |
843 } | 843 } |
844 | 844 |
845 return data; | 845 return data; |
846 } | 846 } |
847 #endif | 847 #endif |
848 | 848 |
849 std::string AboutHistograms(const std::string& query) { | 849 std::string AboutHistograms(const std::string& query) { |
850 TimeDelta wait_time = TimeDelta::FromMilliseconds(10000); | 850 TimeDelta wait_time = TimeDelta::FromMilliseconds(10000); |
851 | 851 |
| 852 #ifndef NDEBUG |
| 853 base::StatisticsRecorder::CollectHistogramStats("Browser"); |
| 854 #endif |
| 855 |
852 HistogramSynchronizer* current_synchronizer = | 856 HistogramSynchronizer* current_synchronizer = |
853 HistogramSynchronizer::CurrentSynchronizer(); | 857 HistogramSynchronizer::CurrentSynchronizer(); |
854 DCHECK(current_synchronizer != NULL); | 858 DCHECK(current_synchronizer != NULL); |
855 current_synchronizer->FetchRendererHistogramsSynchronously(wait_time); | 859 current_synchronizer->FetchRendererHistogramsSynchronously(wait_time); |
856 | 860 |
857 std::string unescaped_query; | 861 std::string unescaped_query; |
858 std::string unescaped_title("About Histograms"); | 862 std::string unescaped_title("About Histograms"); |
859 if (!query.empty()) { | 863 if (!query.empty()) { |
860 unescaped_query = net::UnescapeURLComponent(query, UnescapeRule::NORMAL); | 864 unescaped_query = net::UnescapeURLComponent(query, UnescapeRule::NORMAL); |
861 unescaped_title += " - " + unescaped_query; | 865 unescaped_title += " - " + unescaped_query; |
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1632 return false; | 1636 return false; |
1633 } | 1637 } |
1634 | 1638 |
1635 std::vector<std::string> ChromePaths() { | 1639 std::vector<std::string> ChromePaths() { |
1636 std::vector<std::string> paths; | 1640 std::vector<std::string> paths; |
1637 paths.reserve(arraysize(kChromePaths)); | 1641 paths.reserve(arraysize(kChromePaths)); |
1638 for (size_t i = 0; i < arraysize(kChromePaths); i++) | 1642 for (size_t i = 0; i < arraysize(kChromePaths); i++) |
1639 paths.push_back(kChromePaths[i]); | 1643 paths.push_back(kChromePaths[i]); |
1640 return paths; | 1644 return paths; |
1641 } | 1645 } |
OLD | NEW |