| Index: chrome/browser/first_run/first_run_win.cc
|
| ===================================================================
|
| --- chrome/browser/first_run/first_run_win.cc (revision 76859)
|
| +++ chrome/browser/first_run/first_run_win.cc (working copy)
|
| @@ -622,7 +622,7 @@
|
| // Shows the modal dialog asking the user to try chrome. Note that the dialog
|
| // has no parent and it will position itself in a lower corner of the screen.
|
| // The dialog does not steal focus and does not have an entry in the taskbar.
|
| - Upgrade::TryResult ShowModal() {
|
| + Upgrade::TryResult ShowModal(ProcessSingleton* process_singleton) {
|
| using views::GridLayout;
|
| ResourceBundle& rb = ResourceBundle::GetSharedInstance();
|
|
|
| @@ -637,6 +637,7 @@
|
| NOTREACHED();
|
| return Upgrade::TD_DIALOG_ERROR;
|
| }
|
| +
|
| popup->set_delete_on_destroy(true);
|
| popup->set_window_style(WS_POPUP | WS_CLIPCHILDREN);
|
| popup->set_window_ex_style(WS_EX_TOOLWINDOW);
|
| @@ -767,10 +768,14 @@
|
| // Carve the toast shape into the window.
|
| SetToastRegion(popup->GetNativeView(),
|
| preferred.width(), preferred.height());
|
| - // Time to show the window in a modal loop.
|
| popup_ = popup;
|
| +
|
| + // Time to show the window in a modal loop. We don't want this chrome
|
| + // instance trying to serve WM_COPYDATA requests, as we'll surely crash.
|
| + process_singleton->Lock(popup->GetNativeView());
|
| popup_->Show();
|
| MessageLoop::current()->Run();
|
| + process_singleton->Unlock();
|
| return result_;
|
| }
|
|
|
| @@ -859,12 +864,14 @@
|
|
|
| } // namespace
|
|
|
| -Upgrade::TryResult Upgrade::ShowTryChromeDialog(size_t version) {
|
| +Upgrade::TryResult Upgrade::ShowTryChromeDialog(
|
| + size_t version,
|
| + ProcessSingleton* process_singleton) {
|
| if (version > 10000) {
|
| // This is a test value. We want to make sure we exercise
|
| // returning this early. See EarlyReturnTest test harness.
|
| return Upgrade::TD_NOT_NOW;
|
| }
|
| TryChromeDialog td(version);
|
| - return td.ShowModal();
|
| + return td.ShowModal(process_singleton);
|
| }
|
|
|