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

Side by Side Diff: chrome/browser/ui/autofill/tab_autofill_manager_delegate.cc

Issue 12091086: [Autofill] Add UMA timing metrics for requestAutocomplete dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moar vertical whitespace 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/ui/autofill/tab_autofill_manager_delegate.h" 5 #include "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/browser/api/infobars/infobar_service.h" 8 #include "chrome/browser/api/infobars/infobar_service.h"
9 #include "chrome/browser/autofill/password_generator.h" 9 #include "chrome/browser/autofill/password_generator.h"
10 #include "chrome/browser/password_manager/password_manager.h" 10 #include "chrome/browser/password_manager/password_manager.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 #else 82 #else
83 Browser* browser = chrome::FindBrowserWithWebContents(web_contents_); 83 Browser* browser = chrome::FindBrowserWithWebContents(web_contents_);
84 browser->window()->ShowPasswordGenerationBubble(bounds, form, generator); 84 browser->window()->ShowPasswordGenerationBubble(bounds, form, generator);
85 #endif // #if defined(OS_ANDROID) 85 #endif // #if defined(OS_ANDROID)
86 } 86 }
87 87
88 void TabAutofillManagerDelegate::ShowRequestAutocompleteDialog( 88 void TabAutofillManagerDelegate::ShowRequestAutocompleteDialog(
89 const FormData& form, 89 const FormData& form,
90 const GURL& source_url, 90 const GURL& source_url,
91 const content::SSLStatus& ssl_status, 91 const content::SSLStatus& ssl_status,
92 const AutofillMetrics& metric_logger,
92 const base::Callback<void(const FormStructure*)>& callback) { 93 const base::Callback<void(const FormStructure*)>& callback) {
93 HideRequestAutocompleteDialog(); 94 HideRequestAutocompleteDialog();
94 95
95 autofill_dialog_controller_ = 96 autofill_dialog_controller_ =
96 new autofill::AutofillDialogControllerImpl(web_contents_, 97 new autofill::AutofillDialogControllerImpl(web_contents_,
97 form, 98 form,
98 source_url, 99 source_url,
99 ssl_status, 100 ssl_status,
101 metric_logger,
100 callback); 102 callback);
101 autofill_dialog_controller_->Show(); 103 autofill_dialog_controller_->Show();
102 } 104 }
103 105
104 void TabAutofillManagerDelegate::RequestAutocompleteDialogClosed() { 106 void TabAutofillManagerDelegate::RequestAutocompleteDialogClosed() {
105 autofill_dialog_controller_ = NULL; 107 autofill_dialog_controller_ = NULL;
106 } 108 }
107 109
108 void TabAutofillManagerDelegate::HideRequestAutocompleteDialog() { 110 void TabAutofillManagerDelegate::HideRequestAutocompleteDialog() {
109 if (autofill_dialog_controller_) 111 if (autofill_dialog_controller_)
110 autofill_dialog_controller_->Hide(); 112 autofill_dialog_controller_->Hide();
111 RequestAutocompleteDialogClosed(); 113 RequestAutocompleteDialogClosed();
112 } 114 }
113 115
114 void TabAutofillManagerDelegate::DidNavigateMainFrame( 116 void TabAutofillManagerDelegate::DidNavigateMainFrame(
115 const content::LoadCommittedDetails& details, 117 const content::LoadCommittedDetails& details,
116 const content::FrameNavigateParams& params) { 118 const content::FrameNavigateParams& params) {
117 // TODO(dbeam): selectively allow this dialog to remain open when going 119 // TODO(dbeam): selectively allow this dialog to remain open when going
118 // through the autocheckout flow (when the behavior is more fleshed out). 120 // through the autocheckout flow (when the behavior is more fleshed out).
119 HideRequestAutocompleteDialog(); 121 HideRequestAutocompleteDialog();
120 } 122 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698