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

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

Issue 10895: Add Terminate() to the Process object, have RenderProcessHost use this to avo... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 1 month 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 | « chrome/browser/browser_init.cc ('k') | chrome/browser/first_run.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 <windows.h> 5 #include <windows.h>
6 #include <shellapi.h> 6 #include <shellapi.h>
7 7
8 #include <algorithm> 8 #include <algorithm>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 l10n_util::GetString(IDS_MACHINE_LEVEL_INSTALL_CONFLICT); 232 l10n_util::GetString(IDS_MACHINE_LEVEL_INSTALL_CONFLICT);
233 const std::wstring caption = l10n_util::GetString(IDS_PRODUCT_NAME); 233 const std::wstring caption = l10n_util::GetString(IDS_PRODUCT_NAME);
234 const UINT flags = MB_OK | MB_ICONERROR | MB_TOPMOST; 234 const UINT flags = MB_OK | MB_ICONERROR | MB_TOPMOST;
235 win_util::MessageBox(NULL, text, caption, flags); 235 win_util::MessageBox(NULL, text, caption, flags);
236 std::wstring uninstall_cmd = InstallUtil::GetChromeUninstallCmd(false); 236 std::wstring uninstall_cmd = InstallUtil::GetChromeUninstallCmd(false);
237 if (!uninstall_cmd.empty()) { 237 if (!uninstall_cmd.empty()) {
238 uninstall_cmd.append(L" --"); 238 uninstall_cmd.append(L" --");
239 uninstall_cmd.append(installer_util::switches::kForceUninstall); 239 uninstall_cmd.append(installer_util::switches::kForceUninstall);
240 uninstall_cmd.append(L" --"); 240 uninstall_cmd.append(L" --");
241 uninstall_cmd.append(installer_util::switches::kDoNotRemoveSharedItems); 241 uninstall_cmd.append(installer_util::switches::kDoNotRemoveSharedItems);
242 process_util::LaunchApp(uninstall_cmd, false, false, NULL); 242 base::LaunchApp(uninstall_cmd, false, false, NULL);
243 } 243 }
244 return true; 244 return true;
245 } 245 }
246 } 246 }
247 return false; 247 return false;
248 } 248 }
249 249
250 // We record in UMA the conditions that can prevent breakpad from generating 250 // We record in UMA the conditions that can prevent breakpad from generating
251 // and sending crash reports. Namely that the crash reporting registration 251 // and sending crash reports. Namely that the crash reporting registration
252 // failed and that the process is being debugged. 252 // failed and that the process is being debugged.
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 367
368 if (!user_data_dir.empty()) { 368 if (!user_data_dir.empty()) {
369 // Because of the way CommandLine parses, it's sufficient to append a new 369 // Because of the way CommandLine parses, it's sufficient to append a new
370 // --user-data-dir switch. The last flag of the same name wins. 370 // --user-data-dir switch. The last flag of the same name wins.
371 // TODO(tc): It would be nice to remove the flag we don't want, but that 371 // TODO(tc): It would be nice to remove the flag we don't want, but that
372 // sounds risky if we parse differently than CommandLineToArgvW. 372 // sounds risky if we parse differently than CommandLineToArgvW.
373 std::wstring new_command_line = 373 std::wstring new_command_line =
374 parsed_command_line.command_line_string(); 374 parsed_command_line.command_line_string();
375 CommandLine::AppendSwitchWithValue(&new_command_line, 375 CommandLine::AppendSwitchWithValue(&new_command_line,
376 switches::kUserDataDir, user_data_dir); 376 switches::kUserDataDir, user_data_dir);
377 process_util::LaunchApp(new_command_line, false, false, NULL); 377 base::LaunchApp(new_command_line, false, false, NULL);
378 } 378 }
379 379
380 return ResultCodes::NORMAL_EXIT; 380 return ResultCodes::NORMAL_EXIT;
381 } 381 }
382 382
383 PrefService* user_prefs = profile->GetPrefs(); 383 PrefService* user_prefs = profile->GetPrefs();
384 DCHECK(user_prefs); 384 DCHECK(user_prefs);
385 385
386 // Now that local state and user prefs have been loaded, make the two pref 386 // Now that local state and user prefs have been loaded, make the two pref
387 // services aware of all our preferences. 387 // services aware of all our preferences.
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 // The following should ONLY be called when in single threaded mode. It is 583 // The following should ONLY be called when in single threaded mode. It is
584 // unsafe to do this cleanup if other threads are still active. 584 // unsafe to do this cleanup if other threads are still active.
585 // It is also very unnecessary, so I'm only doing this in debug to satisfy 585 // It is also very unnecessary, so I'm only doing this in debug to satisfy
586 // purify. 586 // purify.
587 if (tracking_objects) 587 if (tracking_objects)
588 tracked_objects::ThreadData::ShutdownSingleThreadedCleanup(); 588 tracked_objects::ThreadData::ShutdownSingleThreadedCleanup();
589 #endif // NDEBUG 589 #endif // NDEBUG
590 590
591 return result_code; 591 return result_code;
592 } 592 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_init.cc ('k') | chrome/browser/first_run.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698