Instantiate a NetworkChangeNotifier to have chromium transparently handle interface

changes.

Change-Id: If48d2934ce29d68b9c31a1d120fe8f134f277a33
This commit is contained in:
Andreas Huber
2011-06-20 13:57:04 -07:00
parent b93b8b4976
commit 2bcc183cab

View File

@@ -41,6 +41,7 @@ namespace android {
static Mutex gNetworkThreadLock;
static base::Thread *gNetworkThread = NULL;
static scoped_refptr<net::URLRequestContext> gReqContext;
static scoped_ptr<net::NetworkChangeNotifier> gNetworkChangeNotifier;
static void InitializeNetworkThreadIfNecessary() {
Mutex::Autolock autoLock(gNetworkThreadLock);
@@ -52,6 +53,8 @@ static void InitializeNetworkThreadIfNecessary() {
gReqContext = new SfRequestContext;
gNetworkChangeNotifier.reset(net::NetworkChangeNotifier::Create());
net::AndroidNetworkLibrary::RegisterSharedInstance(
new SfNetworkLibrary);
}