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

Side by Side Diff: net/http/http_status_code.h

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef NET_HTTP_HTTP_STATUS_CODE_H_ 5 #ifndef NET_HTTP_HTTP_STATUS_CODE_H_
6 #define NET_HTTP_HTTP_STATUS_CODE_H_ 6 #define NET_HTTP_HTTP_STATUS_CODE_H_
7 7
8 #include "net/base/net_export.h" 8 #include "net/base/net_export.h"
9 9
10 namespace net { 10 namespace net {
11 11
12 // HTTP status codes. 12 // HTTP status codes.
13 enum HttpStatusCode { 13 enum HttpStatusCode {
14 14
15 #define HTTP_STATUS(label, code, reason) HTTP_ ## label = code, 15 #define HTTP_STATUS(label, code, reason) HTTP_##label = code,
16 #include "net/http/http_status_code_list.h" 16 #include "net/http/http_status_code_list.h"
17 #undef HTTP_STATUS 17 #undef HTTP_STATUS
18
19 }; 18 };
20 19
21 // Returns the corresponding HTTP status description to use in the Reason-Phrase 20 // Returns the corresponding HTTP status description to use in the Reason-Phrase
22 // field in an HTTP response for given |code|. It's based on the IANA HTTP 21 // field in an HTTP response for given |code|. It's based on the IANA HTTP
23 // Status Code Registry. 22 // Status Code Registry.
24 // http://www.iana.org/assignments/http-status-codes/http-status-codes.xml 23 // http://www.iana.org/assignments/http-status-codes/http-status-codes.xml
25 // 24 //
26 // This function may not cover all codes defined in the IANA registry. It 25 // This function may not cover all codes defined in the IANA registry. It
27 // returns an empty string (or crash in debug build) for status codes which are 26 // returns an empty string (or crash in debug build) for status codes which are
28 // not yet covered or just invalid. Please extend it when needed. 27 // not yet covered or just invalid. Please extend it when needed.
29 NET_EXPORT const char* GetHttpReasonPhrase(HttpStatusCode code); 28 NET_EXPORT const char* GetHttpReasonPhrase(HttpStatusCode code);
30 29
31 } // namespace net 30 } // namespace net
32 31
33 #endif // NET_HTTP_HTTP_STATUS_CODE_H_ 32 #endif // NET_HTTP_HTTP_STATUS_CODE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698