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

Side by Side Diff: services/http_server/http_server.cc

Issue 898343002: Copy http_status_code_list.h from /net to be owned by http_server. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « services/http_server/BUILD.gn ('k') | services/http_server/http_status_code_list.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <winsock2.h> 8 #include <winsock2.h>
9 #elif defined(OS_POSIX) 9 #elif defined(OS_POSIX)
10 #include <arpa/inet.h> 10 #include <arpa/inet.h>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 namespace http_server { 43 namespace http_server {
44 44
45 class Connection; 45 class Connection;
46 46
47 typedef base::Callback<void(HttpRequestPtr, Connection*)> HandleRequestCallback; 47 typedef base::Callback<void(HttpRequestPtr, Connection*)> HandleRequestCallback;
48 48
49 const char* GetHttpReasonPhrase(uint32_t code_in) { 49 const char* GetHttpReasonPhrase(uint32_t code_in) {
50 switch (code_in) { 50 switch (code_in) {
51 #define HTTP_STATUS(label, code, reason) case code: return reason; 51 #define HTTP_STATUS(label, code, reason) case code: return reason;
52 #include "net/http/http_status_code_list.h" 52 #include "services/http_server/http_status_code_list.h"
53 #undef HTTP_STATUS 53 #undef HTTP_STATUS
54 54
55 default: 55 default:
56 NOTREACHED() << "unknown HTTP status code " << code_in; 56 NOTREACHED() << "unknown HTTP status code " << code_in;
57 } 57 }
58 58
59 return ""; 59 return "";
60 } 60 }
61 61
62 // Represents one connection to a client. This connection will manage its own 62 // Represents one connection to a client. This connection will manage its own
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 421
422 ScopedVector<Handler> handlers_; 422 ScopedVector<Handler> handlers_;
423 }; 423 };
424 424
425 } // namespace http_server 425 } // namespace http_server
426 426
427 MojoResult MojoMain(MojoHandle shell_handle) { 427 MojoResult MojoMain(MojoHandle shell_handle) {
428 mojo::ApplicationRunner runner(new http_server::HttpServerApp); 428 mojo::ApplicationRunner runner(new http_server::HttpServerApp);
429 return runner.Run(shell_handle); 429 return runner.Run(shell_handle);
430 } 430 }
OLDNEW
« no previous file with comments | « services/http_server/BUILD.gn ('k') | services/http_server/http_status_code_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698