Home | History | Annotate | Download | only in net
      1 // Copyright (c) 2009 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 #include "chrome/browser/net/ssl_config_service_manager.h"
      6 #include "net/base/ssl_config_service.h"
      7 
      8 ////////////////////////////////////////////////////////////////////////////////
      9 //  SSLConfigServiceManagerSystem
     10 
     11 // The manager for holding a system SSLConfigService instance.  System
     12 // SSLConfigService objects do not depend on the profile.
     13 class SSLConfigServiceManagerSystem
     14     : public SSLConfigServiceManager {
     15  public:
     16   SSLConfigServiceManagerSystem()
     17       : ssl_config_service_(
     18           net::SSLConfigService::CreateSystemSSLConfigService()) {
     19   }
     20   virtual ~SSLConfigServiceManagerSystem() {}
     21 
     22   virtual net::SSLConfigService* Get() {
     23     return ssl_config_service_;
     24   }
     25 
     26  private:
     27   scoped_refptr<net::SSLConfigService> ssl_config_service_;
     28 
     29   DISALLOW_COPY_AND_ASSIGN(SSLConfigServiceManagerSystem);
     30 };
     31 
     32 ////////////////////////////////////////////////////////////////////////////////
     33 //  SSLConfigServiceManager
     34 
     35 // static
     36 SSLConfigServiceManager* SSLConfigServiceManager::CreateDefaultManager(
     37     PrefService* user_prefs,
     38     PrefService* local_state) {
     39   return new SSLConfigServiceManagerSystem();
     40 }
     41