OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "chromeos/cryptohome/cryptohome_parameters.h" | 5 #include "chromeos/cryptohome/cryptohome_parameters.h" |
6 | 6 |
| 7 #include "chromeos/dbus/cryptohome/key.pb.h" |
| 8 |
7 namespace cryptohome { | 9 namespace cryptohome { |
8 | 10 |
9 | |
10 Identification::Identification(const std::string& user_id) : user_id(user_id) { | 11 Identification::Identification(const std::string& user_id) : user_id(user_id) { |
11 } | 12 } |
12 | 13 |
13 bool Identification::operator==(const Identification& other) const { | 14 bool Identification::operator==(const Identification& other) const { |
14 return user_id == other.user_id; | 15 return user_id == other.user_id; |
15 } | 16 } |
16 | 17 |
17 KeyDefinition::KeyDefinition(const std::string& key, | 18 KeyDefinition::KeyDefinition(const std::string& key, |
18 const std::string& label, | 19 const std::string& label, |
19 int /*AuthKeyPrivileges*/ privileges) | 20 int /*AuthKeyPrivileges*/ privileges) |
(...skipping 22 matching lines...) Expand all Loading... |
42 | 43 |
43 Authorization::Authorization(const KeyDefinition& key_def) | 44 Authorization::Authorization(const KeyDefinition& key_def) |
44 : key(key_def.key), | 45 : key(key_def.key), |
45 label(key_def.label) { | 46 label(key_def.label) { |
46 } | 47 } |
47 | 48 |
48 bool Authorization::operator==(const Authorization& other) const { | 49 bool Authorization::operator==(const Authorization& other) const { |
49 return key == other.key && label == other.label; | 50 return key == other.key && label == other.label; |
50 } | 51 } |
51 | 52 |
52 MountParameters::MountParameters(bool ephemeral) : ephemeral(ephemeral) { | 53 RetrievedKeyData::ProviderData::ProviderData(const std::string& name) |
| 54 : name(name) { |
53 } | 55 } |
54 | 56 |
55 MountParameters::~MountParameters() { | 57 RetrievedKeyData::ProviderData::~ProviderData() { |
| 58 } |
| 59 |
| 60 RetrievedKeyData::RetrievedKeyData(Type type, |
| 61 const std::string& label, |
| 62 int64 revision) : type(type), |
| 63 label(label), |
| 64 privileges(0), |
| 65 revision(revision) { |
| 66 } |
| 67 |
| 68 RetrievedKeyData::~RetrievedKeyData() { |
| 69 } |
| 70 |
| 71 MountParameters::MountParameters(bool ephemeral) : ephemeral(ephemeral) { |
56 } | 72 } |
57 | 73 |
58 bool MountParameters::operator==(const MountParameters& other) const { | 74 bool MountParameters::operator==(const MountParameters& other) const { |
59 return ephemeral == other.ephemeral && create_keys == other.create_keys; | 75 return ephemeral == other.ephemeral && create_keys == other.create_keys; |
60 } | 76 } |
61 | 77 |
| 78 MountParameters::~MountParameters() { |
| 79 } |
| 80 |
62 } // namespace cryptohome | 81 } // namespace cryptohome |
OLD | NEW |