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

Side by Side Diff: chrome/browser/password_manager/chrome_password_manager_client.cc

Issue 967193002: Credential saving clank infobar for Smart Lock. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@reusable_more_button
Patch Set: Created 5 years, 9 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 "chrome/browser/password_manager/chrome_password_manager_client.h" 5 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 ManagePasswordsUIController::FromWebContents(web_contents()); 183 ManagePasswordsUIController::FromWebContents(web_contents());
184 manage_passwords_ui_controller->OnPasswordSubmitted(form_to_save.Pass()); 184 manage_passwords_ui_controller->OnPasswordSubmitted(form_to_save.Pass());
185 } else { 185 } else {
186 // TODO(melandory): If type is CREDENTIAL_SOURCE_API then new bubble should 186 // TODO(melandory): If type is CREDENTIAL_SOURCE_API then new bubble should
187 // be shown. 187 // be shown.
188 std::string uma_histogram_suffix( 188 std::string uma_histogram_suffix(
189 password_manager::metrics_util::GroupIdToString( 189 password_manager::metrics_util::GroupIdToString(
190 password_manager::metrics_util::MonitoredDomainGroupId( 190 password_manager::metrics_util::MonitoredDomainGroupId(
191 form_to_save->realm(), GetPrefs()))); 191 form_to_save->realm(), GetPrefs())));
192 SavePasswordInfoBarDelegate::Create( 192 SavePasswordInfoBarDelegate::Create(
193 web_contents(), form_to_save.Pass(), uma_histogram_suffix); 193 web_contents(), form_to_save.Pass(), uma_histogram_suffix, type);
194 } 194 }
195 return true; 195 return true;
196 } 196 }
197 197
198 bool ChromePasswordManagerClient::PromptUserToChooseCredentials( 198 bool ChromePasswordManagerClient::PromptUserToChooseCredentials(
199 ScopedVector<autofill::PasswordForm> local_forms, 199 ScopedVector<autofill::PasswordForm> local_forms,
200 ScopedVector<autofill::PasswordForm> federated_forms, 200 ScopedVector<autofill::PasswordForm> federated_forms,
201 const GURL& origin, 201 const GURL& origin,
202 base::Callback<void(const password_manager::CredentialInfo&)> callback) { 202 base::Callback<void(const password_manager::CredentialInfo&)> callback) {
203 return ManagePasswordsUIController::FromWebContents(web_contents())-> 203 return ManagePasswordsUIController::FromWebContents(web_contents())->
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS; 553 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS;
554 } else { 554 } else {
555 // Allow by default. 555 // Allow by default.
556 autofill_sync_state_ = ALLOW_SYNC_CREDENTIALS; 556 autofill_sync_state_ = ALLOW_SYNC_CREDENTIALS;
557 } 557 }
558 } 558 }
559 559
560 const GURL& ChromePasswordManagerClient::GetMainFrameURL() const { 560 const GURL& ChromePasswordManagerClient::GetMainFrameURL() const {
561 return web_contents()->GetVisibleURL(); 561 return web_contents()->GetVisibleURL();
562 } 562 }
OLDNEW
« no previous file with comments | « chrome/browser/android/chrome_jni_registrar.cc ('k') | chrome/browser/password_manager/save_password_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698