This source file includes following definitions.
- OverrideBlacklistForURL
#include "chrome/browser/policy/policy_helpers.h"
#include "url/gurl.h"
#if defined(OS_CHROMEOS)
#include "base/command_line.h"
#include "chromeos/chromeos_switches.h"
#endif
#if !defined(OS_CHROMEOS) && !defined(OS_IOS)
#include "components/signin/core/browser/signin_manager.h"
#include "google_apis/gaia/gaia_urls.h"
#endif
namespace policy {
bool OverrideBlacklistForURL(const GURL& url, bool* block) {
#if defined(OS_CHROMEOS)
if (CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kOobeGuestSession)) {
if (!url.SchemeIs("chrome") && !url.SchemeIs("chrome-extension")) {
*block = true;
return true;
}
}
return false;
#elif defined(OS_IOS)
return false;
#else
static const char kServiceLoginAuth[] = "/ServiceLoginAuth";
*block = false;
if (SigninManager::IsWebBasedSigninFlowURL(url))
return true;
if (url.GetOrigin() != GaiaUrls::GetInstance()->gaia_url().GetOrigin())
return false;
return url.path() == kServiceLoginAuth;
#endif
}
}