Add diagnostics_writer.cc to the list of files allowed to printf.
[chromium-blink-merge.git] / components / autofill / content / browser / wallet / gaia_account.h
blob2eb6e2ebf3aed559cc38c64944f7f1088d79618a
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_
8 #include <string>
10 #include "base/memory/scoped_ptr.h"
12 namespace base {
13 class DictionaryValue;
16 namespace autofill {
17 namespace wallet {
19 class GaiaAccount {
20 public:
21 ~GaiaAccount();
23 // Returns an empty scoped_ptr if input is invalid, otherwise a valid GAIA
24 // account.
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,
31 size_t index,
32 bool is_active);
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_; }
42 private:
43 GaiaAccount(const std::string& email_address,
44 const std::string& obfuscated_id,
45 size_t index,
46 bool is_active);
48 std::string email_address_;
49 std::string obfuscated_id_;
50 size_t index_;
51 bool is_active_;
53 DISALLOW_COPY_AND_ASSIGN(GaiaAccount);
56 } // namespace wallet
57 } // namespace autofill
59 #endif // COMPONENTS_AUTOFILL_CONTENT_BROWSER_WALLET_GAIA_ACCOUNTS_H_