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> |
| 8 #include <stdint.h> |
| 9 |
7 #include "base/bind.h" | 10 #include "base/bind.h" |
8 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/macros.h" |
9 #include "chromeos/dbus/cryptohome/key.pb.h" | 13 #include "chromeos/dbus/cryptohome/key.pb.h" |
10 #include "chromeos/dbus/cryptohome/rpc.pb.h" | 14 #include "chromeos/dbus/cryptohome/rpc.pb.h" |
11 #include "chromeos/dbus/dbus_thread_manager.h" | 15 #include "chromeos/dbus/dbus_thread_manager.h" |
12 #include "components/device_event_log/device_event_log.h" | 16 #include "components/device_event_log/device_event_log.h" |
13 | 17 |
14 #if defined(USE_SYSTEM_PROTOBUF) | 18 #if defined(USE_SYSTEM_PROTOBUF) |
15 #include <google/protobuf/repeated_field.h> | 19 #include <google/protobuf/repeated_field.h> |
16 #else | 20 #else |
17 #include "third_party/protobuf/src/google/protobuf/repeated_field.h" | 21 #include "third_party/protobuf/src/google/protobuf/repeated_field.h" |
18 #endif | 22 #endif |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 // Extract |name|. | 384 // Extract |name|. |
381 key_definition.provider_data.push_back( | 385 key_definition.provider_data.push_back( |
382 KeyDefinition::ProviderData(provider_data_it->name())); | 386 KeyDefinition::ProviderData(provider_data_it->name())); |
383 KeyDefinition::ProviderData& provider_data = | 387 KeyDefinition::ProviderData& provider_data = |
384 key_definition.provider_data.back(); | 388 key_definition.provider_data.back(); |
385 | 389 |
386 int data_items = 0; | 390 int data_items = 0; |
387 | 391 |
388 // Extract |number|. | 392 // Extract |number|. |
389 if (provider_data_it->has_number()) { | 393 if (provider_data_it->has_number()) { |
390 provider_data.number.reset(new int64(provider_data_it->number())); | 394 provider_data.number.reset(new int64_t(provider_data_it->number())); |
391 ++data_items; | 395 ++data_items; |
392 } | 396 } |
393 | 397 |
394 // Extract |bytes|. | 398 // Extract |bytes|. |
395 if (provider_data_it->has_bytes()) { | 399 if (provider_data_it->has_bytes()) { |
396 provider_data.bytes.reset( | 400 provider_data.bytes.reset( |
397 new std::string(provider_data_it->bytes())); | 401 new std::string(provider_data_it->bytes())); |
398 ++data_items; | 402 ++data_items; |
399 } | 403 } |
400 | 404 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 } | 486 } |
483 delete g_homedir_methods; | 487 delete g_homedir_methods; |
484 g_homedir_methods = NULL; | 488 g_homedir_methods = NULL; |
485 VLOG(1) << "HomedirMethods Shutdown completed"; | 489 VLOG(1) << "HomedirMethods Shutdown completed"; |
486 } | 490 } |
487 | 491 |
488 // static | 492 // static |
489 HomedirMethods* HomedirMethods::GetInstance() { return g_homedir_methods; } | 493 HomedirMethods* HomedirMethods::GetInstance() { return g_homedir_methods; } |
490 | 494 |
491 } // namespace cryptohome | 495 } // namespace cryptohome |
OLD | NEW |