Part of fix for bug 5455901 Export symbols from net/

Exporting needed symbols for linking libwebcore and libstagefright.

Everything here is cherrypicks from upstream, but only taking
the definitions we need to satisfy linker errors.

One exception is in openssl_private_key_store.h, which because of this
uses an android guard.

Change-Id: I74a8f2bfd63a83c2c1684ba955fcdf00bcb2666a
diff --git a/googleurl/src/url_common.h b/googleurl/src/url_common.h
index 7e7e27a..684555d 100644
--- a/googleurl/src/url_common.h
+++ b/googleurl/src/url_common.h
@@ -34,15 +34,20 @@
 #define GURL_IMPLEMENTATION 0
 #endif
 
-#if defined(WIN32) && defined(GURL_DLL)
+#if defined(GURL_DLL)
+#if defined(WIN32)
 #if GURL_IMPLEMENTATION
 #define GURL_API __declspec(dllexport)
 #else
 #define GURL_API __declspec(dllimport)
 #endif
 #else
+// Non-Windows DLLs.
+#define GURL_API __attribute__((visibility("default")))
+#endif
+#else
+// Not a DLL.
 #define GURL_API
 #endif
 
 #endif  // GOOGLEURL_SRC_URL_COMMON_H__
-
diff --git a/net/base/android_network_library.h b/net/base/android_network_library.h
index 4edecb3..924e1c4 100644
--- a/net/base/android_network_library.h
+++ b/net/base/android_network_library.h
@@ -10,10 +10,11 @@
 #include <vector>
 
 #include "base/basictypes.h"
+#include "net/base/net_export.h"
 
 namespace net {
 
-class AndroidNetworkLibrary {
+class NET_EXPORT AndroidNetworkLibrary {
  public:
   static void RegisterSharedInstance(AndroidNetworkLibrary* lib);
   static void UnregisterSharedInstance();
diff --git a/net/base/auth.h b/net/base/auth.h
index 32919c8..834d9b5 100644
--- a/net/base/auth.h
+++ b/net/base/auth.h
@@ -10,12 +10,13 @@
 
 #include "base/memory/ref_counted.h"
 #include "base/string16.h"
+#include "net/base/net_export.h"
 
 namespace net {
 
 // Holds info about an authentication challenge that we may want to display
 // to the user.
-class AuthChallengeInfo :
+class NET_EXPORT AuthChallengeInfo :
     public base::RefCountedThreadSafe<AuthChallengeInfo> {
  public:
   AuthChallengeInfo();
diff --git a/net/base/cert_verifier.h b/net/base/cert_verifier.h
index f2db53f..dc0930d 100644
--- a/net/base/cert_verifier.h
+++ b/net/base/cert_verifier.h
@@ -16,6 +16,7 @@
 #include "net/base/cert_database.h"
 #include "net/base/cert_verify_result.h"
 #include "net/base/completion_callback.h"
+#include "net/base/net_export.h"
 #include "net/base/x509_cert_types.h"
 
 namespace net {
@@ -47,7 +48,7 @@
 // request at a time is to create a SingleRequestCertVerifier wrapper around
 // CertVerifier (which will automatically cancel the single request when it
 // goes out of scope).
-class CertVerifier : public base::NonThreadSafe,
+class NET_EXPORT CertVerifier : public base::NonThreadSafe,
                      public CertDatabase::Observer {
  public:
   // Opaque type used to cancel a request.
diff --git a/net/base/cookie_monster.h b/net/base/cookie_monster.h
index b7cf8b7..4bbf9a5 100644
--- a/net/base/cookie_monster.h
+++ b/net/base/cookie_monster.h
@@ -42,7 +42,7 @@
 //
 // TODO(deanm) Implement CookieMonster, the cookie database.
 //  - Verify that our domain enforcement and non-dotted handling is correct
-class CookieMonster : public CookieStore {
+class NET_EXPORT CookieMonster : public CookieStore {
  public:
   class CanonicalCookie;
   class Delegate;
@@ -526,7 +526,7 @@
   DISALLOW_COPY_AND_ASSIGN(CookieMonster);
 };
 
-class CookieMonster::CanonicalCookie {
+class NET_EXPORT CookieMonster::CanonicalCookie {
  public:
 
   // These constructors do no validation or canonicalization of their inputs;
@@ -643,7 +643,7 @@
   bool has_expires_;
 };
 
-class CookieMonster::Delegate
+class NET_EXPORT CookieMonster::Delegate
     : public base::RefCountedThreadSafe<CookieMonster::Delegate> {
  public:
   // The publicly relevant reasons a cookie might be changed.
@@ -680,7 +680,7 @@
   virtual ~Delegate() {}
 };
 
-class CookieMonster::ParsedCookie {
+class NET_EXPORT CookieMonster::ParsedCookie {
  public:
   typedef std::pair<std::string, std::string> TokenValuePair;
   typedef std::vector<TokenValuePair> PairList;
@@ -803,7 +803,7 @@
   DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore);
 };
 
-class CookieList : public std::vector<CookieMonster::CanonicalCookie> {
+class NET_EXPORT CookieList : public std::vector<CookieMonster::CanonicalCookie> {
 };
 
 }  // namespace net
diff --git a/net/base/cookie_store.h b/net/base/cookie_store.h
index 7d64ee8..24f4810 100644
--- a/net/base/cookie_store.h
+++ b/net/base/cookie_store.h
@@ -15,6 +15,7 @@
 #include "base/memory/ref_counted.h"
 #include "base/time.h"
 #include "net/base/cookie_options.h"
+#include "net/base/net_export.h"
 
 class GURL;
 
@@ -24,7 +25,7 @@
 
 // An interface for storing and retrieving cookies. Implementations need to
 // be thread safe as its methods can be accessed from IO as well as UI threads.
-class CookieStore : public base::RefCountedThreadSafe<CookieStore> {
+class NET_EXPORT CookieStore : public base::RefCountedThreadSafe<CookieStore> {
  public:
   // Sets a single cookie.  Expects a cookie line, like "a=1; domain=b.com".
   virtual bool SetCookieWithOptions(const GURL& url,
diff --git a/net/base/data_url.h b/net/base/data_url.h
index 65a211a..a257064 100644
--- a/net/base/data_url.h
+++ b/net/base/data_url.h
@@ -10,6 +10,8 @@
 
 class GURL;
 
+#include "net/base/net_export.h"
+
 namespace net {
 
 // See RFC 2397 for a complete description of the 'data' URL scheme.
@@ -26,7 +28,7 @@
 // If <mediatype> is omitted, it defaults to text/plain;charset=US-ASCII.  As a
 // shorthand, "text/plain" can be omitted but the charset parameter supplied.
 //
-class DataURL {
+class NET_EXPORT DataURL {
  public:
   // This method can be used to parse a 'data' URL into its component pieces.
   //
diff --git a/net/base/host_resolver.h b/net/base/host_resolver.h
index f16c265..8f53b6b 100644
--- a/net/base/host_resolver.h
+++ b/net/base/host_resolver.h
@@ -13,6 +13,7 @@
 #include "net/base/address_family.h"
 #include "net/base/completion_callback.h"
 #include "net/base/host_port_pair.h"
+#include "net/base/net_export.h"
 #include "net/base/request_priority.h"
 
 namespace net {
@@ -32,11 +33,11 @@
 // request at a time is to create a SingleRequestHostResolver wrapper around
 // HostResolver (which will automatically cancel the single request when it
 // goes out of scope).
-class HostResolver {
+class NET_EXPORT HostResolver {
  public:
   // The parameters for doing a Resolve(). A hostname and port are required,
   // the rest are optional (and have reasonable defaults).
-  class RequestInfo {
+  class NET_EXPORT RequestInfo {
    public:
     explicit RequestInfo(const HostPortPair& host_port_pair);
 
@@ -196,7 +197,7 @@
 // This class represents the task of resolving a hostname (or IP address
 // literal) to an AddressList object.  It wraps HostResolver to resolve only a
 // single hostname at a time and cancels this request when going out of scope.
-class SingleRequestHostResolver {
+class NET_EXPORT SingleRequestHostResolver {
  public:
   // |resolver| must remain valid for the lifetime of |this|.
   explicit SingleRequestHostResolver(HostResolver* resolver);
@@ -240,9 +241,9 @@
 // underlying system, |max_concurrent_resolves| is how many resolve
 // requests will be allowed to run in parallel. Pass
 // HostResolver::kDefaultParallelism to choose a default value.
-HostResolver* CreateSystemHostResolver(size_t max_concurrent_resolves,
-                                       HostResolverProc* resolver_proc,
-                                       NetLog* net_log);
+NET_EXPORT HostResolver* CreateSystemHostResolver(size_t max_concurrent_resolves,
+                                                  HostResolverProc* resolver_proc,
+                                                  NetLog* net_log);
 
 }  // namespace net
 
diff --git a/net/base/io_buffer.h b/net/base/io_buffer.h
index a747ead..5069f66 100644
--- a/net/base/io_buffer.h
+++ b/net/base/io_buffer.h
@@ -11,12 +11,13 @@
 #include "base/memory/ref_counted.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/pickle.h"
+#include "net/base/net_export.h"
 
 namespace net {
 
 // This is a simple wrapper around a buffer that provides ref counting for
 // easier asynchronous IO handling.
-class IOBuffer : public base::RefCountedThreadSafe<IOBuffer> {
+class NET_EXPORT IOBuffer : public base::RefCountedThreadSafe<IOBuffer> {
  public:
   IOBuffer();
   explicit IOBuffer(int buffer_size);
@@ -39,7 +40,7 @@
 // doesn't have to keep track of that value.
 // NOTE: This doesn't mean that we want to stop sending the size as an explicit
 // argument to IO functions. Please keep using IOBuffer* for API declarations.
-class IOBufferWithSize : public IOBuffer {
+class NET_EXPORT IOBufferWithSize : public IOBuffer {
  public:
   explicit IOBufferWithSize(int size);
 
@@ -53,7 +54,7 @@
 
 // This is a read only IOBuffer.  The data is stored in a string and
 // the IOBuffer interface does not provide a proper way to modify it.
-class StringIOBuffer : public IOBuffer {
+class NET_EXPORT StringIOBuffer : public IOBuffer {
  public:
   explicit StringIOBuffer(const std::string& s);
 
@@ -67,7 +68,7 @@
 
 // This version wraps an existing IOBuffer and provides convenient functions
 // to progressively read all the data.
-class DrainableIOBuffer : public IOBuffer {
+class NET_EXPORT DrainableIOBuffer : public IOBuffer {
  public:
   DrainableIOBuffer(IOBuffer* base, int size);
 
@@ -96,7 +97,7 @@
 };
 
 // This version provides a resizable buffer and a changeable offset.
-class GrowableIOBuffer : public IOBuffer {
+class NET_EXPORT GrowableIOBuffer : public IOBuffer {
  public:
   GrowableIOBuffer();
 
@@ -121,7 +122,7 @@
 
 // This versions allows a pickle to be used as the storage for a write-style
 // operation, avoiding an extra data copy.
-class PickledIOBuffer : public IOBuffer {
+class NET_EXPORT PickledIOBuffer : public IOBuffer {
  public:
   PickledIOBuffer();
 
@@ -142,7 +143,7 @@
 // A good example is the buffer for a synchronous operation, where we can be
 // sure that nobody is keeping an extra reference to this object so the lifetime
 // of the buffer can be completely managed by its intended owner.
-class WrappedIOBuffer : public IOBuffer {
+class NET_EXPORT WrappedIOBuffer : public IOBuffer {
  public:
   explicit WrappedIOBuffer(const char* data);
 
diff --git a/net/base/mime_util.h b/net/base/mime_util.h
index 249a25b..f0ab20f 100644
--- a/net/base/mime_util.h
+++ b/net/base/mime_util.h
@@ -10,6 +10,7 @@
 #include <vector>
 
 #include "base/file_path.h"
+#include "net/base/net_export.h"
 
 namespace net {
 
@@ -20,7 +21,7 @@
 
 // Get the mime type (if any) that is associated with the given file.  Returns
 // true if a corresponding mime type exists.
-bool GetMimeTypeFromFile(const FilePath& file_path, std::string* mime_type);
+NET_EXPORT bool GetMimeTypeFromFile(const FilePath& file_path, std::string* mime_type);
 
 // Get the preferred extension (if any) associated with the given mime type.
 // Returns true if a corresponding file extension exists.  The extension is
diff --git a/net/base/net_util.h b/net/base/net_util.h
index df99469..30bc2bf 100644
--- a/net/base/net_util.h
+++ b/net/base/net_util.h
@@ -23,6 +23,7 @@
 #include "base/basictypes.h"
 #include "base/string16.h"
 #include "net/base/escape.h"
+#include "net/base/net_export.h"
 
 struct addrinfo;
 class FilePath;
@@ -204,7 +205,7 @@
 // an offset points past the end of |host| or into the middle of a punycode
 // sequence, the offending offset will be set to std::wstring::npos.
 // |offset[s]_for_adjustment| may be NULL.
-std::wstring IDNToUnicode(const char* host,
+NET_EXPORT std::wstring IDNToUnicode(const char* host,
                           size_t host_len,
                           const std::wstring& languages,
                           size_t* offset_for_adjustment);
diff --git a/net/base/network_change_notifier.h b/net/base/network_change_notifier.h
index 4550eed..3eb58e3 100644
--- a/net/base/network_change_notifier.h
+++ b/net/base/network_change_notifier.h
@@ -8,15 +8,16 @@
 
 #include "base/basictypes.h"
 #include "base/observer_list_threadsafe.h"
+#include "net/base/net_export.h"
 
 namespace net {
 
 // NetworkChangeNotifier monitors the system for network changes, and notifies
 // registered observers of those events.  Observers may register on any thread,
 // and will be called back on the thread from which they registered.
-class NetworkChangeNotifier {
+class NET_EXPORT NetworkChangeNotifier {
  public:
-  class IPAddressObserver {
+  class NET_EXPORT IPAddressObserver {
    public:
     virtual ~IPAddressObserver() {}
 
@@ -31,7 +32,7 @@
     DISALLOW_COPY_AND_ASSIGN(IPAddressObserver);
   };
 
-  class OnlineStateObserver {
+  class NET_EXPORT OnlineStateObserver {
    public:
     virtual ~OnlineStateObserver() {}
 
diff --git a/net/base/openssl_private_key_store.h b/net/base/openssl_private_key_store.h
index 17f8fe1..396ee80 100644
--- a/net/base/openssl_private_key_store.h
+++ b/net/base/openssl_private_key_store.h
@@ -7,6 +7,7 @@
 #pragma once
 
 #include "base/basictypes.h"
+#include "net/base/net_export.h"
 
 typedef struct evp_pkey_st EVP_PKEY;
 
@@ -21,7 +22,11 @@
 // system location, and be available to the SSLClientSocketOpenSSL when using a
 // client certificate created against the associated public key for client
 // authentication.
-class OpenSSLPrivateKeyStore {
+class
+#ifdef ANDROID
+NET_EXPORT
+#endif
+OpenSSLPrivateKeyStore {
  public:
   // Platforms must define this factory function as appropriate.
   static OpenSSLPrivateKeyStore* GetInstance();
diff --git a/net/base/ssl_cert_request_info.h b/net/base/ssl_cert_request_info.h
index cbff862..1593160 100644
--- a/net/base/ssl_cert_request_info.h
+++ b/net/base/ssl_cert_request_info.h
@@ -10,6 +10,7 @@
 #include <vector>
 
 #include "base/memory/ref_counted.h"
+#include "net/base/net_export.h"
 
 namespace net {
 
@@ -17,7 +18,7 @@
 
 // The SSLCertRequestInfo class contains the info that allows a user to
 // select a certificate to send to the SSL server for client authentication.
-class SSLCertRequestInfo
+class NET_EXPORT SSLCertRequestInfo
     : public base::RefCountedThreadSafe<SSLCertRequestInfo> {
  public:
   SSLCertRequestInfo();
diff --git a/net/base/ssl_config_service.h b/net/base/ssl_config_service.h
index 1b77839..efe87f6 100644
--- a/net/base/ssl_config_service.h
+++ b/net/base/ssl_config_service.h
@@ -11,12 +11,13 @@
 #include "base/basictypes.h"
 #include "base/memory/ref_counted.h"
 #include "base/observer_list.h"
+#include "net/base/net_export.h"
 #include "net/base/x509_certificate.h"
 
 namespace net {
 
 // A collection of SSL-related configuration settings.
-struct SSLConfig {
+struct NET_EXPORT SSLConfig {
   // Default to revocation checking.
   // Default to SSL 3.0 on and TLS 1.0 on.
   SSLConfig();
@@ -97,10 +98,10 @@
 // does not cover setting the SSL configuration, as on some systems, the
 // SSLConfigService objects may not have direct access to the configuration, or
 // live longer than the configuration preferences.
-class SSLConfigService : public base::RefCountedThreadSafe<SSLConfigService> {
+class NET_EXPORT SSLConfigService : public base::RefCountedThreadSafe<SSLConfigService> {
  public:
   // Observer is notified when SSL config settings have changed.
-  class Observer {
+  class NET_EXPORT Observer {
    public:
     // Notify observers if SSL settings have changed.  We don't check all of the
     // data in SSLConfig, just those that qualify as a user config change.
diff --git a/net/base/ssl_info.h b/net/base/ssl_info.h
index 7b65a1b..d4b6757 100644
--- a/net/base/ssl_info.h
+++ b/net/base/ssl_info.h
@@ -9,6 +9,7 @@
 #include <vector>
 
 #include "base/memory/ref_counted.h"
+#include "net/base/net_export.h"
 #include "net/base/x509_cert_types.h"
 
 namespace net {
@@ -17,7 +18,7 @@
 
 // SSL connection info.
 // This is really a struct.  All members are public.
-class SSLInfo {
+class NET_EXPORT SSLInfo {
  public:
   SSLInfo();
   SSLInfo(const SSLInfo& info);
diff --git a/net/base/x509_certificate.h b/net/base/x509_certificate.h
index 625be62..89865cc 100644
--- a/net/base/x509_certificate.h
+++ b/net/base/x509_certificate.h
@@ -15,6 +15,7 @@
 #include "base/memory/ref_counted.h"
 #include "base/string_piece.h"
 #include "base/time.h"
+#include "net/base/net_export.h"
 #include "net/base/x509_cert_types.h"
 
 #if defined(OS_WIN)
@@ -48,7 +49,7 @@
 typedef std::vector<scoped_refptr<X509Certificate> > CertificateList;
 
 // X509Certificate represents an X.509 certificate used by SSL.
-class X509Certificate : public base::RefCountedThreadSafe<X509Certificate> {
+class NET_EXPORT X509Certificate : public base::RefCountedThreadSafe<X509Certificate> {
  public:
   // A handle to the certificate object in the underlying crypto library.
   // We assume that OSCertHandle is a pointer type on all platforms and
diff --git a/net/http/http_auth_handler_factory.h b/net/http/http_auth_handler_factory.h
index c5cf98e..ba39e51 100644
--- a/net/http/http_auth_handler_factory.h
+++ b/net/http/http_auth_handler_factory.h
@@ -11,6 +11,7 @@
 #include <vector>
 
 #include "base/memory/scoped_ptr.h"
+#include "net/base/net_export.h"
 #include "net/http/http_auth.h"
 #include "net/http/url_security_manager.h"
 
@@ -26,7 +27,7 @@
 // An HttpAuthHandlerFactory is used to create HttpAuthHandler objects.
 // The HttpAuthHandlerFactory object _must_ outlive any of the HttpAuthHandler
 // objects that it creates.
-class HttpAuthHandlerFactory {
+class NET_EXPORT HttpAuthHandlerFactory {
  public:
   enum CreateReason {
     CREATE_CHALLENGE,     // Create a handler in response to a challenge.
@@ -125,7 +126,8 @@
 
 // The HttpAuthHandlerRegistryFactory dispatches create requests out
 // to other factories based on the auth scheme.
-class HttpAuthHandlerRegistryFactory : public HttpAuthHandlerFactory {
+class NET_EXPORT HttpAuthHandlerRegistryFactory 
+    : public HttpAuthHandlerFactory {
  public:
   HttpAuthHandlerRegistryFactory();
   virtual ~HttpAuthHandlerRegistryFactory();
diff --git a/net/http/http_cache.h b/net/http/http_cache.h
index 0a02506..0c2dc35 100644
--- a/net/http/http_cache.h
+++ b/net/http/http_cache.h
@@ -30,6 +30,7 @@
 #include "net/base/cache_type.h"
 #include "net/base/completion_callback.h"
 #include "net/base/load_states.h"
+#include "net/base/net_export.h"
 #include "net/http/http_transaction_factory.h"
 
 class GURL;
@@ -56,7 +57,7 @@
 class SSLConfigService;
 class ViewCacheHelper;
 
-class HttpCache : public HttpTransactionFactory,
+class NET_EXPORT HttpCache : public HttpTransactionFactory,
                   public base::SupportsWeakPtr<HttpCache>,
                   public base::NonThreadSafe {
  public:
@@ -75,7 +76,7 @@
   };
 
   // A BackendFactory creates a backend object to be used by the HttpCache.
-  class BackendFactory {
+  class NET_EXPORT BackendFactory {
    public:
     virtual ~BackendFactory() {}
 
@@ -91,7 +92,7 @@
   };
 
   // A default backend factory for the common use cases.
-  class DefaultBackend : public BackendFactory {
+  class NET_EXPORT DefaultBackend : public BackendFactory {
    public:
     // |path| is the destination for any files used by the backend, and
     // |cache_thread| is the thread where disk operations should take place. If
diff --git a/net/http/http_request_headers.h b/net/http/http_request_headers.h
index ef4b60d..d574ae4 100644
--- a/net/http/http_request_headers.h
+++ b/net/http/http_request_headers.h
@@ -15,10 +15,11 @@
 #include <vector>
 #include "base/basictypes.h"
 #include "base/string_piece.h"
+#include "net/base/net_export.h"
 
 namespace net {
 
-class HttpRequestHeaders {
+class NET_EXPORT HttpRequestHeaders {
  public:
   struct HeaderKeyValuePair {
     HeaderKeyValuePair();
diff --git a/net/http/http_response_headers.h b/net/http/http_response_headers.h
index 7187da5..a1b9dfa 100644
--- a/net/http/http_response_headers.h
+++ b/net/http/http_response_headers.h
@@ -12,6 +12,7 @@
 #include "base/basictypes.h"
 #include "base/hash_tables.h"
 #include "base/memory/ref_counted.h"
+#include "net/base/net_export.h"
 #include "net/http/http_version.h"
 
 class Pickle;
@@ -24,7 +25,7 @@
 namespace net {
 
 // HttpResponseHeaders: parses and holds HTTP response headers.
-class HttpResponseHeaders
+class NET_EXPORT HttpResponseHeaders
     : public base::RefCountedThreadSafe<HttpResponseHeaders> {
  public:
   // Persist options.
diff --git a/net/http/http_response_info.h b/net/http/http_response_info.h
index c925aa9..9d69988 100644
--- a/net/http/http_response_info.h
+++ b/net/http/http_response_info.h
@@ -8,6 +8,7 @@
 
 #include "base/time.h"
 #include "net/base/host_port_pair.h"
+#include "net/base/net_export.h"
 #include "net/base/ssl_info.h"
 #include "net/http/http_vary_data.h"
 
@@ -20,7 +21,7 @@
 class IOBufferWithSize;
 class SSLCertRequestInfo;
 
-class HttpResponseInfo {
+class NET_EXPORT HttpResponseInfo {
  public:
   HttpResponseInfo();
   HttpResponseInfo(const HttpResponseInfo& rhs);
diff --git a/net/proxy/proxy_config.h b/net/proxy/proxy_config.h
index 9012a31..e1a341e 100644
--- a/net/proxy/proxy_config.h
+++ b/net/proxy/proxy_config.h
@@ -9,6 +9,7 @@
 #include <string>
 
 #include "googleurl/src/gurl.h"
+#include "net/base/net_export.h"
 #include "net/proxy/proxy_bypass_rules.h"
 #include "net/proxy/proxy_server.h"
 
@@ -29,7 +30,7 @@
 //
 // For more details see:
 // http://www.chromium.org/developers/design-documents/proxy-settings-fallback
-class ProxyConfig {
+class NET_EXPORT ProxyConfig {
  public:
   // ProxyRules describes the "manual" proxy settings.
   // TODO(eroman): Turn this into a class.
diff --git a/net/proxy/proxy_config_service.h b/net/proxy/proxy_config_service.h
index f194ca0..6ec3334 100644
--- a/net/proxy/proxy_config_service.h
+++ b/net/proxy/proxy_config_service.h
@@ -6,12 +6,14 @@
 #define NET_PROXY_PROXY_CONFIG_SERVICE_H_
 #pragma once
 
+#include "net/base/net_export.h"
+
 namespace net {
 
 class ProxyConfig;
 
 // Service for watching when the proxy settings have changed.
-class ProxyConfigService {
+class NET_EXPORT ProxyConfigService {
  public:
   // Indicates whether proxy configuration is valid, and if not, why.
   enum ConfigAvailability {
@@ -24,7 +26,7 @@
   };
 
   // Observer for being notified when the proxy settings have changed.
-  class Observer {
+  class NET_EXPORT Observer {
    public:
     virtual ~Observer() {}
     // Notification callback that should be invoked by ProxyConfigService
diff --git a/net/proxy/proxy_config_service_android.h b/net/proxy/proxy_config_service_android.h
index d4abfac..5b45419 100644
--- a/net/proxy/proxy_config_service_android.h
+++ b/net/proxy/proxy_config_service_android.h
@@ -6,6 +6,7 @@
 #define NET_PROXY_PROXY_CONFIG_SERVICE_ANDROID_H_
 #pragma once
 
+#include "net/base/net_export.h"
 #include "net/proxy/proxy_config_service.h"
 
 #include <string>
@@ -14,7 +15,7 @@
 
 namespace net {
 
-class ProxyConfigServiceAndroid : public ProxyConfigService {
+class NET_EXPORT ProxyConfigServiceAndroid : public ProxyConfigService {
  public:
   // ProxyConfigService implementation:
   virtual void AddObserver(Observer* observer);
diff --git a/net/proxy/proxy_service.h b/net/proxy/proxy_service.h
index 8146470..5aa2cb5 100644
--- a/net/proxy/proxy_service.h
+++ b/net/proxy/proxy_service.h
@@ -14,6 +14,7 @@
 #include "base/synchronization/waitable_event.h"
 #include "base/threading/non_thread_safe.h"
 #include "net/base/completion_callback.h"
+#include "net/base/net_export.h"
 #include "net/base/net_log.h"
 #include "net/base/network_change_notifier.h"
 #include "net/proxy/proxy_config_service.h"
@@ -34,7 +35,7 @@
 // This class can be used to resolve the proxy server to use when loading a
 // HTTP(S) URL.  It uses the given ProxyResolver to handle the actual proxy
 // resolution.  See ProxyResolverV8 for example.
-class ProxyService : public base::RefCounted<ProxyService>,
+class NET_EXPORT ProxyService : public base::RefCounted<ProxyService>,
                      public NetworkChangeNotifier::IPAddressObserver,
                      public ProxyConfigService::Observer,
                      public base::NonThreadSafe {
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index 0c91e07..e5816a9 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -19,6 +19,7 @@
 #include "googleurl/src/gurl.h"
 #include "net/base/completion_callback.h"
 #include "net/base/load_states.h"
+#include "net/base/net_export.h"
 #include "net/base/net_log.h"
 #include "net/base/request_priority.h"
 #include "net/http/http_request_headers.h"
@@ -58,7 +59,7 @@
 //
 // NOTE: All usage of all instances of this class should be on the same thread.
 //
-class URLRequest : public base::NonThreadSafe {
+class NET_EXPORT URLRequest : public base::NonThreadSafe {
  public:
   // Callback function implemented by protocol handlers to create new jobs.
   // The factory may return NULL to indicate an error, which will cause other
@@ -85,7 +86,7 @@
 
   // This class handles network interception.  Use with
   // (Un)RegisterRequestInterceptor.
-  class Interceptor {
+  class NET_EXPORT Interceptor {
   public:
     virtual ~Interceptor() {}
 
@@ -137,7 +138,7 @@
   // if an error occurred, or if the IO is just pending.  When Read() returns
   // true with zero bytes read, it indicates the end of the response.
   //
-  class Delegate {
+  class NET_EXPORT Delegate {
    public:
     virtual ~Delegate() {}
 
diff --git a/net/url_request/url_request_context.h b/net/url_request/url_request_context.h
index 714eedb..20a7344 100644
--- a/net/url_request/url_request_context.h
+++ b/net/url_request/url_request_context.h
@@ -13,6 +13,7 @@
 
 #include "base/memory/ref_counted.h"
 #include "base/threading/non_thread_safe.h"
+#include "net/base/net_export.h"
 #include "net/base/net_log.h"
 #include "net/base/ssl_config_service.h"
 #include "net/base/transport_security_state.h"
@@ -38,7 +39,7 @@
 // instances. Note that URLRequestContext typically does not provide storage for
 // these member variables, since they may be shared. For the ones that aren't
 // shared, URLRequestContextStorage can be helpful in defining their storage.
-class URLRequestContext
+class NET_EXPORT URLRequestContext
     : public base::RefCountedThreadSafe<URLRequestContext>,
       public base::NonThreadSafe {
  public:
diff --git a/net/url_request/url_request_context_getter.h b/net/url_request/url_request_context_getter.h
index b6c5464..8029132 100644
--- a/net/url_request/url_request_context_getter.h
+++ b/net/url_request/url_request_context_getter.h
@@ -8,6 +8,7 @@
 
 #include "base/memory/ref_counted.h"
 #include "base/task.h"
+#include "net/base/net_export.h"
 
 namespace base {
 class MessageLoopProxy;
@@ -20,7 +21,7 @@
 struct URLRequestContextGetterTraits;
 
 // Interface for retrieving an net::URLRequestContext.
-class URLRequestContextGetter
+class NET_EXPORT URLRequestContextGetter
     : public base::RefCountedThreadSafe<URLRequestContextGetter,
                                         URLRequestContextGetterTraits> {
  public: