#include "chrome/browser/ui/tabs/organization/tab_organization_service.h"
#include <memory>
#include "base/containers/contains.h"
#include "chrome/browser/about_flags.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/flag_descriptions.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/organization/metrics.h"
#include "chrome/browser/ui/tabs/organization/request_factory.h"
#include "chrome/browser/ui/tabs/organization/tab_organization_request.h"
#include "chrome/browser/ui/tabs/organization/tab_organization_session.h"
#include "chrome/browser/ui/tabs/organization/tab_organization_utils.h"
#include "chrome/browser/ui/tabs/organization/tab_sensitivity_cache.h"
#include "chrome/browser/ui/tabs/organization/trigger_policies.h"
#include "chrome/browser/ui/webui/tab_search/tab_search_prefs.h"
#include "components/signin/public/identity_manager/identity_manager.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "base/system/sys_info.h"
#include "chrome/browser/ash/crosapi/browser_data_migrator.h"
#include "chrome/browser/ash/ownership/owner_settings_service_ash.h"
#include "chrome/browser/ash/ownership/owner_settings_service_ash_factory.h"
#include "chrome/browser/ash/settings/about_flags.h"
#endif
TabOrganizationService::TabOrganizationService(
content::BrowserContext* browser_context)
: … { … }
TabOrganizationService::~TabOrganizationService() = default;
void TabOrganizationService::OnTriggerOccured(const Browser* browser) { … }
const TabOrganizationSession* TabOrganizationService::GetSessionForBrowser(
const Browser* browser) const { … }
TabOrganizationSession* TabOrganizationService::GetSessionForBrowser(
const Browser* browser) { … }
TabOrganizationSession* TabOrganizationService::CreateSessionForBrowser(
const Browser* browser,
const TabOrganizationEntryPoint entrypoint,
const content::WebContents* base_session_webcontents) { … }
TabOrganizationSession* TabOrganizationService::ResetSessionForBrowser(
const Browser* browser,
const TabOrganizationEntryPoint entrypoint,
const content::WebContents* base_session_webcontents) { … }
void TabOrganizationService::RestartSessionAndShowUI(
const Browser* browser,
const TabOrganizationEntryPoint entrypoint,
const content::WebContents* base_session_webcontents) { … }
void TabOrganizationService::OnUserInvokedFeature(const Browser* browser) { … }
bool TabOrganizationService::CanStartRequest() const { … }
void TabOrganizationService::StartRequestIfNotFRE(
const Browser* browser,
const TabOrganizationEntryPoint entrypoint) { … }
void TabOrganizationService::StartRequest(
const Browser* browser,
const TabOrganizationEntryPoint entrypoint) { … }
void TabOrganizationService::OnTabStripModelChanged(
TabStripModel* tab_strip_model,
const TabStripModelChange& change,
const TabStripSelectionChange& selection) { … }
void TabOrganizationService::OnTabGroupChanged(const TabGroupChange& change) { … }
void TabOrganizationService::AcceptTabOrganization(
Browser* browser,
TabOrganization::ID session_id,
TabOrganization::ID organization_id) { … }
void TabOrganizationService::OnActionUIAccepted(const Browser* browser) { … }
void TabOrganizationService::OnActionUIDismissed(const Browser* browser) { … }
void TabOrganizationService::RemoveBrowserFromSessionMap(
const Browser* browser) { … }
const Browser* TabOrganizationService::GetBrowserForTabStripModel(
const TabStripModel* tab_strip_model) { … }