Skip to content

Commit

Permalink
Move chromeos/cryptohome/tpm_util -> chromeos/dbus/util
Browse files Browse the repository at this point in the history
tpm_util depends exclusively on chromeos/dbus and therefore
belongs there (which also simplifies some dependencies in the
fake dbus implementations).

Bug: 863439

For minor header changes to chrome/browser/chromeos/policy:
TBR=emaxx@chromium.org

Change-Id: Ie42326ed7e6c5de42571b01955e302fa68640f2c
Reviewed-on: https://chromium-review.googlesource.com/1136945
Commit-Queue: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Ryo Hashimoto <hashimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576614}
  • Loading branch information
stevenjb authored and Commit Bot committed Jul 19, 2018
1 parent a6e1713 commit 642db78
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
#include "chrome/test/base/interactive_test_utils.h"
#include "chromeos/chromeos_paths.h"
#include "chromeos/chromeos_switches.h"
#include "chromeos/cryptohome/tpm_util.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/fake_auth_policy_client.h"
#include "chromeos/dbus/fake_cryptohome_client.h"
#include "chromeos/dbus/util/tpm_util.h"
#include "chromeos/login/auth/authpolicy_login_helper.h"
#include "components/account_id/account_id.h"
#include "components/user_manager/user_names.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@
#include "chrome/grit/generated_resources.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chromeos/chromeos_switches.h"
#include "chromeos/cryptohome/tpm_util.h"
#include "chromeos/dbus/fake_auth_policy_client.h"
#include "chromeos/dbus/fake_session_manager_client.h"
#include "chromeos/dbus/util/tpm_util.h"
#include "chromeos/login/auth/key.h"
#include "chromeos/login/auth/mock_url_fetchers.h"
#include "chromeos/login/auth/user_context.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@
#include "chromeos/cert_loader.h"
#include "chromeos/chromeos_switches.h"
#include "chromeos/cryptohome/cryptohome_parameters.h"
#include "chromeos/cryptohome/tpm_util.h"
#include "chromeos/dbus/cryptohome_client.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/session_manager_client.h"
#include "chromeos/dbus/util/tpm_util.h"
#include "chromeos/login/auth/stub_authenticator.h"
#include "chromeos/network/portal_detector/network_portal_detector.h"
#include "chromeos/network/portal_detector/network_portal_detector_strategy.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
#include "chrome/browser/policy/profile_policy_connector_factory.h"
#include "chrome/common/chrome_paths.h"
#include "chromeos/chromeos_switches.h"
#include "chromeos/cryptohome/tpm_util.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/fake_cryptohome_client.h"
#include "chromeos/dbus/fake_session_manager_client.h"
#include "chromeos/dbus/login_manager/policy_descriptor.pb.h"
#include "chromeos/dbus/util/tpm_util.h"
#include "components/policy/core/common/cloud/cloud_policy_constants.h"
#include "components/policy/core/common/cloud/policy_builder.h"
#include "components/policy/core/common/policy_service.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#include "chrome/browser/chromeos/settings/install_attributes.h"
#include "chrome/test/base/scoped_testing_local_state.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chromeos/cryptohome/tpm_util.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/fake_cryptohome_client.h"
#include "chromeos/dbus/util/tpm_util.h"
#include "components/policy/core/common/cloud/cloud_policy_constants.h"
#include "components/policy/policy_constants.h"
#include "components/policy/proto/chrome_device_policy.pb.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#include "chrome/browser/chromeos/settings/install_attributes.h"
#include "chrome/common/chrome_paths.h"
#include "chromeos/chromeos_paths.h"
#include "chromeos/cryptohome/tpm_util.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/fake_session_manager_client.h"
#include "chromeos/dbus/util/tpm_util.h"
#include "crypto/rsa_private_key.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/chromeos/settings/install_attributes.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#include "base/sys_info.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
#include "chromeos/cryptohome/tpm_util.h"
#include "chromeos/dbus/cryptohome/rpc.pb.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/util/tpm_util.h"
#include "components/policy/proto/install_attributes.pb.h"
#include "google_apis/gaia/gaia_auth_util.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_task_environment.h"
#include "chromeos/chromeos_paths.h"
#include "chromeos/cryptohome/tpm_util.h"
#include "chromeos/dbus/cryptohome/rpc.pb.h"
#include "chromeos/dbus/cryptohome_client.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/util/tpm_util.h"
#include "components/policy/proto/install_attributes.pb.h"
#include "google_apis/gaia/gaia_auth_util.h"
#include "testing/gtest/include/gtest/gtest.h"
Expand Down
4 changes: 2 additions & 2 deletions chromeos/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ component("chromeos") {
"cryptohome/homedir_methods.h",
"cryptohome/system_salt_getter.cc",
"cryptohome/system_salt_getter.h",
"cryptohome/tpm_util.cc",
"cryptohome/tpm_util.h",
"dbus/arc_appfuse_provider_client.cc",
"dbus/arc_appfuse_provider_client.h",
"dbus/arc_midis_client.cc",
Expand Down Expand Up @@ -321,6 +319,8 @@ component("chromeos") {
"dbus/update_engine_client.h",
"dbus/upstart_client.cc",
"dbus/upstart_client.h",
"dbus/util/tpm_util.cc",
"dbus/util/tpm_util.h",
"dbus/virtual_file_provider_client.cc",
"dbus/virtual_file_provider_client.h",
"dbus/volume_state.cc",
Expand Down
2 changes: 1 addition & 1 deletion chromeos/dbus/fake_auth_policy_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
#include "base/threading/thread_task_runner_handle.h"
#include "chromeos/chromeos_paths.h"
#include "chromeos/cryptohome/cryptohome_parameters.h"
#include "chromeos/cryptohome/tpm_util.h"
#include "chromeos/dbus/cryptohome_client.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/session_manager_client.h"
#include "chromeos/dbus/util/tpm_util.h"
#include "components/account_id/account_id.h"
#include "components/policy/proto/cloud_policy.pb.h"
#include "dbus/message.h"
Expand Down
2 changes: 1 addition & 1 deletion chromeos/dbus/fake_auth_policy_client_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "chromeos/cryptohome/tpm_util.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/fake_cryptohome_client.h"
#include "chromeos/dbus/fake_session_manager_client.h"
#include "chromeos/dbus/util/tpm_util.h"
#include "components/account_id/account_id.h"
#include "testing/gtest/include/gtest/gtest.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chromeos/cryptohome/tpm_util.h"
#include "chromeos/dbus/util/tpm_util.h"

#include <stdint.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROMEOS_CRYPTOHOME_TPM_UTIL_H_
#define CHROMEOS_CRYPTOHOME_TPM_UTIL_H_
#ifndef CHROMEOS_DBUS_UTIL_TPM_UTIL_H_
#define CHROMEOS_DBUS_UTIL_TPM_UTIL_H_

#include <string>

Expand Down Expand Up @@ -43,4 +43,4 @@ CHROMEOS_EXPORT bool LockDeviceActiveDirectoryForTesting(
} // namespace tpm_util
} // namespace chromeos

#endif // CHROMEOS_CRYPTOHOME_TPM_UTIL_H_
#endif // CHROMEOS_DBUS_UTIL_TPM_UTIL_H_
2 changes: 1 addition & 1 deletion chromeos/login/auth/authpolicy_login_helper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/task_scheduler/post_task.h"
#include "chromeos/cryptohome/tpm_util.h"
#include "chromeos/dbus/auth_policy_client.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/upstart_client.h"
#include "chromeos/dbus/util/tpm_util.h"
#include "crypto/encryptor.h"
#include "crypto/hmac.h"
#include "crypto/symmetric_key.h"
Expand Down

0 comments on commit 642db78

Please sign in to comment.