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

Side by Side Diff: chromeos/cryptohome/cryptohome_parameters.cc

Issue 554043003: cros: Create cryptohome keys for Easy sign-in. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update histograms.xml Created 6 years, 3 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
« no previous file with comments | « chromeos/cryptohome/cryptohome_parameters.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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" 7 #include "chromeos/dbus/cryptohome/key.pb.h"
8 8
9 namespace cryptohome { 9 namespace cryptohome {
10 10
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 79 }
80 80
81 KeyDefinition::ProviderData::ProviderData(const ProviderData& other) 81 KeyDefinition::ProviderData::ProviderData(const ProviderData& other)
82 : name(other.name) { 82 : name(other.name) {
83 if (other.number) 83 if (other.number)
84 number.reset(new int64(*other.number)); 84 number.reset(new int64(*other.number));
85 if (other.bytes) 85 if (other.bytes)
86 bytes.reset(new std::string(*other.bytes)); 86 bytes.reset(new std::string(*other.bytes));
87 } 87 }
88 88
89 KeyDefinition::ProviderData::ProviderData(const std::string& name, int64 number)
90 : name(name),
91 number(new int64(number)) {
92 }
93
94 KeyDefinition::ProviderData::ProviderData(const std::string& name,
95 const std::string& bytes)
96 : name(name),
97 bytes(new std::string(bytes)) {
98 }
99
89 void KeyDefinition::ProviderData::operator=(const ProviderData& other) { 100 void KeyDefinition::ProviderData::operator=(const ProviderData& other) {
90 name = other.name; 101 name = other.name;
91 number.reset(other.number ? new int64(*other.number) : NULL); 102 number.reset(other.number ? new int64(*other.number) : NULL);
92 bytes.reset(other.bytes ? new std::string(*other.bytes) : NULL); 103 bytes.reset(other.bytes ? new std::string(*other.bytes) : NULL);
93 } 104 }
94 105
95 KeyDefinition::ProviderData::~ProviderData() { 106 KeyDefinition::ProviderData::~ProviderData() {
96 } 107 }
97 108
98 bool KeyDefinition::ProviderData::operator==(const ProviderData& other) const { 109 bool KeyDefinition::ProviderData::operator==(const ProviderData& other) const {
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } 175 }
165 176
166 bool MountParameters::operator==(const MountParameters& other) const { 177 bool MountParameters::operator==(const MountParameters& other) const {
167 return ephemeral == other.ephemeral && create_keys == other.create_keys; 178 return ephemeral == other.ephemeral && create_keys == other.create_keys;
168 } 179 }
169 180
170 MountParameters::~MountParameters() { 181 MountParameters::~MountParameters() {
171 } 182 }
172 183
173 } // namespace cryptohome 184 } // namespace cryptohome
OLDNEW
« no previous file with comments | « chromeos/cryptohome/cryptohome_parameters.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698