Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 182 ManagePasswordsUIController* manage_passwords_ui_controller = | 182 ManagePasswordsUIController* manage_passwords_ui_controller = |
| 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(web_contents(), form_to_save.Pass(), |
|
gone
2015/03/02 17:39:38
nit: if the arguments don't fit, c++ style puts th
melandory
2015/03/03 11:55:46
I was also surprised when I saw how clang format f
Bernhard Bauer
2015/03/03 16:54:20
Yeah, the "either all arguments on one line, or ea
| |
| 193 web_contents(), form_to_save.Pass(), uma_histogram_suffix); | 193 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 Loading... | |
| 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 } |
| OLD | NEW |