| Index: chrome/browser/browser_shutdown.cc
|
| ===================================================================
|
| --- chrome/browser/browser_shutdown.cc (revision 73990)
|
| +++ chrome/browser/browser_shutdown.cc (working copy)
|
| @@ -22,7 +22,7 @@
|
| #include "chrome/browser/about_flags.h"
|
| #include "chrome/browser/browser_process.h"
|
| #include "chrome/browser/browser_thread.h"
|
| -#include "chrome/browser/dom_ui/chrome_url_data_manager.h"
|
| +#include "chrome/browser/dom_ui/chrome_url_data_manager_backend.h"
|
| #include "chrome/browser/first_run/first_run.h"
|
| #include "chrome/browser/jankometer.h"
|
| #include "chrome/browser/metrics/metrics_service.h"
|
| @@ -173,6 +173,12 @@
|
| RLZTracker::CleanupRlz();
|
| #endif
|
|
|
| + // Deleting the IO thread deletes the ChromeURLDataManagerBackends and their
|
| + // DataSources. We need the DataSources to be released on the UI thread after
|
| + // the IO thread has been shutdown. PrepareForShutdown makes sure none of the
|
| + // existing DataSources are released on the IO thread.
|
| + ChromeURLDataManagerBackend::PrepareForShutdown();
|
| +
|
| // The jank'o'meter requires that the browser process has been destroyed
|
| // before calling UninstallJankometer().
|
| delete g_browser_process;
|
| @@ -250,16 +256,12 @@
|
| file_util::WriteFile(shutdown_ms_file, shutdown_ms.c_str(), len);
|
| }
|
|
|
| - UnregisterURLRequestChromeJob();
|
| -
|
| #if defined(OS_CHROMEOS)
|
| BrowserList::NotifyAndTerminate(false);
|
| #endif
|
|
|
| - // Clean up data sources before the UI thread is removed.
|
| - ChromeURLDataManager* data_manager = ChromeURLDataManager::GetInstance();
|
| - if (data_manager)
|
| - data_manager->RemoveAllDataSources();
|
| + // Finish the shutdown started in PrepareForShutdown.
|
| + ChromeURLDataManagerBackend::CompleteShutdown();
|
| }
|
|
|
| void ReadLastShutdownFile(
|
|
|