Remove old flags from about:flags and add new ones instead.

We are moving from nacl64-gdb to debugger via debug stub.
In order to reduce user confusion, we need to leave only new flag.

BUG= none
TEST= bots, launch chrome and open about:flags page.
Review URL: https://chromiumcodereview.appspot.com/10918021

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@157006 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 76beaa23..e599430f 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -5597,17 +5597,11 @@
       <message name="IDS_FLAGS_ENABLE_NACL_EXCEPTION_HANDLING_DESCRIPTION" desc="Description of the 'Enable Native Client hardware exception handling' lab.">
         Enable support for Native Client hardware exception handling.
       </message>
-      <message name="IDS_FLAGS_NACL_GDB_NAME" desc="Name of the 'Debug Native Client applications at startup' lab">
-        Debug Native Client applications at startup.
+      <message name="IDS_FLAGS_ENABLE_NACL_DEBUG_NAME" desc="Name of the 'NaCl GDB debug stub' lab.">
+        Native Client GDB-based debugging
       </message>
-      <message name="IDS_FLAGS_NACL_GDB_DESCRIPTION" desc="Description of the 'Debug Native Client applications at startup' lab.">
-        Set path to nacl-gdb debugger. It will be attached to NaCl applications at startup.
-      </message>
-      <message name="IDS_FLAGS_NACL_GDB_SCRIPT_NAME" desc="Name of the 'Script executed by Native Client application debugger at startup' lab.">
-        Script to be executed by nacl-gdb at startup.
-      </message>
-      <message name="IDS_FLAGS_NACL_GDB_SCRIPT_DESCRIPTION" desc="Description of the 'Script executed by Native Client application debugger at startup' lab.">
-        Set path to script with gdb commands which will be executed by nacl-gdb at startup.
+      <message name="IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION" desc="Description of the 'NaCl GDB debug stub' lab.">
+        Enable GDB debug stub. This will stop a Native Client application on startup and wait for nacl-gdb (from the NaCl SDK) to attach to it.
       </message>
       <message name="IDS_FLAGS_ENABLE_PNACL_NAME" desc="Name of the 'Enable Portable Native Client' lab.">
         Portable Native Client.
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index e0297445..e6aa7e2 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -343,18 +343,11 @@
     SINGLE_VALUE_TYPE(switches::kEnableNaClExceptionHandling)
   },
   {
-    "nacl-gdb",  // FLAGS:RECORD_UMA
-    IDS_FLAGS_NACL_GDB_NAME,
-    IDS_FLAGS_NACL_GDB_DESCRIPTION,
-    kOsWin,
-    SINGLE_VALUE_TYPE(switches::kNaClGdb)
-  },
-  {
-    "nacl-gdb-script",  // FLAGS:RECORD_UMA
-    IDS_FLAGS_NACL_GDB_SCRIPT_NAME,
-    IDS_FLAGS_NACL_GDB_SCRIPT_DESCRIPTION,
+    "enable-nacl-debug",  // FLAGS:RECORD_UMA
+    IDS_FLAGS_ENABLE_NACL_DEBUG_NAME,
+    IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION,
     kOsAll,
-    SINGLE_VALUE_TYPE(switches::kNaClGdbScript)
+    SINGLE_VALUE_TYPE(switches::kEnableNaClDebug)
   },
   {
     "enable-pnacl",  // FLAGS:RECORD_UMA
diff --git a/chrome/browser/nacl_host/nacl_process_host.cc b/chrome/browser/nacl_host/nacl_process_host.cc
index 867f735..748506c 100644
--- a/chrome/browser/nacl_host/nacl_process_host.cc
+++ b/chrome/browser/nacl_host/nacl_process_host.cc
@@ -10,6 +10,7 @@
 #include "base/bind.h"
 #include "base/command_line.h"
 #include "base/message_loop.h"
+#include "base/metrics/histogram.h"
 #include "base/path_service.h"
 #include "base/string_number_conversions.h"
 #include "base/string_split.h"
@@ -215,6 +216,16 @@
   // under us by autoupdate.
   NaClBrowser::GetInstance()->EnsureIrtAvailable();
 #endif
+  CommandLine* cmd = CommandLine::ForCurrentProcess();
+  UMA_HISTOGRAM_BOOLEAN(
+      "NaCl.nacl-gdb",
+      !cmd->GetSwitchValuePath(switches::kNaClGdb).empty());
+  UMA_HISTOGRAM_BOOLEAN(
+      "NaCl.nacl-gdb-script",
+      !cmd->GetSwitchValuePath(switches::kNaClGdbScript).empty());
+  UMA_HISTOGRAM_BOOLEAN(
+      "NaCl.enable-nacl-debug",
+      cmd->HasSwitch(switches::kEnableNaClDebug));
 }
 
 void NaClProcessHost::Launch(
diff --git a/chrome/tools/chromeactions.txt b/chrome/tools/chromeactions.txt
index f214d8c..3fbe82a 100644
--- a/chrome/tools/chromeactions.txt
+++ b/chrome/tools/chromeactions.txt
@@ -15,6 +15,7 @@
 0x3add7fc42803849e	AboutFlags_downloads-new-ui
 0x487390cc957aa352	AboutFlags_enable-chrome-to-mobile
 0x4eae5ccc2900dffa	AboutFlags_enable-nacl
+0x91d89fbc43b29963	AboutFlags_enable-nacl-debug
 0x6d932203ed5c6ae8	AboutFlags_enable-nacl-exception-handling
 0x26ca6c633d183f66	AboutFlags_enable-pnacl
 0x98ffd067fa68e69f	AboutFlags_enable-scripted-speech