Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2059)

Unified Diff: chrome/browser/resources/apps_debugger/js/items.js

Issue 23460005: Show modal dialog to tell users that the profile is managed when it's the case. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/apps_debugger/js/items.js
diff --git a/chrome/browser/resources/apps_debugger/js/items.js b/chrome/browser/resources/apps_debugger/js/items.js
index 8d0946429d5362b7a5ead31020231a827cec5d06..d6b9d154574e344c8f93fe77ac1e751166990e34 100644
--- a/chrome/browser/resources/apps_debugger/js/items.js
+++ b/chrome/browser/resources/apps_debugger/js/items.js
@@ -96,7 +96,24 @@ cr.define('apps_dev_tool', function() {
chrome.developerPrivate.getStrings(function(strings) {
loadTimeData.data = strings;
i18nTemplate.process(document, loadTimeData);
- });
+
+ // Check managed profiles.
+ chrome.developerPrivate.isProfileManaged(function(isManaged) {
+ if (!isManaged)
+ return;
+ alertOverlay.setValues(
+ loadTimeData.getString('managedProfileDialogTitle'),
+ loadTimeData.getString('managedProfileDialogDescription'),
+ loadTimeData.getString('managedProfileDialogCloseButton'),
+ null,
+ function() {
+ AppsDevTool.showOverlay(null);
+ window.close();
+ },
+ null);
+ this.showOverlay($('alertOverlay'));
xiyuan 2013/08/27 17:02:34 Should this be AppsDevTool.showOverlay instead of
dvh 2013/08/27 17:51:06 It's in the context of AppsDevTools.initStrings()
+ }.bind(this));
+ }.bind(this));
};
return {

Powered by Google App Engine
This is Rietveld 408576698