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

Side by Side Diff: third_party/WebKit/Source/core/dom/SandboxFlags.cpp

Issue 2017053003: Remove StringBuilder::appendLiteral. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase. Created 4 years, 6 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All Rights Reserved. 2 * Copyright (C) 2013 Google Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } else if (equalIgnoringCase(sandboxToken, "allow-orientation-lock")) { 60 } else if (equalIgnoringCase(sandboxToken, "allow-orientation-lock")) {
61 flags &= ~SandboxOrientationLock; 61 flags &= ~SandboxOrientationLock;
62 } else if (equalIgnoringCase(sandboxToken, "allow-popups-to-escape-sandb ox") && RuntimeEnabledFeatures::unsandboxedAuxiliaryEnabled()) { 62 } else if (equalIgnoringCase(sandboxToken, "allow-popups-to-escape-sandb ox") && RuntimeEnabledFeatures::unsandboxedAuxiliaryEnabled()) {
63 flags &= ~SandboxPropagatesToAuxiliaryBrowsingContexts; 63 flags &= ~SandboxPropagatesToAuxiliaryBrowsingContexts;
64 } else if (equalIgnoringCase(sandboxToken, "allow-modals") && RuntimeEna bledFeatures::sandboxBlocksModalsEnabled()) { 64 } else if (equalIgnoringCase(sandboxToken, "allow-modals") && RuntimeEna bledFeatures::sandboxBlocksModalsEnabled()) {
65 flags &= ~SandboxModals; 65 flags &= ~SandboxModals;
66 } else if (equalIgnoringCase(sandboxToken, "allow-presentation")) { 66 } else if (equalIgnoringCase(sandboxToken, "allow-presentation")) {
67 flags &= ~SandboxPresentation; 67 flags &= ~SandboxPresentation;
68 } else { 68 } else {
69 if (numberOfTokenErrors) 69 if (numberOfTokenErrors)
70 tokenErrors.appendLiteral(", '"); 70 tokenErrors.append(", '");
71 else 71 else
72 tokenErrors.append('\''); 72 tokenErrors.append('\'');
73 tokenErrors.append(sandboxToken); 73 tokenErrors.append(sandboxToken);
74 tokenErrors.append('\''); 74 tokenErrors.append('\'');
75 numberOfTokenErrors++; 75 numberOfTokenErrors++;
76 } 76 }
77 } 77 }
78 78
79 if (numberOfTokenErrors) { 79 if (numberOfTokenErrors) {
80 if (numberOfTokenErrors > 1) 80 if (numberOfTokenErrors > 1)
81 tokenErrors.appendLiteral(" are invalid sandbox flags."); 81 tokenErrors.append(" are invalid sandbox flags.");
82 else 82 else
83 tokenErrors.appendLiteral(" is an invalid sandbox flag."); 83 tokenErrors.append(" is an invalid sandbox flag.");
84 invalidTokensErrorMessage = tokenErrors.toString(); 84 invalidTokensErrorMessage = tokenErrors.toString();
85 } 85 }
86 86
87 return flags; 87 return flags;
88 } 88 }
89 89
90 } // namespace blink 90 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Range.cpp ('k') | third_party/WebKit/Source/core/dom/Text.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698