Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Side by Side Diff: chrome/browser/browser_about_handler.cc

Issue 8552002: net: Move UnescapeRule into the net namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/bookmarks/bookmark_utils.cc ('k') | chrome/browser/chromeos/web_socket_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 #endif 852 #endif
853 853
854 HistogramSynchronizer* current_synchronizer = 854 HistogramSynchronizer* current_synchronizer =
855 HistogramSynchronizer::CurrentSynchronizer(); 855 HistogramSynchronizer::CurrentSynchronizer();
856 DCHECK(current_synchronizer != NULL); 856 DCHECK(current_synchronizer != NULL);
857 current_synchronizer->FetchRendererHistogramsSynchronously(wait_time); 857 current_synchronizer->FetchRendererHistogramsSynchronously(wait_time);
858 858
859 std::string unescaped_query; 859 std::string unescaped_query;
860 std::string unescaped_title("About Histograms"); 860 std::string unescaped_title("About Histograms");
861 if (!query.empty()) { 861 if (!query.empty()) {
862 unescaped_query = net::UnescapeURLComponent(query, UnescapeRule::NORMAL); 862 unescaped_query = net::UnescapeURLComponent(query,
863 net::UnescapeRule::NORMAL);
863 unescaped_title += " - " + unescaped_query; 864 unescaped_title += " - " + unescaped_query;
864 } 865 }
865 866
866 std::string data; 867 std::string data;
867 AppendHeader(&data, 0, unescaped_title); 868 AppendHeader(&data, 0, unescaped_title);
868 AppendBody(&data); 869 AppendBody(&data);
869 base::StatisticsRecorder::WriteHTMLGraph(unescaped_query, &data); 870 base::StatisticsRecorder::WriteHTMLGraph(unescaped_query, &data);
870 AppendFooter(&data); 871 AppendFooter(&data);
871 return data; 872 return data;
872 } 873 }
(...skipping 10 matching lines...) Expand all
883 ResourceBundle::GetSharedInstance().GetRawDataResource( 884 ResourceBundle::GetSharedInstance().GetRawDataResource(
884 path == kMemoryJsPath ? IDR_ABOUT_MEMORY_JS : 885 path == kMemoryJsPath ? IDR_ABOUT_MEMORY_JS :
885 IDR_ABOUT_MEMORY_HTML).as_string(), request_id); 886 IDR_ABOUT_MEMORY_HTML).as_string(), request_id);
886 } 887 }
887 } 888 }
888 889
889 static std::string AboutTracking(const std::string& query) { 890 static std::string AboutTracking(const std::string& query) {
890 std::string unescaped_title("About Tracking"); 891 std::string unescaped_title("About Tracking");
891 if (!query.empty()) { 892 if (!query.empty()) {
892 unescaped_title += " - "; 893 unescaped_title += " - ";
893 unescaped_title += net::UnescapeURLComponent(query, UnescapeRule::NORMAL); 894 unescaped_title += net::UnescapeURLComponent(query,
895 net::UnescapeRule::NORMAL);
894 } 896 }
895 std::string data; 897 std::string data;
896 AppendHeader(&data, 0, unescaped_title); 898 AppendHeader(&data, 0, unescaped_title);
897 AppendBody(&data); 899 AppendBody(&data);
898 tracked_objects::ThreadData::WriteHTML(query, &data); 900 tracked_objects::ThreadData::WriteHTML(query, &data);
899 AppendFooter(&data); 901 AppendFooter(&data);
900 return data; 902 return data;
901 } 903 }
902 904
903 // Handler for filling in the "about:stats" page, as called by the browser's 905 // Handler for filling in the "about:stats" page, as called by the browser's
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
1630 return false; 1632 return false;
1631 } 1633 }
1632 1634
1633 std::vector<std::string> ChromePaths() { 1635 std::vector<std::string> ChromePaths() {
1634 std::vector<std::string> paths; 1636 std::vector<std::string> paths;
1635 paths.reserve(arraysize(kChromePaths)); 1637 paths.reserve(arraysize(kChromePaths));
1636 for (size_t i = 0; i < arraysize(kChromePaths); i++) 1638 for (size_t i = 0; i < arraysize(kChromePaths); i++)
1637 paths.push_back(kChromePaths[i]); 1639 paths.push_back(kChromePaths[i]);
1638 return paths; 1640 return paths;
1639 } 1641 }
OLDNEW
« no previous file with comments | « chrome/browser/bookmarks/bookmark_utils.cc ('k') | chrome/browser/chromeos/web_socket_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698