Commit bf1be9f4 authored by Pavol Marko's avatar Pavol Marko Committed by Chromium LUCI CQ

Remove refs to ACCOUNT_TYPE_SESSIONLESS_USER

Remove all references of ACCOUNT_TYPE_SESSIONLESS_USER from
SessionManagerClient, in preparation of removing this account type from
session_manager.
The only user of this account type was PreSigninPolicyFetcher which was
removed in CL:2513205

Bug: 832127
Change-Id: I3b8e8a9fdfb38c5cc925a1c77dafc3a96297b054
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2513584
Commit-Queue: Pavol Marko <pmarko@chromium.org>
Reviewed-by: default avatarAchuith Bhandarkar <achuith@chromium.org>
Cr-Commit-Position: refs/heads/master@{#836801}
parent 6e08fea7
......@@ -102,8 +102,6 @@ void UserPolicyMixin::SetUpPolicy() {
const cryptohome::AccountIdentifier cryptohome_id =
cryptohome::CreateAccountIdentifierFromAccountId(account_id_);
FakeSessionManagerClient::Get()->set_user_policy(cryptohome_id, policy_blob);
FakeSessionManagerClient::Get()->set_user_policy_without_session(
cryptohome_id, policy_blob);
if (policy_server_) {
policy_server_->UpdateUserPolicy(user_policy_builder_.payload(),
......
......@@ -41,8 +41,8 @@ class ComponentActiveDirectoryPolicyService : public SchemaRegistry::Observer {
//
// |account_type| and |account_id| specify the Session Manager store from
// which policy is retrieved. |account_id| must be the user's cryptohome id
// for ACCOUNT_TYPE_USER and empty for ACCOUNT_TYPE_DEVICE. Not suppored yet
// are ACCOUNT_TYPE_SESSIONLESS_USER and ACCOUNT_TYPE_DEVICE_LOCAL_ACCOUNT.
// for ACCOUNT_TYPE_USER and empty for ACCOUNT_TYPE_DEVICE.
// ACCOUNT_TYPE_DEVICE_LOCAL_ACCOUNT is not yet supported.
//
// Usually, |scope|, |domain|, |account_type| and |account_id| are coupled:
// For user-level policy, use:
......
......@@ -149,7 +149,6 @@ base::FilePath GetStubRelativePolicyPath(
return base::FilePath(kStubDevicePolicyFileNamePrefix + postfix);
case login_manager::ACCOUNT_TYPE_USER:
case login_manager::ACCOUNT_TYPE_SESSIONLESS_USER:
case login_manager::ACCOUNT_TYPE_DEVICE_LOCAL_ACCOUNT: {
DCHECK(descriptor.has_account_id());
cryptohome::AccountIdentifier cryptohome_id;
......@@ -159,9 +158,10 @@ base::FilePath GetStubRelativePolicyPath(
return base::FilePath(sanitized_id)
.AppendASCII(kStubPerAccountPolicyFileNamePrefix + postfix);
}
default:
NOTREACHED();
return base::FilePath();
}
NOTREACHED();
return base::FilePath();
}
// Gets the stub file paths of the policy blob and optionally the policy key
......@@ -185,7 +185,6 @@ base::FilePath GetStubPolicyFilePath(
}
case login_manager::ACCOUNT_TYPE_USER:
case login_manager::ACCOUNT_TYPE_SESSIONLESS_USER:
case login_manager::ACCOUNT_TYPE_DEVICE_LOCAL_ACCOUNT: {
base::FilePath base_path;
CHECK(
......@@ -196,9 +195,10 @@ base::FilePath GetStubPolicyFilePath(
}
return base_path.Append(relative_policy_path);
}
default:
NOTREACHED();
return base::FilePath();
}
NOTREACHED();
return base::FilePath();
}
// Returns a key that's used for storing policy in memory.
......@@ -423,14 +423,6 @@ FakeSessionManagerClient::BlockingRetrievePolicyForUser(
return BlockingRetrievePolicy(descriptor, policy_out);
}
void FakeSessionManagerClient::RetrievePolicyForUserWithoutSession(
const cryptohome::AccountIdentifier& cryptohome_id,
RetrievePolicyCallback callback) {
login_manager::PolicyDescriptor descriptor = MakeChromePolicyDescriptor(
login_manager::ACCOUNT_TYPE_SESSIONLESS_USER, cryptohome_id.account_id());
RetrievePolicy(descriptor, std::move(callback));
}
void FakeSessionManagerClient::RetrieveDeviceLocalAccountPolicy(
const std::string& account_id,
RetrievePolicyCallback callback) {
......@@ -751,15 +743,6 @@ void FakeSessionManagerClient::set_user_policy(
policy_[GetMemoryStorageKey(descriptor)] = policy_blob;
}
void FakeSessionManagerClient::set_user_policy_without_session(
const cryptohome::AccountIdentifier& cryptohome_id,
const std::string& policy_blob) {
DCHECK(policy_storage_ == PolicyStorageType::kInMemory);
login_manager::PolicyDescriptor descriptor = MakeChromePolicyDescriptor(
login_manager::ACCOUNT_TYPE_SESSIONLESS_USER, cryptohome_id.account_id());
policy_[GetMemoryStorageKey(descriptor)] = policy_blob;
}
const std::string& FakeSessionManagerClient::device_local_account_policy(
const std::string& account_id) const {
DCHECK(policy_storage_ == PolicyStorageType::kInMemory);
......
......@@ -92,9 +92,6 @@ class COMPONENT_EXPORT(SESSION_MANAGER) FakeSessionManagerClient
RetrievePolicyResponseType BlockingRetrievePolicyForUser(
const cryptohome::AccountIdentifier& cryptohome_id,
std::string* policy_out) override;
void RetrievePolicyForUserWithoutSession(
const cryptohome::AccountIdentifier& cryptohome_id,
RetrievePolicyCallback callback) override;
void RetrieveDeviceLocalAccountPolicy(
const std::string& account_id,
RetrievePolicyCallback callback) override;
......@@ -186,9 +183,6 @@ class COMPONENT_EXPORT(SESSION_MANAGER) FakeSessionManagerClient
const cryptohome::AccountIdentifier& cryptohome_id) const;
void set_user_policy(const cryptohome::AccountIdentifier& cryptohome_id,
const std::string& policy_blob);
void set_user_policy_without_session(
const cryptohome::AccountIdentifier& cryptohome_id,
const std::string& policy_blob);
// Accessors for device local account policy. Only available for
// PolicyStorageType::kInMemory.
......
......@@ -95,10 +95,8 @@ void LogPolicyResponseUma(login_manager::PolicyAccountType account_type,
UMA_HISTOGRAM_ENUMERATION("Enterprise.RetrievePolicyResponse.User",
response, RetrievePolicyResponseType::COUNT);
break;
case login_manager::ACCOUNT_TYPE_SESSIONLESS_USER:
UMA_HISTOGRAM_ENUMERATION(
"Enterprise.RetrievePolicyResponse.UserDuringLogin", response,
RetrievePolicyResponseType::COUNT);
default:
NOTREACHED();
break;
}
}
......@@ -449,15 +447,6 @@ class SessionManagerClientImpl : public SessionManagerClient {
return BlockingRetrievePolicy(descriptor, policy_out);
}
void RetrievePolicyForUserWithoutSession(
const cryptohome::AccountIdentifier& cryptohome_id,
RetrievePolicyCallback callback) override {
login_manager::PolicyDescriptor descriptor =
MakeChromePolicyDescriptor(login_manager::ACCOUNT_TYPE_SESSIONLESS_USER,
cryptohome_id.account_id());
CallRetrievePolicy(descriptor, std::move(callback));
}
void RetrieveDeviceLocalAccountPolicy(
const std::string& account_name,
RetrievePolicyCallback callback) override {
......
......@@ -298,13 +298,6 @@ class COMPONENT_EXPORT(SESSION_MANAGER) SessionManagerClient {
const cryptohome::AccountIdentifier& cryptohome_id,
std::string* policy_out) = 0;
// Fetches the user policy blob for a hidden user home mount. |callback| is
// invoked upon completition.
// DEPRECATED, use RetrievePolicy() instead.
virtual void RetrievePolicyForUserWithoutSession(
const cryptohome::AccountIdentifier& cryptohome_id,
RetrievePolicyCallback callback) = 0;
// Fetches the policy blob associated with the specified device-local account
// from session manager. |callback| is invoked up on completion.
// DEPRECATED, use RetrievePolicy() instead.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment