1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_GAIA_ACCOUNTS_H_
6 #define COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_GAIA_ACCOUNTS_H_
10 #include "base/memory/scoped_ptr.h"
13 class DictionaryValue
;
23 // Returns an empty scoped_ptr if input is invalid, otherwise a valid GAIA
25 static scoped_ptr
<GaiaAccount
> Create(
26 const base::DictionaryValue
& dictionary
);
28 static scoped_ptr
<GaiaAccount
> CreateForTesting(
29 const std::string
& email_address
,
30 const std::string
& obfuscated_id
,
34 bool operator==(const GaiaAccount
& other
) const;
35 bool operator!=(const GaiaAccount
& other
) const;
37 const std::string
& email_address() const { return email_address_
; }
38 const std::string
& obfuscated_id() const { return obfuscated_id_
; }
39 size_t index() const { return index_
; }
40 bool is_active() const { return is_active_
; }
43 GaiaAccount(const std::string
& email_address
,
44 const std::string
& obfuscated_id
,
48 std::string email_address_
;
49 std::string obfuscated_id_
;
53 DISALLOW_COPY_AND_ASSIGN(GaiaAccount
);
57 } // namespace autofill
59 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_GAIA_ACCOUNTS_H_