• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2023 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 package org.chromium.net.impl;
6 
7 import static org.chromium.net.impl.HttpEngineNativeProvider.EXT_API_LEVEL;
8 import static org.chromium.net.impl.HttpEngineNativeProvider.EXT_VERSION;
9 
10 import androidx.annotation.RequiresExtension;
11 
12 @RequiresExtension(extension = EXT_API_LEVEL, version = EXT_VERSION)
13 class AndroidQuicExceptionWrapper extends org.chromium.net.QuicException {
14     private final AndroidNetworkExceptionWrapper mBackend;
15 
AndroidQuicExceptionWrapper(android.net.http.QuicException backend)16     AndroidQuicExceptionWrapper(android.net.http.QuicException backend) {
17         super(backend.getMessage(), backend);
18         this.mBackend = new AndroidNetworkExceptionWrapper(backend, true);
19     }
20 
21     @Override
getQuicDetailedErrorCode()22     public int getQuicDetailedErrorCode() {
23         // TODO(danstahr): hidden API
24         return 0;
25     }
26 
27     @Override
getErrorCode()28     public int getErrorCode() {
29         return mBackend.getErrorCode();
30     }
31 
32     @Override
getCronetInternalErrorCode()33     public int getCronetInternalErrorCode() {
34         return mBackend.getCronetInternalErrorCode();
35     }
36 
37     @Override
immediatelyRetryable()38     public boolean immediatelyRetryable() {
39         return mBackend.immediatelyRetryable();
40     }
41 }
42