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 "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" | 5 #include "chrome/browser/ui/autofill/autofill_dialog_controller_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
412 AutofillDialogControllerImpl* autofill_dialog_controller = | 412 AutofillDialogControllerImpl* autofill_dialog_controller = |
413 new AutofillDialogControllerImpl(contents, | 413 new AutofillDialogControllerImpl(contents, |
414 form_structure, | 414 form_structure, |
415 source_url, | 415 source_url, |
416 dialog_type, | 416 dialog_type, |
417 callback); | 417 callback); |
418 return autofill_dialog_controller->weak_ptr_factory_.GetWeakPtr(); | 418 return autofill_dialog_controller->weak_ptr_factory_.GetWeakPtr(); |
419 } | 419 } |
420 | 420 |
421 // static | 421 // static |
422 void AutofillDialogControllerImpl::RegisterUserPrefs( | 422 void AutofillDialogControllerImpl::RegisterProfilePrefs( |
423 user_prefs::PrefRegistrySyncable* registry) { | 423 user_prefs::PrefRegistrySyncable* registry) { |
424 registry->RegisterIntegerPref( | 424 registry->RegisterIntegerPref( |
425 ::prefs::kAutofillDialogShowCount, | 425 ::prefs::kAutofillDialogShowCount, |
426 0, | 426 0, |
427 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 427 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
428 registry->RegisterBooleanPref( | 428 registry->RegisterBooleanPref( |
429 ::prefs::kAutofillDialogHasPaidWithWallet, | 429 ::prefs::kAutofillDialogHasPaidWithWallet, |
430 false, | 430 false, |
431 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); | 431 user_prefs::PrefRegistrySyncable::SYNCABLE_PREF); |
432 registry->RegisterBooleanPref( | 432 registry->RegisterBooleanPref( |
(...skipping 2865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3298 AutofillMetrics::DIALOG_USER_SIGNED_IN_NO_WALLET_NO_AUTOFILL; | 3298 AutofillMetrics::DIALOG_USER_SIGNED_IN_NO_WALLET_NO_AUTOFILL; |
3299 } | 3299 } |
3300 | 3300 |
3301 // Has Wallet items. | 3301 // Has Wallet items. |
3302 return has_autofill_profiles ? | 3302 return has_autofill_profiles ? |
3303 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_HAS_AUTOFILL : | 3303 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_HAS_AUTOFILL : |
3304 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_NO_AUTOFILL; | 3304 AutofillMetrics::DIALOG_USER_SIGNED_IN_HAS_WALLET_NO_AUTOFILL; |
3305 } | 3305 } |
3306 | 3306 |
3307 } // namespace autofill | 3307 } // namespace autofill |
OLD | NEW |