Chromium Code Reviews| 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 1906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1917 auto form_structure = base::MakeUnique<FormStructure>(form); | 1917 auto form_structure = base::MakeUnique<FormStructure>(form); |
| 1918 form_structure->ParseFieldTypesFromAutocompleteAttributes(); | 1918 form_structure->ParseFieldTypesFromAutocompleteAttributes(); |
| 1919 if (!form_structure->ShouldBeParsed()) | 1919 if (!form_structure->ShouldBeParsed()) |
| 1920 return false; | 1920 return false; |
| 1921 | 1921 |
| 1922 // Ownership is transferred to |form_structures_| which maintains it until | 1922 // Ownership is transferred to |form_structures_| which maintains it until |
| 1923 // the manager is Reset() or destroyed. It is safe to use references below | 1923 // the manager is Reset() or destroyed. It is safe to use references below |
| 1924 // as long as receivers don't take ownership. | 1924 // as long as receivers don't take ownership. |
| 1925 form_structures_.push_back(std::move(form_structure)); | 1925 form_structures_.push_back(std::move(form_structure)); |
| 1926 *parsed_form_structure = form_structures_.back().get(); | 1926 *parsed_form_structure = form_structures_.back().get(); |
| 1927 (*parsed_form_structure)->DetermineHeuristicTypes(); | 1927 (*parsed_form_structure) |
| 1928 ->DetermineHeuristicTypes(client_->GetUkmService(), | |
| 1929 pending_upload_request_url_); | |
|
Mathieu
2017/03/27 18:58:55
FormStructure::source_url is what you need, so can
csashi
2017/03/27 23:37:43
Done.
| |
| 1928 return true; | 1930 return true; |
| 1929 } | 1931 } |
| 1930 | 1932 |
| 1931 int AutofillManager::BackendIDToInt(const std::string& backend_id) const { | 1933 int AutofillManager::BackendIDToInt(const std::string& backend_id) const { |
| 1932 if (!base::IsValidGUID(backend_id)) | 1934 if (!base::IsValidGUID(backend_id)) |
| 1933 return 0; | 1935 return 0; |
| 1934 | 1936 |
| 1935 const auto found = backend_to_int_map_.find(backend_id); | 1937 const auto found = backend_to_int_map_.find(backend_id); |
| 1936 if (found == backend_to_int_map_.end()) { | 1938 if (found == backend_to_int_map_.end()) { |
| 1937 // Unknown one, make a new entry. | 1939 // Unknown one, make a new entry. |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2197 } | 2199 } |
| 2198 #endif // ENABLE_FORM_DEBUG_DUMP | 2200 #endif // ENABLE_FORM_DEBUG_DUMP |
| 2199 | 2201 |
| 2200 void AutofillManager::LogCardUploadDecisionUkm( | 2202 void AutofillManager::LogCardUploadDecisionUkm( |
| 2201 AutofillMetrics::CardUploadDecisionMetric upload_decision) { | 2203 AutofillMetrics::CardUploadDecisionMetric upload_decision) { |
| 2202 AutofillMetrics::LogCardUploadDecisionUkm( | 2204 AutofillMetrics::LogCardUploadDecisionUkm( |
| 2203 client_->GetUkmService(), pending_upload_request_url_, upload_decision); | 2205 client_->GetUkmService(), pending_upload_request_url_, upload_decision); |
| 2204 } | 2206 } |
| 2205 | 2207 |
| 2206 } // namespace autofill | 2208 } // namespace autofill |
| OLD | NEW |