• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2010 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 #ifndef ANDROID_NET_ANDROID_NETWORK_LIBRARY_IMPL_H_
6 #define ANDROID_NET_ANDROID_NETWORK_LIBRARY_IMPL_H_
7 
8 #pragma once
9 
10 #include <jni.h>
11 
12 #include <string>
13 #include <vector>
14 
15 #include "net/base/android_network_library.h"
16 
17 class AndroidNetworkLibraryImpl : public net::AndroidNetworkLibrary {
18  public:
19   static void InitWithApplicationContext(JNIEnv* env, jobject context);
20 
21   virtual VerifyResult VerifyX509CertChain(
22       const std::vector<std::string>& cert_chain,
23       const std::string& hostname,
24       const std::string& auth_type);
25 
26  private:
27   explicit AndroidNetworkLibraryImpl(JNIEnv* env);
28   virtual ~AndroidNetworkLibraryImpl();
29 
30   jclass cert_verifier_class_;
31 
32   DISALLOW_COPY_AND_ASSIGN(AndroidNetworkLibraryImpl);
33 };
34 
35 #endif  // ANDROID_NET_ANDROID_NETWORK_LIBRARY_IMPL_H_
36