chromium/chrome/browser/policy/messaging_layer/util/user_dm_token_retriever.cc

// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/policy/messaging_layer/util/user_dm_token_retriever.h"

#include <memory>

#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/memory/ptr_util.h"
#include "base/task/thread_pool.h"
#include "base/types/expected.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/policy/dm_token_utils.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "components/policy/core/common/cloud/dm_token.h"
#include "components/reporting/client/dm_token_retriever.h"
#include "components/reporting/util/statusor.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"

namespace reporting {

namespace {

// Retrieves and returns the user DM token for the profile specified by the
// profile delegate
policy::DMToken GetDMToken(
    const UserDMTokenRetriever::ProfileRetrievalCallback profile_retrieval_cb) {}

// Gets current active user profile
Profile* GetUserProfile() {}

// Processes retrieved DM token even if the retriever goes out of scope in the
// caller.
void OnDMTokenRetrieved(DMTokenRetriever::CompletionCallback completion_cb,
                        const policy::DMToken& dm_token) {}

}  // namespace

UserDMTokenRetriever::UserDMTokenRetriever(
    UserDMTokenRetriever::ProfileRetrievalCallback profile_retrieval_cb)
    :{}

UserDMTokenRetriever::~UserDMTokenRetriever() = default;

// static
std::unique_ptr<UserDMTokenRetriever> UserDMTokenRetriever::Create() {}

// static
std::unique_ptr<UserDMTokenRetriever> UserDMTokenRetriever::CreateForTest(
    UserDMTokenRetriever::ProfileRetrievalCallback profile_retrieval_cb) {}

// Gets user DM token for current active user
void UserDMTokenRetriever::RetrieveDMToken(
    DMTokenRetriever::CompletionCallback completion_cb) {}

}  // namespace reporting