diff options
| author | khmel <khmel@chromium.org> | 2016-03-11 16:12:37 -0800 |
|---|---|---|
| committer | Commit bot <commit-bot@chromium.org> | 2016-03-12 00:14:15 +0000 |
| commit | 8c5ee7703eed1efa0a5f1bd532c3ac9c7f8e9242 (patch) | |
| tree | 9605b097082e81eea7759bfc90956d86e2ec6ba1 | |
| parent | f307247b890c281aee1cc7e6382c0ddb5d760abf (diff) | |
| download | chromium_src-8c5ee7703eed1efa0a5f1bd532c3ac9c7f8e9242.zip chromium_src-8c5ee7703eed1efa0a5f1bd532c3ac9c7f8e9242.tar.gz chromium_src-8c5ee7703eed1efa0a5f1bd532c3ac9c7f8e9242.tar.bz2 | |
arc: Disable any UI for supervised profiles.
We cannot fetch authorization code for supervised profiles.
Therefore we cannot start Arc and should disable any Arc
related UI.
BUG=593542
TEST=Sign-in with supervised profile. Arc is not started,
there is no Arc settins in Chrome::Settings and there
is no OptIn UI and Arc welcome notification. Signed in
with normal profile and everything works as before.
Review URL: https://codereview.chromium.org/1781933002
Cr-Commit-Position: refs/heads/master@{#380798}
| -rw-r--r-- | chrome/browser/chromeos/arc/arc_auth_service.cc | 5 | ||||
| -rw-r--r-- | chrome/browser/ui/webui/options/browser_options_handler.cc | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/chrome/browser/chromeos/arc/arc_auth_service.cc b/chrome/browser/chromeos/arc/arc_auth_service.cc index 86ae290..facd3f3 100644 --- a/chrome/browser/chromeos/arc/arc_auth_service.cc +++ b/chrome/browser/chromeos/arc/arc_auth_service.cc @@ -150,6 +150,11 @@ void ArcAuthService::OnPrimaryUserProfilePrepared(Profile* profile) { Shutdown(); + if (profile->IsLegacySupervised()) { + VLOG(2) << "Supervised profiles are not supported in Arc."; + return; + } + profile_ = profile; // Reuse storage used in ARC OptIn platform app. const std::string site_url = diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc index c631bec..6bd2743 100644 --- a/chrome/browser/ui/webui/options/browser_options_handler.cc +++ b/chrome/browser/ui/webui/options/browser_options_handler.cc @@ -1063,7 +1063,8 @@ void BrowserOptionsHandler::InitializePage() { if (!arc::ArcBridgeService::GetEnabled( base::CommandLine::ForCurrentProcess()) || - arc::ArcAuthService::IsOptInVerificationDisabled()) { + arc::ArcAuthService::IsOptInVerificationDisabled() || + profile->IsLegacySupervised()) { web_ui()->CallJavascriptFunction("BrowserOptions.hideAndroidAppsSection"); } #endif |
