Commit 3cbe9284 authored by Kushagra Sinha's avatar Kushagra Sinha Committed by Commit Bot

Integrate Chrome OS Account Manager with OneGoogleBar

Presence of Chrome OS Account Manager implies Mirror Account
Reconciliation, which implies that the only allowed operations are:

  - Going Incognito.
  - Displaying Chrome OS Account Manager.

The incognito case is already handled.
Handle the display of Chrome OS Account Manager.

Bug: 833797
Change-Id: I387db8a50a84f82724fa8f4b41b32f3a8fccf518
Reviewed-on: https://chromium-review.googlesource.com/1188474Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Commit-Queue: Kush Sinha <sinhak@chromium.org>
Cr-Commit-Position: refs/heads/master@{#585834}
parent c1d47013
......@@ -54,6 +54,11 @@
#include "extensions/browser/guest_view/web_view/web_view_renderer_state.h"
#endif // defined(OS_ANDROID)
#if defined(OS_CHROMEOS)
#include "chrome/browser/ui/settings_window_manager_chromeos.h"
#include "chromeos/chromeos_switches.h"
#endif
namespace signin {
namespace {
......@@ -198,9 +203,21 @@ void ProcessMirrorHeaderUIThread(
account_reconcilor->GetState());
#if defined(OS_CHROMEOS)
if (chromeos::switches::IsAccountManagerEnabled()) {
// Chrome OS Account Manager is available. The only allowed operations
// are:
//
// - Going Incognito (already handled in above switch-case).
// - Displaying the Account Manager for managing accounts.
chrome::SettingsWindowManager::GetInstance()->ShowChromePageForProfile(
profile, GURL("chrome://settings/accountManager"));
return;
}
// TODO(sinhak): Remove this when Chrome OS Account Manager is released.
// Chrome OS does not have an account picker right now. To fix
// https://crbug.com/807568, this is a no-op here. This is OK because in the
// limited cases that Mirror is available on Chrome OS, 1:1 account
// https://crbug.com/807568, this is a no-op here. This is OK because in
// the limited cases where Mirror is available on Chrome OS, 1:1 account
// consistency is enforced and adding/removing accounts is not allowed,
// GAIA_SERVICE_TYPE_INCOGNITO may be allowed though.
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment