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 <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 #if defined(OS_WIN) | 72 #if defined(OS_WIN) |
73 #include "chrome/browser/enumerate_modules_model_win.h" | 73 #include "chrome/browser/enumerate_modules_model_win.h" |
74 #elif defined(OS_CHROMEOS) | 74 #elif defined(OS_CHROMEOS) |
75 #include "chrome/browser/chromeos/cros/cros_library.h" | 75 #include "chrome/browser/chromeos/cros/cros_library.h" |
76 #include "chrome/browser/chromeos/cros/cryptohome_library.h" | 76 #include "chrome/browser/chromeos/cros/cryptohome_library.h" |
77 #include "chrome/browser/chromeos/cros/network_library.h" | 77 #include "chrome/browser/chromeos/cros/network_library.h" |
78 #include "chrome/browser/chromeos/customization_document.h" | 78 #include "chrome/browser/chromeos/customization_document.h" |
79 #include "chrome/browser/chromeos/login/wizard_controller.h" | 79 #include "chrome/browser/chromeos/login/wizard_controller.h" |
80 #include "chrome/browser/chromeos/version_loader.h" | 80 #include "chrome/browser/chromeos/version_loader.h" |
81 #include "chrome/browser/oom_priority_manager.h" | 81 #include "chrome/browser/oom_priority_manager.h" |
82 #include "content/browser/zygote_host_linux.h" | 82 #include "content/public/browser/zygote_host_linux.h" |
83 #elif defined(OS_LINUX) || defined(OS_OPENBSD) | 83 #elif defined(OS_LINUX) || defined(OS_OPENBSD) |
84 #include "content/browser/zygote_host_linux.h" | 84 #include "content/public/browser/zygote_host_linux.h" |
85 #endif | 85 #endif |
86 | 86 |
87 #if defined(USE_TCMALLOC) | 87 #if defined(USE_TCMALLOC) |
88 #include "third_party/tcmalloc/chromium/src/google/malloc_extension.h" | 88 #include "third_party/tcmalloc/chromium/src/google/malloc_extension.h" |
89 #endif | 89 #endif |
90 | 90 |
91 using base::Time; | 91 using base::Time; |
92 using base::TimeDelta; | 92 using base::TimeDelta; |
93 using content::BrowserThread; | 93 using content::BrowserThread; |
94 using content::PluginService; | 94 using content::PluginService; |
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
955 } | 955 } |
956 | 956 |
957 std::string AboutSandbox() { | 957 std::string AboutSandbox() { |
958 std::string data; | 958 std::string data; |
959 AppendHeader(&data, 0, l10n_util::GetStringUTF8(IDS_ABOUT_SANDBOX_TITLE)); | 959 AppendHeader(&data, 0, l10n_util::GetStringUTF8(IDS_ABOUT_SANDBOX_TITLE)); |
960 AppendBody(&data); | 960 AppendBody(&data); |
961 data.append("<h1>"); | 961 data.append("<h1>"); |
962 data.append(l10n_util::GetStringUTF8(IDS_ABOUT_SANDBOX_TITLE)); | 962 data.append(l10n_util::GetStringUTF8(IDS_ABOUT_SANDBOX_TITLE)); |
963 data.append("</h1>"); | 963 data.append("</h1>"); |
964 | 964 |
965 const int status = ZygoteHost::GetInstance()->sandbox_status(); | 965 const int status = content::ZygoteHost::GetInstance()->GetSandboxStatus(); |
966 | 966 |
967 data.append("<table>"); | 967 data.append("<table>"); |
968 | 968 |
969 AboutSandboxRow(&data, "", IDS_ABOUT_SANDBOX_SUID_SANDBOX, | 969 AboutSandboxRow(&data, "", IDS_ABOUT_SANDBOX_SUID_SANDBOX, |
970 status & ZygoteHost::kSandboxSUID); | 970 status & content::ZygoteHost::kSandboxSUID); |
971 AboutSandboxRow(&data, " ", IDS_ABOUT_SANDBOX_PID_NAMESPACES, | 971 AboutSandboxRow(&data, " ", IDS_ABOUT_SANDBOX_PID_NAMESPACES, |
972 status & ZygoteHost::kSandboxPIDNS); | 972 status & content::ZygoteHost::kSandboxPIDNS); |
973 AboutSandboxRow(&data, " ", IDS_ABOUT_SANDBOX_NET_NAMESPACES, | 973 AboutSandboxRow(&data, " ", IDS_ABOUT_SANDBOX_NET_NAMESPACES, |
974 status & ZygoteHost::kSandboxNetNS); | 974 status & content::ZygoteHost::kSandboxNetNS); |
975 AboutSandboxRow(&data, "", IDS_ABOUT_SANDBOX_SECCOMP_SANDBOX, | 975 AboutSandboxRow(&data, "", IDS_ABOUT_SANDBOX_SECCOMP_SANDBOX, |
976 status & ZygoteHost::kSandboxSeccomp); | 976 status & content::ZygoteHost::kSandboxSeccomp); |
977 | 977 |
978 data.append("</table>"); | 978 data.append("</table>"); |
979 | 979 |
980 bool good = ((status & ZygoteHost::kSandboxSUID) && | 980 bool good = ((status & content::ZygoteHost::kSandboxSUID) && |
981 (status & ZygoteHost::kSandboxPIDNS)) || | 981 (status & content::ZygoteHost::kSandboxPIDNS)) || |
982 (status & ZygoteHost::kSandboxSeccomp); | 982 (status & content::ZygoteHost::kSandboxSeccomp); |
983 if (good) { | 983 if (good) { |
984 data.append("<p style=\"color: green\">"); | 984 data.append("<p style=\"color: green\">"); |
985 data.append(l10n_util::GetStringUTF8(IDS_ABOUT_SANDBOX_OK)); | 985 data.append(l10n_util::GetStringUTF8(IDS_ABOUT_SANDBOX_OK)); |
986 } else { | 986 } else { |
987 data.append("<p style=\"color: red\">"); | 987 data.append("<p style=\"color: red\">"); |
988 data.append(l10n_util::GetStringUTF8(IDS_ABOUT_SANDBOX_BAD)); | 988 data.append(l10n_util::GetStringUTF8(IDS_ABOUT_SANDBOX_BAD)); |
989 } | 989 } |
990 data.append("</p>"); | 990 data.append("</p>"); |
991 | 991 |
992 AppendFooter(&data); | 992 AppendFooter(&data); |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1383 } | 1383 } |
1384 | 1384 |
1385 AboutUI::AboutUI(content::WebUI* web_ui, const std::string& name) | 1385 AboutUI::AboutUI(content::WebUI* web_ui, const std::string& name) |
1386 : WebUIController(web_ui) { | 1386 : WebUIController(web_ui) { |
1387 Profile* profile = Profile::FromWebUI(web_ui); | 1387 Profile* profile = Profile::FromWebUI(web_ui); |
1388 ChromeURLDataManager::DataSource* source = | 1388 ChromeURLDataManager::DataSource* source = |
1389 new AboutUIHTMLSource(name, profile); | 1389 new AboutUIHTMLSource(name, profile); |
1390 if (source) | 1390 if (source) |
1391 profile->GetChromeURLDataManager()->AddDataSource(source); | 1391 profile->GetChromeURLDataManager()->AddDataSource(source); |
1392 } | 1392 } |
OLD | NEW |