summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_webrequest_api_constants.cc
blob: a96987fecdc82ba55480b4245672d9fab9f78986 (plain)
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
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/extensions/extension_webrequest_api_constants.h"

namespace extension_webrequest_api_constants {

const char kChallengerKey[] = "challenger";
const char kErrorKey[] = "error";
const char kFrameIdKey[] = "frameId";
const char kParentFrameIdKey[] = "parentFrameId";
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 kRequestHeadersKey[] = "requestHeaders";
const char kResponseHeadersKey[] = "responseHeaders";
const char kHeaderNameKey[] = "name";
const char kHeaderValueKey[] = "value";
const char kHeaderBinaryValueKey[] = "binaryValue";
const char kIsProxyKey[] = "isProxy";
const char kSchemeKey[] = "scheme";
const char kRealmKey[] = "realm";
const char kAuthCredentialsKey[] = "authCredentials";
const char kUsernameKey[] = "username";
const char kPasswordKey[] = "password";

const char kOnBeforeRedirect[] = "webRequest.onBeforeRedirect";
const char kOnBeforeRequest[] = "webRequest.onBeforeRequest";
const char kOnBeforeSendHeaders[] = "webRequest.onBeforeSendHeaders";
const char kOnCompleted[] = "webRequest.onCompleted";
const char kOnErrorOccurred[] = "webRequest.onErrorOccurred";
const char kOnHeadersReceived[] = "webRequest.onHeadersReceived";
const char kOnResponseStarted[] = "webRequest.onResponseStarted";
const char kOnSendHeaders[] = "webRequest.onSendHeaders";
const char kOnAuthRequired[] = "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.";
const char kHostPermissionsRequired[] =
    "You need to request host permissions in the manifest file in order to "
    "be notified about requests from the webRequest API.";

}  // namespace extension_webrequest_api_constants