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

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

Issue 2955963002: Update Chrome Upstream flow to reflect new UI mocks (Closed)
Patch Set: Code review changes; change label; fix trybot Created 3 years, 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 int GetCvcImageResourceId() const override; 59 int GetCvcImageResourceId() const override;
60 bool ShouldRequestCvcFromUser() const override; 60 bool ShouldRequestCvcFromUser() const override;
61 base::string16 GetCvcEnteredByUser() const override; 61 base::string16 GetCvcEnteredByUser() const override;
62 void OnSaveButton(const base::string16& cvc = base::string16()) override; 62 void OnSaveButton(const base::string16& cvc = base::string16()) override;
63 void OnCancelButton() override; 63 void OnCancelButton() override;
64 void OnLearnMoreClicked() override; 64 void OnLearnMoreClicked() override;
65 void OnLegalMessageLinkClicked(const GURL& url) override; 65 void OnLegalMessageLinkClicked(const GURL& url) override;
66 void OnBubbleClosed() override; 66 void OnBubbleClosed() override;
67 67
68 const LegalMessageLines& GetLegalMessageLines() const override; 68 const LegalMessageLines& GetLegalMessageLines() const override;
69 void SetShowUploadConfirmTitle(bool show_upload_confirm_title) override;
69 70
70 // Used to check if an entered CVC value is a valid CVC for the current card. 71 // Used to check if an entered CVC value is a valid CVC for the current card.
71 // Valid CVCs are a certain length for their card type (4 for AMEX, 3 72 // Valid CVCs are a certain length for their card type (4 for AMEX, 3
72 // otherwise) and are comprised only of numbers. 73 // otherwise) and are comprised only of numbers.
73 bool InputCvcIsValid(const base::string16& input_text) const override; 74 bool InputCvcIsValid(const base::string16& input_text) const override;
74 75
75 protected: 76 protected:
76 explicit SaveCardBubbleControllerImpl(content::WebContents* web_contents); 77 explicit SaveCardBubbleControllerImpl(content::WebContents* web_contents);
77 78
78 // Returns the time elapsed since |timer_| was initialized. 79 // Returns the time elapsed since |timer_| was initialized.
(...skipping 30 matching lines...) Expand all
109 110
110 // Whether ReshowBubble() has been called since ShowBubbleFor*() was called. 111 // Whether ReshowBubble() has been called since ShowBubbleFor*() was called.
111 bool is_reshow_{false}; 112 bool is_reshow_{false};
112 113
113 // Whether the upload save version of the UI should ask the user for CVC. 114 // Whether the upload save version of the UI should ask the user for CVC.
114 bool should_cvc_be_requested_{false}; 115 bool should_cvc_be_requested_{false};
115 116
116 // The value of the CVC entered by the user (if it was requested). 117 // The value of the CVC entered by the user (if it was requested).
117 base::string16 cvc_entered_by_user_; 118 base::string16 cvc_entered_by_user_;
118 119
120 // Whether the normal title or the "Confirm [card]" title should be shown
121 // during upload save.
122 bool show_upload_confirm_title_{false};
msw 2017/06/29 20:10:24 nit: this curly-bracket init style is very uncommo
Jared Saul 2017/07/05 19:36:50 I can't recall/find who originally told me to init
123
119 // Contains the details of the card that will be saved if the user accepts. 124 // Contains the details of the card that will be saved if the user accepts.
120 CreditCard card_; 125 CreditCard card_;
121 126
122 // If no legal message should be shown then this variable is an empty vector. 127 // If no legal message should be shown then this variable is an empty vector.
123 LegalMessageLines legal_message_lines_; 128 LegalMessageLines legal_message_lines_;
124 129
125 // Used to measure the amount of time on a page; if it's less than some 130 // Used to measure the amount of time on a page; if it's less than some
126 // reasonable limit, then don't close the bubble upon navigation. 131 // reasonable limit, then don't close the bubble upon navigation.
127 std::unique_ptr<base::ElapsedTimer> timer_; 132 std::unique_ptr<base::ElapsedTimer> timer_;
128 133
129 DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleControllerImpl); 134 DISALLOW_COPY_AND_ASSIGN(SaveCardBubbleControllerImpl);
130 }; 135 };
131 136
132 } // namespace autofill 137 } // namespace autofill
133 138
134 #endif // CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_ 139 #endif // CHROME_BROWSER_UI_AUTOFILL_SAVE_CARD_BUBBLE_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698