Bug 1364673 - Hide the mouse throbber when running the pingsender on Windows; r?Dexter
This patch uses the functionality introduced in
bug 1366711 to launch the
pingsender without showing its console window nor a mouse throbber. This also
reverts the pingsender into a console application.
MozReview-Commit-ID: BTcqAkR9UKB
--- a/toolkit/components/telemetry/TelemetrySend.jsm
+++ b/toolkit/components/telemetry/TelemetrySend.jsm
@@ -1289,11 +1289,12 @@ var TelemetrySendImpl = {
: "pingsender";
let exe = Services.dirsvc.get("GreBinD", Ci.nsIFile);
exe.append(exeName);
let process = Cc["@mozilla.org/process/util;1"]
.createInstance(Ci.nsIProcess);
process.init(exe);
+ process.startHidden = true;
process.run(/* blocking */ false, [url, pingPath], 2);
},
};
--- a/toolkit/components/telemetry/pingsender/pingsender_win.cpp
+++ b/toolkit/components/telemetry/pingsender/pingsender_win.cpp
@@ -3,18 +3,16 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include <string>
#include <windows.h>
#include <wininet.h>
-#pragma comment(linker, "/SUBSYSTEM:windows /ENTRY:mainCRTStartup")
-
namespace PingSender {
using std::string;
/**
* A helper to automatically close internet handles when they go out of scope
*/
class ScopedHInternet {