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

Side by Side Diff: third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp

Issue 2614663008: Migrate WTF::Vector::append() to ::push_back() [part 13 of N] (Closed)
Patch Set: Created 3 years, 11 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "modules/credentialmanager/CredentialsContainer.h" 5 #include "modules/credentialmanager/CredentialsContainer.h"
6 6
7 #include "bindings/core/v8/Dictionary.h" 7 #include "bindings/core/v8/Dictionary.h"
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptPromiseResolver.h" 9 #include "bindings/core/v8/ScriptPromiseResolver.h"
10 #include "core/dom/DOMException.h" 10 #include "core/dom/DOMException.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 // TODO(mkwst): CredentialRequestOptions::federated() needs to return a 170 // TODO(mkwst): CredentialRequestOptions::federated() needs to return a
171 // reference, not a value. Because it returns a temporary value now, a for 171 // reference, not a value. Because it returns a temporary value now, a for
172 // loop that directly references the value generates code that holds a 172 // loop that directly references the value generates code that holds a
173 // reference to a value that no longer exists by the time the loop starts 173 // reference to a value that no longer exists by the time the loop starts
174 // looping. In order to avoid this crazyness for the moment, we're making a 174 // looping. In order to avoid this crazyness for the moment, we're making a
175 // copy of the vector. https://crbug.com/587088 175 // copy of the vector. https://crbug.com/587088
176 const Vector<String> providerStrings = options.federated().providers(); 176 const Vector<String> providerStrings = options.federated().providers();
177 for (const auto& string : providerStrings) { 177 for (const auto& string : providerStrings) {
178 KURL url = KURL(KURL(), string); 178 KURL url = KURL(KURL(), string);
179 if (url.isValid()) 179 if (url.isValid())
180 providers.append(url); 180 providers.push_back(url);
181 } 181 }
182 } 182 }
183 183
184 UseCounter::count(scriptState->getExecutionContext(), 184 UseCounter::count(scriptState->getExecutionContext(),
185 options.unmediated() 185 options.unmediated()
186 ? UseCounter::CredentialManagerGetWithoutUI 186 ? UseCounter::CredentialManagerGetWithoutUI
187 : UseCounter::CredentialManagerGetWithUI); 187 : UseCounter::CredentialManagerGetWithUI);
188 188
189 CredentialManagerClient::from(scriptState->getExecutionContext()) 189 CredentialManagerClient::from(scriptState->getExecutionContext())
190 ->dispatchGet(options.unmediated(), options.password(), providers, 190 ->dispatchGet(options.unmediated(), options.password(), providers,
(...skipping 21 matching lines...) Expand all
212 ScriptPromise promise = resolver->promise(); 212 ScriptPromise promise = resolver->promise();
213 if (!checkBoilerplate(resolver)) 213 if (!checkBoilerplate(resolver))
214 return promise; 214 return promise;
215 215
216 CredentialManagerClient::from(scriptState->getExecutionContext()) 216 CredentialManagerClient::from(scriptState->getExecutionContext())
217 ->dispatchRequireUserMediation(new NotificationCallbacks(resolver)); 217 ->dispatchRequireUserMediation(new NotificationCallbacks(resolver));
218 return promise; 218 return promise;
219 } 219 }
220 220
221 } // namespace blink 221 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/canvas2d/ClipList.cpp ('k') | third_party/WebKit/Source/modules/crypto/CryptoKey.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698