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

Side by Side Diff: net/tools/testserver/run_testserver.cc

Issue 2211473003: Remove calls to deprecated MessageLoop methods on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdio.h> 5 #include <stdio.h>
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/message_loop/message_loop.h" 11 #include "base/message_loop/message_loop.h"
12 #include "base/run_loop.h"
12 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
13 #include "base/test/test_timeouts.h" 14 #include "base/test/test_timeouts.h"
14 #include "net/test/spawned_test_server/spawned_test_server.h" 15 #include "net/test/spawned_test_server/spawned_test_server.h"
15 16
16 static void PrintUsage() { 17 static void PrintUsage() {
17 printf("run_testserver --doc-root=relpath\n" 18 printf("run_testserver --doc-root=relpath\n"
18 " [--http|--https|--ws|--wss|--ftp]\n" 19 " [--http|--https|--ws|--wss|--ftp]\n"
19 " [--ssl-cert=ok|mismatched-name|expired]\n"); 20 " [--ssl-cert=ok|mismatched-name|expired]\n");
20 printf("(NOTE: relpath should be relative to the 'src' directory.\n"); 21 printf("(NOTE: relpath should be relative to the 'src' directory.\n");
21 } 22 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 if (!base::DirectoryExists(test_server->document_root())) { 115 if (!base::DirectoryExists(test_server->document_root())) {
115 printf("Error: invalid doc root: \"%s\" does not exist!\n", 116 printf("Error: invalid doc root: \"%s\" does not exist!\n",
116 base::UTF16ToUTF8( 117 base::UTF16ToUTF8(
117 test_server->document_root().LossyDisplayName()).c_str()); 118 test_server->document_root().LossyDisplayName()).c_str());
118 return -1; 119 return -1;
119 } 120 }
120 121
121 printf("testserver running at %s (type ctrl+c to exit)\n", 122 printf("testserver running at %s (type ctrl+c to exit)\n",
122 test_server->host_port_pair().ToString().c_str()); 123 test_server->host_port_pair().ToString().c_str());
123 124
124 message_loop.Run(); 125 base::RunLoop().Run();
agl 2016/08/06 00:44:00 Should the |message_loop| variable be removed?
fdoray 2016/08/06 01:26:14 No. It needs to exist. Throughout its lifetime, a
125 return 0; 126 return 0;
126 } 127 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698