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_AUTOFILL_WALLET_WALLET_ITEMS_H_ | 5 #ifndef CHROME_BROWSER_AUTOFILL_WALLET_WALLET_ITEMS_H_ |
6 #define CHROME_BROWSER_AUTOFILL_WALLET_WALLET_ITEMS_H_ | 6 #define CHROME_BROWSER_AUTOFILL_WALLET_WALLET_ITEMS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 129 |
130 private: | 130 private: |
131 friend class WalletItemsTest; | 131 friend class WalletItemsTest; |
132 FRIEND_TEST_ALL_PREFIXES(WalletItemsTest, CreateLegalDocument); | 132 FRIEND_TEST_ALL_PREFIXES(WalletItemsTest, CreateLegalDocument); |
133 FRIEND_TEST_ALL_PREFIXES(WalletItemsTest, CreateWalletItems); | 133 FRIEND_TEST_ALL_PREFIXES(WalletItemsTest, CreateWalletItems); |
134 FRIEND_TEST_ALL_PREFIXES(WalletItemsTest, LegalDocumentGetUrl); | 134 FRIEND_TEST_ALL_PREFIXES(WalletItemsTest, LegalDocumentGetUrl); |
135 LegalDocument(const std::string& document_id, | 135 LegalDocument(const std::string& document_id, |
136 const std::string& display_name); | 136 const std::string& display_name); |
137 std::string document_id_; | 137 std::string document_id_; |
138 std::string display_name_; | 138 std::string display_name_; |
| 139 |
139 DISALLOW_COPY_AND_ASSIGN(LegalDocument); | 140 DISALLOW_COPY_AND_ASSIGN(LegalDocument); |
140 }; | 141 }; |
141 | 142 |
142 ~WalletItems(); | 143 ~WalletItems(); |
143 | 144 |
144 // Returns null on invalid input, an empty wallet items with required | 145 // Returns null on invalid input, an empty wallet items with required |
145 // actions if any are present, and a populated wallet items otherwise. Caller | 146 // actions if any are present, and a populated wallet items otherwise. Caller |
146 // owns returned pointer. | 147 // owns returned pointer. |
147 static scoped_ptr<WalletItems> | 148 static scoped_ptr<WalletItems> |
148 CreateWalletItems(const base::DictionaryValue& dictionary); | 149 CreateWalletItems(const base::DictionaryValue& dictionary); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 ScopedVector<Address> addresses_; | 205 ScopedVector<Address> addresses_; |
205 ScopedVector<LegalDocument> legal_documents_; | 206 ScopedVector<LegalDocument> legal_documents_; |
206 | 207 |
207 DISALLOW_COPY_AND_ASSIGN(WalletItems); | 208 DISALLOW_COPY_AND_ASSIGN(WalletItems); |
208 }; | 209 }; |
209 | 210 |
210 } // namespace wallet | 211 } // namespace wallet |
211 | 212 |
212 #endif // CHROME_BROWSER_AUTOFILL_WALLET_WALLET_ITEMS_H_ | 213 #endif // CHROME_BROWSER_AUTOFILL_WALLET_WALLET_ITEMS_H_ |
213 | 214 |
OLD | NEW |