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

Side by Side Diff: chrome/browser/autofill/autofill_manager.cc

Issue 12091086: [Autofill] Add UMA timing metrics for requestAutocomplete dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase harder Created 7 years, 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/autofill/autofill_manager.h" 5 #include "chrome/browser/autofill/autofill_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <limits> 9 #include <limits>
10 #include <map> 10 #include <map>
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 } 775 }
776 776
777 const std::vector<FormStructure*>& AutofillManager::GetFormStructures() { 777 const std::vector<FormStructure*>& AutofillManager::GetFormStructures() {
778 return form_structures_.get(); 778 return form_structures_.get();
779 } 779 }
780 780
781 void AutofillManager::ShowRequestAutocompleteDialog( 781 void AutofillManager::ShowRequestAutocompleteDialog(
782 const FormData& form, 782 const FormData& form,
783 const GURL& source_url, 783 const GURL& source_url,
784 const content::SSLStatus& ssl_status, 784 const content::SSLStatus& ssl_status,
785 autofill::DialogType dialog_type,
785 const base::Callback<void(const FormStructure*)>& callback) { 786 const base::Callback<void(const FormStructure*)>& callback) {
786 manager_delegate_->ShowRequestAutocompleteDialog( 787 manager_delegate_->ShowRequestAutocompleteDialog(
787 form, source_url, ssl_status, callback); 788 form, source_url, ssl_status, *metric_logger_, dialog_type, callback);
788 } 789 }
789 790
790 void AutofillManager::RequestAutocompleteDialogClosed() { 791 void AutofillManager::RequestAutocompleteDialogClosed() {
791 manager_delegate_->RequestAutocompleteDialogClosed(); 792 manager_delegate_->RequestAutocompleteDialogClosed();
792 } 793 }
793 794
794 void AutofillManager::OnAddPasswordFormMapping( 795 void AutofillManager::OnAddPasswordFormMapping(
795 const FormFieldData& form, 796 const FormFieldData& form,
796 const PasswordFormFillData& fill_data) { 797 const PasswordFormFillData& fill_data) {
797 if (external_delegate_) 798 if (external_delegate_)
(...skipping 30 matching lines...) Expand all
828 const GURL& frame_url, 829 const GURL& frame_url,
829 const content::SSLStatus& ssl_status) { 830 const content::SSLStatus& ssl_status) {
830 if (!IsAutofillEnabled()) { 831 if (!IsAutofillEnabled()) {
831 ReturnAutocompleteResult(WebFormElement::AutocompleteResultErrorDisabled, 832 ReturnAutocompleteResult(WebFormElement::AutocompleteResultErrorDisabled,
832 FormData()); 833 FormData());
833 return; 834 return;
834 } 835 }
835 836
836 base::Callback<void(const FormStructure*)> callback = 837 base::Callback<void(const FormStructure*)> callback =
837 base::Bind(&AutofillManager::ReturnAutocompleteData, this); 838 base::Bind(&AutofillManager::ReturnAutocompleteData, this);
838 ShowRequestAutocompleteDialog(form, frame_url, ssl_status, callback); 839 ShowRequestAutocompleteDialog(
840 form, frame_url, ssl_status,
841 autofill::DIALOG_TYPE_REQUEST_AUTOCOMPLETE, callback);
839 } 842 }
840 843
841 void AutofillManager::ReturnAutocompleteResult( 844 void AutofillManager::ReturnAutocompleteResult(
842 WebFormElement::AutocompleteResult result, const FormData& form_data) { 845 WebFormElement::AutocompleteResult result, const FormData& form_data) {
843 // web_contents() will be NULL when the interactive autocomplete is closed due 846 // web_contents() will be NULL when the interactive autocomplete is closed due
844 // to a tab or browser window closing. 847 // to a tab or browser window closing.
845 if (!web_contents()) 848 if (!web_contents())
846 return; 849 return;
847 850
848 RenderViewHost* host = web_contents()->GetRenderViewHost(); 851 RenderViewHost* host = web_contents()->GetRenderViewHost();
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1320 *profile_guid = IDToGUID(profile_id); 1323 *profile_guid = IDToGUID(profile_id);
1321 } 1324 }
1322 1325
1323 void AutofillManager::UpdateInitialInteractionTimestamp( 1326 void AutofillManager::UpdateInitialInteractionTimestamp(
1324 const TimeTicks& interaction_timestamp) { 1327 const TimeTicks& interaction_timestamp) {
1325 if (initial_interaction_timestamp_.is_null() || 1328 if (initial_interaction_timestamp_.is_null() ||
1326 interaction_timestamp < initial_interaction_timestamp_) { 1329 interaction_timestamp < initial_interaction_timestamp_) {
1327 initial_interaction_timestamp_ = interaction_timestamp; 1330 initial_interaction_timestamp_ = interaction_timestamp;
1328 } 1331 }
1329 } 1332 }
OLDNEW
« no previous file with comments | « chrome/browser/autofill/autofill_manager.h ('k') | chrome/browser/autofill/autofill_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698