| 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 // This file contains utilities related to working with "facets". | 5 // This file contains utilities related to working with "facets". |
| 6 // | 6 // |
| 7 // A "facet" is defined as the manifestation of a logical application on a given | 7 // A "facet" is defined as the manifestation of a logical application on a given |
| 8 // platform. For example, "My Bank" may have released an Android application | 8 // platform. For example, "My Bank" may have released an Android application |
| 9 // and a Web application accessible from a browser. These are all facets of the | 9 // and a Web application accessible from a browser. These are all facets of the |
| 10 // "My Bank" logical application. | 10 // "My Bank" logical application. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 #include "base/containers/hash_tables.h" | 53 #include "base/containers/hash_tables.h" |
| 54 #include "base/logging.h" | 54 #include "base/logging.h" |
| 55 #include "base/strings/utf_string_conversions.h" | 55 #include "base/strings/utf_string_conversions.h" |
| 56 #include "base/time/time.h" | 56 #include "base/time/time.h" |
| 57 #include "url/third_party/mozilla/url_parse.h" | 57 #include "url/third_party/mozilla/url_parse.h" |
| 58 | 58 |
| 59 namespace autofill { | 59 namespace autofill { |
| 60 struct PasswordForm; | 60 struct PasswordForm; |
| 61 } // namespace autofill | 61 } // namespace autofill |
| 62 | 62 |
| 63 namespace base { | |
| 64 class CommandLine; | |
| 65 } // namespace base | |
| 66 | |
| 67 namespace password_manager { | 63 namespace password_manager { |
| 68 | 64 |
| 69 // Encapsulates a facet URI in canonical form. | 65 // Encapsulates a facet URI in canonical form. |
| 70 // | 66 // |
| 71 // This is a very light-weight wrapper around an std::string containing the text | 67 // This is a very light-weight wrapper around an std::string containing the text |
| 72 // of the URI, and can be passed around as a value. The main rationale for the | 68 // of the URI, and can be passed around as a value. The main rationale for the |
| 73 // existance of this class is to make it clearer in the code when a certain URI | 69 // existance of this class is to make it clearer in the code when a certain URI |
| 74 // is known to be a valid facet URI in canonical form, and to allow verifying | 70 // is known to be a valid facet URI in canonical form, and to allow verifying |
| 75 // and converting URIs to such canonical form. | 71 // and converting URIs to such canonical form. |
| 76 // | 72 // |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 template <> | 194 template <> |
| 199 struct hash<password_manager::FacetURI> { | 195 struct hash<password_manager::FacetURI> { |
| 200 size_t operator()(const password_manager::FacetURI& facet_uri) const { | 196 size_t operator()(const password_manager::FacetURI& facet_uri) const { |
| 201 return hash<std::string>()(facet_uri.potentially_invalid_spec()); | 197 return hash<std::string>()(facet_uri.potentially_invalid_spec()); |
| 202 } | 198 } |
| 203 }; | 199 }; |
| 204 | 200 |
| 205 } // namespace BASE_HASH_NAMESPACE | 201 } // namespace BASE_HASH_NAMESPACE |
| 206 | 202 |
| 207 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_AFFILIATION_UTILS_H_ | 203 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_AFFILIATION_UTILS_H_ |
| OLD | NEW |