#include "chrome/browser/ui/webui/family_link_user_internals/family_link_user_internals_message_handler.h"
#include <memory>
#include <string_view>
#include <utility>
#include "base/functional/bind.h"
#include "base/memory/ref_counted.h"
#include "base/values.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_key.h"
#include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/browser/supervised_user/supervised_user_browser_utils.h"
#include "chrome/browser/supervised_user/supervised_user_service_factory.h"
#include "chrome/browser/supervised_user/supervised_user_settings_service_factory.h"
#include "chrome/common/channel_info.h"
#include "components/signin/public/identity_manager/identity_manager.h"
#include "components/signin/public/identity_manager/tribool.h"
#include "components/supervised_user/core/browser/child_account_service.h"
#include "components/supervised_user/core/browser/supervised_user_error_page.h"
#include "components/supervised_user/core/browser/supervised_user_preferences.h"
#include "components/supervised_user/core/browser/supervised_user_settings_service.h"
#include "components/supervised_user/core/browser/supervised_user_utils.h"
#include "components/supervised_user/core/common/features.h"
#include "components/url_formatter/url_fixer.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
BrowserThread;
namespace {
base::Value::List* AddSection(base::Value::List* parent_list,
std::string_view title) { … }
void AddSectionEntry(base::Value::List* section_list,
std::string_view name,
bool value) { … }
void AddSectionEntry(base::Value::List* section_list,
std::string_view name,
std::string_view value) { … }
std::string FilteringBehaviorToString(
supervised_user::FilteringBehavior behavior) { … }
std::string FilteringBehaviorToString(
supervised_user::FilteringBehavior behavior,
bool uncertain) { … }
}
FamilyLinkUserInternalsMessageHandler::FamilyLinkUserInternalsMessageHandler() =
default;
FamilyLinkUserInternalsMessageHandler::
~FamilyLinkUserInternalsMessageHandler() = default;
void FamilyLinkUserInternalsMessageHandler::RegisterMessages() { … }
void FamilyLinkUserInternalsMessageHandler::OnJavascriptDisallowed() { … }
void FamilyLinkUserInternalsMessageHandler::OnURLFilterChanged() { … }
supervised_user::SupervisedUserService*
FamilyLinkUserInternalsMessageHandler::GetSupervisedUserService() { … }
void FamilyLinkUserInternalsMessageHandler::HandleRegisterForEvents(
const base::Value::List& args) { … }
void FamilyLinkUserInternalsMessageHandler::HandleGetBasicInfo(
const base::Value::List& args) { … }
void FamilyLinkUserInternalsMessageHandler::HandleTryURL(
const base::Value::List& args) { … }
void FamilyLinkUserInternalsMessageHandler::SendBasicInfo() { … }
void FamilyLinkUserInternalsMessageHandler::SendFamilyLinkUserSettings(
const base::Value::Dict& settings) { … }
void FamilyLinkUserInternalsMessageHandler::OnTryURLResult(
const std::string& callback_id,
supervised_user::FilteringBehavior behavior,
supervised_user::FilteringBehaviorReason reason,
bool uncertain) { … }
void FamilyLinkUserInternalsMessageHandler::OnURLChecked(
const GURL& url,
supervised_user::FilteringBehavior behavior,
supervised_user::FilteringBehaviorReason reason,
bool uncertain) { … }