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

Side by Side Diff: components/password_manager/content/browser/credential_manager_dispatcher.cc

Issue 877613004: [Credential Manager API] Pass origin to Account chooser UI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@local_vs_federated
Patch Set: Rebased. Created 5 years, 10 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/browser/credential_manager_dispatc her.h" 5 #include "components/password_manager/content/browser/credential_manager_dispatc her.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 CredentialInfo info(*zero_click_form_to_return, 97 CredentialInfo info(*zero_click_form_to_return,
98 zero_click_form_to_return->federation_url.is_empty() 98 zero_click_form_to_return->federation_url.is_empty()
99 ? CredentialType::CREDENTIAL_TYPE_LOCAL 99 ? CredentialType::CREDENTIAL_TYPE_LOCAL
100 : CredentialType::CREDENTIAL_TYPE_FEDERATED); 100 : CredentialType::CREDENTIAL_TYPE_FEDERATED);
101 dispatcher_->SendCredential(id_, info); 101 dispatcher_->SendCredential(id_, info);
102 return; 102 return;
103 } 103 }
104 104
105 if (zero_click_only_ || 105 if (zero_click_only_ ||
106 !dispatcher_->client()->PromptUserToChooseCredentials( 106 !dispatcher_->client()->PromptUserToChooseCredentials(
107 local_results.Pass(), federated_results.Pass(), 107 local_results.Pass(), federated_results.Pass(), origin_,
108 base::Bind(&CredentialManagerDispatcher::SendCredential, 108 base::Bind(&CredentialManagerDispatcher::SendCredential,
109 base::Unretained(dispatcher_), id_))) { 109 base::Unretained(dispatcher_), id_))) {
110 dispatcher_->SendCredential(id_, CredentialInfo()); 110 dispatcher_->SendCredential(id_, CredentialInfo());
111 } 111 }
112 } 112 }
113 113
114 // CredentialManagerDispatcher::PendingSignedOutTask --------------------------- 114 // CredentialManagerDispatcher::PendingSignedOutTask ---------------------------
115 115
116 class CredentialManagerDispatcher::PendingSignedOutTask 116 class CredentialManagerDispatcher::PendingSignedOutTask
117 : public PasswordStoreConsumer { 117 : public PasswordStoreConsumer {
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 pending_request_->id(), info)); 320 pending_request_->id(), info));
321 pending_request_.reset(); 321 pending_request_.reset();
322 } 322 }
323 323
324 void CredentialManagerDispatcher::DoneSigningOut() { 324 void CredentialManagerDispatcher::DoneSigningOut() {
325 DCHECK(pending_sign_out_); 325 DCHECK(pending_sign_out_);
326 pending_sign_out_.reset(); 326 pending_sign_out_.reset();
327 } 327 }
328 328
329 } // namespace password_manager 329 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698