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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLIFrameElementPermissions.cpp

Issue 2583233002: Migrate WTF::Vector::append() to ::push_back() [part 7 of N] (Closed)
Patch Set: Created 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSDstyle license that can be 2 // Use of this source code is governed by a BSDstyle license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/html/HTMLIFrameElementPermissions.h" 5 #include "core/html/HTMLIFrameElementPermissions.h"
6 6
7 #include "core/html/HTMLIFrameElement.h" 7 #include "core/html/HTMLIFrameElement.h"
8 #include "wtf/HashMap.h" 8 #include "wtf/HashMap.h"
9 #include "wtf/text/StringBuilder.h" 9 #include "wtf/text/StringBuilder.h"
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 HTMLIFrameElementPermissions::parseDelegatedPermissions( 53 HTMLIFrameElementPermissions::parseDelegatedPermissions(
54 String& invalidTokensErrorMessage) const { 54 String& invalidTokensErrorMessage) const {
55 Vector<WebPermissionType> permissions; 55 Vector<WebPermissionType> permissions;
56 unsigned numTokenErrors = 0; 56 unsigned numTokenErrors = 0;
57 StringBuilder tokenErrors; 57 StringBuilder tokenErrors;
58 const SpaceSplitString& tokens = this->tokens(); 58 const SpaceSplitString& tokens = this->tokens();
59 59
60 for (size_t i = 0; i < tokens.size(); ++i) { 60 for (size_t i = 0; i < tokens.size(); ++i) {
61 WebPermissionType type; 61 WebPermissionType type;
62 if (getPermissionType(tokens[i], &type)) { 62 if (getPermissionType(tokens[i], &type)) {
63 permissions.append(type); 63 permissions.push_back(type);
64 } else { 64 } else {
65 if (numTokenErrors) 65 if (numTokenErrors)
66 tokenErrors.append(", '"); 66 tokenErrors.append(", '");
67 else 67 else
68 tokenErrors.append('\''); 68 tokenErrors.append('\'');
69 tokenErrors.append(tokens[i]); 69 tokenErrors.append(tokens[i]);
70 tokenErrors.append('\''); 70 tokenErrors.append('\'');
71 ++numTokenErrors; 71 ++numTokenErrors;
72 } 72 }
73 } 73 }
(...skipping 15 matching lines...) Expand all
89 WebPermissionType unused; 89 WebPermissionType unused;
90 return getPermissionType(tokenValue, &unused); 90 return getPermissionType(tokenValue, &unused);
91 } 91 }
92 92
93 void HTMLIFrameElementPermissions::valueWasSet() { 93 void HTMLIFrameElementPermissions::valueWasSet() {
94 if (m_element) 94 if (m_element)
95 m_element->permissionsValueWasSet(); 95 m_element->permissionsValueWasSet();
96 } 96 }
97 97
98 } // namespace blink 98 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLFormElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLInputElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698