| 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" |
| 11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
| 12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
| 13 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 13 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
| 14 #include "chrome/browser/password_manager/password_manager_util.h" | 14 #include "chrome/browser/password_manager/password_manager_util.h" |
| 15 #include "chrome/browser/password_manager/password_store_factory.h" | 15 #include "chrome/browser/password_manager/password_store_factory.h" |
| 16 #include "chrome/browser/password_manager/save_password_infobar_delegate.h" | 16 #include "chrome/browser/password_manager/save_password_infobar_delegate.h" |
| 17 #include "chrome/browser/password_manager/sync_metrics.h" | 17 #include "chrome/browser/password_manager/sync_metrics.h" |
| 18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/sync/profile_sync_service.h" | 19 #include "chrome/browser/sync/profile_sync_service.h" |
| 20 #include "chrome/browser/sync/profile_sync_service_factory.h" | 20 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 21 #include "chrome/browser/ui/autofill/password_generation_popup_controller_impl.h
" | 21 #include "chrome/browser/ui/autofill/password_generation_popup_controller_impl.h
" |
| 22 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" | 22 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" |
| 23 #include "chrome/browser/ui/passwords/password_manager_url_collection_experiment
.h" |
| 23 #include "chrome/common/chrome_switches.h" | 24 #include "chrome/common/chrome_switches.h" |
| 24 #include "chrome/common/chrome_version_info.h" | 25 #include "chrome/common/chrome_version_info.h" |
| 25 #include "chrome/common/url_constants.h" | 26 #include "chrome/common/url_constants.h" |
| 26 #include "components/autofill/content/browser/content_autofill_driver.h" | 27 #include "components/autofill/content/browser/content_autofill_driver.h" |
| 27 #include "components/autofill/content/browser/content_autofill_driver_factory.h" | 28 #include "components/autofill/content/browser/content_autofill_driver_factory.h" |
| 28 #include "components/autofill/content/common/autofill_messages.h" | 29 #include "components/autofill/content/common/autofill_messages.h" |
| 29 #include "components/autofill/core/browser/password_generator.h" | 30 #include "components/autofill/core/browser/password_generator.h" |
| 30 #include "components/autofill/core/common/password_form.h" | 31 #include "components/autofill/core/common/password_form.h" |
| 31 #include "components/password_manager/content/browser/content_password_manager_d
river.h" | 32 #include "components/password_manager/content/browser/content_password_manager_d
river.h" |
| 32 #include "components/password_manager/content/browser/password_manager_internals
_service_factory.h" | 33 #include "components/password_manager/content/browser/password_manager_internals
_service_factory.h" |
| 33 #include "components/password_manager/content/common/credential_manager_messages
.h" | 34 #include "components/password_manager/content/common/credential_manager_messages
.h" |
| 34 #include "components/password_manager/content/common/credential_manager_types.h" | 35 #include "components/password_manager/content/common/credential_manager_types.h" |
| 35 #include "components/password_manager/core/browser/browser_save_password_progres
s_logger.h" | 36 #include "components/password_manager/core/browser/browser_save_password_progres
s_logger.h" |
| 36 #include "components/password_manager/core/browser/log_receiver.h" | 37 #include "components/password_manager/core/browser/log_receiver.h" |
| 37 #include "components/password_manager/core/browser/password_form_manager.h" | 38 #include "components/password_manager/core/browser/password_form_manager.h" |
| 38 #include "components/password_manager/core/browser/password_manager_internals_se
rvice.h" | 39 #include "components/password_manager/core/browser/password_manager_internals_se
rvice.h" |
| 39 #include "components/password_manager/core/browser/password_manager_metrics_util
.h" | 40 #include "components/password_manager/core/browser/password_manager_metrics_util
.h" |
| 40 #include "components/password_manager/core/browser/password_manager_url_collecti
on_experiment.h" | |
| 41 #include "components/password_manager/core/common/password_manager_switches.h" | 41 #include "components/password_manager/core/common/password_manager_switches.h" |
| 42 #include "content/public/browser/navigation_entry.h" | 42 #include "content/public/browser/navigation_entry.h" |
| 43 #include "content/public/browser/render_view_host.h" | 43 #include "content/public/browser/render_view_host.h" |
| 44 #include "content/public/browser/web_contents.h" | 44 #include "content/public/browser/web_contents.h" |
| 45 #include "google_apis/gaia/gaia_urls.h" | 45 #include "google_apis/gaia/gaia_urls.h" |
| 46 #include "net/base/url_util.h" | 46 #include "net/base/url_util.h" |
| 47 #include "third_party/re2/re2/re2.h" | 47 #include "third_party/re2/re2/re2.h" |
| 48 | 48 |
| 49 #if defined(OS_ANDROID) | 49 #if defined(OS_ANDROID) |
| 50 #include "chrome/browser/password_manager/generated_password_saved_infobar_deleg
ate_android.h" | 50 #include "chrome/browser/password_manager/generated_password_saved_infobar_deleg
ate_android.h" |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 | 554 |
| 555 if (group_name == "DisallowSyncCredentialsForReauth") { | 555 if (group_name == "DisallowSyncCredentialsForReauth") { |
| 556 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS_FOR_REAUTH; | 556 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS_FOR_REAUTH; |
| 557 } else if (group_name == "DisallowSyncCredentials") { | 557 } else if (group_name == "DisallowSyncCredentials") { |
| 558 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS; | 558 autofill_sync_state_ = DISALLOW_SYNC_CREDENTIALS; |
| 559 } else { | 559 } else { |
| 560 // Allow by default. | 560 // Allow by default. |
| 561 autofill_sync_state_ = ALLOW_SYNC_CREDENTIALS; | 561 autofill_sync_state_ = ALLOW_SYNC_CREDENTIALS; |
| 562 } | 562 } |
| 563 } | 563 } |
| OLD | NEW |