| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 #include "chrome/browser/enumerate_modules_model_win.h" | 72 #include "chrome/browser/enumerate_modules_model_win.h" |
| 73 #elif defined(OS_CHROMEOS) | 73 #elif defined(OS_CHROMEOS) |
| 74 #include "chrome/browser/chromeos/cros/cros_library.h" | 74 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 75 #include "chrome/browser/chromeos/cros/cryptohome_library.h" | 75 #include "chrome/browser/chromeos/cros/cryptohome_library.h" |
| 76 #include "chrome/browser/chromeos/cros/network_library.h" | 76 #include "chrome/browser/chromeos/cros/network_library.h" |
| 77 #include "chrome/browser/chromeos/customization_document.h" | 77 #include "chrome/browser/chromeos/customization_document.h" |
| 78 #include "chrome/browser/chromeos/login/wizard_controller.h" | 78 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 79 #include "chrome/browser/chromeos/version_loader.h" | 79 #include "chrome/browser/chromeos/version_loader.h" |
| 80 #include "chrome/browser/oom_priority_manager.h" | 80 #include "chrome/browser/oom_priority_manager.h" |
| 81 #include "content/browser/zygote_host_linux.h" | 81 #include "content/browser/zygote_host_linux.h" |
| 82 #elif defined(OS_LINUX) | 82 #elif defined(OS_LINUX) || defined(OS_OPENBSD) |
| 83 #include "content/browser/zygote_host_linux.h" | 83 #include "content/browser/zygote_host_linux.h" |
| 84 #endif | 84 #endif |
| 85 | 85 |
| 86 #if defined(USE_TCMALLOC) | 86 #if defined(USE_TCMALLOC) |
| 87 #include "third_party/tcmalloc/chromium/src/google/malloc_extension.h" | 87 #include "third_party/tcmalloc/chromium/src/google/malloc_extension.h" |
| 88 #endif | 88 #endif |
| 89 | 89 |
| 90 using base::Time; | 90 using base::Time; |
| 91 using base::TimeDelta; | 91 using base::TimeDelta; |
| 92 | 92 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 chrome::kChromeUITermsHost, | 145 chrome::kChromeUITermsHost, |
| 146 chrome::kChromeUITracingHost, | 146 chrome::kChromeUITracingHost, |
| 147 chrome::kChromeUIVersionHost, | 147 chrome::kChromeUIVersionHost, |
| 148 chrome::kChromeUIWorkersHost, | 148 chrome::kChromeUIWorkersHost, |
| 149 #if defined(TRACK_ALL_TASK_OBJECTS) | 149 #if defined(TRACK_ALL_TASK_OBJECTS) |
| 150 chrome::kChromeUITrackingHost, | 150 chrome::kChromeUITrackingHost, |
| 151 #endif | 151 #endif |
| 152 #if defined(OS_WIN) | 152 #if defined(OS_WIN) |
| 153 chrome::kChromeUIConflictsHost, | 153 chrome::kChromeUIConflictsHost, |
| 154 #endif | 154 #endif |
| 155 #if defined(OS_LINUX) | 155 #if defined(OS_LINUX) || defined(OS_OPENBSD) |
| 156 chrome::kChromeUILinuxProxyConfigHost, | 156 chrome::kChromeUILinuxProxyConfigHost, |
| 157 chrome::kChromeUISandboxHost, | 157 chrome::kChromeUISandboxHost, |
| 158 #endif | 158 #endif |
| 159 #if defined(OS_CHROMEOS) | 159 #if defined(OS_CHROMEOS) |
| 160 chrome::kChromeUIActiveDownloadsHost, | 160 chrome::kChromeUIActiveDownloadsHost, |
| 161 chrome::kChromeUIChooseMobileNetworkHost, | 161 chrome::kChromeUIChooseMobileNetworkHost, |
| 162 chrome::kChromeUICryptohomeHost, | 162 chrome::kChromeUICryptohomeHost, |
| 163 chrome::kChromeUIDiscardsHost, | 163 chrome::kChromeUIDiscardsHost, |
| 164 chrome::kChromeUIImageBurnerHost, | 164 chrome::kChromeUIImageBurnerHost, |
| 165 chrome::kChromeUIKeyboardOverlayHost, | 165 chrome::kChromeUIKeyboardOverlayHost, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 183 chrome::kChromeUIStatsHost, | 183 chrome::kChromeUIStatsHost, |
| 184 chrome::kChromeUITaskManagerHost, | 184 chrome::kChromeUITaskManagerHost, |
| 185 chrome::kChromeUITermsHost, | 185 chrome::kChromeUITermsHost, |
| 186 chrome::kChromeUIVersionHost, | 186 chrome::kChromeUIVersionHost, |
| 187 #if defined(TRACK_ALL_TASK_OBJECTS) | 187 #if defined(TRACK_ALL_TASK_OBJECTS) |
| 188 chrome::kChromeUITrackingHost, | 188 chrome::kChromeUITrackingHost, |
| 189 #endif | 189 #endif |
| 190 #if defined(USE_TCMALLOC) | 190 #if defined(USE_TCMALLOC) |
| 191 chrome::kChromeUITCMallocHost, | 191 chrome::kChromeUITCMallocHost, |
| 192 #endif | 192 #endif |
| 193 #if defined(OS_LINUX) | 193 #if defined(OS_LINUX) || defined(OS_OPENBSD) |
| 194 chrome::kChromeUILinuxProxyConfigHost, | 194 chrome::kChromeUILinuxProxyConfigHost, |
| 195 chrome::kChromeUISandboxHost, | 195 chrome::kChromeUISandboxHost, |
| 196 #endif | 196 #endif |
| 197 #if defined(OS_CHROMEOS) | 197 #if defined(OS_CHROMEOS) |
| 198 chrome::kChromeUICryptohomeHost, | 198 chrome::kChromeUICryptohomeHost, |
| 199 chrome::kChromeUIDiscardsHost, | 199 chrome::kChromeUIDiscardsHost, |
| 200 chrome::kChromeUINetworkHost, | 200 chrome::kChromeUINetworkHost, |
| 201 chrome::kChromeUIOSCreditsHost, | 201 chrome::kChromeUIOSCreditsHost, |
| 202 #endif | 202 #endif |
| 203 }; | 203 }; |
| (...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1059 timers->Remove(index, &value); | 1059 timers->Remove(index, &value); |
| 1060 // We don't care about the value pointer; it's still tracked | 1060 // We don't care about the value pointer; it's still tracked |
| 1061 // on the counters list. | 1061 // on the counters list. |
| 1062 } | 1062 } |
| 1063 } | 1063 } |
| 1064 } | 1064 } |
| 1065 | 1065 |
| 1066 return data; | 1066 return data; |
| 1067 } | 1067 } |
| 1068 | 1068 |
| 1069 #if defined(OS_LINUX) | 1069 #if defined(OS_LINUX) || defined(OS_OPENBSD) |
| 1070 std::string AboutLinuxProxyConfig() { | 1070 std::string AboutLinuxProxyConfig() { |
| 1071 std::string data; | 1071 std::string data; |
| 1072 AppendHeader(&data, 0, | 1072 AppendHeader(&data, 0, |
| 1073 l10n_util::GetStringUTF8(IDS_ABOUT_LINUX_PROXY_CONFIG_TITLE)); | 1073 l10n_util::GetStringUTF8(IDS_ABOUT_LINUX_PROXY_CONFIG_TITLE)); |
| 1074 data.append("<style>body { max-width: 70ex; padding: 2ex 5ex; }</style>"); | 1074 data.append("<style>body { max-width: 70ex; padding: 2ex 5ex; }</style>"); |
| 1075 AppendBody(&data); | 1075 AppendBody(&data); |
| 1076 FilePath binary = CommandLine::ForCurrentProcess()->GetProgram(); | 1076 FilePath binary = CommandLine::ForCurrentProcess()->GetProgram(); |
| 1077 data.append(l10n_util::GetStringFUTF8( | 1077 data.append(l10n_util::GetStringFUTF8( |
| 1078 IDS_ABOUT_LINUX_PROXY_CONFIG_BODY, | 1078 IDS_ABOUT_LINUX_PROXY_CONFIG_BODY, |
| 1079 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), | 1079 l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), |
| (...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1444 } else if (host == chrome::kChromeUICryptohomeHost) { | 1444 } else if (host == chrome::kChromeUICryptohomeHost) { |
| 1445 response = AboutCryptohome(path); | 1445 response = AboutCryptohome(path); |
| 1446 } else if (host == chrome::kChromeUIDiscardsHost) { | 1446 } else if (host == chrome::kChromeUIDiscardsHost) { |
| 1447 response = AboutDiscards(path); | 1447 response = AboutDiscards(path); |
| 1448 #endif | 1448 #endif |
| 1449 } else if (host == chrome::kChromeUIDNSHost) { | 1449 } else if (host == chrome::kChromeUIDNSHost) { |
| 1450 AboutDnsHandler::Start(this, request_id); | 1450 AboutDnsHandler::Start(this, request_id); |
| 1451 return; | 1451 return; |
| 1452 } else if (host == chrome::kChromeUIHistogramsHost) { | 1452 } else if (host == chrome::kChromeUIHistogramsHost) { |
| 1453 response = AboutHistograms(path); | 1453 response = AboutHistograms(path); |
| 1454 #if defined(OS_LINUX) | 1454 #if defined(OS_LINUX) || defined(OS_OPENBSD) |
| 1455 } else if (host == chrome::kChromeUILinuxProxyConfigHost) { | 1455 } else if (host == chrome::kChromeUILinuxProxyConfigHost) { |
| 1456 response = AboutLinuxProxyConfig(); | 1456 response = AboutLinuxProxyConfig(); |
| 1457 #endif | 1457 #endif |
| 1458 } else if (host == chrome::kChromeUIMemoryHost) { | 1458 } else if (host == chrome::kChromeUIMemoryHost) { |
| 1459 response = GetAboutMemoryRedirectResponse(profile()); | 1459 response = GetAboutMemoryRedirectResponse(profile()); |
| 1460 } else if (host == chrome::kChromeUIMemoryRedirectHost) { | 1460 } else if (host == chrome::kChromeUIMemoryRedirectHost) { |
| 1461 AboutMemory(path, this, request_id); | 1461 AboutMemory(path, this, request_id); |
| 1462 return; | 1462 return; |
| 1463 #if defined(OS_CHROMEOS) | 1463 #if defined(OS_CHROMEOS) |
| 1464 } else if (host == chrome::kChromeUINetworkHost) { | 1464 } else if (host == chrome::kChromeUINetworkHost) { |
| 1465 response = AboutNetwork(path); | 1465 response = AboutNetwork(path); |
| 1466 } else if (host == chrome::kChromeUIOSCreditsHost) { | 1466 } else if (host == chrome::kChromeUIOSCreditsHost) { |
| 1467 response = ResourceBundle::GetSharedInstance().GetRawDataResource( | 1467 response = ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 1468 IDR_OS_CREDITS_HTML).as_string(); | 1468 IDR_OS_CREDITS_HTML).as_string(); |
| 1469 #endif | 1469 #endif |
| 1470 #if defined(OS_LINUX) | 1470 #if defined(OS_LINUX) || defined(OS_OPENBSD) |
| 1471 } else if (host == chrome::kChromeUISandboxHost) { | 1471 } else if (host == chrome::kChromeUISandboxHost) { |
| 1472 response = AboutSandbox(); | 1472 response = AboutSandbox(); |
| 1473 #endif | 1473 #endif |
| 1474 } else if (host == chrome::kChromeUIStatsHost) { | 1474 } else if (host == chrome::kChromeUIStatsHost) { |
| 1475 response = AboutStats(path); | 1475 response = AboutStats(path); |
| 1476 #if defined(TRACK_ALL_TASK_OBJECTS) | 1476 #if defined(TRACK_ALL_TASK_OBJECTS) |
| 1477 } else if (host == chrome::kChromeUITrackingHost) { | 1477 } else if (host == chrome::kChromeUITrackingHost) { |
| 1478 response = AboutTracking(path); | 1478 response = AboutTracking(path); |
| 1479 #endif | 1479 #endif |
| 1480 #if defined(USE_TCMALLOC) | 1480 #if defined(USE_TCMALLOC) |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1636 return false; | 1636 return false; |
| 1637 } | 1637 } |
| 1638 | 1638 |
| 1639 std::vector<std::string> ChromePaths() { | 1639 std::vector<std::string> ChromePaths() { |
| 1640 std::vector<std::string> paths; | 1640 std::vector<std::string> paths; |
| 1641 paths.reserve(arraysize(kChromePaths)); | 1641 paths.reserve(arraysize(kChromePaths)); |
| 1642 for (size_t i = 0; i < arraysize(kChromePaths); i++) | 1642 for (size_t i = 0; i < arraysize(kChromePaths); i++) |
| 1643 paths.push_back(kChromePaths[i]); | 1643 paths.push_back(kChromePaths[i]); |
| 1644 return paths; | 1644 return paths; |
| 1645 } | 1645 } |
| OLD | NEW |