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

Side by Side Diff: chrome/browser/message_window.cc

Issue 24004: Fix the windows implementation of KillProcess and WaitForSingleProcess to not... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/stats_table_unittest.cc ('k') | chrome/browser/metrics/metrics_service_uitest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/message_window.h" 5 #include "chrome/browser/message_window.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/win_util.h" 10 #include "base/win_util.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 std::wstring text = l10n_util::GetString(IDS_BROWSER_HUNGBROWSER_MESSAGE); 99 std::wstring text = l10n_util::GetString(IDS_BROWSER_HUNGBROWSER_MESSAGE);
100 std::wstring caption = l10n_util::GetString(IDS_PRODUCT_NAME); 100 std::wstring caption = l10n_util::GetString(IDS_PRODUCT_NAME);
101 if (IDYES != win_util::MessageBox(NULL, text, caption, 101 if (IDYES != win_util::MessageBox(NULL, text, caption,
102 MB_YESNO | MB_ICONSTOP | MB_TOPMOST)) { 102 MB_YESNO | MB_ICONSTOP | MB_TOPMOST)) {
103 // The user denied. Quit silently. 103 // The user denied. Quit silently.
104 return true; 104 return true;
105 } 105 }
106 } 106 }
107 107
108 // Time to take action. Kill the browser process. 108 // Time to take action. Kill the browser process.
109 base::KillProcess(process_id, ResultCodes::HUNG, true); 109 base::KillProcessById(process_id, ResultCodes::HUNG, true);
110 remote_window_ = NULL; 110 remote_window_ = NULL;
111 return false; 111 return false;
112 } 112 }
113 113
114 void MessageWindow::Create() { 114 void MessageWindow::Create() {
115 DCHECK(!window_); 115 DCHECK(!window_);
116 DCHECK(!remote_window_); 116 DCHECK(!remote_window_);
117 HINSTANCE hinst = GetModuleHandle(NULL); 117 HINSTANCE hinst = GetModuleHandle(NULL);
118 118
119 WNDCLASSEX wc = {0}; 119 WNDCLASSEX wc = {0};
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 return true; 278 return true;
279 } 279 }
280 280
281 protected: 281 protected:
282 std::vector<uint32> browsers_; 282 std::vector<uint32> browsers_;
283 }; 283 };
284 284
285 ZombieDetector zombie_detector; 285 ZombieDetector zombie_detector;
286 base::KillProcesses(L"chrome.exe", ResultCodes::HUNG, &zombie_detector); 286 base::KillProcesses(L"chrome.exe", ResultCodes::HUNG, &zombie_detector);
287 } 287 }
OLDNEW
« no previous file with comments | « base/stats_table_unittest.cc ('k') | chrome/browser/metrics/metrics_service_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698