OLD | NEW |
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 <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 void HandleSaveOrUpdateRequiredActions( | 442 void HandleSaveOrUpdateRequiredActions( |
443 const std::vector<wallet::RequiredAction>& required_actions); | 443 const std::vector<wallet::RequiredAction>& required_actions); |
444 | 444 |
445 // Whether submission is currently waiting for |action| to be handled. | 445 // Whether submission is currently waiting for |action| to be handled. |
446 bool IsSubmitPausedOn(wallet::RequiredAction action) const; | 446 bool IsSubmitPausedOn(wallet::RequiredAction action) const; |
447 | 447 |
448 // Called when there's nothing left to accept, update, save, or authenticate | 448 // Called when there's nothing left to accept, update, save, or authenticate |
449 // in order to fill |form_structure_| and pass data back to the invoking page. | 449 // in order to fill |form_structure_| and pass data back to the invoking page. |
450 void FinishSubmit(); | 450 void FinishSubmit(); |
451 | 451 |
| 452 // Writes to prefs the choice of AutofillDataModel for |section|. |
| 453 void PersistAutofillChoice(DialogSection section, |
| 454 const std::string& guid, |
| 455 int variant); |
| 456 |
| 457 // Sets the outparams to the default AutofillDataModel for |section| (which is |
| 458 // the first one in the menu that is a suggestion item). |
| 459 void GetDefaultAutofillChoice(DialogSection section, |
| 460 std::string* guid, |
| 461 int* variant); |
| 462 |
| 463 // Reads from prefs the choice of AutofillDataModel for |section|. Returns |
| 464 // whether there was a setting to read. |
| 465 bool GetAutofillChoice(DialogSection section, |
| 466 std::string* guid, |
| 467 int* variant); |
| 468 |
| 469 // Calculates which AutofillDataModel variant |model| is referring to. |
| 470 size_t GetSelectedVariantForModel(const SuggestionsMenuModel& model); |
| 471 |
452 // Logs metrics when the dialog is submitted. | 472 // Logs metrics when the dialog is submitted. |
453 void LogOnFinishSubmitMetrics(); | 473 void LogOnFinishSubmitMetrics(); |
454 | 474 |
455 // Logs metrics when the dialog is canceled. | 475 // Logs metrics when the dialog is canceled. |
456 void LogOnCancelMetrics(); | 476 void LogOnCancelMetrics(); |
457 | 477 |
458 // Logs metrics when the edit ui is shown for the given |section|. | 478 // Logs metrics when the edit ui is shown for the given |section|. |
459 void LogEditUiShownMetric(DialogSection section); | 479 void LogEditUiShownMetric(DialogSection section); |
460 | 480 |
461 // Logs metrics when a suggestion item from the given |model| is selected. | 481 // Logs metrics when a suggestion item from the given |model| is selected. |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 | 607 |
588 // Whether the latency to display to the UI was logged to UMA yet. | 608 // Whether the latency to display to the UI was logged to UMA yet. |
589 bool was_ui_latency_logged_; | 609 bool was_ui_latency_logged_; |
590 | 610 |
591 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); | 611 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); |
592 }; | 612 }; |
593 | 613 |
594 } // namespace autofill | 614 } // namespace autofill |
595 | 615 |
596 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ | 616 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ |
OLD | NEW |