Home | History | Annotate | Download | only in proxy
      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
      3 // found in the LICENSE file.
      4 
      5 // Constants for the Chrome Extensions Proxy Settings API.
      6 
      7 #ifndef CHROME_BROWSER_EXTENSIONS_API_PROXY_PROXY_API_CONSTANTS_H_
      8 #define CHROME_BROWSER_EXTENSIONS_API_PROXY_PROXY_API_CONSTANTS_H_
      9 
     10 namespace extensions {
     11 namespace proxy_api_constants {
     12 
     13 // String literals in dictionaries used to communicate with extension.
     14 extern const char kProxyConfigMode[];
     15 extern const char kProxyConfigPacScript[];
     16 extern const char kProxyConfigPacScriptMandatory[];
     17 extern const char kProxyConfigPacScriptUrl[];
     18 extern const char kProxyConfigPacScriptData[];
     19 extern const char kProxyConfigRules[];
     20 extern const char kProxyConfigRuleHost[];
     21 extern const char kProxyConfigRulePort[];
     22 extern const char kProxyConfigRuleScheme[];
     23 extern const char kProxyConfigBypassList[];
     24 
     25 extern const char kProxyEventFatal[];
     26 extern const char kProxyEventError[];
     27 extern const char kProxyEventDetails[];
     28 extern const char kProxyEventOnProxyError[];
     29 
     30 // Prefix that identifies PAC-script encoding urls.
     31 extern const char kPACDataUrlPrefix[];
     32 
     33 // The scheme for which to use a manually specified proxy, not of the proxy URI
     34 // itself.
     35 enum {
     36   SCHEME_ALL = 0,
     37   SCHEME_HTTP,
     38   SCHEME_HTTPS,
     39   SCHEME_FTP,
     40   SCHEME_FALLBACK,
     41   SCHEME_MAX = SCHEME_FALLBACK  // Keep this value up to date.
     42 };
     43 
     44 // The names of the JavaScript properties to extract from the proxy_rules.
     45 // These must be kept in sync with the SCHEME_* constants.
     46 extern const char* field_name[];
     47 
     48 // The names of the schemes to be used to build the preference value string
     49 // for manual proxy settings.  These must be kept in sync with the SCHEME_*
     50 // constants.
     51 extern const char* scheme_name[];
     52 
     53 }  // namespace proxy_api_constants
     54 }  // namespace extensions
     55 
     56 #endif  // CHROME_BROWSER_EXTENSIONS_API_PROXY_PROXY_API_CONSTANTS_H_
     57