| 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 if (!BrowsingDataHelper::IsWebScheme( | 222 if (!BrowsingDataHelper::IsWebScheme( |
| 223 web_contents()->GetLastCommittedURL().scheme())) { | 223 web_contents()->GetLastCommittedURL().scheme())) { |
| 224 return false; | 224 return false; |
| 225 } | 225 } |
| 226 | 226 |
| 227 if (IsTheHotNewBubbleUIEnabled()) { | 227 if (IsTheHotNewBubbleUIEnabled()) { |
| 228 ManagePasswordsUIController* manage_passwords_ui_controller = | 228 ManagePasswordsUIController* manage_passwords_ui_controller = |
| 229 ManagePasswordsUIController::FromWebContents(web_contents()); | 229 ManagePasswordsUIController::FromWebContents(web_contents()); |
| 230 manage_passwords_ui_controller->OnPasswordSubmitted(form_to_save.Pass()); | 230 manage_passwords_ui_controller->OnPasswordSubmitted(form_to_save.Pass()); |
| 231 } else { | 231 } else { |
| 232 // TODO(melandory): If type is CREDENTIAL_SOURCE_API then new bubble should | |
| 233 // be shown. | |
| 234 std::string uma_histogram_suffix( | 232 std::string uma_histogram_suffix( |
| 235 password_manager::metrics_util::GroupIdToString( | 233 password_manager::metrics_util::GroupIdToString( |
| 236 password_manager::metrics_util::MonitoredDomainGroupId( | 234 password_manager::metrics_util::MonitoredDomainGroupId( |
| 237 form_to_save->realm(), GetPrefs()))); | 235 form_to_save->realm(), GetPrefs()))); |
| 238 SavePasswordInfoBarDelegate::Create( | 236 SavePasswordInfoBarDelegate::Create( |
| 239 web_contents(), form_to_save.Pass(), uma_histogram_suffix, type); | 237 web_contents(), form_to_save.Pass(), uma_histogram_suffix, type); |
| 240 } | 238 } |
| 241 return true; | 239 return true; |
| 242 } | 240 } |
| 243 | 241 |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 588 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS; | 586 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS; |
| 589 } else { | 587 } else { |
| 590 // Allow by default. | 588 // Allow by default. |
| 591 autofill_sync_state_ = ALLOW_SYNC_CREDENTIALS; | 589 autofill_sync_state_ = ALLOW_SYNC_CREDENTIALS; |
| 592 } | 590 } |
| 593 } | 591 } |
| 594 | 592 |
| 595 const GURL& ChromePasswordManagerClient::GetMainFrameURL() const { | 593 const GURL& ChromePasswordManagerClient::GetMainFrameURL() const { |
| 596 return web_contents()->GetVisibleURL(); | 594 return web_contents()->GetVisibleURL(); |
| 597 } | 595 } |
| OLD | NEW |