File: web_request_api_constants.cc

package info (click to toggle)
chromium 138.0.7204.183-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,071,908 kB
  • sloc: cpp: 34,937,088; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,953; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,806; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (78 lines) | stat: -rw-r--r-- 3,604 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "extensions/browser/api/web_request/web_request_api_constants.h"

namespace extension_web_request_api_constants {

const char kChallengerKey[] = "challenger";
const char kDocumentIdKey[] = "documentId";
const char kDocumentLifecycleKey[] = "documentLifecycle";
const char kErrorKey[] = "error";
const char kFrameIdKey[] = "frameId";
const char kFrameTypeKey[] = "frameType";
const char kParentDocumentIdKey[] = "parentDocumentId";
const char kParentFrameIdKey[] = "parentFrameId";
const char kProcessIdKey[] = "processId";
const char kFromCache[] = "fromCache";
const char kHostKey[] = "host";
const char kIpKey[] = "ip";
const char kPortKey[] = "port";
const char kMethodKey[] = "method";
const char kRedirectUrlKey[] = "redirectUrl";
const char kRequestIdKey[] = "requestId";
const char kStatusCodeKey[] = "statusCode";
const char kStatusLineKey[] = "statusLine";
const char kTabIdKey[] = "tabId";
const char kTimeStampKey[] = "timeStamp";
const char kTypeKey[] = "type";
const char kUrlKey[] = "url";
const char kRequestBodyKey[] = "requestBody";
const char kRequestBodyErrorKey[] = "error";
const char kRequestBodyFormDataKey[] = "formData";
const char kRequestBodyRawKey[] = "raw";
const char kRequestBodyRawBytesKey[] = "bytes";
const char kRequestBodyRawFileKey[] = "file";
const char kRequestHeadersKey[] = "requestHeaders";
const char kResponseHeadersKey[] = "responseHeaders";
const char kHeaderNameKey[] = "name";
const char kHeaderValueKey[] = "value";
const char kHeaderBinaryValueKey[] = "binaryValue";
const char kIsProxyKey[] = "isProxy";
const char kMessageKey[] = "message";
const char kSchemeKey[] = "scheme";
const char kStageKey[] = "stage";
const char kRealmKey[] = "realm";
const char kAuthCredentialsKey[] = "authCredentials";
const char kUsernameKey[] = "username";
const char kPasswordKey[] = "password";
const char kInitiatorKey[] = "initiator";

const char kOnBeforeRedirectEvent[] = "webRequest.onBeforeRedirect";
const char kOnBeforeSendHeadersEvent[] = "webRequest.onBeforeSendHeaders";
const char kOnCompletedEvent[] = "webRequest.onCompleted";
const char kOnHeadersReceivedEvent[] = "webRequest.onHeadersReceived";
const char kOnResponseStartedEvent[] = "webRequest.onResponseStarted";
const char kOnSendHeadersEvent[] = "webRequest.onSendHeaders";
const char kOnAuthRequiredEvent[] = "webRequest.onAuthRequired";

const char kInvalidRedirectUrl[] = "redirectUrl '*' is not a valid URL.";
const char kInvalidBlockingResponse[] =
    "cancel cannot be true in the presence of other keys.";
const char kInvalidRequestFilterUrl[] = "'*' is not a valid URL pattern.";
const char kBlockingPermissionRequired[] =
    "You do not have permission to use blocking webRequest listeners. "
    "Be sure to declare the webRequestBlocking permission in your "
    "manifest. Note that webRequestBlocking is only allowed for extensions "
    "that are installed using ExtensionInstallForcelist.";
const char kHostPermissionsRequired[] =
    "You need to request host permissions in the manifest file in order to "
    "be notified about requests from the webRequest API.";
const char kInvalidHeaderKeyCombination[] =
    "requestHeaders and responseHeaders cannot both be present.";
const char kInvalidHeader[] = "Invalid header specification '*'.";
const char kInvalidHeaderName[] = "Invalid header name.";
const char kInvalidHeaderValue[] = "Header '*' has an invalid value.";

}  // namespace extension_web_request_api_constants