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 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 AppendBody(&data); | 778 AppendBody(&data); |
779 data.append("<h1>"); | 779 data.append("<h1>"); |
780 data.append(l10n_util::GetStringUTF8(IDS_ABOUT_SANDBOX_TITLE)); | 780 data.append(l10n_util::GetStringUTF8(IDS_ABOUT_SANDBOX_TITLE)); |
781 data.append("</h1>"); | 781 data.append("</h1>"); |
782 | 782 |
783 // Get expected sandboxing status of renderers. | 783 // Get expected sandboxing status of renderers. |
784 const int status = content::ZygoteHost::GetInstance()->GetSandboxStatus(); | 784 const int status = content::ZygoteHost::GetInstance()->GetSandboxStatus(); |
785 | 785 |
786 data.append("<table>"); | 786 data.append("<table>"); |
787 | 787 |
788 AboutSandboxRow(&data, "", IDS_ABOUT_SANDBOX_SUID_SANDBOX, | 788 AboutSandboxRow(&data, |
| 789 std::string(), |
| 790 IDS_ABOUT_SANDBOX_SUID_SANDBOX, |
789 status & content::kSandboxLinuxSUID); | 791 status & content::kSandboxLinuxSUID); |
790 AboutSandboxRow(&data, " ", IDS_ABOUT_SANDBOX_PID_NAMESPACES, | 792 AboutSandboxRow(&data, " ", IDS_ABOUT_SANDBOX_PID_NAMESPACES, |
791 status & content::kSandboxLinuxPIDNS); | 793 status & content::kSandboxLinuxPIDNS); |
792 AboutSandboxRow(&data, " ", IDS_ABOUT_SANDBOX_NET_NAMESPACES, | 794 AboutSandboxRow(&data, " ", IDS_ABOUT_SANDBOX_NET_NAMESPACES, |
793 status & content::kSandboxLinuxNetNS); | 795 status & content::kSandboxLinuxNetNS); |
794 AboutSandboxRow(&data, "", IDS_ABOUT_SANDBOX_SECCOMP_LEGACY_SANDBOX, | 796 AboutSandboxRow(&data, |
| 797 std::string(), |
| 798 IDS_ABOUT_SANDBOX_SECCOMP_LEGACY_SANDBOX, |
795 status & content::kSandboxLinuxSeccompLegacy); | 799 status & content::kSandboxLinuxSeccompLegacy); |
796 AboutSandboxRow(&data, "", IDS_ABOUT_SANDBOX_SECCOMP_BPF_SANDBOX, | 800 AboutSandboxRow(&data, |
| 801 std::string(), |
| 802 IDS_ABOUT_SANDBOX_SECCOMP_BPF_SANDBOX, |
797 status & content::kSandboxLinuxSeccompBpf); | 803 status & content::kSandboxLinuxSeccompBpf); |
798 | 804 |
799 data.append("</table>"); | 805 data.append("</table>"); |
800 | 806 |
801 // The setuid sandbox is required as our first-layer sandbox. | 807 // The setuid sandbox is required as our first-layer sandbox. |
802 bool good_layer1 = status & content::kSandboxLinuxSUID && | 808 bool good_layer1 = status & content::kSandboxLinuxSUID && |
803 status & content::kSandboxLinuxPIDNS && | 809 status & content::kSandboxLinuxPIDNS && |
804 status & content::kSandboxLinuxNetNS; | 810 status & content::kSandboxLinuxNetNS; |
805 // A second-layer sandbox is also required to be adequately sandboxed. | 811 // A second-layer sandbox is also required to be adequately sandboxed. |
806 bool good_layer2 = status & content::kSandboxLinuxSeccompBpf; | 812 bool good_layer2 = status & content::kSandboxLinuxSeccompBpf; |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1061 Profile* profile = Profile::FromWebUI(web_ui); | 1067 Profile* profile = Profile::FromWebUI(web_ui); |
1062 | 1068 |
1063 #if defined(ENABLE_THEMES) | 1069 #if defined(ENABLE_THEMES) |
1064 // Set up the chrome://theme/ source. | 1070 // Set up the chrome://theme/ source. |
1065 ThemeSource* theme = new ThemeSource(profile); | 1071 ThemeSource* theme = new ThemeSource(profile); |
1066 content::URLDataSource::Add(profile, theme); | 1072 content::URLDataSource::Add(profile, theme); |
1067 #endif | 1073 #endif |
1068 | 1074 |
1069 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile)); | 1075 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile)); |
1070 } | 1076 } |
OLD | NEW |