Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(731)

Side by Side Diff: components/password_manager/core/browser/affiliation_utils.h

Issue 1066543004: Update affiliated web credentials when Android credentials are updated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments from vasilii@, minor changes. Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 const AffiliatedFacets& b); 170 const AffiliatedFacets& b);
171 171
172 // A shorter way to spell FacetURI::IsValidAndroidFacetURI(). 172 // A shorter way to spell FacetURI::IsValidAndroidFacetURI().
173 bool IsValidAndroidFacetURI(const std::string& uri); 173 bool IsValidAndroidFacetURI(const std::string& uri);
174 174
175 // Returns whether or not affiliation based matching is enabled, either via 175 // Returns whether or not affiliation based matching is enabled, either via
176 // command line flags or field trials. The command line flag, if present, always 176 // command line flags or field trials. The command line flag, if present, always
177 // takes precedence. 177 // takes precedence.
178 bool IsAffiliationBasedMatchingEnabled(const base::CommandLine& command_line); 178 bool IsAffiliationBasedMatchingEnabled(const base::CommandLine& command_line);
179 179
180 // Returns whether or not the "propagating password changes to affiliated saved
181 // web credentials" sub-feature is enabled via variation parameters. However, if
182 // the entire affiliation-based matching feature is forced enabled/disabled via
183 // the command line, the sub-feature will be enabled/disabled correspondingly.
184 bool IsUpdatingAffiliatedWebCredentialsEnabled(
185 const base::CommandLine& command_line);
186
180 // For logging use only. 187 // For logging use only.
181 std::ostream& operator<<(std::ostream& os, const FacetURI& facet_uri); 188 std::ostream& operator<<(std::ostream& os, const FacetURI& facet_uri);
182 189
183 } // namespace password_manager 190 } // namespace password_manager
184 191
185 // Provide a hash function so that hash_sets and maps can contain FacetURIs. 192 // Provide a hash function so that hash_sets and maps can contain FacetURIs.
186 namespace BASE_HASH_NAMESPACE { 193 namespace BASE_HASH_NAMESPACE {
187 194
188 template <> 195 template <>
189 struct hash<password_manager::FacetURI> { 196 struct hash<password_manager::FacetURI> {
190 size_t operator()(const password_manager::FacetURI& facet_uri) const { 197 size_t operator()(const password_manager::FacetURI& facet_uri) const {
191 return hash<std::string>()(facet_uri.potentially_invalid_spec()); 198 return hash<std::string>()(facet_uri.potentially_invalid_spec());
192 } 199 }
193 }; 200 };
194 201
195 } // namespace BASE_HASH_NAMESPACE 202 } // namespace BASE_HASH_NAMESPACE
196 203
197 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_AFFILIATION_UTILS_H_ 204 #endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_AFFILIATION_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698