| 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/autofill/core/browser/autofill_manager.h" | 5 #include "components/autofill/core/browser/autofill_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1907 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1918 auto form_structure = base::MakeUnique<FormStructure>(form); | 1918 auto form_structure = base::MakeUnique<FormStructure>(form); |
| 1919 form_structure->ParseFieldTypesFromAutocompleteAttributes(); | 1919 form_structure->ParseFieldTypesFromAutocompleteAttributes(); |
| 1920 if (!form_structure->ShouldBeParsed()) | 1920 if (!form_structure->ShouldBeParsed()) |
| 1921 return false; | 1921 return false; |
| 1922 | 1922 |
| 1923 // Ownership is transferred to |form_structures_| which maintains it until | 1923 // Ownership is transferred to |form_structures_| which maintains it until |
| 1924 // the manager is Reset() or destroyed. It is safe to use references below | 1924 // the manager is Reset() or destroyed. It is safe to use references below |
| 1925 // as long as receivers don't take ownership. | 1925 // as long as receivers don't take ownership. |
| 1926 form_structures_.push_back(std::move(form_structure)); | 1926 form_structures_.push_back(std::move(form_structure)); |
| 1927 *parsed_form_structure = form_structures_.back().get(); | 1927 *parsed_form_structure = form_structures_.back().get(); |
| 1928 (*parsed_form_structure)->DetermineHeuristicTypes(); | 1928 (*parsed_form_structure)->DetermineHeuristicTypes(client_->GetUkmService()); |
| 1929 return true; | 1929 return true; |
| 1930 } | 1930 } |
| 1931 | 1931 |
| 1932 int AutofillManager::BackendIDToInt(const std::string& backend_id) const { | 1932 int AutofillManager::BackendIDToInt(const std::string& backend_id) const { |
| 1933 if (!base::IsValidGUID(backend_id)) | 1933 if (!base::IsValidGUID(backend_id)) |
| 1934 return 0; | 1934 return 0; |
| 1935 | 1935 |
| 1936 const auto found = backend_to_int_map_.find(backend_id); | 1936 const auto found = backend_to_int_map_.find(backend_id); |
| 1937 if (found == backend_to_int_map_.end()) { | 1937 if (found == backend_to_int_map_.end()) { |
| 1938 // Unknown one, make a new entry. | 1938 // Unknown one, make a new entry. |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2198 } | 2198 } |
| 2199 #endif // ENABLE_FORM_DEBUG_DUMP | 2199 #endif // ENABLE_FORM_DEBUG_DUMP |
| 2200 | 2200 |
| 2201 void AutofillManager::LogCardUploadDecisionUkm( | 2201 void AutofillManager::LogCardUploadDecisionUkm( |
| 2202 AutofillMetrics::CardUploadDecisionMetric upload_decision) { | 2202 AutofillMetrics::CardUploadDecisionMetric upload_decision) { |
| 2203 AutofillMetrics::LogCardUploadDecisionUkm( | 2203 AutofillMetrics::LogCardUploadDecisionUkm( |
| 2204 client_->GetUkmService(), pending_upload_request_url_, upload_decision); | 2204 client_->GetUkmService(), pending_upload_request_url_, upload_decision); |
| 2205 } | 2205 } |
| 2206 | 2206 |
| 2207 } // namespace autofill | 2207 } // namespace autofill |
| OLD | NEW |