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

Unified Diff: tools/memory_inspector/memory_inspector/frontends/www_content/js/processes.js

Issue 549313006: [Android] memory_inspector: move to libheap_profiler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mi3_prebuilts
Patch Set: Add prebuilts Created 6 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: tools/memory_inspector/memory_inspector/frontends/www_content/js/processes.js
diff --git a/tools/memory_inspector/memory_inspector/frontends/www_content/js/processes.js b/tools/memory_inspector/memory_inspector/frontends/www_content/js/processes.js
index a4a12751b60c160bd4f87ec616839bf1481c0820..a7dc14210cd93d06d12692f3dfe75e90f7f79b71 100644
--- a/tools/memory_inspector/memory_inspector/frontends/www_content/js/processes.js
+++ b/tools/memory_inspector/memory_inspector/frontends/www_content/js/processes.js
@@ -77,6 +77,26 @@ this.dumpSelectedProcessMmaps_ = function() {
rootUi.showTab('mm');
};
+this.showAndroidProvisionDialog_ = function() {
+ $("#android_provision_dialog").dialog({
+ modal: true,
+ width: '50em',
+ buttons: {
+ Continue: function() {
+ devices.initializeSelectedDevice(true);
+ $(this).dialog('close');
+ rootUi.showDialog(
+ 'Wait device to complete reboot (~30 s) then retry.',
+ 'Device rebooting');
+ processes.clear();
+ },
+ Cancel: function() {
+ $(this).dialog('close');
+ }
+ }
+ });
+};
+
this.showTracingDialog_ = function() {
if (!this.selProcUri_)
return alert('Must select a process!');
@@ -92,13 +112,8 @@ this.startTracingSelectedProcess_ = function() {
$('#ps-tracer-dialog').dialog('close');
if (traceNativeHeap && !devices.getSelectedDevice().isNativeTracingEnabled) {
- var shouldProvision = confirm('Native heap tracing is not enabled.\n' +
- 'Do you want to enable it (will cause a reboot on Android)?');
- if (shouldProvision) {
- devices.initializeSelectedDevice(true);
- alert('Wait device to complete reboot and then retry.');
+ this.showAndroidProvisionDialog_();
return;
- }
}
var postArgs = {interval: $('#ps-tracer-period').val(),

Powered by Google App Engine
This is Rietveld 408576698