#include "chrome/browser/media/router/media_router_feature.h"
#include <stdint.h>
#include <string>
#include <utility>
#include "base/base64.h"
#include "base/command_line.h"
#include "base/containers/flat_map.h"
#include "base/feature_list.h"
#include "base/no_destructor.h"
#include "base/strings/string_util.h"
#include "build/build_config.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.h"
#include "components/media_router/common/pref_names.h"
#include "components/prefs/pref_service.h"
#include "components/user_prefs/user_prefs.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/content_features.h"
#include "crypto/random.h"
#include "media/base/media_switches.h"
#include "ui/base/buildflags.h"
#if !BUILDFLAG(IS_ANDROID)
#include "components/prefs/pref_registry_simple.h"
#endif
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "chromeos/ash/components/browser_context_helper/browser_context_types.h"
#endif
namespace media_router {
#if !BUILDFLAG(IS_ANDROID)
BASE_FEATURE(…);
BASE_FEATURE(…);
BASE_FEATURE(…);
BASE_FEATURE(…);
BASE_FEATURE(…);
#endif
BASE_FEATURE(…);
BASE_FEATURE(…);
#endif
BASE_FEATURE(…);
const base::FeatureParam<int> kCastMirroringPlayoutDelayMs{ … };
BASE_FEATURE(…);
BASE_FEATURE(…);
#endif
#if BUILDFLAG(IS_MAC)
BASE_FEATURE(kUseNetworkFrameworkForLocalDiscovery,
"UseNetworkFrameworkForLocalDiscovery",
base::FEATURE_DISABLED_BY_DEFAULT);
#endif
namespace {
const PrefService::Preference* GetMediaRouterPref(
content::BrowserContext* context) { … }
base::flat_map<content::BrowserContext*, bool>& GetStoredPrefValues() { … }
#if !BUILDFLAG(IS_ANDROID)
bool IsValidMirroringPlayoutDelayMs(int delay_ms) { … }
#endif
}
void ClearMediaRouterStoredPrefsForTesting() { … }
bool MediaRouterEnabled(content::BrowserContext* context) { … }
#if !BUILDFLAG(IS_ANDROID)
void RegisterLocalStatePrefs(PrefRegistrySimple* registry) { … }
void RegisterProfilePrefs(PrefRegistrySimple* registry) { … }
bool GetCastAllowAllIPsPref(PrefService* pref_service) { … }
std::string GetReceiverIdHashToken(PrefService* pref_service) { … }
bool DialMediaRouteProviderEnabled() { … }
bool GlobalMediaControlsCastStartStopEnabled(content::BrowserContext* context) { … }
std::optional<base::TimeDelta> GetCastMirroringPlayoutDelay() { … }
#endif
}