OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/about_ui.h" | 5 #include "chrome/browser/ui/webui/about_ui.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
801 std::string AboutHistograms(const std::string& query) { | 801 std::string AboutHistograms(const std::string& query) { |
802 TimeDelta wait_time = TimeDelta::FromMilliseconds(10000); | 802 TimeDelta wait_time = TimeDelta::FromMilliseconds(10000); |
803 | 803 |
804 #ifndef NDEBUG | 804 #ifndef NDEBUG |
805 base::StatisticsRecorder::CollectHistogramStats("Browser"); | 805 base::StatisticsRecorder::CollectHistogramStats("Browser"); |
806 #endif | 806 #endif |
807 | 807 |
808 HistogramSynchronizer* current_synchronizer = | 808 HistogramSynchronizer* current_synchronizer = |
809 HistogramSynchronizer::CurrentSynchronizer(); | 809 HistogramSynchronizer::CurrentSynchronizer(); |
810 DCHECK(current_synchronizer != NULL); | 810 DCHECK(current_synchronizer != NULL); |
811 current_synchronizer->FetchRendererHistogramsSynchronously(wait_time); | 811 current_synchronizer->FetchHistogramsSynchronously(wait_time); |
812 | 812 |
813 std::string unescaped_query; | 813 std::string unescaped_query; |
814 std::string unescaped_title("About Histograms"); | 814 std::string unescaped_title("About Histograms"); |
815 if (!query.empty()) { | 815 if (!query.empty()) { |
816 unescaped_query = net::UnescapeURLComponent(query, | 816 unescaped_query = net::UnescapeURLComponent(query, |
817 net::UnescapeRule::NORMAL); | 817 net::UnescapeRule::NORMAL); |
818 unescaped_title += " - " + unescaped_query; | 818 unescaped_title += " - " + unescaped_query; |
819 } | 819 } |
820 | 820 |
821 std::string data; | 821 std::string data; |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1471 | 1471 |
1472 AboutUI::AboutUI(content::WebUI* web_ui, const std::string& name) | 1472 AboutUI::AboutUI(content::WebUI* web_ui, const std::string& name) |
1473 : WebUIController(web_ui) { | 1473 : WebUIController(web_ui) { |
1474 Profile* profile = Profile::FromWebUI(web_ui); | 1474 Profile* profile = Profile::FromWebUI(web_ui); |
1475 ChromeURLDataManager::DataSource* source = | 1475 ChromeURLDataManager::DataSource* source = |
1476 new AboutUIHTMLSource(name, profile); | 1476 new AboutUIHTMLSource(name, profile); |
1477 if (source) { | 1477 if (source) { |
1478 ChromeURLDataManager::AddDataSource(profile, source); | 1478 ChromeURLDataManager::AddDataSource(profile, source); |
1479 } | 1479 } |
1480 } | 1480 } |
OLD | NEW |