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

Side by Side Diff: chrome/browser/ui/views/payments/credit_card_editor_view_controller.h

Issue 2803443003: [Payments] Added region load failure tolerance and tests to PR editor. (Closed)
Patch Set: Sign bot error fixes Created 3 years, 8 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_VIEWS_PAYMENTS_CREDIT_CARD_EDITOR_VIEW_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_CREDIT_CARD_EDITOR_VIEW_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_CREDIT_CARD_EDITOR_VIEW_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_CREDIT_CARD_EDITOR_VIEW_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // passed in to validate |field| (the data will be copied to the delegate). 51 // passed in to validate |field| (the data will be copied to the delegate).
52 CreditCardValidationDelegate( 52 CreditCardValidationDelegate(
53 const EditorField& field, 53 const EditorField& field,
54 EditorViewController* controller, 54 EditorViewController* controller,
55 const std::vector<std::string>& supported_card_networks); 55 const std::vector<std::string>& supported_card_networks);
56 ~CreditCardValidationDelegate() override; 56 ~CreditCardValidationDelegate() override;
57 57
58 // ValidationDelegate: 58 // ValidationDelegate:
59 bool ValidateTextfield(views::Textfield* textfield) override; 59 bool ValidateTextfield(views::Textfield* textfield) override;
60 bool ValidateCombobox(views::Combobox* combobox) override; 60 bool ValidateCombobox(views::Combobox* combobox) override;
61 void ComboboxModelChanged(views::Combobox* combobox) override{};
Mathieu 2017/04/05 00:25:14 nit: space between override {}
MAD 2017/04/07 18:50:40 Done.
61 62
62 private: 63 private:
63 // Validates a specific |value|. 64 // Validates a specific |value|.
64 bool ValidateValue(const base::string16& value); 65 bool ValidateValue(const base::string16& value);
65 66
66 EditorField field_; 67 EditorField field_;
67 // Outlives this class. 68 // Outlives this class.
68 EditorViewController* controller_; 69 EditorViewController* controller_;
69 // The list of supported basic card networks. 70 // The list of supported basic card networks.
70 std::set<std::string> supported_card_networks_; 71 std::set<std::string> supported_card_networks_;
71 72
72 DISALLOW_COPY_AND_ASSIGN(CreditCardValidationDelegate); 73 DISALLOW_COPY_AND_ASSIGN(CreditCardValidationDelegate);
73 }; 74 };
74 75
75 DISALLOW_COPY_AND_ASSIGN(CreditCardEditorViewController); 76 DISALLOW_COPY_AND_ASSIGN(CreditCardEditorViewController);
76 }; 77 };
77 78
78 } // namespace payments 79 } // namespace payments
79 80
80 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_CREDIT_CARD_EDITOR_VIEW_CONTROLLER_H _ 81 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_CREDIT_CARD_EDITOR_VIEW_CONTROLLER_H _
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698