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

Side by Side Diff: chrome/browser/ui/webui/about_ui.cc

Issue 101773003: Linux sandbox: cleanup sandbox-bpf naming. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address namespace sandbox nits. Created 7 years 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 | « no previous file | chrome/test/security_tests/sandbox_browsertest_linux.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) 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 805 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 std::string(), 816 std::string(),
817 IDS_ABOUT_SANDBOX_SUID_SANDBOX, 817 IDS_ABOUT_SANDBOX_SUID_SANDBOX,
818 status & content::kSandboxLinuxSUID); 818 status & content::kSandboxLinuxSUID);
819 AboutSandboxRow(&data, "&nbsp;&nbsp;", IDS_ABOUT_SANDBOX_PID_NAMESPACES, 819 AboutSandboxRow(&data, "&nbsp;&nbsp;", IDS_ABOUT_SANDBOX_PID_NAMESPACES,
820 status & content::kSandboxLinuxPIDNS); 820 status & content::kSandboxLinuxPIDNS);
821 AboutSandboxRow(&data, "&nbsp;&nbsp;", IDS_ABOUT_SANDBOX_NET_NAMESPACES, 821 AboutSandboxRow(&data, "&nbsp;&nbsp;", IDS_ABOUT_SANDBOX_NET_NAMESPACES,
822 status & content::kSandboxLinuxNetNS); 822 status & content::kSandboxLinuxNetNS);
823 AboutSandboxRow(&data, 823 AboutSandboxRow(&data,
824 std::string(), 824 std::string(),
825 IDS_ABOUT_SANDBOX_SECCOMP_BPF_SANDBOX, 825 IDS_ABOUT_SANDBOX_SECCOMP_BPF_SANDBOX,
826 status & content::kSandboxLinuxSeccompBpf); 826 status & content::kSandboxLinuxSeccompBPF);
827 827
828 data.append("</table>"); 828 data.append("</table>");
829 829
830 // The setuid sandbox is required as our first-layer sandbox. 830 // The setuid sandbox is required as our first-layer sandbox.
831 bool good_layer1 = status & content::kSandboxLinuxSUID && 831 bool good_layer1 = status & content::kSandboxLinuxSUID &&
832 status & content::kSandboxLinuxPIDNS && 832 status & content::kSandboxLinuxPIDNS &&
833 status & content::kSandboxLinuxNetNS; 833 status & content::kSandboxLinuxNetNS;
834 // A second-layer sandbox is also required to be adequately sandboxed. 834 // A second-layer sandbox is also required to be adequately sandboxed.
835 bool good_layer2 = status & content::kSandboxLinuxSeccompBpf; 835 bool good_layer2 = status & content::kSandboxLinuxSeccompBPF;
836 bool good = good_layer1 && good_layer2; 836 bool good = good_layer1 && good_layer2;
837 837
838 if (good) { 838 if (good) {
839 data.append("<p style='color: green'>"); 839 data.append("<p style='color: green'>");
840 data.append(l10n_util::GetStringUTF8(IDS_ABOUT_SANDBOX_OK)); 840 data.append(l10n_util::GetStringUTF8(IDS_ABOUT_SANDBOX_OK));
841 } else { 841 } else {
842 data.append("<p style='color: red'>"); 842 data.append("<p style='color: red'>");
843 data.append(l10n_util::GetStringUTF8(IDS_ABOUT_SANDBOX_BAD)); 843 data.append(l10n_util::GetStringUTF8(IDS_ABOUT_SANDBOX_BAD));
844 } 844 }
845 data.append("</p>"); 845 data.append("</p>");
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1085 Profile* profile = Profile::FromWebUI(web_ui); 1085 Profile* profile = Profile::FromWebUI(web_ui);
1086 1086
1087 #if defined(ENABLE_THEMES) 1087 #if defined(ENABLE_THEMES)
1088 // Set up the chrome://theme/ source. 1088 // Set up the chrome://theme/ source.
1089 ThemeSource* theme = new ThemeSource(profile); 1089 ThemeSource* theme = new ThemeSource(profile);
1090 content::URLDataSource::Add(profile, theme); 1090 content::URLDataSource::Add(profile, theme);
1091 #endif 1091 #endif
1092 1092
1093 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile)); 1093 content::URLDataSource::Add(profile, new AboutUIHTMLSource(name, profile));
1094 } 1094 }
OLDNEW
« no previous file with comments | « no previous file | chrome/test/security_tests/sandbox_browsertest_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698