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

Side by Side Diff: components/password_manager/content/renderer/credential_manager_client.cc

Issue 2895243002: Rename requireUserMediation to preventSilentAccess in the CM API. (Closed)
Patch Set: merge Created 3 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 // 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 "components/password_manager/content/renderer/credential_manager_client .h" 5 #include "components/password_manager/content/renderer/credential_manager_client .h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 ConnectToMojoCMIfNeeded(); 224 ConnectToMojoCMIfNeeded();
225 225
226 CredentialInfo info; 226 CredentialInfo info;
227 WebCredentialToCredentialInfo(credential, &info); 227 WebCredentialToCredentialInfo(credential, &info);
228 mojo_cm_service_->Store( 228 mojo_cm_service_->Store(
229 info, 229 info,
230 base::Bind(&RespondToNotificationCallback, 230 base::Bind(&RespondToNotificationCallback,
231 base::Owned(new NotificationCallbacksWrapper(callbacks)))); 231 base::Owned(new NotificationCallbacksWrapper(callbacks))));
232 } 232 }
233 233
234 void CredentialManagerClient::DispatchRequireUserMediation( 234 void CredentialManagerClient::DispatchPreventSilentAccess(
235 blink::WebCredentialManagerClient::NotificationCallbacks* callbacks) { 235 blink::WebCredentialManagerClient::NotificationCallbacks* callbacks) {
236 DCHECK(callbacks); 236 DCHECK(callbacks);
237 ConnectToMojoCMIfNeeded(); 237 ConnectToMojoCMIfNeeded();
238 238
239 mojo_cm_service_->RequireUserMediation( 239 mojo_cm_service_->PreventSilentAccess(
240 base::Bind(&RespondToNotificationCallback, 240 base::Bind(&RespondToNotificationCallback,
241 base::Owned(new NotificationCallbacksWrapper(callbacks)))); 241 base::Owned(new NotificationCallbacksWrapper(callbacks))));
242 } 242 }
243 243
244 void CredentialManagerClient::DispatchGet( 244 void CredentialManagerClient::DispatchGet(
245 blink::WebCredentialMediationRequirement mediation, 245 blink::WebCredentialMediationRequirement mediation,
246 bool include_passwords, 246 bool include_passwords,
247 const blink::WebVector<blink::WebURL>& federations, 247 const blink::WebVector<blink::WebURL>& federations,
248 RequestCallbacks* callbacks) { 248 RequestCallbacks* callbacks) {
249 DCHECK(callbacks); 249 DCHECK(callbacks);
(...skipping 16 matching lines...) Expand all
266 266
267 content::RenderFrame* main_frame = render_view()->GetMainRenderFrame(); 267 content::RenderFrame* main_frame = render_view()->GetMainRenderFrame();
268 main_frame->GetRemoteInterfaces()->GetInterface(&mojo_cm_service_); 268 main_frame->GetRemoteInterfaces()->GetInterface(&mojo_cm_service_);
269 } 269 }
270 270
271 void CredentialManagerClient::OnDestruct() { 271 void CredentialManagerClient::OnDestruct() {
272 delete this; 272 delete this;
273 } 273 }
274 274
275 } // namespace password_manager 275 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698