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

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_controller_impl.h

Issue 12588002: [Autofill] Add user type metrics. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Enumerate all the cases, including the error case Created 7 years, 9 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 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/string16.h" 13 #include "base/string16.h"
14 #include "base/time.h" 14 #include "base/time.h"
15 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" 15 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h"
16 #include "chrome/browser/ui/autofill/autofill_dialog_models.h" 16 #include "chrome/browser/ui/autofill/autofill_dialog_models.h"
17 #include "chrome/browser/ui/autofill/autofill_dialog_types.h" 17 #include "chrome/browser/ui/autofill/autofill_dialog_types.h"
18 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h" 18 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h"
19 #include "chrome/browser/ui/autofill/country_combobox_model.h" 19 #include "chrome/browser/ui/autofill/country_combobox_model.h"
20 #include "components/autofill/browser/autofill_manager_delegate.h" 20 #include "components/autofill/browser/autofill_manager_delegate.h"
21 #include "components/autofill/browser/autofill_metrics.h"
21 #include "components/autofill/browser/autofill_popup_delegate.h" 22 #include "components/autofill/browser/autofill_popup_delegate.h"
22 #include "components/autofill/browser/field_types.h" 23 #include "components/autofill/browser/field_types.h"
23 #include "components/autofill/browser/form_structure.h" 24 #include "components/autofill/browser/form_structure.h"
24 #include "components/autofill/browser/personal_data_manager.h" 25 #include "components/autofill/browser/personal_data_manager.h"
25 #include "components/autofill/browser/personal_data_manager_observer.h" 26 #include "components/autofill/browser/personal_data_manager_observer.h"
26 #include "components/autofill/browser/wallet/required_action.h" 27 #include "components/autofill/browser/wallet/required_action.h"
27 #include "components/autofill/browser/wallet/wallet_client.h" 28 #include "components/autofill/browser/wallet/wallet_client.h"
28 #include "components/autofill/browser/wallet/wallet_client_observer.h" 29 #include "components/autofill/browser/wallet/wallet_client_observer.h"
29 #include "content/public/browser/notification_observer.h" 30 #include "content/public/browser/notification_observer.h"
30 #include "content/public/browser/notification_registrar.h" 31 #include "content/public/browser/notification_registrar.h"
31 #include "content/public/common/ssl_status.h" 32 #include "content/public/common/ssl_status.h"
32 #include "googleurl/src/gurl.h" 33 #include "googleurl/src/gurl.h"
33 #include "ui/base/models/simple_menu_model.h" 34 #include "ui/base/models/simple_menu_model.h"
34 #include "ui/base/ui_base_types.h" 35 #include "ui/base/ui_base_types.h"
35 36
36 class AutofillMetrics;
37 class AutofillPopupControllerImpl; 37 class AutofillPopupControllerImpl;
38 class FormGroup; 38 class FormGroup;
39 class Profile; 39 class Profile;
40 class PrefRegistrySyncable; 40 class PrefRegistrySyncable;
41 41
42 namespace content { 42 namespace content {
43 class WebContents; 43 class WebContents;
44 } 44 }
45 45
46 namespace autofill { 46 namespace autofill {
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 void HidePopup(); 278 void HidePopup();
279 279
280 // Asks risk module to asynchronously load fingerprint data. Data will be 280 // Asks risk module to asynchronously load fingerprint data. Data will be
281 // returned via OnDidLoadRiskFingerprintData. 281 // returned via OnDidLoadRiskFingerprintData.
282 void LoadRiskFingerprintData(); 282 void LoadRiskFingerprintData();
283 void OnDidLoadRiskFingerprintData(scoped_ptr<risk::Fingerprint> fingerprint); 283 void OnDidLoadRiskFingerprintData(scoped_ptr<risk::Fingerprint> fingerprint);
284 284
285 // Whether the billing section should be used to fill in the shipping details. 285 // Whether the billing section should be used to fill in the shipping details.
286 bool UseBillingForShipping(); 286 bool UseBillingForShipping();
287 287
288 AutofillMetrics::DialogInitialUserStateMetric GetInitialUserState() const;
289
288 // The |profile| for |contents_|. 290 // The |profile| for |contents_|.
289 Profile* const profile_; 291 Profile* const profile_;
290 292
291 // The WebContents where the Autofill action originated. 293 // The WebContents where the Autofill action originated.
292 content::WebContents* const contents_; 294 content::WebContents* const contents_;
293 295
294 FormStructure form_structure_; 296 FormStructure form_structure_;
295 297
296 // Whether the URL visible to the user when this dialog was requested to be 298 // Whether the URL visible to the user when this dialog was requested to be
297 // invoked is the same as |source_url_|. 299 // invoked is the same as |source_url_|.
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 358
357 // A NotificationRegistrar for tracking the completion of sign-in. 359 // A NotificationRegistrar for tracking the completion of sign-in.
358 content::NotificationRegistrar registrar_; 360 content::NotificationRegistrar registrar_;
359 361
360 base::WeakPtrFactory<AutofillDialogControllerImpl> weak_ptr_factory_; 362 base::WeakPtrFactory<AutofillDialogControllerImpl> weak_ptr_factory_;
361 363
362 // For logging UMA metrics. 364 // For logging UMA metrics.
363 const AutofillMetrics& metric_logger_; 365 const AutofillMetrics& metric_logger_;
364 base::Time dialog_shown_timestamp_; 366 base::Time dialog_shown_timestamp_;
365 base::Time autocheckout_started_timestamp_; 367 base::Time autocheckout_started_timestamp_;
368 AutofillMetrics::DialogInitialUserStateMetric initial_user_state_;
366 369
367 // Whether this is an Autocheckout or a requestAutocomplete dialog. 370 // Whether this is an Autocheckout or a requestAutocomplete dialog.
368 const DialogType dialog_type_; 371 const DialogType dialog_type_;
369 372
370 // True if the termination action was a submit. 373 // True if the termination action was a submit.
371 bool did_submit_; 374 bool did_submit_;
372 375
373 // Whether or not an Autocheckout flow is running. 376 // Whether or not an Autocheckout flow is running.
374 bool autocheckout_is_running_; 377 bool autocheckout_is_running_;
375 378
376 // Whether or not there was an error in the Autocheckout flow. 379 // Whether or not there was an error in the Autocheckout flow.
377 bool had_autocheckout_error_; 380 bool had_autocheckout_error_;
378 381
379 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); 382 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl);
380 }; 383 };
381 384
382 } // namespace autofill 385 } // namespace autofill
383 386
384 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ 387 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698