Use net/base/net_error_list.h to populate the cef_errorcode_t enum (fixes issue #2650)

This commit is contained in:
Marshall Greenblatt 2019-04-16 12:06:54 -04:00
parent 879911b721
commit 07863c0d46
5 changed files with 27 additions and 65 deletions

View File

@ -0,0 +1,8 @@
// Copyright (c) 2019 The Chromium Embedded Framework 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 net error codes from the Chromium source location. When creating a
// CEF binary distribution this file will be replaced with the Chromium version.
#include "net/base/net_error_list.h"

View File

@ -880,67 +880,16 @@ typedef enum {
} cef_storage_type_t;
///
// Supported error code values. See net\base\net_error_list.h for complete
// descriptions of the error codes.
// Supported error code values.
///
typedef enum {
// No error.
ERR_NONE = 0,
ERR_FAILED = -2,
ERR_ABORTED = -3,
ERR_INVALID_ARGUMENT = -4,
ERR_INVALID_HANDLE = -5,
ERR_FILE_NOT_FOUND = -6,
ERR_TIMED_OUT = -7,
ERR_FILE_TOO_BIG = -8,
ERR_UNEXPECTED = -9,
ERR_ACCESS_DENIED = -10,
ERR_NOT_IMPLEMENTED = -11,
ERR_CONNECTION_CLOSED = -100,
ERR_CONNECTION_RESET = -101,
ERR_CONNECTION_REFUSED = -102,
ERR_CONNECTION_ABORTED = -103,
ERR_CONNECTION_FAILED = -104,
ERR_NAME_NOT_RESOLVED = -105,
ERR_INTERNET_DISCONNECTED = -106,
ERR_SSL_PROTOCOL_ERROR = -107,
ERR_ADDRESS_INVALID = -108,
ERR_ADDRESS_UNREACHABLE = -109,
ERR_SSL_CLIENT_AUTH_CERT_NEEDED = -110,
ERR_TUNNEL_CONNECTION_FAILED = -111,
ERR_NO_SSL_VERSIONS_ENABLED = -112,
ERR_SSL_VERSION_OR_CIPHER_MISMATCH = -113,
ERR_SSL_RENEGOTIATION_REQUESTED = -114,
ERR_CERT_COMMON_NAME_INVALID = -200,
ERR_CERT_BEGIN = ERR_CERT_COMMON_NAME_INVALID,
ERR_CERT_DATE_INVALID = -201,
ERR_CERT_AUTHORITY_INVALID = -202,
ERR_CERT_CONTAINS_ERRORS = -203,
ERR_CERT_NO_REVOCATION_MECHANISM = -204,
ERR_CERT_UNABLE_TO_CHECK_REVOCATION = -205,
ERR_CERT_REVOKED = -206,
ERR_CERT_INVALID = -207,
ERR_CERT_WEAK_SIGNATURE_ALGORITHM = -208,
// -209 is available: was ERR_CERT_NOT_IN_DNS.
ERR_CERT_NON_UNIQUE_NAME = -210,
ERR_CERT_WEAK_KEY = -211,
ERR_CERT_NAME_CONSTRAINT_VIOLATION = -212,
ERR_CERT_VALIDITY_TOO_LONG = -213,
ERR_CERT_END = ERR_CERT_VALIDITY_TOO_LONG,
ERR_INVALID_URL = -300,
ERR_DISALLOWED_URL_SCHEME = -301,
ERR_UNKNOWN_URL_SCHEME = -302,
ERR_TOO_MANY_REDIRECTS = -310,
ERR_UNSAFE_REDIRECT = -311,
ERR_UNSAFE_PORT = -312,
ERR_INVALID_RESPONSE = -320,
ERR_INVALID_CHUNKED_ENCODING = -321,
ERR_METHOD_NOT_SUPPORTED = -322,
ERR_UNEXPECTED_PROXY_AUTH = -323,
ERR_EMPTY_RESPONSE = -324,
ERR_RESPONSE_HEADERS_TOO_BIG = -325,
ERR_CONTENT_DECODING_FAILED = -330,
ERR_CACHE_MISS = -400,
ERR_INSECURE_RESPONSE = -501,
#define NET_ERROR(label, value) ERR_ ## label = value,
#include "include/base/internal/cef_net_error_list.h"
#undef NET_ERROR
} cef_errorcode_t;
///

View File

@ -2,12 +2,16 @@
# target: Target location relative to the target release directory. This
# value is required.
# source: Source location relative to the CEF root directory. This value
# is optional. If specified the target will be copied to this location
# and a TRANSFER-README.txt file will be created.
# is optional. If specified the source file will be copied to the target
# location and a TRANSFER-README.txt file will be created.
# post-process: Post-processing operation to perform. This value is
# optional and may be any one of the following:
# 'normalize_headers': Replace fully-qualified project header paths with
# the optionally specified 'new_header_path' value.
[
{
'source' : '../net/base/net_error_list.h',
'target' : 'include/base/internal/cef_net_error_list.h',
},
]

View File

@ -2,8 +2,8 @@
# target: Target location relative to the target release directory. This
# value is required.
# source: Source location relative to the CEF root directory. This value
# is optional. If specified the target will be copied to this location
# and a TRANSFER-README.txt file will be created.
# is optional. If specified the source file will be copied to the target
# location and a TRANSFER-README.txt file will be created.
# post-process: Post-processing operation to perform. This value is
# optional and may be any one of the following:
# 'normalize_headers': Replace fully-qualified project header paths with

View File

@ -679,9 +679,10 @@ if mode == 'standard' or mode == 'minimal':
transfer_gypi_files(cef_dir, cef_paths['autogen_client_side'], \
'libcef_dll/', libcef_dll_dir, options.quiet)
# transfer additional files
transfer_files(cef_dir, script_dir, os.path.join(script_dir, 'distrib'), \
mode, output_dir, options.quiet)
if mode == 'standard' or mode == 'minimal':
# transfer additional files
transfer_files(cef_dir, script_dir, os.path.join(script_dir, 'distrib'), \
mode, output_dir, options.quiet)
# process cmake templates
variables = dict(cef_paths.items() + cef_paths2.items())