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