| Index: chrome/browser/browser_process_impl.cc
|
| ===================================================================
|
| --- chrome/browser/browser_process_impl.cc (revision 141718)
|
| +++ chrome/browser/browser_process_impl.cc (working copy)
|
| @@ -50,6 +50,7 @@
|
| #include "chrome/browser/printing/background_printing_manager.h"
|
| #include "chrome/browser/printing/print_job_manager.h"
|
| #include "chrome/browser/printing/print_preview_tab_controller.h"
|
| +#include "chrome/browser/process_singleton.h"
|
| #include "chrome/browser/profiles/profile_manager.h"
|
| #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.h"
|
| #include "chrome/browser/safe_browsing/safe_browsing_service.h"
|
| @@ -126,7 +127,8 @@
|
| using content::PluginService;
|
| using content::ResourceDispatcherHost;
|
|
|
| -BrowserProcessImpl::BrowserProcessImpl(const CommandLine& command_line)
|
| +BrowserProcessImpl::BrowserProcessImpl(const CommandLine& command_line,
|
| + ProcessSingleton* process_singleton)
|
| : created_metrics_service_(false),
|
| created_watchdog_thread_(false),
|
| created_browser_policy_connector_(false),
|
| @@ -140,7 +142,9 @@
|
| checked_for_new_frames_(false),
|
| using_new_frames_(false),
|
| thumbnail_generator_(new ThumbnailGenerator),
|
| - download_status_updater_(new DownloadStatusUpdater) {
|
| + download_status_updater_(new DownloadStatusUpdater),
|
| + process_singleton_(process_singleton) {
|
| + DCHECK(process_singleton_);
|
| g_browser_process = this;
|
| clipboard_.reset(new ui::Clipboard);
|
|
|
| @@ -346,6 +350,12 @@
|
| // If we did get extra quits, then we should re-post them to the message loop.
|
| while (--quits_received > 0)
|
| MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
|
| +
|
| + // BrowserProcess::EndSession is only called in response to a window message
|
| + // sent by Windows when the user logs out or shuts down. When this occurs,
|
| + // all of Chrome is still running, so the pointer to process_singleton_
|
| + // should still be valid.
|
| + process_singleton_->UnregisterWindowClass();
|
| #else
|
| NOTIMPLEMENTED();
|
| #endif
|
|
|