summaryrefslogtreecommitdiffstats
path: root/base/process_util_win.cc
Commit message (Collapse)AuthorAgeFilesLines
* Style cleanup in preparation for auto-linting base/.erg@google.com2010-01-261-1/+1
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/552004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37164 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: UI tweaks for task manager.thakis@chromium.org2010-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Nib change: Reduce row height, make scrollbars smaller. Make text in task manager table slightly smaller. Show in decimal digit for %cpu. Show memory in KB/MB, not always in K. Change update frequency from 1s to 2s to match Activity Monitor's default. (all mac-only. ui team is fine with this.) Finally, turn taskman on. BUG=13156 TEST=Open task manager, look at it. Should look & feel similar to Activity Monitor. Review URL: http://codereview.chromium.org/536038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36096 0039d316-1c4b-4281-b951-d872f2087c98
* Make base::GetProcId() thread-safe on windows and drop w2k supportjamesr@chromium.org2009-12-071-68/+2
| | | | | | | | | | | base::GetProcId() was previously not threadsafe since it relied upon threads observing reads between two different static variables in the same order that they were written without any explicit synchronization. This probably is responsible for a small number of our startup crashes (http://crash/search?query=product:%22Chrome%22+base::GetProcIdViaGetProcessId). This fixes the race by dropping w2k support and directly calling the function. TEST=start up without crashing BUG=none Review URL: http://codereview.chromium.org/460063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33987 0039d316-1c4b-4281-b951-d872f2087c98
* More memory stats code cleanup:sgk@chromium.org2009-11-091-0/+39
| | | | | | | | | | | | Move GetSystemCommitCharge() into bsae\process_util*. Kill PrintChromeMemoryUsageInfo(), which was only used by reliability_tests.exe on Windows and whose stats are obsolete. Delete the now-unnecessary chrome\test\perf\mem_usage* files. BUG=none TEST=none Review URL: http://codereview.chromium.org/371025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31423 0039d316-1c4b-4281-b951-d872f2087c98
* Remove some histograms that have not provided benefit.jar@chromium.org2009-10-311-28/+0
| | | | | | | | | | I added these to try to look at exit codes in crashes, but we didn't find antyhing surprising. I'm now removing them. r=nsylvain Review URL: http://codereview.chromium.org/343053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30663 0039d316-1c4b-4281-b951-d872f2087c98
* Move console stack dumping code to a function so it can be reused in ↵maruel@chromium.org2009-10-271-2/+62
| | | | | | | | | | test_shell_tests. TEST=none BUG=13770 Review URL: http://codereview.chromium.org/339024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30220 0039d316-1c4b-4281-b951-d872f2087c98
* Don't grant unnecessary handle privileges in OpenProcessHandle.phajdan.jr@chromium.org2009-06-191-5/+4
| | | | | | | | | This patch makes it harder for process handles with more privileges to leak to untrusted places. Review URL: http://codereview.chromium.org/125260 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18802 0039d316-1c4b-4281-b951-d872f2087c98
* Consistently use int64 for integers holding number of milliseconds.phajdan.jr@chromium.org2009-06-171-6/+5
| | | | | | | | | | This applies only to things which use TimeDelta::InMilliseconds, because it returns int64. Before this patch callers static_casted that to int, and after this patch they use the returned value as int64. Review URL: http://codereview.chromium.org/126279 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18626 0039d316-1c4b-4281-b951-d872f2087c98
* Harmonizing ProcessUtil::GetAppOutput on Win/Unixjcampan@chromium.org2009-06-041-7/+4
| | | | | | | | BUG=None TEST=Run the base unit-tests Review URL: http://codereview.chromium.org/119190 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17660 0039d316-1c4b-4281-b951-d872f2087c98
* Add memory stats for linux page cycler. On linux, we collecttc@google.com2009-05-111-0/+9
| | | | | | | | | the final RSS size and the total VM size. Review URL: http://codereview.chromium.org/113217 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15814 0039d316-1c4b-4281-b951-d872f2087c98
* Make task_manager_resource_providers.cc compile on POSIX.phajdan.jr@chromium.org2009-04-301-0/+16
| | | | | | | | TEST=Make sure that the task manager isn't obviously broken on Windows. Review URL: http://codereview.chromium.org/93067 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14934 0039d316-1c4b-4281-b951-d872f2087c98
* Support for showing memory usage of 64-bit IE in a 32-bit Chromium mbelshe@google.com2009-04-291-14/+23
| | | | | | | | | This is a changelist for http://codereview.chromium.org/75031 by Kent Tamura (tkent@google.com) Review URL: http://codereview.chromium.org/100111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14846 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: don't spawn zombies.agl@chromium.org2009-04-281-1/+5
| | | | | | | | | http://codereview.chromium.org/93147 BUG=9401 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14705 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "POSIX: Don't spawn zombies." (r14488)agl@chromium.org2009-04-241-5/+1
| | | | | | | | Something else is trying to reap children in the ui_tests and causing a mess. Reverting since it's a Friday night. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14499 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: Don't spawn zombies.agl@chromium.org2009-04-241-1/+5
| | | | | | | | TEST=Navigate to several different sites and check that no Chrome zombies are roaming around. BUG=9401 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14488 0039d316-1c4b-4281-b951-d872f2087c98
* Ensures we don't leak handles in ProcessUtil::GetAppOutput.jcampan@chromium.org2009-04-221-7/+7
| | | | | | | | TEST=Run base_unit_tests BUG=None Review URL: http://codereview.chromium.org/93030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14235 0039d316-1c4b-4281-b951-d872f2087c98
* This CL adds a utility method that lets you start a process and block until ↵jcampan@chromium.org2009-04-211-1/+77
| | | | | | | | | | | | | the process terminates, and retrieve what the process printed to the standard output. That util function is needed for the new in-process test framework. It is Windows only for now. BUG=None TEST=Covered by new unit test. Review URL: http://codereview.chromium.org/87008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14135 0039d316-1c4b-4281-b951-d872f2087c98
* Replace chrome_process_filter with chrome_process_util.estade@chromium.org2009-04-091-1/+4
| | | | | | | | | | | | | | - move code only used by tests to chrome/test - make a better, more portable abstraction For now, it still only works on Windows. But this is the first step to porting this part of code. Patch by phajdan.jr@chromium.org: <http://codereview.chromium.org/54003> Review URL: http://codereview.chromium.org/67004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13476 0039d316-1c4b-4281-b951-d872f2087c98
* Make OpenProcessHandle report an error when it couldn't open the handle.phajdan.jr@chromium.org2009-04-031-2/+9
| | | | | | | | One more step to land http://codereview.chromium.org/54003 (chrome_process_util). Review URL: http://codereview.chromium.org/62004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13086 0039d316-1c4b-4281-b951-d872f2087c98
* Use portable typedef for PIDs (process IDs).phajdan.jr@chromium.org2009-04-011-4/+4
| | | | | | | | | This is a preparation to land http://codereview.chromium.org/54003, which replaces chrome_process_filter with more portable chrome_process_util. Review URL: http://codereview.chromium.org/57062 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12948 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup in chrome/browserphajdan.jr@chromium.org2009-03-251-8/+8
| | | | | | | | | | - make more things const - remove unreferenced declaration of GetGoButton - fix indentation in one place Review URL: http://codereview.chromium.org/53053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12475 0039d316-1c4b-4281-b951-d872f2087c98
* Start the crash_service on windows when running ui tests, if it's not ↵jam@chromium.org2009-03-061-1/+1
| | | | | | | | running already. Otherwise there's no point in running ui_tests! Review URL: http://codereview.chromium.org/39282 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11172 0039d316-1c4b-4281-b951-d872f2087c98
* Make UITest::CrashAwareSleep portable.phajdan.jr@chromium.org2009-03-041-0/+5
| | | | | | Review URL: http://codereview.chromium.org/40119 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10916 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGE (except one global std::wstring changed to const wchar_t* ↵maruel@chromium.org2009-03-031-1/+1
| | | | | | | | | | | const per style compliance). Preliminary work to enforce new PRESUBMIT.py rules: - <=80 cols - no trailing whitespaces - svn:eol-style=LF git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10791 0039d316-1c4b-4281-b951-d872f2087c98
* Use string for Histogram names since these are all ASCII anyway.dsh@google.com2009-02-241-3/+3
| | | | | | | | Wide-character literals cause problems between platforms. Review URL: http://codereview.chromium.org/28046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10276 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the windows implementation of KillProcess and WaitForSingleProcess to ↵stoyan@chromium.org2009-02-091-16/+19
| | | | | | | | not close the process handle that they do not own. Review URL: http://codereview.chromium.org/24004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9400 0039d316-1c4b-4281-b951-d872f2087c98
* Make ResourceMessageFilter compile on Mac. It stubs out a substantial part ofbrettw@google.com2009-02-061-0/+8
| | | | | | | | | the printing. It creates new base functions for converting PIDs to handles, and then closing them (since Windows requires this). This also fixes the formatting of image_util. Review URL: http://codereview.chromium.org/20109 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9291 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r8560 due to broken interactive_ui_testsmark@chromium.org2009-01-231-5/+1
| | | | | | Review URL: http://codereview.chromium.org/18722 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8570 0039d316-1c4b-4281-b951-d872f2087c98
* Porting in chrome/phajdan.jr@chromium.org2009-01-231-1/+5
| | | | | | Review URL: http://codereview.chromium.org/18446 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8560 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: Get render_process_host to build.agl@chromium.org2009-01-221-11/+14
| | | | | | | | | | | | This is an adopted CL from Evan. Original: http://codereview.chromium.org/14504 (see original for review comments etc) Review URL: http://codereview.chromium.org/16814 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8430 0039d316-1c4b-4281-b951-d872f2087c98
* * Revert "POSIX: Get render_process_host to build."agl@chromium.org2009-01-211-14/+11
| | | | | | | | | * Revert "Build fix: release builds seemed to break" Review URL: http://codereview.chromium.org/18460 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8386 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: Get render_process_host to build.agl@chromium.org2009-01-211-11/+14
| | | | | | | | | | | | This is an adopted CL from Evan. Original: http://codereview.chromium.org/14504 (see original for review comments etc) Review URL: http://codereview.chromium.org/16814 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8384 0039d316-1c4b-4281-b951-d872f2087c98
* Port crash_cache tool to Linux.phajdan.jr@chromium.org2009-01-131-0/+14
| | | | | | Review URL: http://codereview.chromium.org/17353 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7939 0039d316-1c4b-4281-b951-d872f2087c98
* Make the implementation of LaunchApp have the correct prototype to match the ↵deanm@chromium.org2008-11-211-1/+1
| | | | | | | | header file, we were missing a const. Review URL: http://codereview.chromium.org/11809 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5864 0039d316-1c4b-4281-b951-d872f2087c98
* Add Terminate() to the Process object, have RenderProcessHost use this to ↵brettw@google.com2008-11-141-6/+6
| | | | | | | | | | avoid some more Windows specific code. Move Process and SharedMemory into the base namespace (most changes). Review URL: http://codereview.chromium.org/10895 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5446 0039d316-1c4b-4281-b951-d872f2087c98
* Re-do the way browser windows are shown:ben@chromium.org2008-11-141-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Remove the path from WinMain to the Browser object passing the show_command. For the Browser object, this is a problem since this value isn't portable. For the code in general it involves a lot of ugly wiring. It's completely unnecessary since the value is obtainable via GetStartupInfo. - Remove show_command plumbing from all over the place (session restore, web app launcher, etc) Change the way browser windows are constructed: - The browser constructor now takes just a type and a profile, and simply initializes the object. - Some configuration that used to be part of the constructor that was only used in one or two use cases (initial bounds, maximized state, web app name) are split into separate setters. - Window creation is split out into a separate step to be called post configuration. - Assorted static helper functions added to Browser to make construction of common types easy. - Remove Browser::Show in favor of BrowserWindow::Show - Adjust all callers to use the new helpers. Change the way ChromeViews restores window placement: - Split restored size determination from restored maximized determination. They are needed by the code at different times. Size restoration happens when the window is constructed and Window::SetInitialBounds is called. Maximized state restoration happens when the window is shown for the first time and SW_SHOWMAXIMIZED or SW_SHOWNORMAL is needed. Thus, replace WindowDelegate::RestoreWindowPosition with WindowDelegate::RestoreWindowBounds and WindowDelegate::RestoreMaximizedState. - Window::SetInitialBounds calls WindowDelegate::RestoreWindowBounds - Window::Show calls WindowDelegate::RestoreMaximizedState - Adjusts all WindowDelegate implementations that override RestoreWindowPosition to implement these new methods instead. - Move "playback/record" mode window size setting from browser_init to Browser::RestoreWindowBounds. - Provide a virtual function on Window called GetShowState that determines the default show state to be used when Window::Show is called. For most windows and dialogs this is SW_SHOWNORMAL. AeroGlassFrame/OpaqueFrame (the browser window frames) override this since they're the app's main windows to return the value provided by GetStartupInfo which gives the value from the app shortcut. http://crbug.com/3557 Review URL: http://codereview.chromium.org/10896 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5417 0039d316-1c4b-4281-b951-d872f2087c98
* Remove fragile check in DidProcessCrashcpu@google.com2008-11-031-4/+3
| | | | | | | | | | | | | - the numbers were out of sync with result_codes.h - can't use result_codes.h in base project so I extracted the generic part of it. Rahul: I hope I don't break installer assumptions here. Dan: don't feel obligated to review. Review URL: http://codereview.chromium.org/9012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4519 0039d316-1c4b-4281-b951-d872f2087c98
* Added linux process utilities and tests.estade@chromium.org2008-10-221-1/+12
| | | | | | Review URL: http://codereview.chromium.org/7202 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3715 0039d316-1c4b-4281-b951-d872f2087c98
* Enforce Terminate on Heap Corruption in most of our executable on Windows XP ↵maruel@google.com2008-09-241-0/+5
| | | | | | | | | | | SP3 or Vista. This won't submit the crash dump but it's still better than nothing. Fix broken alignment on test_shell_main.cc. Review URL: http://codereview.chromium.org/3105 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2546 0039d316-1c4b-4281-b951-d872f2087c98
* * Change output of trace_event log to JSON to enable easier integration with ↵erikkay@google.com2008-09-181-0/+4
| | | | | | | | | | | | visualization UI. * Simple (manual) trace visualizer with some sample data. * a few more trace events * add process_util function for current process handle Review URL: http://codereview.chromium.org/3086 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2381 0039d316-1c4b-4281-b951-d872f2087c98
* Make perftimer and run_all_perftests compile on Posix. Stub out a few ↵deanm@google.com2008-08-271-1/+4
| | | | | | | | things into process_util_posix, and add a function to raise to a high priority. BUG=1343318 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1438 0039d316-1c4b-4281-b951-d872f2087c98
* Remove false 'process crash' signal (again)cpu@google.com2008-08-261-9/+20
| | | | | | | | | | | This is a redo of a previous CL that has been lgtm (by sky) that got hosed. - Sometimes we kill a plugin or a renderer by calling exitprocess(.., HUNG) we were counting that as a crash - Check for the return code and make a dchek into a regular case. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1389 0039d316-1c4b-4281-b951-d872f2087c98
* Move process_util.cc to process_util_win.cc to make way for posix.deanm@google.com2008-08-261-0/+587
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1377 0039d316-1c4b-4281-b951-d872f2087c98