| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/dbus/session_manager_client.h" | 5 #include "chromeos/dbus/session_manager_client.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <sys/socket.h> | 9 #include <sys/socket.h> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 14 #include "base/files/file_util.h" | 14 #include "base/files/file_util.h" |
| 15 #include "base/location.h" | 15 #include "base/location.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/path_service.h" | 17 #include "base/path_service.h" |
| 18 #include "base/strings/string_number_conversions.h" | 18 #include "base/strings/string_number_conversions.h" |
| 19 #include "base/strings/string_util.h" | 19 #include "base/strings/string_util.h" |
| 20 #include "base/task_runner_util.h" | 20 #include "base/task_runner_util.h" |
| 21 #include "base/threading/worker_pool.h" | 21 #include "base/threading/worker_pool.h" |
| 22 #include "chromeos/chromeos_paths.h" | 22 #include "chromeos/chromeos_paths.h" |
| 23 #include "chromeos/cryptohome/cryptohome_parameters.h" | 23 #include "chromeos/cryptohome/cryptohome_parameters.h" |
| 24 #include "chromeos/dbus/blocking_method_caller.h" | 24 #include "chromeos/dbus/blocking_method_caller.h" |
| 25 #include "chromeos/dbus/cryptohome_client.h" | 25 #include "chromeos/dbus/cryptohome_client.h" |
| 26 #include "components/policy/proto/device_management_backend.pb.h" |
| 26 #include "crypto/sha2.h" | 27 #include "crypto/sha2.h" |
| 27 #include "dbus/bus.h" | 28 #include "dbus/bus.h" |
| 28 #include "dbus/message.h" | 29 #include "dbus/message.h" |
| 29 #include "dbus/object_path.h" | 30 #include "dbus/object_path.h" |
| 30 #include "dbus/object_proxy.h" | 31 #include "dbus/object_proxy.h" |
| 31 #include "policy/proto/device_management_backend.pb.h" | |
| 32 #include "third_party/cros_system_api/dbus/service_constants.h" | 32 #include "third_party/cros_system_api/dbus/service_constants.h" |
| 33 | 33 |
| 34 namespace chromeos { | 34 namespace chromeos { |
| 35 | 35 |
| 36 namespace { | 36 namespace { |
| 37 | 37 |
| 38 // Returns a location for |file| that is specific to the given |cryptohome_id|. | 38 // Returns a location for |file| that is specific to the given |cryptohome_id|. |
| 39 // These paths will be relative to DIR_USER_POLICY_KEYS, and can be used only | 39 // These paths will be relative to DIR_USER_POLICY_KEYS, and can be used only |
| 40 // to store stub files. | 40 // to store stub files. |
| 41 base::FilePath GetUserFilePath(const cryptohome::Identification& cryptohome_id, | 41 base::FilePath GetUserFilePath(const cryptohome::Identification& cryptohome_id, |
| (...skipping 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 971 | 971 |
| 972 SessionManagerClient* SessionManagerClient::Create( | 972 SessionManagerClient* SessionManagerClient::Create( |
| 973 DBusClientImplementationType type) { | 973 DBusClientImplementationType type) { |
| 974 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) | 974 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) |
| 975 return new SessionManagerClientImpl(); | 975 return new SessionManagerClientImpl(); |
| 976 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); | 976 DCHECK_EQ(STUB_DBUS_CLIENT_IMPLEMENTATION, type); |
| 977 return new SessionManagerClientStubImpl(); | 977 return new SessionManagerClientStubImpl(); |
| 978 } | 978 } |
| 979 | 979 |
| 980 } // namespace chromeos | 980 } // namespace chromeos |
| OLD | NEW |