summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Add an OVERRIDE macro to our list of compiler-specific annotations.evan@chromium.org2010-10-081-11/+31
| | | | | | | | While I'm at it, add docs and examples to the other annotations. Review URL: http://codereview.chromium.org/3581016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61964 0039d316-1c4b-4281-b951-d872f2087c98
* CommandLine: deprecate another function on non-Windowsevan@chromium.org2010-10-083-8/+9
| | | | | | | | | BUG=23581 TEST=CommandLine unit tests Review URL: http://codereview.chromium.org/3549023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61889 0039d316-1c4b-4281-b951-d872f2087c98
* CommandLine: remove deprecated wstring APIevan@chromium.org2010-10-072-20/+10
| | | | | | | | | | | | (o3d still uses an older version of base; if they update past this change they will need to apply the change I reverted in r55433.) BUG=23581 TEST=compiles, existing tests still pass Review URL: http://codereview.chromium.org/3552011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61839 0039d316-1c4b-4281-b951-d872f2087c98
* Make ~GoogleURLChangeNotifier happen on the I/O thread.levin@chromium.org2010-10-077-5/+109
| | | | | | | | | | | | | | | | | | Also change the test code to allow for its destruction. One key problem was that the object containing WeakPtr is created on the UI thread but then always used on the I/O thread like everything else that hangs off of ResourceMessageFilter. The solution was to allow WeakPtr to detach from its thread (and automatically re-attach the next time the thread is checked). BUG=38475 TEST=base_unittest --gtest_filter=NonThread*:ThreadChecker* unit_tests --gtest_filter=SearchProviderInstallData* Review URL: http://codereview.chromium.org/3627001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61836 0039d316-1c4b-4281-b951-d872f2087c98
* Add histograms to see if we can find out why we're failingtony@chromium.org2010-10-072-1/+36
| | | | | | | | | | to load resources.pak on Windows. BUG=58056 Review URL: http://codereview.chromium.org/3616007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61818 0039d316-1c4b-4281-b951-d872f2087c98
* #include <ostream> in base/string16.cc. This is required for the Mac OS X 10.6mark@chromium.org2010-10-071-0/+2
| | | | | | | | | | | SDK build. Otherwise, various bits of <ostream> that would be needed are declared but not defined. BUG=none TEST=none Review URL: http://codereview.chromium.org/3631001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61813 0039d316-1c4b-4281-b951-d872f2087c98
* Reapply 61613 that was reverted for false valgrind alarm.kinuko@chromium.org2010-10-073-59/+75
| | | | | | | | | | | | | Original issue: http://codereview.chromium.org/3567012/show BUG=none TEST=FileSystemOperationTest.* TBR=ericu,thestig Review URL: http://codereview.chromium.org/3603014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61771 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 61613 - possible culprit for valgrind error. (Support ↵kinuko@chromium.org2010-10-063-75/+59
| | | | | | | | | | | removeRecursively and new copy/move) BUG=none TEST=none Review URL: http://codereview.chromium.org/3576017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61713 0039d316-1c4b-4281-b951-d872f2087c98
* fixes issue 52839 (MatchPattern timeout)andybons@chromium.org2010-10-063-0/+11
| | | | | | | | | | | | | Fixes issue 52839 by converting consecutive wildcards (******) into one wildcard (*) in MatchPattern. BUG=52839 TEST=MatchPattern Original patch from issue 3608005 (Jon Stritar) Review URL: http://codereview.chromium.org/3551016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61644 0039d316-1c4b-4281-b951-d872f2087c98
* Second try for support removeRecursively and new copy/move behaviors added ↵kinuko@chromium.org2010-10-063-59/+75
| | | | | | | | | | | | | | | | | | | | | | to the spec recently. http://lists.w3.org/Archives/Public/public-webapps/2010JulSep/1101.html > For a move/copy of a file on top of existing file, or a directory on > top of an existing empty directory, you get an automatic overwrite. > A move/copy of a file on top of an existing directory, or of a > directory on top of an existing file, will always fail. > A move/copy of a file or directory on top of an existing non-empty > directory will always fail. original issue: http://codereview.chromium.org/3567012 BUG=none TEST=FileSystemOperationTest.* TBR=ericu Review URL: http://codereview.chromium.org/3531012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61613 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Continue fixing nits found by my automated source scanner.erg@google.com2010-10-052-1/+3
| | | | | | | | | | | (~1.3 megs off Debug linux .a files) BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3556013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61587 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up orphaned testserver processes before launching a new one in ↵rsimha@chromium.org2010-10-053-10/+56
| | | | | | | | | | | | | | | net::TestServer Several chrome tests have failed in recent days because some test cases crashed due to failures, leaving behind orphaned testserver processes. These test suites do not use out_of_proc_test_runner, and therefore, do not get the benefit of using the LaunchAppInNewProcessGroup()/KillProcessGroup() mechanism. This patch implements an added layer of safety, by causing TestServer::LaunchPython() to first kill any remaining orphaned instances of testserver.py before launching a new one. The check for an orphaned testserver process on POSIX is a process with exe_name "python", a parent_pid of "1" (indicating that it's an orphan), and command line parameters that contain the strings "testserver.py" and "<port>" where <port> is the port that is being used by the test server instance. BUG=55808,57253 TEST=Run a test that spawns a testserver and dies. Run another test. It shouldn't fail. Review URL: http://codereview.chromium.org/3537002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61584 0039d316-1c4b-4281-b951-d872f2087c98
* Move TestTimeouts from chrome/test to base/test.sergeyu@chromium.org2010-10-056-0/+201
| | | | | | | | | BUG=None TEST=unittests Review URL: http://codereview.chromium.org/3544008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61540 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 61480 - Support removeRecursively and new copy/move behaviors added ↵kinuko@chromium.org2010-10-053-75/+59
| | | | | | | | | | | | | | | | | | | | | to the spec recently. http://lists.w3.org/Archives/Public/public-webapps/2010JulSep/1101.html > For a move/copy of a file on top of existing file, or a directory on > top of an existing empty directory, you get an automatic overwrite. > A move/copy of a file on top of an existing directory, or of a > directory on top of an existing file, will always fail. > A move/copy of a file or directory on top of an existing non-empty > directory will always fail. BUG=32277 TEST=FileSystemOperationTest.* Review URL: http://codereview.chromium.org/3567012 TBR=kinuko@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61482 0039d316-1c4b-4281-b951-d872f2087c98
* Marks Test{Move,Copy}FailureContainsPath FAILS on Windows, also makes a fix ↵kinuko@chromium.org2010-10-051-1/+1
| | | | | | | | | | | | | | attempt for the failure. This patch also contains an attempt to fix the failure. TBR=ericu BUG=none TEST=green bot Review URL: http://codereview.chromium.org/3516014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61481 0039d316-1c4b-4281-b951-d872f2087c98
* Support removeRecursively and new copy/move behaviors added to the spec ↵kinuko@chromium.org2010-10-053-59/+75
| | | | | | | | | | | | | | | | | | | recently. http://lists.w3.org/Archives/Public/public-webapps/2010JulSep/1101.html > For a move/copy of a file on top of existing file, or a directory on > top of an existing empty directory, you get an automatic overwrite. > A move/copy of a file on top of an existing directory, or of a > directory on top of an existing file, will always fail. > A move/copy of a file or directory on top of an existing non-empty > directory will always fail. BUG=32277 TEST=FileSystemOperationTest.* Review URL: http://codereview.chromium.org/3567012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61480 0039d316-1c4b-4281-b951-d872f2087c98
* Second try at submitting 61462.ericu@google.com2010-10-052-9/+61
| | | | | | | | | BUG=none TEST=in file_system_operation_unittest.cc Review URL: http://codereview.chromium.org/3526018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61468 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 61462 - Add truncate and cancel for FileWriter; write and more tests ↵ericu@google.com2010-10-052-61/+9
| | | | | | | | | | | | | | | will come in later CLs. This CL also contains a fair amount of plumbing for the write call itself. BUG=none TEST=none Review URL: http://codereview.chromium.org/3599011 TBR=ericu@google.com Review URL: http://codereview.chromium.org/3604006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61463 0039d316-1c4b-4281-b951-d872f2087c98
* Add truncate and cancel for FileWriter; write and more tests will come in ↵ericu@google.com2010-10-052-9/+61
| | | | | | | | | | | | later CLs. This CL also contains a fair amount of plumbing for the write call itself. BUG=none TEST=none Review URL: http://codereview.chromium.org/3599011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61462 0039d316-1c4b-4281-b951-d872f2087c98
* Reapply r61237: FBTF: Another big ctor/dtor cleanup found by automated tools.erg@google.com2010-10-044-2/+9
| | | | | | | | | | | | | | | Removes changes to code in webkit/ that broke chrome_frame. Will debug that portion later. (Shaves ~2MB off Linux Debug .a files) BUG=none TEST=compiles First Review URL: http://codereview.chromium.org/3563004 Review URL: http://codereview.chromium.org/3621003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61435 0039d316-1c4b-4281-b951-d872f2087c98
* Add DCHECK for misused string resources.estade@chromium.org2010-10-041-5/+6
| | | | | | | | | | | When replacing a placeholder in a localized string, make sure the correct number of placeholders were found (i.e. the same number of strings that the calling code passed). BUG=none TEST=running/testing the browser in debug doesn't cause errors Review URL: http://codereview.chromium.org/3396025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61420 0039d316-1c4b-4281-b951-d872f2087c98
* clang/mac: Fix almost all problems when building all.xcodeproj.thakis@chromium.org2010-10-044-50/+6
| | | | | | | | BUG=None TEST=None TBR=hans git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61344 0039d316-1c4b-4281-b951-d872f2087c98
* clang/mac: Fix most problems in unittest targets in webkit.gypthakis@chromium.org2010-10-032-3/+3
| | | | | | | | | | | | This does to WebPoint/gfx::Point what we did to WebString/string16 last friday and fixes a bunch of other small issues. Also fix two tiny issues in the base unit tests target. BUG=None TEST=None TBR=hans git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61343 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor the code for loading icons into the PageInfoModel.rsesek@chromium.org2010-10-023-0/+25
| | | | | | | | | | | | This code is basically duplicated twice on each platform. This consolidates all that into PageInfoModel::GetIconImage() and renames the SectionInfo.state to icon_id. BUG=none TEST=Page info windows and bubbles work as they did before across all platforms. Review URL: http://codereview.chromium.org/3560004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61308 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 61269 (broke lots of browser and ui tests, like on your try run) - ↵thakis@chromium.org2010-10-022-12/+0
| | | | | | | | | | | | | | | | [GTK] delay reference count check in OwnedWidgetGtk It's a common problem that a GtkWidget will be referenced by an event that's currently on the callstack. These ref holders ignore the "destroy" signal, so when we go to destroy the owned widget, the refcount == 1 DCHECK fails. This change delays that DCHECK until the current stack has unwound, so we don't have to keep running into this. BUG=none TEST=in debug builds, Escape in a constrained window doesn't DCHECK, dragging a tab doesn't cause a DCHECK, pressing the custom frame [x] in lucid doesn't DCHECK; in general, no additional DCHECKs Review URL: http://codereview.chromium.org/3416032 TBR=estade@chromium.org Review URL: http://codereview.chromium.org/3564007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61283 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 61272 - Fix windows build (missing include).thakis@chromium.org2010-10-022-1/+1
| | | | | | | | | | | | | TBR=thakis BUG=none TEST=compile Review URL: http://codereview.chromium.org/3533011 TBR=estade@chromium.org Review URL: http://codereview.chromium.org/3552006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61282 0039d316-1c4b-4281-b951-d872f2087c98