| 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/homedir_methods.h" | 5 #include "chromeos/cryptohome/homedir_methods.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 | 217 |
| 218 if (request.ephemeral) | 218 if (request.ephemeral) |
| 219 request_proto.set_require_ephemeral(true); | 219 request_proto.set_require_ephemeral(true); |
| 220 | 220 |
| 221 if (!request.create_keys.empty()) { | 221 if (!request.create_keys.empty()) { |
| 222 CreateRequest* create = request_proto.mutable_create(); | 222 CreateRequest* create = request_proto.mutable_create(); |
| 223 for (size_t i = 0; i < request.create_keys.size(); ++i) | 223 for (size_t i = 0; i < request.create_keys.size(); ++i) |
| 224 FillKeyProtobuf(request.create_keys[i], create->add_keys()); | 224 FillKeyProtobuf(request.create_keys[i], create->add_keys()); |
| 225 } | 225 } |
| 226 | 226 |
| 227 if (request.force_dircrypto_if_available) |
| 228 request_proto.set_force_dircrypto_if_available(true); |
| 229 |
| 227 DBusThreadManager::Get()->GetCryptohomeClient()->MountEx( | 230 DBusThreadManager::Get()->GetCryptohomeClient()->MountEx( |
| 228 id, auth_proto, request_proto, | 231 id, auth_proto, request_proto, |
| 229 base::Bind(&HomedirMethodsImpl::OnMountExCallback, | 232 base::Bind(&HomedirMethodsImpl::OnMountExCallback, |
| 230 weak_ptr_factory_.GetWeakPtr(), callback)); | 233 weak_ptr_factory_.GetWeakPtr(), callback)); |
| 231 } | 234 } |
| 232 | 235 |
| 233 void AddKeyEx(const Identification& id, | 236 void AddKeyEx(const Identification& id, |
| 234 const Authorization& auth, | 237 const Authorization& auth, |
| 235 const KeyDefinition& new_key, | 238 const KeyDefinition& new_key, |
| 236 bool clobber_if_exists, | 239 bool clobber_if_exists, |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 } | 514 } |
| 512 delete g_homedir_methods; | 515 delete g_homedir_methods; |
| 513 g_homedir_methods = NULL; | 516 g_homedir_methods = NULL; |
| 514 VLOG(1) << "HomedirMethods Shutdown completed"; | 517 VLOG(1) << "HomedirMethods Shutdown completed"; |
| 515 } | 518 } |
| 516 | 519 |
| 517 // static | 520 // static |
| 518 HomedirMethods* HomedirMethods::GetInstance() { return g_homedir_methods; } | 521 HomedirMethods* HomedirMethods::GetInstance() { return g_homedir_methods; } |
| 519 | 522 |
| 520 } // namespace cryptohome | 523 } // namespace cryptohome |
| OLD | NEW |