OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/core/browser/psl_matching_helper.h" | 5 #include "components/password_manager/core/browser/psl_matching_helper.h" |
6 | 6 |
7 #include "base/command_line.h" | |
8 #include "base/logging.h" | 7 #include "base/logging.h" |
9 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
10 #include "components/autofill/core/common/password_form.h" | 9 #include "components/autofill/core/common/password_form.h" |
11 #include "components/password_manager/core/common/password_manager_switches.h" | |
12 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" | 10 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" |
13 #include "url/gurl.h" | 11 #include "url/gurl.h" |
14 | 12 |
15 using autofill::PasswordForm; | 13 using autofill::PasswordForm; |
16 | 14 |
17 namespace password_manager { | 15 namespace password_manager { |
18 | 16 |
19 bool ShouldPSLDomainMatchingApply( | 17 bool ShouldPSLDomainMatchingApply( |
20 const std::string& registry_controlled_domain) { | 18 const std::string& registry_controlled_domain) { |
21 return !registry_controlled_domain.empty() && | 19 return !registry_controlled_domain.empty() && |
(...skipping 21 matching lines...) Expand all Loading... |
43 gurl1.port() == gurl2.port(); | 41 gurl1.port() == gurl2.port(); |
44 } | 42 } |
45 | 43 |
46 std::string GetRegistryControlledDomain(const GURL& signon_realm) { | 44 std::string GetRegistryControlledDomain(const GURL& signon_realm) { |
47 return net::registry_controlled_domains::GetDomainAndRegistry( | 45 return net::registry_controlled_domains::GetDomainAndRegistry( |
48 signon_realm, | 46 signon_realm, |
49 net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES); | 47 net::registry_controlled_domains::INCLUDE_PRIVATE_REGISTRIES); |
50 } | 48 } |
51 | 49 |
52 } // namespace password_manager | 50 } // namespace password_manager |
OLD | NEW |