summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* Fix Valgrind unittests by forcing illegal memory accesses to happen ↵pkasting@chromium.org2010-10-181-2/+4
| | | | | | | | | | unconditionally. BUG=none TEST=none Review URL: http://codereview.chromium.org/3838006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62992 0039d316-1c4b-4281-b951-d872f2087c98
* Move APSL code into third_party.avi@chromium.org2010-10-182-63/+9
| | | | | | | | | BUG=none TEST=unit tested Review URL: http://codereview.chromium.org/3801013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62983 0039d316-1c4b-4281-b951-d872f2087c98
* ** Think this may have caused TabSwitchingTest to fail, as it is parsing log ↵tim@chromium.org2010-10-1814-45/+51
| | | | | | | | | | | | | | | | | files. ** Revert 62959 - Convert LOG(INFO) to VLOG(1) - base/. Also removes an "else" after "return" and aligns "<<" per style guide. BUG=none TEST=none Review URL: http://codereview.chromium.org/3845002 TBR=pkasting@chromium.org Review URL: http://codereview.chromium.org/3850006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62981 0039d316-1c4b-4281-b951-d872f2087c98
* Convert LOG(INFO) to VLOG(1) - base/.pkasting@chromium.org2010-10-1814-51/+45
| | | | | | | | | | Also removes an "else" after "return" and aligns "<<" per style guide. BUG=none TEST=none Review URL: http://codereview.chromium.org/3845002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62959 0039d316-1c4b-4281-b951-d872f2087c98
* Move scoped_nsdisable_screen_update from base to app/macbrettw@chromium.org2010-10-1811-71/+44
| | | | | | | | | | | Move scoped_aedesc from base to base/mac Use namespace and proper Google-style class naming. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3828009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62904 0039d316-1c4b-4281-b951-d872f2087c98
* Move BaseDropTarget and BaseDragSource from base to app/win. Remove the ↵brettw@chromium.org2010-10-175-421/+0
| | | | | | | | | | "Base" class name prefix and put in the app::win namespace. TEST=none BUG=none Review URL: http://codereview.chromium.org/3822007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62900 0039d316-1c4b-4281-b951-d872f2087c98
* Move pe_image and registry from base to base/win and use the namespace. It ↵brettw@chromium.org2010-10-1712-421/+242
| | | | | | | | | | | | removes windows_message_list which isn't used. This keeps a stub for registry in the old location until we can update that. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3836005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62888 0039d316-1c4b-4281-b951-d872f2087c98
* Move scoped_cftyperef from base to base/mac, use the new namespace, and name itbrettw@chromium.org2010-10-178-58/+68
| | | | | | | | | | properly (scoped_cftyperef -> ScopedCFTypeRef). TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3855001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62887 0039d316-1c4b-4281-b951-d872f2087c98
* Address review comment I forgot in scoped_comptr checkin.brettw@chromium.org2010-10-161-3/+2
| | | | | | | | TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62865 0039d316-1c4b-4281-b951-d872f2087c98
* Move xdg_util into base/nix. I originally wanted to use base/linux, but youbrettw@chromium.org2010-10-166-32/+50
| | | | | | | | | | | | | | | | can't have a namespace called "linux" because it's ifdefed by GCC to be a number. Same for "unix". "x11" was discarded because some future stuff in here will not be related to x11. This also renames base_paths_posix to base_paths_linux since this does not apply to mac, and normally posix applies to mac (this confused me when I had to edit it for the XDG stuff). TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3778007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62848 0039d316-1c4b-4281-b951-d872f2087c98
* Move the windows-specific scoped_* stuff from base to base/win and in the ↵brettw@chromium.org2010-10-1621-766/+830
| | | | | | | | | | | | | | | | base::win namespace. This keeps old headers that forward to the new versions and have using declarations that allow the existing code to compile. I fixed all the callers in base to use the new ones, and also the other files I happened to touch. This splits out the stuff from scoped_handle into a few separate files. I just deleted ScopedFindFile since it was only used in one place and it wasn't even really helping there. I removed StackBstr which was a #define and used the "regular" ScopedBstr in the 7 places that used it. This is an optimization to avoid an extra allocation, but none of the callers are remotely performance critical. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3781009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62843 0039d316-1c4b-4281-b951-d872f2087c98
* Fix event tracing for windows test flakyness.siggi@chromium.org2010-10-167-47/+91
| | | | | | | | | | | | | | | Assert on non-null properties to the static members of the trace controller. Fix usage of same. Add a PostEventsDisabled method to trace producer to which allows for a non-racy enable/disable test. Fix a race in the trace event unittest by normalizing the state of the singleton ETW provider to dead, dead, and stone cold dead with an at exit manager. BUG=52388 BUG=59328 TEST=Unittests in the change. Review URL: http://codereview.chromium.org/3777007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62834 0039d316-1c4b-4281-b951-d872f2087c98
* Properly check CreateFileMapping's return value.tony@chromium.org2010-10-161-1/+1
| | | | | | | | | | According to MSDN, NULL is returned on error, not INVALID_FILE_HANDLE. BUG=58056 Review URL: http://codereview.chromium.org/3760008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62824 0039d316-1c4b-4281-b951-d872f2087c98
* seccomp: disable seccomp for RendererMainTestevan@chromium.org2010-10-151-2/+4
| | | | | | | | | | | | This test *could* work, but it requires refactoring as outlined in the bug. BUG=59376 TEST=test works with seccomp enabled at compile-time Review URL: http://codereview.chromium.org/3797010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62775 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 62766 - Fix event tracing for windows test flakyness.tim@chromium.org2010-10-156-40/+13
| | | | | | | | | | | | | | | | | Assert on non-null properties to the static members of the trace controller. Fix usage of same. Add a PostEventsDisabled method to trace producer to which allows for a non-racy enable/disable test. BUG=52388 BUG=59328 TEST=Unittests in the change. Review URL: http://codereview.chromium.org/3800006 TBR=siggi@chromium.org Review URL: http://codereview.chromium.org/3815008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62767 0039d316-1c4b-4281-b951-d872f2087c98
* Fix event tracing for windows test flakyness.siggi@chromium.org2010-10-156-13/+40
| | | | | | | | | | | | | | Assert on non-null properties to the static members of the trace controller. Fix usage of same. Add a PostEventsDisabled method to trace producer to which allows for a non-racy enable/disable test. BUG=52388 BUG=59328 TEST=Unittests in the change. Review URL: http://codereview.chromium.org/3800006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62766 0039d316-1c4b-4281-b951-d872f2087c98
* Remove call to std::min since this check is already done intony@chromium.org2010-10-151-6/+2
| | | | | | | | histograms.h. Review URL: http://codereview.chromium.org/3769006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62762 0039d316-1c4b-4281-b951-d872f2087c98
* Mark EtwTraceControllerTest.EnableDisable as flaky.phajdan.jr@chromium.org2010-10-151-1/+2
| | | | | | | | | | | TBR=siggi BUG=59328 TEST=base_unittests Review URL: http://codereview.chromium.org/3829003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62715 0039d316-1c4b-4281-b951-d872f2087c98
* Roll DEPS for rlz library r25:26.tfarina@chromium.org2010-10-151-7/+0
| | | | | | | | | | | | This should get the latest fix in rlz library that includes string_split.h and append base:: at the call of SplitString, so we can remove the hack in string_util.h BUG=None TEST=trybots Review URL: http://codereview.chromium.org/3828001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62696 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
* Move windows version-related stuff out of base/win_util and into ↵brettw@chromium.org2010-10-1513-315/+177
| | | | | | | | | | | | | | base/win/windows_version. Many files now only need to include this instead of all of win_util. Remove a bunch of unused code from base/win_util. There was a surprising amount. Replace the AppUserModel property key with the one from the SDK now that we use the Win7 SDK. Move GetLogonSessionOnlyDACL from win_util to ipc since it's only used in that one place. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3823002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62694 0039d316-1c4b-4281-b951-d872f2087c98
* Rename FileUtilProxy::Create to EnsureFileExistskinuko@chromium.org2010-10-154-33/+84
| | | | | | | | | | | | | | | | | | per follow-up discussion on http://codereview.chromium.org/3717001/show Rename FileUtilProxy::Create to EnsureFileExists to make it clear that it doesn't open the file (or doesn't leave a file handle opened). Also fixes CreatePlatformFile to set |created| correctly when PLATFORM_FILE_CREATE flag is given (I think this is the correct behavior). BUG=none TEST=FileSystemOperationTest.* Review URL: http://codereview.chromium.org/3743004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62683 0039d316-1c4b-4281-b951-d872f2087c98
* Move iat_patch from base to app/win. Remove the functions from the header sincebrettw@chromium.org2010-10-143-366/+0
| | | | | | | | | | | | they aren't used, and just make them local to the .cc file. Rename the .cc file to iat_patch_function to match the class definition. Put it in the app::win namespace to match the directories. Update callers. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3743006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62678 0039d316-1c4b-4281-b951-d872f2087c98
* Un-recursify FileEnumerator::Next().dumi@chromium.org2010-10-143-59/+56
| | | | | | | | | | BUG=58368 TEST=file_util_unittest.cc passes Review URL: http://codereview.chromium.org/3751001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62677 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: More ctor/dtor cleanup.erg@google.com2010-10-144-1/+11
| | | | | | | | | | | (3.5 megs off debug linux .a files) BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3806005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62654 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
* Moving GUID generation from base to chrome/browser/guid*dhollowa@chromium.org2010-10-144-89/+0
| | | | | | | | | | | Moves GUID generation into chrome/browser/guid*. GUID generation is used only within chrome/browser. So am moving it there. BUG=58813 TEST=GUIDTest.GUIDGeneratesAllZeroes, GUIDTest.GUIDGeneratesCorrectly, GUIDTest.GUIDCorrectlyFormatted, MetricsServiceTest.ClientIdCorrectlyFormatted Review URL: http://codereview.chromium.org/3800003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62639 0039d316-1c4b-4281-b951-d872f2087c98
* CommandLine: remove wstring-based program() accessorevan@chromium.org2010-10-143-8/+1
| | | | | | | | | | | | | | This was already removed on non-Windows, so this change modifies the remaining Windows-specific usage. In a few places I converted use of wstring paths into FilePath, but in general for Windows-specific code I don't think it's too important to use FilePath everywhere, because it is equivalent on Windows and the current code already works. BUG=23581 Review URL: http://codereview.chromium.org/3817001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62637 0039d316-1c4b-4281-b951-d872f2087c98
* base: remove various unused string utility functionsevan@chromium.org2010-10-146-39/+11
| | | | | | | | TEST=trybots Review URL: http://codereview.chromium.org/3753003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62580 0039d316-1c4b-4281-b951-d872f2087c98
* Copied Evan's http://codereview.chromium.org/3691007 (base_unittests: moveglider@chromium.org2010-10-141-8/+8
| | | | | | | | | local functions into an anonymous namespace) and made the necessary changes to sanity suppressions. Review URL: http://codereview.chromium.org/3765002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62521 0039d316-1c4b-4281-b951-d872f2087c98
* Move Stats, histograms, and field trial into a metrics subdirectory of base andbrettw@chromium.org2010-10-1420-206/+249
| | | | | | | | | 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
* base: Move SplitString functions into the base namespace and update the callers.tfarina@chromium.org2010-10-146-13/+10
| | | | | | | | | BUG=None TEST=trybots Review URL: http://codereview.chromium.org/3750001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62483 0039d316-1c4b-4281-b951-d872f2087c98
* Factoring GUID generation from metrics to basedhollowa@chromium.org2010-10-134-0/+89
| | | | | | | | | | | Factors GUID generation into base/rand_util. The Autofill feature is in need of this utility so am factoring GUID generation out of metrics and moving to the commons. BUG=58813 TEST=RandUtilTest.GUIDGeneratesAllZeroes, RandUtilTest.GUIDGeneratesCorrectly, RandUtilTest.GUIDCorrectlyFormatted, MetricsServiceTest.ClientIdCorrectlyFormatted Review URL: http://codereview.chromium.org/3800001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62480 0039d316-1c4b-4281-b951-d872f2087c98
* file_util: don't compile any of the deprecated functions on non-Windowsevan@chromium.org2010-10-131-7/+2
| | | | | | | | We've removed usage of these functions on non-Windows platforms. Review URL: http://codereview.chromium.org/3762002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62470 0039d316-1c4b-4281-b951-d872f2087c98
* process_util: remove a function we don't use anywayevan@chromium.org2010-10-132-6/+0
| | | | | | Review URL: http://codereview.chromium.org/3806001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62452 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Fix more ctor/dtors found by clang plugin.erg@google.com2010-10-134-0/+11
| | | | | | | | | | | (1.2 megs off of Debug Linux .a files) BUG=none TEST=compiles everywhere Review URL: http://codereview.chromium.org/3743001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62420 0039d316-1c4b-4281-b951-d872f2087c98
* Add extra unit test to avoid off-by-one errorsjar@chromium.org2010-10-121-0/+24
| | | | | | | | | | | I was worried about this problem, and realized I didn't have a unit test to ensure the correctness in this case. This just adds a unit test. r=rvargas Review URL: http://codereview.chromium.org/3535009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62354 0039d316-1c4b-4281-b951-d872f2087c98
* Used process_util methods to wait for the service process to die in the ↵sanjeevr@chromium.org2010-10-123-1/+63
| | | | | | | | | | | ServiceProcessControlBrowserTest. BUG=None TEST=browser_tests. Review URL: http://codereview.chromium.org/3653005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62339 0039d316-1c4b-4281-b951-d872f2087c98
* Removing sync from file_util::Delete for ChromeOS.gspencer@chromium.org2010-10-121-3/+0
| | | | | | | | | | | | | | | | | | | | | | This was added to address a problem with SD cards not always deleting files that were deleted from the ChromeOS file browser. Since it doesn't always fix the problem anyhow, and since the file browser isn't in beta, I'm removing the extra sync call, because it increases the time it takes to run recursive delete by about three orders of magnitude, and was slowing down some tests. I've filed bug http://code.google.com/p/chromium-os/issues/detail?id=7196 so we can address this at a later time. [This has already been reviewed and LGTM'd here: http://codereview.chromium.org/3697005/show] BUG=none TEST=ran base unittests Review URL: http://codereview.chromium.org/3706005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62245 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 62205 - Make writing to stdout and stderr work in Chrome processes ↵isherman@chromium.org2010-10-121-3/+1
| | | | | | | | | | | | | | | | | | | | | when inherited handles are available. Don't create a console, just attach to any existing console. R=cpu BUG=none TEST=none Review URL: http://codereview.chromium.org/3574008 Reverting because it breaks browser_tests logging TBR=darin@chromium.org Review URL: http://codereview.chromium.org/3691005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62236 0039d316-1c4b-4281-b951-d872f2087c98
* Return NOT_FOUND error for an attempt to create a file under nonexistent ↵kinuko@chromium.org2010-10-121-0/+5
| | | | | | | | | | | directory. BUG=none TEST=fast/filesystem/op-get-entry.html Review URL: http://codereview.chromium.org/3729001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62229 0039d316-1c4b-4281-b951-d872f2087c98
* Make writing to stdout and stderr work in Chrome processes when inheriteddarin@chromium.org2010-10-111-1/+3
| | | | | | | | | | | | | | handles are available. Don't create a console, just attach to any existing console. R=cpu BUG=none TEST=none Review URL: http://codereview.chromium.org/3574008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62205 0039d316-1c4b-4281-b951-d872f2087c98
* Make sure we close the file_handle when we create (but not open) a new filekinuko@chromium.org2010-10-112-1/+29
| | | | | | | | | | | | 1. Add FileUtilProxy::Create that does not leave a file_handle opened. 2. Update the file_util_operation to use FileUtilProxy::Create instead of FileUtilProxy::CreateOrOpen so that no other tasks get queued in before we close the handle. BUG=58424,58473 TEST=fast/filesystem/ Review URL: http://codereview.chromium.org/3717001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62192 0039d316-1c4b-4281-b951-d872f2087c98
* base: comment fixes onlyagl@chromium.org2010-10-112-5/+6
| | | | | | | TEST=none BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62144 0039d316-1c4b-4281-b951-d872f2087c98
* Fix forgotten wmi line in base.gypibrettw@chromium.org2010-10-101-3/+0
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62124 0039d316-1c4b-4281-b951-d872f2087c98
* Move wmi_util out of base and into chrome/installer/util since that's the ↵brettw@chromium.org2010-10-104-277/+0
| | | | | | | | | | only place where it's used. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3696001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62123 0039d316-1c4b-4281-b951-d872f2087c98
* Fix for the shared library build issue. This reverts my previous two tries ↵brettw@chromium.org2010-10-101-0/+1
| | | | | | | | | which werer incorrect. perftimer just needed to be added to test_support_base. TEST=it compiles BUG=none git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62099 0039d316-1c4b-4281-b951-d872f2087c98
* Move PerfTestSuite implementation into a .cc file and add it to the basebrettw@chromium.org2010-10-104-37/+56
| | | | | | | | | | namespace. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3695001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62095 0039d316-1c4b-4281-b951-d872f2087c98
* Invoke OnEventsDisabled before clearing the provider state to allow the ↵ericdingle@chromium.org2010-10-081-3/+3
| | | | | | | | | | | provider subclass to do last chance logging to the session. BUG=none TEST=none Review URL: http://codereview.chromium.org/3549030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62014 0039d316-1c4b-4281-b951-d872f2087c98
* [Mac] Return better error messages when AmIBundled() fails. We're seeing ↵rohitrao@chromium.org2010-10-081-5/+7
| | | | | | | | | | this error on the bots, so better messages may help us track down the problem. BUG=None TEST=None Review URL: http://codereview.chromium.org/3625003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62005 0039d316-1c4b-4281-b951-d872f2087c98