Commit eb4de0a2 authored by yoshiki@chromium.org's avatar yoshiki@chromium.org

Remove the google drive option on the settings page for supervized user

BUG=253660
TEST=manual
TBR=estade@chromium.org

This is reland of http://crrev.com/209125

Review URL: https://chromiumcodereview.appspot.com/18197002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209347 0039d316-1c4b-4281-b951-d872f2087c98
parent 92f68594
......@@ -527,7 +527,7 @@
</span>
</div>
<if expr="pp_ifdef('chromeos')">
<div class="checkbox" guest-visibility="disabled">
<div class="checkbox" id="disable-drive-row" guest-visibility="disabled">
<span class="controlled-setting-with-label">
<input id="drive-disabled" type="checkbox"
pref="gdata.disabled"
......
......@@ -382,6 +382,9 @@ cr.define('options', function() {
$('autoOpenFileTypesResetToDefault').onclick = function(event) {
chrome.send('autoOpenFileTypesAction');
};
} else {
$('disable-drive-row').hidden =
UIAccountTweaks.loggedInAsLocallyManagedUser();
}
// HTTPS/SSL section.
......
......@@ -29,6 +29,9 @@ void AddAccountUITweaksLocalizedValues(
localized_strings->SetBoolean("loggedInAsGuest",
UserManager::Get()->IsLoggedInAsGuest());
localized_strings->SetBoolean("loggedInAsLocallyManagedUser",
UserManager::Get()->IsLoggedInAsLocallyManagedUser());
}
void AddAccountUITweaksLocalizedValues(
......
......@@ -38,6 +38,13 @@ cr.define('uiAccountTweaks', function() {
return loadTimeData.getBoolean('loggedInAsGuest');
};
/**
* @return {boolean} Whether we're currently in supervised user mode.
*/
UIAccountTweaks.loggedInAsLocallyManagedUser = function() {
return loadTimeData.getBoolean('loggedInAsLocallyManagedUser');
};
/**
* Disables or hides some elements in Guest mode in ChromeOS.
* All elements within given document with guest-visibility
......
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