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

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

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 months 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
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 767 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, "&nbsp;&nbsp;", IDS_ABOUT_SANDBOX_PID_NAMESPACES, 792 AboutSandboxRow(&data, "&nbsp;&nbsp;", IDS_ABOUT_SANDBOX_PID_NAMESPACES,
791 status & content::kSandboxLinuxPIDNS); 793 status & content::kSandboxLinuxPIDNS);
792 AboutSandboxRow(&data, "&nbsp;&nbsp;", IDS_ABOUT_SANDBOX_NET_NAMESPACES, 794 AboutSandboxRow(&data, "&nbsp;&nbsp;", 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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698