summaryrefslogtreecommitdiffstats
path: root/base/message_loop.cc
Commit message (Collapse)AuthorAgeFilesLines
* Add support for base::Closure in the MessageLoop, and reimplement the whole ↵ajwong@chromium.org2011-04-201-54/+174
| | | | | | | | | | | sucker on top of base::Closure. After this, all Task objects that are posted will be wrapped in a closure prior to dispatch. BUG=35223 TEST=unittests. Review URL: http://codereview.chromium.org/6463013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82300 0039d316-1c4b-4281-b951-d872f2087c98
* Use lock-free lazy initialization for static histogram referencesjar@chromium.org2011-04-051-3/+4
| | | | | | | | | | | | | | | | Make all histogram macros thread safe, and fast by again using statics to achieve performance. ...at the cost of: Leak all histograms to avoid races at shutdown. Also included leak suppression for valgrind. r=rtenneti BUG=78207 Review URL: http://codereview.chromium.org/6780035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80412 0039d316-1c4b-4281-b951-d872f2087c98
* When we process the tickler message in our windows message pump, we should ↵ananta@chromium.org2011-03-241-0/+3
| | | | | | | | | | | | | | | | | | | | not dispatch all window messages specifically if we are in the context of a Windows modal loop, i.e. a Windows API like TrackPopupMenu, etc. This is because these API's expect to handle input messages like keyboard and mouse messages by peeking them from the queue and handling them. Our message pump currently dispatches all windows messages while processing the tickler message which causes the windows modal loop to not see keyboard and mouse messages at times. Added a flag in the windows message loop which indicates if we are in the context of an os modal loop. If yes we just peek for WM_PAINT and timer and dispatch those and get out. Fixes bug http://code.google.com/p/chromium/issues/detail?id=59864 BUG=59864 Review URL: http://codereview.chromium.org/6676099 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79248 0039d316-1c4b-4281-b951-d872f2087c98
* Fix style mistakes in r75477.ajwong@chromium.org2011-02-251-4/+3
| | | | | | | | | | | Associated review at: http://codereview.chromium.org/6489031/ BUG=none TEST=none Review URL: http://codereview.chromium.org/6532102 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76074 0039d316-1c4b-4281-b951-d872f2087c98
* Run event executor on the ui thread to remove the need to explicitly ↵ajwong@chromium.org2011-02-191-0/+12
| | | | | | | | | | | | XFlush() the XTest calls. BUG=none TEST=Connect to a host and try moving the mouse and typing. Both inputs should be reflected correctly. Review URL: http://codereview.chromium.org/6489031 Patch from Jamie Walch <jamiewalch@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75477 0039d316-1c4b-4281-b951-d872f2087c98
* Add MessageLoop::AssertIdle(). Use in ChromeOS audio threads.willchan@chromium.org2011-01-261-0/+6
| | | | | | | | | BUG=chrome-os:11110 TEST=existing Review URL: http://codereview.chromium.org/6374010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72576 0039d316-1c4b-4281-b951-d872f2087c98
* Remove obsolete base/lock.h and fix up callers to use the new header file andbrettw@chromium.org2011-01-211-2/+2
| | | | | | | | | | | the base namespace. Fix several files including lock.h unnecessarily. BUG=none TEST=none Original review=http://codereview.chromium.org/6142009/ Patch by leviw@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72106 0039d316-1c4b-4281-b951-d872f2087c98
* Make the order of methods in the cc files match the headers in base/.erg@google.com2011-01-071-170/+164
| | | | | | | | | BUG=68682 TEST=compiles Review URL: http://codereview.chromium.org/6189001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70771 0039d316-1c4b-4281-b951-d872f2087c98
* MessageLoop: use dynamic_annotations.h & RunningOnValgrind instead of ↵timurrrr@chromium.org2011-01-041-5/+5
| | | | | | | | | | valgrind.h & RUNNING_ON_VALGRIND This way we'll be able to delete all tasks on Windows under Dr. Memory TEST=trybots Review URL: http://codereview.chromium.org/6073004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70425 0039d316-1c4b-4281-b951-d872f2087c98
* Move thread local stuff from base to base/threading and consistently use thebrettw@chromium.org2010-12-301-1/+1
| | | | | | | | | | | base namespace. This also fixes references to TLSSlot to base::ThreadLocalStorage::Slot. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/5986012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70322 0039d316-1c4b-4281-b951-d872f2087c98
* Properly lock access to static variables.mad@chromium.org2010-12-231-1/+1
| | | | | | | | | | | | There were a few race conditions where the static method would test the validity of the hitograms_ static variable before attempting to use the lock_ to protect access to it but nothing then prevented the destructor to free both the lock_ and the hitograms_ memory. So I decided to not use a dynamic allocation of the static lock_ to resolve this problem. BUG=38354 TEST=Hard to repro exit scenario crashes. Review URL: http://codereview.chromium.org/5784005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70054 0039d316-1c4b-4281-b951-d872f2087c98
* touchui: build fix for the buildbot.sadrul@chromium.org2010-12-201-4/+3
| | | | | | | | | BUG=http://build.chromium.org/p/chromium.fyi/builders/Chromium%20Linux%20Touch%20%28dbg%29/builds/755/steps/compile/logs/stdio TEST=touch buildbot should pass Review URL: http://codereview.chromium.org/6076001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69760 0039d316-1c4b-4281-b951-d872f2087c98
* touchui: turn on the new message pump.sadrul@chromium.org2010-12-161-2/+1
| | | | | | | | | | | | | Many (most?) of the bugs related to the new message pump have been fixed, and it is ready for testing. It's stable enough that it shouldn't block other people's works. BUG=none TEST=none Review URL: http://codereview.chromium.org/5940003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69444 0039d316-1c4b-4281-b951-d872f2087c98
* Help make Base compile under NaClabarth@chromium.org2010-12-011-3/+8
| | | | | | | | | | This patch is a first attempt to get MessageLoop working inside NaCl. I suspect we'll need to do something more complicated at some point, but this version passes at least a few of the unit tests. Review URL: http://codereview.chromium.org/5435001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67832 0039d316-1c4b-4281-b951-d872f2087c98
* Moved the calls to the MessageLoop destruction observers to after the ↵sanjeevr@chromium.org2010-11-301-4/+4
| | | | | | | | | | | | pending tasks are deleted. BUG=None TEST=Unit-test provided, tests should pass and all hell should not break loose. Review URL: http://codereview.chromium.org/5318003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67623 0039d316-1c4b-4281-b951-d872f2087c98
* Convert some DCHECKs to DCHECK_EQ.thestig@chromium.org2010-11-101-6/+6
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/4766002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65699 0039d316-1c4b-4281-b951-d872f2087c98
* Switch to using TimeTicks rather than Time in message loopsjar@chromium.org2010-11-061-9/+11
| | | | | | | | | | Switch to using TimeTicks rather than Time so that we are not dependent on changes in the system clock. r=mbelshe,darin Review URL: http://codereview.chromium.org/3884001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65322 0039d316-1c4b-4281-b951-d872f2087c98
* Try to improve message_loop efficiency when backloggedjar@chromium.org2010-11-041-4/+14
| | | | | | | | | | | | | | | | | | | | | | The call to Now() uses a lock to handle roll over events, and that might make the call more expensive in some scenarios. Reduce the number of times we need to call Time::Now() when processing timer events by processing all (fully ripe, and ready to run) events with only one call to Now(). This should make the queue run faster as we fall further behind. I was hoping to see some perf improvement, but I think this will only have an impact when we are overloaded, which problably doesn't happen often on the bots. I did some local histogramming, and I do see cases where we get away with processing several (2-3) events with one call to Now(), but that is apparently not enough to move the needle on the perf bots. r=darin Review URL: http://codereview.chromium.org/4247003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65131 0039d316-1c4b-4281-b951-d872f2087c98
* Do not use the new message pump for TOUCH_UI yet.bryeung@google.com2010-11-031-1/+2
| | | | | | | | | | | It isn't quite ready. BUG=none TEST=build and run chrome, can type in the omnibox again Review URL: http://codereview.chromium.org/4425001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64975 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 62695 - Revert 62644 - During shutdown delete any pending tasks if ↵thestig@chromium.org2010-10-271-2/+2
| | | | | | | | | | | | running under Heapchecker. BUG=50345 TEST=Suppression no longer gets used. Original Review URL: http://codereview.chromium.org/3791006 Revert Review URL: http://codereview.chromium.org/3779008 Review URL: http://codereview.chromium.org/4111005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64125 0039d316-1c4b-4281-b951-d872f2087c98
* Added task to Observer methodsdavemoore@chromium.org2010-10-261-2/+2
| | | | | | | | | | | | | By adding the task to the observer methods and GetBirthPlace() to Tracked it makes it possible to register an observer that can print more information about the tasks as they are being processed. BUG=NONE TEST=MessageLoopTest.* Review URL: http://codereview.chromium.org/4081003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63983 0039d316-1c4b-4281-b951-d872f2087c98
* Add a message pump for touchui=1rjkroege@google.com2010-10-221-2/+8
| | | | | | | | | | | | | | | | | | | | | | | The message pump reads events directly from X. For most events, it passes them on to GDK for normal processing. It consumes some events (e.g. keypress events) to demonstrate how it's intended to work. This, of course, makes chrome mostly unusable since you can only use the mouse to do things. But this is a small first step towards capturing events through MPX (e.g. touch etc.) and processing them as chrome pleases. glib message pump: Slightly change architecture This changeset breaks down the glib message pump a little so that it can be easily subclassed. The next set of commits will introduce a subclass that still uses GTK and GDK widgets, but reads events directly from X instead of through GTK/GDK. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=63397 Review URL: http://codereview.chromium.org/3748002 Patch from Sadrul Chowdhury <sadrul@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63519 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 63397 - Add a message pump for touchui=1rjkroege@google.com2010-10-211-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The message pump reads events directly from X. For most events, it passes them on to GDK for normal processing. It consumes some events (e.g. keypress events) to demonstrate how it's intended to work. This, of course, makes chrome mostly unusable since you can only use the mouse to do things. But this is a small first step towards capturing events through MPX (e.g. touch etc.) and processing them as chrome pleases. glib message pump: Slightly change architecture This changeset breaks down the glib message pump a little so that it can be easily subclassed. The next set of commits will introduce a subclass that still uses GTK and GDK widgets, but reads events directly from X instead of through GTK/GDK. Review URL: http://codereview.chromium.org/3748002 Patch from Sadrul Chowdhury <sadrul@chromium.org>. TBR=rjkroege@google.com Probably a dynamic link problem with -lX11. Review URL: http://codereview.chromium.org/4007004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63403 0039d316-1c4b-4281-b951-d872f2087c98
* Add a message pump for touchui=1rjkroege@google.com2010-10-211-2/+8
| | | | | | | | | | | | | | | | | | | | | The message pump reads events directly from X. For most events, it passes them on to GDK for normal processing. It consumes some events (e.g. keypress events) to demonstrate how it's intended to work. This, of course, makes chrome mostly unusable since you can only use the mouse to do things. But this is a small first step towards capturing events through MPX (e.g. touch etc.) and processing them as chrome pleases. glib message pump: Slightly change architecture This changeset breaks down the glib message pump a little so that it can be easily subclassed. The next set of commits will introduce a subclass that still uses GTK and GDK widgets, but reads events directly from X instead of through GTK/GDK. Review URL: http://codereview.chromium.org/3748002 Patch from Sadrul Chowdhury <sadrul@chromium.org>. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63397 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 63332 - Test of performance value of reducing calls to Now().jar@chromium.org2010-10-211-39/+8
| | | | | | | | | | | | I'll revert asap, once the perf bots have kicked off. TBR=mbelshe Review URL: http://codereview.chromium.org/3936003 TBR=jar@chromium.org Review URL: http://codereview.chromium.org/4051001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63334 0039d316-1c4b-4281-b951-d872f2087c98
* Test of performance value of reducing calls to Now().jar@chromium.org2010-10-211-8/+39
| | | | | | | | | I'll revert asap, once the perf bots have kicked off. TBR=mbelshe Review URL: http://codereview.chromium.org/3936003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63332 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 63191 - 2nd try:phajdan.jr@chromium.org2010-10-201-14/+3
| | | | | | | | | | | | | | | | | | | | | | | | Fix regression where high resolution timers could be activated even under battery power. Add unit test to protect chromium from developers like me in the future. The fix is a one-liner in hi_res_timer_manager_win.cc. The rest of the code change is the mechanics to enable the unit test. BUG=59528 TEST=HiResTimerManagerTest.ToggleOnOff Broke unit_tests on Vista and XP: [ RUN ] GeolocationNetworkProviderTest.GatewayAndWifiScans [2916:2376:1020/030222:2975321329:FATAL:network_location_provider.cc(51)] Check failed: cache_.size() == cache_times_.size(). Review URL: http://codereview.chromium.org/3889004 TBR=mbelshe@chromium.org Review URL: http://codereview.chromium.org/3946003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63200 0039d316-1c4b-4281-b951-d872f2087c98
* 2nd try:mbelshe@chromium.org2010-10-201-3/+14
| | | | | | | | | | | | | | | | Fix regression where high resolution timers could be activated even under battery power. Add unit test to protect chromium from developers like me in the future. The fix is a one-liner in hi_res_timer_manager_win.cc. The rest of the code change is the mechanics to enable the unit test. BUG=59528 TEST=HiResTimerManagerTest.ToggleOnOff Review URL: http://codereview.chromium.org/3889004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63191 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 63176 - Fix regression where high resolution timers could be ↵mbelshe@chromium.org2010-10-201-14/+3
| | | | | | | | | | | | | | | | | | | | activated even under battery power. Add unit test to protect chromium from developers like me in the future. The fix is a one-liner in hi_res_timer_manager_win.cc. The rest of the code change is the mechanics to enable the unit test. BUG=59528 TEST=HiResTimerManagerTest.ToggleOnOff Review URL: http://codereview.chromium.org/3848002 TBR=mbelshe@chromium.org Review URL: http://codereview.chromium.org/3948001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63177 0039d316-1c4b-4281-b951-d872f2087c98
* Fix regression where high resolution timers could be activated even undermbelshe@chromium.org2010-10-201-3/+14
| | | | | | | | | | | | | | | battery power. Add unit test to protect chromium from developers like me in the future. The fix is a one-liner in hi_res_timer_manager_win.cc. The rest of the code change is the mechanics to enable the unit test. BUG=59528 TEST=HiResTimerManagerTest.ToggleOnOff Review URL: http://codereview.chromium.org/3848002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63176 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 62644 - During shutdown delete any pending tasks if running under ↵thestig@chromium.org2010-10-151-2/+2
| | | | | | | | | | | | | Heapchecker. BUG=50345 TEST=Suppression no longer gets used. Review URL: http://codereview.chromium.org/3791006 TBR=thestig@chromium.org Review URL: http://codereview.chromium.org/3779008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62695 0039d316-1c4b-4281-b951-d872f2087c98
* During shutdown delete any pending tasks if running under Heapchecker.thestig@chromium.org2010-10-141-2/+2
| | | | | | | | BUG=50345 TEST=Suppression no longer gets used. Review URL: http://codereview.chromium.org/3791006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62644 0039d316-1c4b-4281-b951-d872f2087c98
* Move Stats, histograms, and field trial into a metrics subdirectory of base andbrettw@chromium.org2010-10-141-4/+5
| | | | | | | | | put them in the base namespace. TEST=it compiles BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62510 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes bad URLRequest leak detection. nss_ocsp creates asky@chromium.org2010-09-151-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | URLRequest. This URLRequest, if valid, is deleted when the IO thread is being shutdown by way of a DestructionObserver attached to the IO thread. Prior to this patch this proves problematic as the LeakTracker is run before DestructionObservers, which means we were errorenously detecting a leak and causing random UI failures (and perhaps other tests). To fix this I've moved the LeakTracker to run after the IO thread MessageLoop has been deleted (which means DestructionObservers have been notified). Doing this triggered a DCHECK in ChromeNetLog::AddEntry: DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); Here's the full stack: StackTrace::StackTrace() [0xf247c1] logging::LogMessage::~LogMessage() [0xf3ef4f] ChromeNetLog::AddEntry() [0x5c9639] net::BoundNetLog::AddEntry() [0x147d8a3] net::BoundNetLog::AddEvent() [0x147d92a] net::internal::ClientSocketPoolBaseHelper::CancelRequest() [0x132d032] net::ClientSocketPoolBase<>::CancelRequest() [0x134aabd] net::TCPClientSocketPool::CancelRequest() [0x1348fdb] net::ClientSocketHandle::ResetInternal() [0x13273b7] net::ClientSocketHandle::Reset() [0x1327874] net::ClientSocketHandle::~ClientSocketHandle() [0x1327895] scoped_ptr<>::~scoped_ptr() [0x1304b97] net::HttpStreamRequest::~HttpStreamRequest() [0x1300933] base::RefCounted<>::Release() [0xa15b83] scoped_refptr<>::operator=() [0x12f2da4] net::HttpNetworkTransaction::~HttpNetworkTransaction() [0x12ee377] scoped_ptr<>::~scoped_ptr() [0x12e2724] net::HttpCache::Transaction::~Transaction() [0x12e10a6] scoped_ptr<>::reset() [0x12d1f0b] URLRequestHttpJob::DestroyTransaction() [0x142229e] URLRequestHttpJob::Kill() [0x14252e5] URLRequest::DoCancel() [0x137af1e] URLRequest::Cancel() [0x137b081] (anonymous namespace)::OCSPRequestSession::CancelURLRequest() [0x13142a7] (anonymous namespace)::OCSPRequestSession::WillDestroyCurrentMessageLoop() [0x1314b30] MessageLoop::~MessageLoop() [0xf421ab] base::Thread::ThreadMain() [0xf71395] ThreadFunc() [0xf54338] start_thread [0x7ff66c6d83f7] 0x7ff669d5cbbd This is still on the IO thread, but the DCHECK fails because at the time the DestructionObservers are run Thread::message_loop() returns NULL, which means the DCHECK fails. I've fixed this by changing the DCHECK to pass if the current thread's message loop is NULL. I feel a bit quesy about this as it seems a bit fragile (well, all this code is fragile). I would be inclined to make Thread::message_loop() return the MessageLoop until after the destructor has run, but this seems equally risky. Let me know what you prefer. BUG=52022 TEST=none Review URL: http://codereview.chromium.org/3402006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59566 0039d316-1c4b-4281-b951-d872f2087c98
* Header cleanup in base.brettw@chromium.org2010-08-171-1/+0
| | | | | | | | | | | | | | This makes uses of StringPrintf and friends use the base namespace and include stringprintf.h explicitly. This also removes a bunch of unnecessary string_util includes (which exposed a few other errors like people forgetting to include <vector>. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3119022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56446 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 54584 - Delete tasks unconditionally in ↵akalin@chromium.org2010-08-031-2/+21
| | | | | | | | | | | | | | MessageLoop::DeletePendingTasks(). BUG=6532 TEST=existing unit tests Review URL: http://codereview.chromium.org/3076015 TBR=akalin@chromium.org Review URL: http://codereview.chromium.org/2878074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54697 0039d316-1c4b-4281-b951-d872f2087c98
* Delete tasks unconditionally in MessageLoop::DeletePendingTasks().akalin@chromium.org2010-08-021-21/+2
| | | | | | | | | BUG=6532 TEST=existing unit tests Review URL: http://codereview.chromium.org/3076015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54584 0039d316-1c4b-4281-b951-d872f2087c98
* Move implementation from header to source.erg@chromium.org2010-07-151-0/+11
| | | | | | | | | | | | | | | | | | | | This is an effort to speed up compile and link time, and also minimizing the size of the intermediary .o files on disk. For example, just moving the constructor/destructor from the classes in chrome/browser/pref_member.{cc,h} netted a 368k drop in total .o file size. In aggregate, this shrinks libbrowser.a by 10 megabytes, and a few odd megabytes on most other chrome .a files. A lot of this was done before I started harvesting what the most included symbols were across all of chrome's code. Most of them are in webkit, but there's plenty in base/ that are used everywhere to keep me busy for several patches to come. BUG=none TEST=none Review URL: http://codereview.chromium.org/3012001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52528 0039d316-1c4b-4281-b951-d872f2087c98
* Attempt four at landing the "histogram.h removed from message_loop.h" patch.erg@chromium.org2010-07-151-39/+40
| | | | | | | | | | | | | | Previously committed as r52349 and r52336. Related commits: r52367, r52364 and r52343. Rerunning trybots due to previous trybot breakage. TEST=none BUG=none Review URL: http://codereview.chromium.org/2965015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52496 0039d316-1c4b-4281-b951-d872f2087c98
* Revert everything related to the relanding.erg@chromium.org2010-07-141-40/+39
| | | | | | Review URL: http://codereview.chromium.org/2982009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52367 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r52336.erg@chromium.org2010-07-141-39/+40
| | | | | | | | | | | | | | (I accidentally committed a previous version of the patch (the fixed version was in codereview since I had switched to my mac to address this exact compile failure.) BUG=none TEST=none TBR=evan Review URL: http://codereview.chromium.org/2937010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52349 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 52336 - More header cleanup:erg@chromium.org2010-07-141-40/+39
| | | | | | | | | | | | | | | | - Some cleanup to url_request.h - Remove task.h from headers that don't need it. - Remove histogram.h from message_loop.h BUG=none TEST=none Review URL: http://codereview.chromium.org/2986002 TBR=erg@chromium.org Review URL: http://codereview.chromium.org/2969006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52343 0039d316-1c4b-4281-b951-d872f2087c98
* More header cleanup:erg@chromium.org2010-07-141-39/+40
| | | | | | | | | | | | | - Some cleanup to url_request.h - Remove task.h from headers that don't need it. - Remove histogram.h from message_loop.h BUG=none TEST=none Review URL: http://codereview.chromium.org/2986002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52336 0039d316-1c4b-4281-b951-d872f2087c98
* Change chrome from statically enabling high resolution timers on windowsmbelshe@chromium.org2010-06-291-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | to enabling them dynamically - only when the application really needs them. I am working on some test cases for this, and will add them. But wanted to send out the concept for review. In this implementation, I modify the message loop to detect when the application has requested high resolution timers. Note that there are multiple MessageLoops active in a single process. After a period of time, we simply shut it off again. We could have set a timer or kept a count of active timers, or any number of more complex algorithms. But I think this algorithm is very simple and good enough. If an application continues needing high resolution timers for more than 1s, we'll turn the high-resolution timers back on again. One last change - since we've implemented the clamp at 4ms, there isn't a lot of point to our use of 1ms for timeBeginPeriod. I've modified that to 2 (which is half of 4ms, our target minimal interval). BUG=46531 TEST=MessageLoop.HighResolutionTimers Review URL: http://codereview.chromium.org/2822035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51102 0039d316-1c4b-4281-b951-d872f2087c98
* Removing message loop instrumentation.dhollowa@chromium.org2010-06-291-4/+0
| | | | | | | | | | | | Removes Valgrind info messages in message loop. This was making unit test output difficult to read. TBR=glider@chromium.org BUG=none TEST=none Review URL: http://codereview.chromium.org/2810037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51083 0039d316-1c4b-4281-b951-d872f2087c98
* Log the value of RUNNING_ON_VALGRIND in message_loop.ccglider@chromium.org2010-06-221-0/+4
| | | | | | | BUG=46569 Review URL: http://codereview.chromium.org/2868020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50454 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r49188.willchan@chromium.org2010-06-091-7/+13
| | | | | | | | It was reverted due to breaking a valgrind test which has since been disabled. Review URL: http://codereview.chromium.org/2763004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49320 0039d316-1c4b-4281-b951-d872f2087c98
* Rebaseline tests whose expectations were changed by r55714.hamaji@chromium.org2010-06-091-13/+7
| | | | | | | | | | | | The patch removed extra paddings inside buttons. http://trac.webkit.org/changeset/55714 BUG=1437 TEST=none Review URL: http://codereview.chromium.org/789003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49225 0039d316-1c4b-4281-b951-d872f2087c98
* Jankometer: Generalize the code more. Add better support for monitoring IO ↵willchan@chromium.org2010-06-081-7/+13
| | | | | | | | | | | | | thread. Previously, the Jankometer only monitored windows messages on the UI thread (or gtk events). I've added observers for tasks and IO events. This lets us monitor all events on UI & IO threads (UI messages, all Tasks, and IO events). Replaces the JankObserver with a UIJankObserver and an IOJankObserver. Shares common code in JankObserverHelper. The JankObserverHelper and JankWatchdog are generic enough that they can probably move out to chrome/common and be reused by the renderer. Review URL: http://codereview.chromium.org/2098020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49188 0039d316-1c4b-4281-b951-d872f2087c98
* Make MessageLoop::MessageLoop easier to read.thestig@chromium.org2010-04-151-17/+16
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/1655007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44595 0039d316-1c4b-4281-b951-d872f2087c98