summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* Add thread safety checks but keep them disabled for now until I fix all the ↵maruel@chromium.org2009-01-264-7/+43
| | | | | | | | | current places where it triggers. Fix thread_collision_warner for real this (third?) time. Review URL: http://codereview.chromium.org/18569 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8650 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure variables are referenced in CHECK macros, even for official builds.deanm@chromium.org2009-01-261-11/+13
| | | | | | | | | | | | | | Previously the GCC based builds couldn't build with OFFICIAL_BUILD, since code like: bool success = Something(); DCHECK(success); Would result in a compile warning (treated as error) about success being unused. Review URL: http://codereview.chromium.org/18747 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8630 0039d316-1c4b-4281-b951-d872f2087c98
* Unfork test_shell_main:amanda@chromium.org2009-01-265-1/+45
| | | | | | | | | | | | | | | | | - remove Mac version - move platform-specific operations into PlatformDelegate and remove #ifdefs - add event recorder link stubs for use by platforms that don't have event recording working yet Notes: There's a bunch of stuff in test_shell_{gtk,mac,win} that should also be pulled into the platform delegate so that the TestShell class can also be unforked, but those can be worked on independently per platform after this refactoring. Review URL: http://codereview.chromium.org/18451 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8629 0039d316-1c4b-4281-b951-d872f2087c98
* Add user script support to extensions.aa@chromium.org2009-01-252-18/+5
| | | | | | | | | | | | | | | This is implemented mostly by relying on the existing user script code. But since extension user scripts are declared, not discovered in a directory, I had to add support for adding 'lone' user scripts to UserScriptMaster. This led to a bit of refactoring. Note that this CL relies on: http://codereview.chromium.org/18352 Review URL: http://codereview.chromium.org/18198 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8614 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r8560 due to broken interactive_ui_testsmark@chromium.org2009-01-233-12/+1
| | | | | | Review URL: http://codereview.chromium.org/18722 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8570 0039d316-1c4b-4281-b951-d872f2087c98
* Project changes (automatic reordering by UUID).avi@chromium.org2009-01-231-4/+4
| | | | | | Review URL: http://codereview.chromium.org/18629 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8568 0039d316-1c4b-4281-b951-d872f2087c98
* Add a PNGEncoder helper function that takes an SkBitmap,nick@chromium.org2009-01-232-0/+22
| | | | | | | | | | | | which is how PNGEncode is used almost everywhere. This should be strictly no functional change, except for the ImageFilterPeer::DataReady case, where we now take an SkAutoLockPixels where previously we did not. Review URL: http://codereview.chromium.org/18347 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8561 0039d316-1c4b-4281-b951-d872f2087c98
* Porting in chrome/phajdan.jr@chromium.org2009-01-233-1/+12
| | | | | | Review URL: http://codereview.chromium.org/18446 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8560 0039d316-1c4b-4281-b951-d872f2087c98
* Decrements FieldTrialList::constructor_count_ in the destructor. I'msky@google.com2009-01-233-10/+1
| | | | | | | | | | | | | going to run ui tests in process and call BrowserMain multiple times. That means FieldTrialList's constructor is run multiple times. Without this decrement, the constructor isn't happy. BUG=none TEST=none Review URL: http://codereview.chromium.org/18535 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8554 0039d316-1c4b-4281-b951-d872f2087c98
* Use PlatformThreadId, not int when dealing with thread ids.agl@chromium.org2009-01-2310-15/+36
| | | | | | | | | | | | | | | | | Windows uses a DWORD (unsigned long) for thread ids and POSIX uses a pid_t (int on Linux) for the same. In the code, we are currently stuffing thread ids into an int which is dangerous on Windows (because DWORDS can exceed an int and wrap) and will break if pid_t is ever != int. This change changes all the places where we currently have an int to use a new typedef, PlatformThreadId. This change also needs to occur for process ids, but I'm not doing that in this CL. Review URL: http://codereview.chromium.org/18677 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8525 0039d316-1c4b-4281-b951-d872f2087c98
* Review URL: http://codereview.chromium.org/18690jrg@chromium.org2009-01-222-27/+3
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8506 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 8499.maruel@chromium.org2009-01-222-10/+0
| | | | | | Review URL: http://codereview.chromium.org/18687 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8504 0039d316-1c4b-4281-b951-d872f2087c98
* Add (currently disabled) RefCountedBase check. (2nd try)maruel@chromium.org2009-01-222-0/+10
| | | | | | Review URL: http://codereview.chromium.org/18438 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8499 0039d316-1c4b-4281-b951-d872f2087c98
* Another horrible workaround for bug 6436 (purify freaking out with ↵erikkay@google.com2009-01-221-0/+4
| | | | | | | | | | | base_unittests.exe). I'm talking to a Rational engineer hoping to get a real solution. In the meantime, this fix will get base_unittests working under Purify again. See the bug for more of the ugly details. BUG=6436 Review URL: http://codereview.chromium.org/18514 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8489 0039d316-1c4b-4281-b951-d872f2087c98
* Moved Init() startup_data_->event.Signal() because derived classes mayjrg@chromium.org2009-01-222-3/+27
| | | | | | | | | | | | not be safe to use until Init() has been called. As an example, RenderThread() creates it's IPC::SyncChannel in Init(), so it isn't safe to call Send() method until after. Change tested explicitly on Mac Win Linux. Review URL: http://codereview.chromium.org/18508 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8485 0039d316-1c4b-4281-b951-d872f2087c98
* Replace cases of Append(FILE_PATH_LITERAL()) with AppendASCII("").deanm@chromium.org2009-01-221-3/+2
| | | | | | Review URL: http://codereview.chromium.org/18499 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8454 0039d316-1c4b-4281-b951-d872f2087c98
* Simplify HexEncode.deanm@chromium.org2009-01-222-24/+9
| | | | | | | Review URL: http://codereview.chromium.org/18659 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8450 0039d316-1c4b-4281-b951-d872f2087c98
* Windows fix: missed on the last oneagl@chromium.org2009-01-221-1/+1
| | | | | | | Review URL: http://codereview.chromium.org/18646 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8439 0039d316-1c4b-4281-b951-d872f2087c98
* Windows: typo fixagl@chromium.org2009-01-221-1/+1
| | | | | | | Review URL: http://codereview.chromium.org/18485 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8438 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: Porting renderer/render_process.cc, low hanging fruitagl@chromium.org2009-01-223-0/+17
| | | | | | | Review URL: http://codereview.chromium.org/18622 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8436 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: Get render_process_host to build.agl@chromium.org2009-01-222-11/+17
| | | | | | | | | | | | 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
* Adding a HexEncode function to string_utils.tommi@chromium.org2009-01-223-1/+46
| | | | | | | | This function takes a pointer to a chunk of memory and formats the bytes as hex. Review URL: http://codereview.chromium.org/18452 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8420 0039d316-1c4b-4281-b951-d872f2087c98
* Remove ATL from wmi_utilcpu@google.com2009-01-212-42/+68
| | | | | | | | | | | | | - CComptr and CComBstr gone, baby gone - scoped_comptr_win.h file had a CRLF or at least VC thinks so - Future work: Grow variant helper class to be really helpful - Unit tests already exist It seems base is now free of ATL Review URL: http://codereview.chromium.org/18610 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8419 0039d316-1c4b-4281-b951-d872f2087c98
* Add V8 bindings for Worker.jianli@chromium.org2009-01-212-1/+8
| | | | | | Review URL: http://codereview.chromium.org/17246 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8414 0039d316-1c4b-4281-b951-d872f2087c98
* Add a replace_all param to ReplaceSubstringsAfterOffset and update call sites.aa@chromium.org2009-01-213-3/+65
| | | | | | Review URL: http://codereview.chromium.org/18603 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8413 0039d316-1c4b-4281-b951-d872f2087c98
* Adds AppendASCII which will append an ASCII path component.erikkay@google.com2009-01-213-1/+29
| | | | | | | | Since this is safe to do on all platform path encodings (even Linux), this allows path components to be taken from ASCII sources without #ifdefs for the caller. Review URL: http://codereview.chromium.org/18134 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8394 0039d316-1c4b-4281-b951-d872f2087c98
* * Revert "POSIX: Get render_process_host to build."agl@chromium.org2009-01-212-17/+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-212-11/+17
| | | | | | | | | | | | 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
* Share DidProcessCrash between Linux and Mac.deanm@chromium.org2009-01-212-25/+26
| | | | | | | Review URL: http://codereview.chromium.org/18447 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8363 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up a bunch of style errors in process_util_linux.cc.deanm@chromium.org2009-01-211-27/+30
| | | | | | | Review URL: http://codereview.chromium.org/18615 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8362 0039d316-1c4b-4281-b951-d872f2087c98
* Make CommandLine into a normal object, with some statics for getting at the ↵evan@chromium.org2009-01-219-378/+377
| | | | | | | | | | | current process's command line. One explicit goal of this change is to *not* deal with the string/wstring issues at the API on POSIX; the functions are the same as before, which means they remain as broken as before. (I did try to fix the internals, though, so migrating the callers is now possible by adding platform-appropriate hooks.) Review URL: http://codereview.chromium.org/18248 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8347 0039d316-1c4b-4281-b951-d872f2087c98
* Followup for one missed review comment (sorting includes).thomasvl@chromium.org2009-01-201-1/+1
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8329 0039d316-1c4b-4281-b951-d872f2087c98
* POSIX: Get IPCSyncChannel unittests workingagl@chromium.org2009-01-201-0/+3
| | | | | | | Review URL: http://codereview.chromium.org/18324 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8328 0039d316-1c4b-4281-b951-d872f2087c98
* generate test_shell.pak and hook up loading net resources fromtc@google.com2009-01-201-0/+2
| | | | | | | | | | test_shell.pak. Move the net resource loading into the platform specific files (still a stub on osx). Review URL: http://codereview.chromium.org/18186 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8321 0039d316-1c4b-4281-b951-d872f2087c98
* Added more logging in debug builds for some failure passes, hopefully thisthomasvl@chromium.org2009-01-201-3/+10
| | | | | | | | will let us figure out why we see so mainly unittest failures on the mac but never seem to be able to repro locally. Review URL: http://codereview.chromium.org/18378 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8316 0039d316-1c4b-4281-b951-d872f2087c98
* Flesh out ListValue class.aa@chromium.org2009-01-203-5/+101
| | | | | | Review URL: http://codereview.chromium.org/18200 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8315 0039d316-1c4b-4281-b951-d872f2087c98
* Set back StoreRef as non-thread-safe. (Second try)maruel@chromium.org2009-01-201-1/+1
| | | | | | | BUG=5689 Review URL: http://codereview.chromium.org/18367 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8307 0039d316-1c4b-4281-b951-d872f2087c98
* Collect some metrics on nosniff. There is some concern that respecting this ↵abarth@chromium.org2009-01-171-0/+12
| | | | | | | | | | | header causes more harm than good. R=darin Review URL: http://codereview.chromium.org/18214 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8257 0039d316-1c4b-4281-b951-d872f2087c98
* Generate all chrome .vcproj files:sgk@google.com2009-01-173-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Path name translation (/ to \) of various MSVSTool attributes. * Explicit keyword= arguments to MSVSProject. This will likely go away eventually in favor of uniform behavior. * Add a relative_path_substitutions array that can be used to substitute in Visual Studio variable like $(OutDir). * Add a local_directory_prefix that can be set to './' to only affect files in the current directory. * Additional Keyword ordering in Tool attributes to continue to match the default order Visual Studio generates. * Add a Derived() proxy class that can wrap a File node to tell the .vcproj generation that we want the derived file, not its source(s), in the file list. * In the individual *.scons files, add the necessary files (mostly .h files) to file lists, and update MSVSProject() calls with the additional necessary information. Result is identical .vcproj files modulo the following differences: * Four locales .vcproj files (da, en-US, he and zh-TW) with source file orders that don't match the other locale .vcproj files have re-ordered file lists to match the rest. * Cosmetic XML changes (white space, ending tags) in: chrome/app/chrome_dll.vcproj chrome/app/generated_resources.vcproj net/build/net_resources.vcproj * Removal or addition of ./ prefixes from various files that don't match the other file specifications within their individual .vcproj files: chrome/installer/util/util.vcproj net/build/net.vcproj net/build/net_unittests.vcproj * Add missing empty sections (<ToolFiles>, <References>, <Globals>) for consistency with other .vcproj files: chrome/tools/test/image_diff/image_diff.vcproj third_party/libpng/libpng.vcproj third_party/zlib/zlib.vcproj * Add missing RootNameSpace attribute: chrome/test/automation/automation.vcproj testing/gtest.vcproj * Use && instead of \r\n as a command separator, to sidestep XML-generation problems: chrome/app/chrome_exe.vcproj * Remove unnecessary (?) duplicate files in the file list: chrome/browser/views/browser_views.vcproj (event_utils.cc and event_utils.h were duplicated) Review URL: http://codereview.chromium.org/17603 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8253 0039d316-1c4b-4281-b951-d872f2087c98
* "Port" StackTrace to Macmark@chromium.org2009-01-163-31/+8
| | | | | | Review URL: http://codereview.chromium.org/18173 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8229 0039d316-1c4b-4281-b951-d872f2087c98
* Mac build fixagl@chromium.org2009-01-161-1/+1
| | | | | | | Review URL: http://codereview.chromium.org/18332 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8222 0039d316-1c4b-4281-b951-d872f2087c98
* Windows build fix: sorry, I commit from the wrong tree.agl@chromium.org2009-01-161-0/+1
| | | | | | | Review URL: http://codereview.chromium.org/16611 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8221 0039d316-1c4b-4281-b951-d872f2087c98
* Add StackTrace debugging utility class.agl@chromium.org2009-01-163-1/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the moment, it only works on Linux, although it should be pretty easy to get it working on Mac with __builtin_return_address and __builtin_frame_address. It will mostly fail to resolve functions. Use this wrapper script: import os import sys import subprocess import re address = re.compile('.*\[(0x[0-9a-fA-F]{4,8})\].*') if __name__ == '__main__': p = subprocess.Popen(sys.argv[1:], stderr = subprocess.STDOUT, stdout = subprocess.PIPE) addr2line = subprocess.Popen(['addr2line', '-e', sys.argv[1], '-f', '-C', '-s'], stdout = subprocess.PIPE, stdin = subprocess.PIPE) for line in p.stdout.readlines(): m = address.match(line); if m is not None: addr2line.stdin.write(m.groups()[0] + '\n') function = addr2line.stdout.readline()[:-1] location = addr2line.stdout.readline()[:-1] sys.stdout.write('%s (%s)\n' % (function, location)) else: sys.stdout.write(line) Review URL: http://codereview.chromium.org/18303 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8218 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 8180.maruel@chromium.org2009-01-163-11/+1
| | | | | | Review URL: http://codereview.chromium.org/18319 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8186 0039d316-1c4b-4281-b951-d872f2087c98
* Add thread safety checks but keep them disabled for now until I fix all the ↵maruel@chromium.org2009-01-163-1/+11
| | | | | | | | | | | current places where it triggers. Set back StoreRef as non-thread-safe. BUG5689 Review URL: http://codereview.chromium.org/18272 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8180 0039d316-1c4b-4281-b951-d872f2087c98
* fix filename in vcproj file (time_unittest_win.cc -> time_win_unittest.cc)tc@google.com2009-01-161-1/+1
| | | | | | | | | TBR=tommi Review URL: http://codereview.chromium.org/18135 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8157 0039d316-1c4b-4281-b951-d872f2087c98
* Mac/Linux test fixes: hopefully this will fix some flakey testsagl@chromium.org2009-01-162-30/+54
| | | | | | | Review URL: http://codereview.chromium.org/18298 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8143 0039d316-1c4b-4281-b951-d872f2087c98
* Back out erroneous r8140mark@chromium.org2009-01-161-4/+4
| | | | | | Review URL: http://codereview.chromium.org/18124 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8141 0039d316-1c4b-4281-b951-d872f2087c98
* Fix OSX compilejeremy@chromium.org2009-01-151-4/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8140 0039d316-1c4b-4281-b951-d872f2087c98
* Mac build fixagl@chromium.org2009-01-152-5/+5
| | | | | | | Review URL: http://codereview.chromium.org/18122 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8138 0039d316-1c4b-4281-b951-d872f2087c98