Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / components / data_reduction_proxy / core / common / data_reduction_proxy_bypass_type_list.h
blob8010fbf87c2da0b7a8561ce4556809b1a02fe6c2
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
3 // found in the LICENSE file.
5 // This is the list of data reduction proxy bypass event types and their values.
6 // For the enum values, include the file
7 // "components/data_reduction_proxy/core/common/data_reduction_proxy_headers.h".
8 //
9 // Here we define the values using a macro BYPASS_EVENT_TYPE, so it can be
10 // expanded differently in some places (for example, to automatically
11 // map a bypass type value to its symbolic name). As such, new values must be
12 // appended and cannot be inserted in the middle as there are instances where
13 // we will load data between different builds.
15 // Bypass due to explicit instruction for the current request.
16 BYPASS_EVENT_TYPE(CURRENT, 0)
18 // Bypass the proxy for less than one minute.
19 BYPASS_EVENT_TYPE(SHORT, 1)
21 // Bypass the proxy for one to five minutes.
22 BYPASS_EVENT_TYPE(MEDIUM, 2)
24 // Bypass the proxy for more than five minutes.
25 BYPASS_EVENT_TYPE(LONG, 3)
27 // Bypass due to a 4xx missing via header.
28 BYPASS_EVENT_TYPE(MISSING_VIA_HEADER_4XX, 4)
30 // Bypass due to other missing via header, excluding 4xx errors.
31 BYPASS_EVENT_TYPE(MISSING_VIA_HEADER_OTHER, 5)
33 // Bypass due to 407 response from proxy without a challenge.
34 BYPASS_EVENT_TYPE(MALFORMED_407, 6)
36 // Bypass due to a 500 internal server error
37 BYPASS_EVENT_TYPE(STATUS_500_HTTP_INTERNAL_SERVER_ERROR, 7)
39 // Bypass because the request URI was too long.
40 BYPASS_EVENT_TYPE(STATUS_502_HTTP_BAD_GATEWAY, 8)
42 // Bypass due to a 503 response.
43 BYPASS_EVENT_TYPE(STATUS_503_HTTP_SERVICE_UNAVAILABLE, 9)
45 // Bypass due to any network error.
46 BYPASS_EVENT_TYPE(NETWORK_ERROR, 10)
48 // This must always be last.
49 BYPASS_EVENT_TYPE(MAX, 11)