Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2647)

Unified Diff: content/shell/shell_browser_main_parts.cc

Issue 10979048: Fix potential threading issues in NetworkChangeNotifierAndroid. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/shell/shell_browser_main_parts.cc
diff --git a/content/shell/shell_browser_main_parts.cc b/content/shell/shell_browser_main_parts.cc
index 7d76221ddc176e27621dba4d063679a75745e019..41f92b8545e25304b6e858b7298cc1317b93f693 100644
--- a/content/shell/shell_browser_main_parts.cc
+++ b/content/shell/shell_browser_main_parts.cc
@@ -89,10 +89,6 @@ void ShellBrowserMainParts::PostMainMessageLoopStart() {
}
void ShellBrowserMainParts::PreEarlyInitialization() {
-#if defined(OS_ANDROID)
- net::NetworkChangeNotifier::SetFactory(
- new net::NetworkChangeNotifierFactoryAndroid());
-#endif
}
void ShellBrowserMainParts::PreMainMessageLoopRun() {
@@ -101,6 +97,11 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() {
Shell::PlatformInitialize();
net::NetModule::SetResourceProvider(PlatformResourceProvider);
+#if defined(OS_ANDROID)
+ net::NetworkChangeNotifier::SetFactory(
+ new net::NetworkChangeNotifierFactoryAndroid(
+ MessageLoop::current()->message_loop_proxy()));
+#endif
int port = 0;
// On android the port number isn't used.
« no previous file with comments | « chrome/browser/chrome_browser_main_android.cc ('k') | net/android/java/src/org/chromium/net/NetworkChangeNotifier.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698