summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
...
* POSIX: Transfer network data using shared memoryagl@chromium.org2009-02-114-9/+73
| | | | | | | | | | | | | | | | | | | | | | This patch adds the long planned support for sharing memory on POSIX by transporting file descriptors. It largely builds on the shared memory cleanup work by jrg. We move FileDescriptor out of chrome/common/file_descriptor_posix.h and into base/file_descriptor_posix.h. Since all that's left in the chrome/common verion is the DescriptorSet, those files are renamed to descriptor_set.[h|cc]. The SharedMemoryHandle on POSIX then becomes a typedef to a FileDescriptor and thus can be serialised over IPC. After that, it's mostly a case of cleaning up those snippets of code which considered SharedMemoryHandles to be scaler values. Review URL: http://codereview.chromium.org/21208 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9580 0039d316-1c4b-4281-b951-d872f2087c98
* Add a gtk_utils (like gdi_utils), with region rectangle subtraction.deanm@chromium.org2009-02-115-12/+59
| | | | | | | | | | | | | This will be used like the gdi functions, for constructing clipping regions. Add ToGdkRectangle() on gfx::Rect, similar to the win32 and CG methods. Make the scons file better reflect which files are platform specific. Review URL: http://codereview.chromium.org/20259 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9574 0039d316-1c4b-4281-b951-d872f2087c98
* Fix linux buildestade@chromium.org2009-02-111-1/+2
| | | | | | | | tbr=jeremy Review URL: http://codereview.chromium.org/21241 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9546 0039d316-1c4b-4281-b951-d872f2087c98
* Under the OS X Sandbox, some system calls are blocked.jeremy@chromium.org2009-02-112-3/+20
| | | | | | | | This CL adds a facility to cache system info values on renderer startup. Review URL: http://codereview.chromium.org/20250 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9545 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a browser crash when the async resource handler keeps anrvargas@google.com2009-02-111-0/+2
| | | | | | | | | | | | | | | | IOBuffer after a failed attempt to send the data to a (now gone) renderer. The shared memory section is unmapped so the buffer must not be kept around and possibly re-used. I'm also fixing a leak reported by purify. BUG=7487 BUG=7374 Review URL: http://codereview.chromium.org/21222 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9540 0039d316-1c4b-4281-b951-d872f2087c98
* Unittest gardening on MacOS X:shess@chromium.org2009-02-112-1/+5
| | | | | | | | | | | | | | | | | | | | - base/gfx/rect_unittest.cc had a typo - base/waitable_event_watcher_unittest.cc enabled - chrome/common/pref_member_unittest.cc enabled - chrome/common/json_value_serializer_unittest.cc had a Windows-only bit which currently works fine on Mac. - These worked once an anonymous namespace was cleared up: chrome/browser/history/query_parser_unittest.cc chrome/browser/history/url_database_unittest.cc chrome/common/json_value_serializer_unittest.cc Some required minor editting to remove anonymous namespaces for test classes. Review URL: http://codereview.chromium.org/20241 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9539 0039d316-1c4b-4281-b951-d872f2087c98
* * Fix error checking for mmap() for POSIX shared memory.jeremy@chromium.org2009-02-111-1/+3
| | | | | | | | * Make fd-over-IPC test send multiple FDs. Review URL: http://codereview.chromium.org/21238 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9537 0039d316-1c4b-4281-b951-d872f2087c98
* Disable battery power detection on POSIX since we don't currently use it.jeremy@chromium.org2009-02-102-203/+219
| | | | | | | | Batter Power is used on Windows to toggle HiRest timers, but this isn't applicable on other platforms. Review URL: http://codereview.chromium.org/21187 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9510 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: add command line option to launch renderers in a wrapperagl@chromium.org2009-02-102-0/+14
| | | | | | | | | For example, ./Hammer/chrome --renderer-cmd-prefix="gdb --args" Review URL: http://codereview.chromium.org/21190 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9438 0039d316-1c4b-4281-b951-d872f2087c98
* Stub out a function in FileVersionInfo that the dynamic link wants.evan@chromium.org2009-02-091-0/+5
| | | | | | | Review URL: http://codereview.chromium.org/20170 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9404 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the windows implementation of KillProcess and WaitForSingleProcess to ↵stoyan@chromium.org2009-02-095-19/+26
| | | | | | | | 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
* Add Recycle() method to scoped autorelease pool to allow cleaning out any junkpinkerton@chromium.org2009-02-092-0/+17
| | | | | | | | created at startup before the main runloop. Correct quit on Mac to let the BrowserProcess shut down the event loop when its refcount goes to zero after cleaning up all browser windows. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9386 0039d316-1c4b-4281-b951-d872f2087c98
* Fix a memory error when a timer task deleles itshuanr@chromium.org2009-02-072-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | original timer in the receiver method. This happens in the events of following sequence: - A TimerTask is created on message loop - When TimerTask::Run is called, it nullifies timer_->delayed_task. - The receiver method is dispatched, and inside the method, the timer_ is deleted. Since timer_->delayed_task being null, the timer_ destructor will not orphan the task. - After the method is returned, message loop deletes the task which will deref the dangling pointer to timer_. I also tried to add a unit test to this. The best I can come up with is making the test process crash/fail in full page heap or purify environment. BUG=1570948 Review URL: http://codereview.chromium.org/20111 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9368 0039d316-1c4b-4281-b951-d872f2087c98
* Also add ObserverListThreadSafeTest.CrossThreadNotifications to ignore list.erikkay@google.com2009-02-071-0/+1
| | | | | | | | BUG=7477 Review URL: http://codereview.chromium.org/20157 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9367 0039d316-1c4b-4281-b951-d872f2087c98
* Add ObserverListThreadSafeTest.CrossThreadObserver to skipped tests.erikkay@google.com2009-02-071-0/+3
| | | | | | | | BUG=7477 Review URL: http://codereview.chromium.org/20152 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9363 0039d316-1c4b-4281-b951-d872f2087c98
* Add an exception for a flakey error in DirectoryWatcherTesterikkay@google.com2009-02-061-0/+10
| | | | | | | | | BUG=6051 TBR=darin Review URL: http://codereview.chromium.org/21151 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9361 0039d316-1c4b-4281-b951-d872f2087c98
* Add native drawing context typedef so that we can cut down on some #ifdefsamanda@chromium.org2009-02-061-0/+4
| | | | | | Review URL: http://codereview.chromium.org/20093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9353 0039d316-1c4b-4281-b951-d872f2087c98
* I let a tab slip into the code; remove it.agl@chromium.org2009-02-061-1/+1
| | | | | | | | | (I blame Visual Studio) Review URL: http://codereview.chromium.org/21131 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9324 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite the mac named process iterator:thomasvl@chromium.org2009-02-062-74/+103
| | | | | | | | | | - walk thru only processes for this user. - properly handle walking the data collect. - handle the number of processes increasing between count and data collection. Enable the one unittest the uses the named process iterator. Review URL: http://codereview.chromium.org/20122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9305 0039d316-1c4b-4281-b951-d872f2087c98
* Make ResourceMessageFilter compile on Mac. It stubs out a substantial part ofbrettw@google.com2009-02-064-33/+62
| | | | | | | | | 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
* Implement NamedProcessIterator in base/process_util_mac.mm. Patch by Naokimark@chromium.org2009-02-055-76/+174
| | | | | | | | | Takano <takano.naoki@gmail.com> Review URL: http://codereview.chromium.org/18192 Review URL: http://codereview.chromium.org/21097 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9263 0039d316-1c4b-4281-b951-d872f2087c98
* Allow clean compilation of dmg_fp under g++ -Wall.mark@chromium.org2009-02-054-25/+263
| | | | | | | | | | | | | | | | | | We build dmg_fp as part of libbase, which mostly contains our own code. As such, we want to build libbase with -Wall -Werror or equivalent. Since the gyp model does not allow per-file compilation settings, we can't do this without modifying dmg_fp or building it into its own library with its own settings. The former seems less invasive. The following gcc warnings are fixed by this patch: - suggest parentheses around assignment used as truth value - deprecated conversion from string constant to 'char*' - comparison between signed and unsigned integer expressions - label 'something' defined but not used - 'whatever' may be used uninitialized in this function Review URL: http://codereview.chromium.org/21093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9255 0039d316-1c4b-4281-b951-d872f2087c98
* Add simple terminate support for now to help bring up browser/renderer, willthomasvl@chromium.org2009-02-051-1/+8
| | | | | | | get more work as we make it better handle the posix platform. Review URL: http://codereview.chromium.org/20090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9238 0039d316-1c4b-4281-b951-d872f2087c98
* Transition POSIX shmem to use lockf(), not semaphores. Eliminatesjrg@chromium.org2009-02-053-58/+140
| | | | | | | | | | | | | | resource leak possibility; allows complete sharing of shmem by fd without name. Add actual multiprocess shmem/locking unit test. Fix flaky shmem unit test. agl: please review. Amanda: please look over as you've been here before. Review URL: http://codereview.chromium.org/21063 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9235 0039d316-1c4b-4281-b951-d872f2087c98
* Some fixes to ease debugging of the renderer process on OS X.jeremy@chromium.org2009-02-052-3/+21
| | | | | | Review URL: http://codereview.chromium.org/21084 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9225 0039d316-1c4b-4281-b951-d872f2087c98
* Another macro for 100 linear slotscpu@google.com2009-02-051-0/+5
| | | | | | | | | - Mirrors same without UMA - Current tests sufice Review URL: http://codereview.chromium.org/20069 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9207 0039d316-1c4b-4281-b951-d872f2087c98
* Disable all of ScopedTempDir tests, since the next one crashed as well.erikkay@google.com2009-02-051-1/+1
| | | | | | | | | | TBR=ojan BUG=7412 Review URL: http://codereview.chromium.org/21068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9201 0039d316-1c4b-4281-b951-d872f2087c98
* Disable ScopedTempDir.FullPath since it's crashing.erikkay@google.com2009-02-051-0/+4
| | | | | | | | | BUG=7412 TBR=ojan Review URL: http://codereview.chromium.org/20068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9197 0039d316-1c4b-4281-b951-d872f2087c98
* Use gfx::NativeView instead of gfx::NativeWindow where appropriate. Switch ↵jhawkins@chromium.org2009-02-041-1/+2
| | | | | | to platform-specific types in the implementation files and change variable names to match the header. Based on cl 8783 by Evan Martin. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9171 0039d316-1c4b-4281-b951-d872f2087c98
* This CL adds macro used to track the creation and destructionjcampan@chromium.org2009-02-044-3/+87
| | | | | | | | | | | of HWNDs, in an attempt to detect potential double-delete. A double-delete of a HWND might be responsible for the crasher http://crbug.com/4714 Note: this CL was previously committed and reverted because it broke the sandbox integration module. Review URL: http://codereview.chromium.org/21032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9161 0039d316-1c4b-4281-b951-d872f2087c98
* Templatizing set_quote_chars method in tokenizer.robertshield@chromium.org2009-02-041-1/+1
| | | | | | Review URL: http://codereview.chromium.org/21045 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9148 0039d316-1c4b-4281-b951-d872f2087c98
* Hands off the intercept if 'unpatch' failsjoshia@google.com2009-02-041-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | If IATPatchFunction::Unpatch fails during RestoreImportedFunction it means that we cannot safely unpatch the import address table patch. In this case its better to be hands off the intercept as trying to unpatch again in the destructor of IATPatchFunction is not going to be any safer. In real world, when we patch a plugin's SetCursor, we intercept npswf.dll's IAT entry of SetCursor. It seems that our unpatch fails when the plugin ref count goes to 0. It could be because some one else has patched on top of us. Then, during CRT uninitialization at process shutdown, the destructor of IATPatchFunction is called. It detects that we haven't unpatched yet and tries to unpatch. But at this time the plugin DLL is unloaded and the IAT thunk is invalid. There's no point in trying to unpatch unloaded DLL's IAT :) BUG=6886 Review URL: http://codereview.chromium.org/21044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9142 0039d316-1c4b-4281-b951-d872f2087c98
* Properly honor base::SharedMemory semantics for name="" to meanjrg@chromium.org2009-02-0412-47/+389
| | | | | | | | | | | | new/private shared memory on POSIX. Transition base::SharedMemory implementation to file/mmap() to prevent leaking of wired kernel resources and allow easier cleanup. Enable one more shared_memory unit test for POSIX. Enable stats_table_unittest.cc for Mac, and modify it so it cleans up. Review URL: http://codereview.chromium.org/19724 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9114 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 9109.ojan@google.com2009-02-032-81/+0
| | | | | | | Broke the build. Review URL: http://codereview.chromium.org/20029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9110 0039d316-1c4b-4281-b951-d872f2087c98
* This CL adds macro used to track the creation and destructionjcampan@chromium.org2009-02-032-0/+81
| | | | | | | | | | | | of HWNDs, in an attempt to detect potential double-delete. A double-delete of a HWND might be responsible for the crasher http://crbug.com/4714 Review URL: http://codereview.chromium.org/21018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9109 0039d316-1c4b-4281-b951-d872f2087c98
* Use _NSGetEnviron instead of environ (see "man environ"). environ isn'tmark@chromium.org2009-02-031-5/+2
| | | | | | | | available in a dylib, and with this change, gyp/xcode is able to build libbase as a dylib. Review URL: http://codereview.chromium.org/21019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9089 0039d316-1c4b-4281-b951-d872f2087c98
* The dtor wasn't actually cleaning up the fds from the pipe, so close them downthomasvl@chromium.org2009-02-031-0/+4
| | | | | | | | during shutdown. (this w/ the zombies was what caused the bots to run out of fds) Review URL: http://codereview.chromium.org/20006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9066 0039d316-1c4b-4281-b951-d872f2087c98
* Depending on what runloop we're under, the autoreleasepool might not get cleanedthomasvl@chromium.org2009-02-031-0/+15
| | | | | | | | up until we get a UI event. So we make our CF Source layers use a local pool to make sure we don't collect too much memory before something dumps it. Review URL: http://codereview.chromium.org/20005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9059 0039d316-1c4b-4281-b951-d872f2087c98
* fix off by one in offset values for cf_html.tc@google.com2009-02-031-1/+1
| | | | | | | | | | | | | This was causing the final </span> tag to not be closed which resulted in it showing up when pasting into a pidgin chat window (among other places). BUG=7102 Review URL: http://codereview.chromium.org/19763 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9057 0039d316-1c4b-4281-b951-d872f2087c98
* Add to SDCH histogrammingjar@chromium.org2009-02-021-4/+23
| | | | | | | | | | | | | | | | Define a histogram macro that is customizable, and precise, for detailed examination of performance when needed. Provide graceful degradation when entire SDCH window is not received. We now blacklist the site with an exponential back-off. This allows teh user to hit reload, and get not-SDCH content. bug=1609306 r=huanr,mbelshe Review URL: http://codereview.chromium.org/19718 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9035 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce UrlPattern. This is basically me resuming work onaa@chromium.org2009-02-023-0/+47
| | | | | | | | | | | | issue 14106, but as it is a complete rewrite, I have started a new issue. I also added supporting JoinString() and ReplaceAll() utility functions. Review URL: http://codereview.chromium.org/19704 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9031 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure that Clipboard operations that require dispatchingrvargas@google.com2009-01-314-18/+77
| | | | | | | | | | | | | | | | | | | | of windows messages are performed on the UI thread. SetClipboardData requires the clipboard to be open with a handle to a window that will be notified when the contents are going to change again. If Windows messages are not processed, any other app writing to the clipboard will be locked while we acknowledge their request (by processing the message). The IO thread doesn't pump windows messages anymore so write clipboard operations cannot be performed from that thread and have to be posted to another thread. BUG=5823 Review URL: http://codereview.chromium.org/19733 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9003 0039d316-1c4b-4281-b951-d872f2087c98
* Rename README.google to README.chromium.mal@chromium.org2009-01-303-0/+0
| | | | | | | | | No code change. B=4380 Review URL: http://codereview.chromium.org/19501 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8988 0039d316-1c4b-4281-b951-d872f2087c98
* Provides the ability to write a unit test that brings up a browser. Assky@google.com2009-01-301-0/+10
| | | | | | | | | | | | | | a proof of concept I converted FindInPageControllerTest.FindInPageFrames over to this. See the description in InProcessBrowserTest for how it all works. BUG=none TEST=none Review URL: http://codereview.chromium.org/19644 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8934 0039d316-1c4b-4281-b951-d872f2087c98
* Create a stub chrome executable that crashes when run.tc@google.com2009-01-292-2/+33
| | | | | | | | | This is mostly making sure we have all the symbols we need. Review URL: http://codereview.chromium.org/19683 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8930 0039d316-1c4b-4281-b951-d872f2087c98
* Add a Version class and matching unit tests, roughly based on ↵erikkay@google.com2009-01-298-0/+214
| | | | | | | | chrome/installer/util/version.*. This version has more flexible parsing rules and is more robust to detecting bogus versions, supporting arbitrary numbers of version components rather than just dotted quads. It's possible that we should switch chrome installer to use this version. Review URL: http://codereview.chromium.org/19667 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8901 0039d316-1c4b-4281-b951-d872f2087c98
* The new version of Inset() Ben added a while ago didn't work quite right for ↵pkasting@chromium.org2009-01-292-10/+4
| | | | | | | | rects whose origin wasn't (0,0). Fix this and reduce some redundancy. Review URL: http://codereview.chromium.org/19457 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8893 0039d316-1c4b-4281-b951-d872f2087c98
* Add routine to close file descriptors on execjeremy@chromium.org2009-01-295-31/+66
| | | | | | | | for linux and mac. See BUG 6598. Review URL: http://codereview.chromium.org/18801 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8892 0039d316-1c4b-4281-b951-d872f2087c98
* Add thread checks to the IPC channel.rvargas@google.com2009-01-291-2/+0
| | | | | | | | | | | | | Almost every method of the IPC channel must be invoked from a single thread. This adds the corresponding DCHECKS, and should confirm bug 6489 as a cause of flakiness on the UI tests. BUG: 6489. Review URL: http://codereview.chromium.org/19617 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8837 0039d316-1c4b-4281-b951-d872f2087c98
* Add ScopedTempDir - a class that manages the lifetime of a temporary directory.erikkay@google.com2009-01-287-0/+177
| | | | | | Review URL: http://codereview.chromium.org/19411 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8824 0039d316-1c4b-4281-b951-d872f2087c98