summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* Now that we deal with string16s, provide some useful conversions for them.avi@chromium.org2009-02-182-8/+24
| | | | | | Review URL: http://codereview.chromium.org/21473 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9970 0039d316-1c4b-4281-b951-d872f2087c98
* Reduce the amount of included header files. Vast change like in "Oh God! ↵maruel@chromium.org2009-02-184-16/+6
| | | | | | | | This revision changes half of the source files!". Review URL: http://codereview.chromium.org/20378 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9958 0039d316-1c4b-4281-b951-d872f2087c98
* Don't unpatch an unloaded module. We verify if the original function address ↵ananta@chromium.org2009-02-181-3/+19
| | | | | | | | | | | | | | | is still valid with a VirtualQuery call. This fixes http://code.google.com/p/chromium/issues/detail?id=7701 Bug=7701 Review URL: http://codereview.chromium.org/21434 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9929 0039d316-1c4b-4281-b951-d872f2087c98
* Persist info about subresources on pages for DNS pre-resolutionjar@chromium.org2009-02-171-2/+2
| | | | | | | | | | | | | | | | | | | | | The DNS pre-resolution system already "learns" what domains are commonly needed when rendering sub-resources of a page at a given domain. This patch saves (some of) the information learned into a persistent pref, and restores it on startup. For now, I put in a wimpy pruning of the list each time I save, so that the list will not grow endlessly from session to session. I probably need a better pruning algorithm, such as one that prunes after a given amount of time, rather than only during shutdown. For now, this should get a lot of nice results, and provide slightly larger than needed lists to users that have long lived sessions, which is similar to the current performance, where I didn't persist any info, and only pruned (actually discarded) all learned info at shutdown. r=mbelshe Review URL: http://codereview.chromium.org/21374 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9912 0039d316-1c4b-4281-b951-d872f2087c98
* Add a couple more stubs to file_version_info_linux.cc.thestig@chromium.org2009-02-142-1/+11
| | | | | | Review URL: http://codereview.chromium.org/21366 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9814 0039d316-1c4b-4281-b951-d872f2087c98
* Disable Native Crash reporting on OS X, till we enable Breakpad integration.jeremy@chromium.org2009-02-133-0/+49
| | | | | | See http://crbug.com/7652 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9757 0039d316-1c4b-4281-b951-d872f2087c98
* Add code to be able to detect windows7 and 2008 in GetWinVersion.nsylvain@chromium.org2009-02-122-4/+17
| | | | | | Review URL: http://codereview.chromium.org/21274 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9694 0039d316-1c4b-4281-b951-d872f2087c98
* Lots of small nits to help to split off webkit.dll.maruel@chromium.org2009-02-123-6/+4
| | | | | | | | | - Stop directly referencing WebPluginDelegateImpl. - Make the password manager to not allocation the data on heap. - Remove some unneeded includes. Review URL: http://codereview.chromium.org/20208 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9692 0039d316-1c4b-4281-b951-d872f2087c98
* Change the behavior of --enable-dcheck in releasehuanr@chromium.org2009-02-122-15/+56
| | | | | | | | | | | | | | | | | | | | | | | | build from crashing to logging the failure and continuing. In addition, - In interactive mode, we will display a message box so the user can either click OK and continue or attach a debugger. - If Chrome is running in test environment, it has the option to overide the default behavior and suppress the error dialog. To support this, a new severity level ERROR_REPORT is added. In addition, DFATAL is now mapped to ERROR_REPORT instead of ERROR. The only usage of DFATAL is in ssl_client_socket_nss.cc. Add wtc for code review. Review URL: http://codereview.chromium.org/21216 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9633 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor plugin process code in the browser process so that the ↵jam@chromium.org2009-02-112-0/+5
| | | | | | | | browser/about:memory/task manager/metrics code doesn't depend on PluginProcessHost pointers. In a future changelist I'll add one central child process registry in the browser process. Review URL: http://codereview.chromium.org/20196 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9621 0039d316-1c4b-4281-b951-d872f2087c98
* Turning on the tracking of double-delete of HWND in the hope of catching one ↵jcampan@chromium.org2009-02-112-6/+1
| | | | | | | | that would be the cause of the infamous NCDestroy crasher (bug #4714). Review URL: http://codereview.chromium.org/20269 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9611 0039d316-1c4b-4281-b951-d872f2087c98
* 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