| 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 "components/password_manager/core/browser/affiliation_utils.h" | 5 #include "components/password_manager/core/browser/affiliation_utils.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <ostream> | 8 #include <ostream> |
| 9 | 9 |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| (...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 const std::string update_enabled = variations::GetVariationParamValue( | 313 const std::string update_enabled = variations::GetVariationParamValue( |
| 314 kFieldTrialName, "propagate_password_changes_to_web"); | 314 kFieldTrialName, "propagate_password_changes_to_web"); |
| 315 | 315 |
| 316 if (command_line.HasSwitch(switches::kDisableAffiliationBasedMatching)) | 316 if (command_line.HasSwitch(switches::kDisableAffiliationBasedMatching)) |
| 317 return false; | 317 return false; |
| 318 if (command_line.HasSwitch(switches::kEnableAffiliationBasedMatching)) | 318 if (command_line.HasSwitch(switches::kEnableAffiliationBasedMatching)) |
| 319 return true; | 319 return true; |
| 320 return LowerCaseEqualsASCII(update_enabled, "enabled"); | 320 return LowerCaseEqualsASCII(update_enabled, "enabled"); |
| 321 } | 321 } |
| 322 | 322 |
| 323 bool IsAffiliationRequestsForDummyFacetsEnabled( |
| 324 const base::CommandLine& command_line) { |
| 325 const std::string synthesizing_enabled = variations::GetVariationParamValue( |
| 326 kFieldTrialName, "affiliation_requests_for_dummy_facets"); |
| 327 if (command_line.HasSwitch(switches::kDisableAffiliationBasedMatching)) |
| 328 return false; |
| 329 if (command_line.HasSwitch(switches::kEnableAffiliationBasedMatching)) |
| 330 return true; |
| 331 return LowerCaseEqualsASCII(synthesizing_enabled, "enabled"); |
| 332 } |
| 333 |
| 323 bool IsValidAndroidFacetURI(const std::string& url) { | 334 bool IsValidAndroidFacetURI(const std::string& url) { |
| 324 FacetURI facet = FacetURI::FromPotentiallyInvalidSpec(url); | 335 FacetURI facet = FacetURI::FromPotentiallyInvalidSpec(url); |
| 325 return facet.IsValidAndroidFacetURI(); | 336 return facet.IsValidAndroidFacetURI(); |
| 326 } | 337 } |
| 327 | 338 |
| 328 } // namespace password_manager | 339 } // namespace password_manager |
| OLD | NEW |