Home | History | Annotate | Download | only in net
      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 #include "net/base/net_export.h"
     17 
     18 class NET_EXPORT AndroidNetworkLibraryImpl : public net::AndroidNetworkLibrary {
     19  public:
     20   static void InitWithApplicationContext(JNIEnv* env, jobject context);
     21 
     22   virtual VerifyResult VerifyX509CertChain(
     23       const std::vector<std::string>& cert_chain,
     24       const std::string& hostname,
     25       const std::string& auth_type);
     26 
     27  private:
     28   explicit AndroidNetworkLibraryImpl(JNIEnv* env);
     29   virtual ~AndroidNetworkLibraryImpl();
     30 
     31   jclass cert_verifier_class_;
     32 
     33   DISALLOW_COPY_AND_ASSIGN(AndroidNetworkLibraryImpl);
     34 };
     35 
     36 #endif  // ANDROID_NET_ANDROID_NETWORK_LIBRARY_IMPL_H_
     37