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

Unified Diff: ui/webui/resources/js/cr.js

Issue 23536020: Adds cache and buffer graphs to the properties pane. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: got tests running Created 7 years, 3 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: ui/webui/resources/js/cr.js
diff --git a/ui/webui/resources/js/cr.js b/ui/webui/resources/js/cr.js
index 3ea3b91dd8aac824544a8678608f122975ead79d..53f744c4e94782da0fd158226cd99d165833ea6a 100644
--- a/ui/webui/resources/js/cr.js
+++ b/ui/webui/resources/js/cr.js
@@ -351,13 +351,15 @@ this.cr = (function() {
/**
* Whether this uses GTK or not.
*/
- cr.isGTK = typeof chrome.getVariableValue == 'function' &&
+ cr.isGTK = typeof chrome !== 'undefined' &&
Ty Overby 2013/09/09 17:45:55 The reason for this check is that inside of a webu
scherkus (not reviewing) 2013/09/09 17:48:28 To elaborate, content-based browsers (e.g., conten
arv (Not doing code reviews) 2013/09/09 18:02:19 Please add chrome to your test instead.
Charlie Reis 2013/09/09 18:02:22 Can these thoughts be added as a comment in the co
Ty Overby 2013/09/09 18:28:13 See my comment in reply to your comment in main.js
+ typeof chrome.getVariableValue == 'function' &&
/GTK/.test(chrome.getVariableValue('toolkit'));
/**
* Whether this uses the views toolkit or not.
*/
- cr.isViews = typeof chrome.getVariableValue == 'function' &&
+ cr.isViews = typeof chrome !== 'undefined' &&
+ typeof chrome.getVariableValue == 'function' &&
/views/.test(chrome.getVariableValue('toolkit'));
}
« content/test/webui_resource_browsertest.cc ('K') | « content/test/webui_resource_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698