Home | History | Annotate | Download | only in network
      1 // Copyright 2014 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 MOJO_SERVICES_NETWORK_NETWORK_CONTEXT_H_
      6 #define MOJO_SERVICES_NETWORK_NETWORK_CONTEXT_H_
      7 
      8 #include "base/memory/scoped_ptr.h"
      9 #include "base/threading/thread.h"
     10 
     11 namespace net {
     12 class NetLog;
     13 class URLRequestContext;
     14 class URLRequestContextStorage;
     15 class TransportSecurityPersister;
     16 }
     17 
     18 namespace mojo {
     19 
     20 class NetworkContext {
     21  public:
     22   NetworkContext();
     23   ~NetworkContext();
     24 
     25   net::URLRequestContext* url_request_context() {
     26     return url_request_context_.get();
     27   }
     28 
     29  private:
     30   base::Thread file_thread_;
     31   base::Thread cache_thread_;
     32   scoped_ptr<net::NetLog> net_log_;
     33   scoped_ptr<net::URLRequestContextStorage> storage_;
     34   scoped_ptr<net::URLRequestContext> url_request_context_;
     35   scoped_ptr<net::TransportSecurityPersister> transport_security_persister_;
     36 
     37   DISALLOW_COPY_AND_ASSIGN(NetworkContext);
     38 };
     39 
     40 }  // namespace mojo
     41 
     42 #endif  // MOJO_SERVICES_NETWORK_NETWORK_CONTEXT_H_
     43