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

Unified Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 1562593002: Fix potential crashes in NetworkHandler code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@test
Patch Set: Created 4 years, 11 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: chrome/browser/chromeos/chrome_browser_main_chromeos.cc
diff --git a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
index 71dc2fbdeedf51d9f66ec2414547b9bb07da2917..ce294e29904adc2821a9c2798fd36533e9e5fe57 100644
--- a/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
+++ b/chrome/browser/chromeos/chrome_browser_main_chromeos.cc
@@ -25,6 +25,7 @@
#include "base/sys_info.h"
#include "base/task_runner_util.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/browser_process_impl.h"
#include "chrome/browser/browser_process_platform_part_chromeos.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
@@ -76,6 +77,7 @@
#include "chrome/browser/chromeos/system/input_device_settings.h"
#include "chrome/browser/chromeos/upgrade_detector_chromeos.h"
#include "chrome/browser/defaults.h"
+#include "chrome/browser/io_thread.h"
#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/net/chrome_network_delegate.h"
#include "chrome/browser/profiles/profile.h"
@@ -823,6 +825,10 @@ void ChromeBrowserMainPartsChromeos::PostMainMessageLoopRun() {
}
void ChromeBrowserMainPartsChromeos::PostDestroyThreads() {
+ // Destroy the ProxyConfigServiceImpl owned by IOThread before
sky 2016/01/05 23:17:11 This just documents the code. Document why this or
stevenjb 2016/01/06 00:43:04 Clarified.
+ // shutting down NetworkHandler.
+ browser_process()->io_thread()->ShutdownPrefProxyConfigTracker();
sky 2016/01/05 23:17:11 Won't this mean you're destroying the PrefProxyCon
stevenjb 2016/01/06 00:43:04 No, it is created in IOThread() which is (somewhat
sky 2016/01/06 16:30:37 I'm nervous and not familiar enough with this code
+
// Destroy DBus services immediately after threads are stopped.
dbus_services_.reset();

Powered by Google App Engine
This is Rietveld 408576698