skiaserve: Add a flag to control hosted mode, i.e. when running on debugger.skia.org.

BUG=skia:
TBR=ethannicholas@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2036173002

Review-Url: https://codereview.chromium.org/2036173002
This commit is contained in:
jcgregorio 2016-06-03 07:26:22 -07:00 committed by Commit bot
parent 9d19cc6ca4
commit 34604046cf

View File

@ -26,6 +26,7 @@ using namespace Response;
DEFINE_int32(port, 8888, "The port to listen on.");
DEFINE_string(address, "127.0.0.1", "The address to bind to.");
DEFINE_bool(hosted, false, "Running in hosted mode on debugger.skia.org.");
class UrlManager {
public:
@ -115,7 +116,18 @@ int skiaserve_main() {
return 1;
}
if (FLAGS_hosted) {
while (1) {
SkDebugf("loop\n");
#if defined(SK_BUILD_FOR_WIN)
Sleep(60 * 1000);
#else
sleep(60);
#endif
}
} else {
getchar();
}
MHD_stop_daemon(daemon);
return 0;
}