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

Side by Side Diff: components/autofill/core/browser/autofill_manager.h

Issue 2849753002: Logs all reasons card upload was not offered in UKM and UMA. (Closed)
Patch Set: Formatting fix. Created 3 years, 7 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 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 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 // Parses the forms using heuristic matching and querying the Autofill server. 420 // Parses the forms using heuristic matching and querying the Autofill server.
421 void ParseForms(const std::vector<FormData>& forms); 421 void ParseForms(const std::vector<FormData>& forms);
422 422
423 // Parses the form and adds it to |form_structures_|. 423 // Parses the form and adds it to |form_structures_|.
424 bool ParseForm(const FormData& form, FormStructure** parsed_form_structure); 424 bool ParseForm(const FormData& form, FormStructure** parsed_form_structure);
425 425
426 // Imports the form data, submitted by the user, into |personal_data_|. 426 // Imports the form data, submitted by the user, into |personal_data_|.
427 void ImportFormData(const FormStructure& submitted_form); 427 void ImportFormData(const FormStructure& submitted_form);
428 428
429 // Logs |metric_name| with RAPPOR, for the specific form |source_url|. 429 // Logs |metric_name| with RAPPOR, for the specific form |source_url|.
430 void CollectRapportSample(const GURL& source_url, 430 void CollectRapporSample(const GURL& source_url,
431 const std::string& metric_name) const; 431 const std::string& metric_name) const;
432 432
433 // Examines |card| and the stored profiles and if a candidate set of profiles 433 // Examines |card| and the stored profiles and if a candidate set of profiles
434 // is found that matches the client-side validation rules, assigns the values 434 // is found that matches the client-side validation rules, assigns the values
435 // to |profiles|. If no valid set can be found, returns false, assigns the 435 // to |profiles| and returns 0. If no valid set can be found, returns the
436 // failure reason to |address_upload_decision_metric|, and if applicable, the 436 // failure reasons and, if applicable, the RAPPOR metric to log to
437 // RAPPOR metric to log to |rappor_metric_name|. 437 // |rappor_metric_name|. The return value is a bitmask of
438 bool GetProfilesForCreditCardUpload(const CreditCard& card, 438 // |AutofillMetrics::CardUploadDecisionMetric|.
439 std::vector<AutofillProfile>* profiles, 439 int GetProfilesForCreditCardUpload(const CreditCard& card,
440 autofill::AutofillMetrics:: 440 std::vector<AutofillProfile>* profiles,
441 CardUploadDecisionMetric* 441 std::string* rappor_metric_name) const;
442 address_upload_decision_metric,
443 std::string* rappor_metric_name) const;
444 442
445 // If |initial_interaction_timestamp_| is unset or is set to a later time than 443 // If |initial_interaction_timestamp_| is unset or is set to a later time than
446 // |interaction_timestamp|, updates the cached timestamp. The latter check is 444 // |interaction_timestamp|, updates the cached timestamp. The latter check is
447 // needed because IPC messages can arrive out of order. 445 // needed because IPC messages can arrive out of order.
448 void UpdateInitialInteractionTimestamp( 446 void UpdateInitialInteractionTimestamp(
449 const base::TimeTicks& interaction_timestamp); 447 const base::TimeTicks& interaction_timestamp);
450 448
451 // Examines |form| and returns true if it is in a non-secure context or 449 // Examines |form| and returns true if it is in a non-secure context or
452 // its action attribute targets a HTTP url. 450 // its action attribute targets a HTTP url.
453 bool IsFormNonSecure(const FormData& form) const; 451 bool IsFormNonSecure(const FormData& form) const;
(...skipping 25 matching lines...) Expand all
479 static void DisambiguateNameUploadTypes( 477 static void DisambiguateNameUploadTypes(
480 FormStructure* form, 478 FormStructure* form,
481 size_t current_index, 479 size_t current_index,
482 const ServerFieldTypeSet& upload_types); 480 const ServerFieldTypeSet& upload_types);
483 481
484 #ifdef ENABLE_FORM_DEBUG_DUMP 482 #ifdef ENABLE_FORM_DEBUG_DUMP
485 // Dumps the cached forms to a file on disk. 483 // Dumps the cached forms to a file on disk.
486 void DumpAutofillData(bool imported_cc) const; 484 void DumpAutofillData(bool imported_cc) const;
487 #endif 485 #endif
488 486
489 // Logs the card upload decision UKM. 487 // Logs the card upload decisions in UKM and UMA.
490 void LogCardUploadDecisionUkm( 488 // |upload_decision_metrics| is a bitmask of
491 AutofillMetrics::CardUploadDecisionMetric upload_decision); 489 // |AutofillMetrics::CardUploadDecisionMetric|.
490 void LogCardUploadDecisions(int upload_decision_metrics);
492 491
493 // Provides driver-level context to the shared code of the component. Must 492 // Provides driver-level context to the shared code of the component. Must
494 // outlive this object. 493 // outlive this object.
495 AutofillDriver* driver_; 494 AutofillDriver* driver_;
496 495
497 AutofillClient* const client_; 496 AutofillClient* const client_;
498 497
499 // Handles Payments service requests. 498 // Handles Payments service requests.
500 std::unique_ptr<payments::PaymentsClient> payments_client_; 499 std::unique_ptr<payments::PaymentsClient> payments_client_;
501 500
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, 634 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest,
636 OnLoadedServerPredictions_ResetManager); 635 OnLoadedServerPredictions_ResetManager);
637 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DontOfferToSavePaymentsCard); 636 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, DontOfferToSavePaymentsCard);
638 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillInUpdatedExpirationDate); 637 FRIEND_TEST_ALL_PREFIXES(AutofillManagerTest, FillInUpdatedExpirationDate);
639 DISALLOW_COPY_AND_ASSIGN(AutofillManager); 638 DISALLOW_COPY_AND_ASSIGN(AutofillManager);
640 }; 639 };
641 640
642 } // namespace autofill 641 } // namespace autofill
643 642
644 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_ 643 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698