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

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

Issue 15500008: Persist the choice of AutofillDataModel when using the requestAutocomplete dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad merge resolution Created 7 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 void HandleSaveOrUpdateRequiredActions( 437 void HandleSaveOrUpdateRequiredActions(
438 const std::vector<wallet::RequiredAction>& required_actions); 438 const std::vector<wallet::RequiredAction>& required_actions);
439 439
440 // Whether submission is currently waiting for |action| to be handled. 440 // Whether submission is currently waiting for |action| to be handled.
441 bool IsSubmitPausedOn(wallet::RequiredAction action) const; 441 bool IsSubmitPausedOn(wallet::RequiredAction action) const;
442 442
443 // Called when there's nothing left to accept, update, save, or authenticate 443 // Called when there's nothing left to accept, update, save, or authenticate
444 // in order to fill |form_structure_| and pass data back to the invoking page. 444 // in order to fill |form_structure_| and pass data back to the invoking page.
445 void FinishSubmit(); 445 void FinishSubmit();
446 446
447 // Writes to prefs the choice of AutofillDataModel for |section|.
448 void PersistAutofillChoice(DialogSection section,
449 const std::string& guid,
450 int variant);
451
452 // Sets the outparams to the default AutofillDataModel for |section| (which is
453 // the first one in the menu that is a suggestion item).
454 void GetDefaultAutofillChoice(DialogSection section,
455 std::string* guid,
456 int* variant);
457
458 // Reads from prefs the choice of AutofillDataModel for |section|. Returns
459 // whether there was a setting to read.
460 bool GetAutofillChoice(DialogSection section,
461 std::string* guid,
462 int* variant);
463
464 // Calculates which AutofillDataModel variant |model| is referring to.
465 size_t GetSelectedVariantForModel(const SuggestionsMenuModel& model);
466
447 // Logs metrics when the dialog is submitted. 467 // Logs metrics when the dialog is submitted.
448 void LogOnFinishSubmitMetrics(); 468 void LogOnFinishSubmitMetrics();
449 469
450 // Logs metrics when the dialog is canceled. 470 // Logs metrics when the dialog is canceled.
451 void LogOnCancelMetrics(); 471 void LogOnCancelMetrics();
452 472
453 // Logs metrics when the edit ui is shown for the given |section|. 473 // Logs metrics when the edit ui is shown for the given |section|.
454 void LogEditUiShownMetric(DialogSection section); 474 void LogEditUiShownMetric(DialogSection section);
455 475
456 // Logs metrics when a suggestion item from the given |model| is selected. 476 // Logs metrics when a suggestion item from the given |model| is selected.
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 602
583 // Whether the latency to display to the UI was logged to UMA yet. 603 // Whether the latency to display to the UI was logged to UMA yet.
584 bool was_ui_latency_logged_; 604 bool was_ui_latency_logged_;
585 605
586 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); 606 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl);
587 }; 607 };
588 608
589 } // namespace autofill 609 } // namespace autofill
590 610
591 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ 611 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698