summaryrefslogtreecommitdiffstats
path: root/base
Commit message (Collapse)AuthorAgeFilesLines
* Move operator<< for StringPiece into string_piece.{h,cc}akalin@chromium.org2012-01-204-25/+15
| | | | | | | | | BUG=110651 TEST= Review URL: https://chromiumcodereview.appspot.com/9159005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118416 0039d316-1c4b-4281-b951-d872f2087c98
* remove ; which breaks nacl_integration since they use -pedanticajwong@chromium.org2012-01-202-4/+4
| | | | | | | | | | BUG=none TEST=nacl_integration goes green TBR=darin Review URL: https://chromiumcodereview.appspot.com/9195035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118391 0039d316-1c4b-4281-b951-d872f2087c98
* Transfer the C++03 move-only type emulation into base/move.h and also make ↵ajwong@chromium.org2012-01-205-51/+293
| | | | | | | | | | | | | | | | | ScopedVector move-only. Also: * Add a lot of documentation explaining what this macro does. * Change the implementation of RValue so it cannot be instantiated. The change to always use RValue& makes for more efficent code in debug builds. Looking at the disassembly for a simple use case (calling a function with one parameter), it removes the creation of one temporary. BUG=96118 TEST=new unittests. exist code still compiles. Review URL: https://chromiumcodereview.appspot.com/9207021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118388 0039d316-1c4b-4281-b951-d872f2087c98
* Transition to base/mac/bundle_locations.h step 2jeremy@chromium.org2012-01-193-15/+2
| | | | | | | | | | | Remove MainAppBundle() in favor of FrameworkBundle() and update all callsites + code comments. BUG=None TEST=Code should compile and all unit tests should pass. Review URL: https://chromiumcodereview.appspot.com/9220005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118293 0039d316-1c4b-4281-b951-d872f2087c98
* Transition to base/mac/bundle_locations.h step 1jeremy@chromium.org2012-01-193-41/+15
| | | | | | | | | | | | | | | | | Initial transition steps, trying to do this in small steps so it's easier to review. foundation_util.h: * Remove SetOverride*() methods and modify all callsites to use bundle_location.h version. * MainAppBundle() - call through to bundle_location version as an interim step. * Rename PathForFrameworkBundleResource() and modify callers. * Remove one instance of [NSBundle mainBundle]. BUG=None TEST=Chrome/Mac should launch correctly and all unit tests should pass. Review URL: http://codereview.chromium.org/9187053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118284 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up the SequencedWorkerPool to the browser thread.brettw@chromium.org2012-01-192-15/+80
| | | | | | | | | | | [re-land of 116816 http://codereview.chromium.org/9065009] This does some refactoring of the static data in the browser thread so we only have one global object instead of a bunch fo separate arrays. It also hooks up the visited link master's I/O to use this new system as a proof of concept. Review URL: https://chromiumcodereview.appspot.com/9124033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118236 0039d316-1c4b-4281-b951-d872f2087c98
* Change sandbox policy so we can create sync socketscpu@chromium.org2012-01-191-17/+20
| | | | | | | | | | | - Security-wise no change, we could do this already for a different prefix (chrome.nacl) - Improve the sync socket as not to have silly infinite loop. BUG=103975,103985 TEST=see bug Review URL: https://chromiumcodereview.appspot.com/9252003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118234 0039d316-1c4b-4281-b951-d872f2087c98
* Watchdog - Added a JOINABLE state to avoid StartupTimebombrtenneti@chromium.org2012-01-192-13/+37
| | | | | | | | | | | | | | | | | | | | | blocking UI thread during Watchdog thread join. StartupTimebomb deletes the startup_watchdog thread only if it is joinable. This fixes the case when UI thread is blocked until watchdog thread finishes generating the dump. StartupTimebomb keeps calling IsJoinable on startup_watchdog thread every 10 secs until it is joinable until it is deleted. The delete method calls Cleanup to set the state to SHUTDOWN for backward compatability. BUG=110055 R=jar TEST=base unit tests and browser ui and unit tests. Review URL: http://codereview.chromium.org/9173002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118209 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 118118 - Temporarily revert 117127 for perf analysis.rsesek@chromium.org2012-01-183-22/+24
| | | | | | | | | | | BUG=110555 TBR=rsesek@chromium.org Review URL: https://chromiumcodereview.appspot.com/9252014 TBR=rsesek@chromium.org Review URL: https://chromiumcodereview.appspot.com/9250014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118152 0039d316-1c4b-4281-b951-d872f2087c98
* Temporarily revert 117127 for perf analysis.rsesek@chromium.org2012-01-183-24/+22
| | | | | | | | BUG=110555 TBR=rsesek@chromium.org Review URL: https://chromiumcodereview.appspot.com/9252014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118118 0039d316-1c4b-4281-b951-d872f2087c98
* Match whole path components in DevicePathToDriveLetterPath(). Add tests.skerner@chromium.org2012-01-173-49/+128
| | | | | | | | | | | | | +rvargas, who understands the code +brettw, who is in OWNERS BUG=109577 TEST=FileUtilTest.DevicePathToDriveLetter Review URL: http://codereview.chromium.org/9167004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117986 0039d316-1c4b-4281-b951-d872f2087c98
* Add back in stack_trace_android.cc on Android.jrg@google.com2012-01-171-1/+0
| | | | | | | | | | | | Needed to make net_unittests link. Does not reference JNI so it was improperly excluded. BUG=None TEST= Review URL: https://chromiumcodereview.appspot.com/9242023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117959 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 117824 - Convert use of int ms to TimeDelta in files owned by brettw.hbono@chromium.org2012-01-162-5/+5
| | | | | | | | | | | | | | | | | | | | This change broke Linux and Mac bots. I would recommend to ask committers to run your next change on trybots. (*1) http://chromegw.corp.google.com/i/chromium/builders/Mac/builds/10788/steps/compile/logs/stdio (*2) http://chromegw.corp.google.com/i/chromium/builders/Linux/builds/19313/steps/compile/logs/stdio (*3) http://chromegw.corp.google.com/i/chromium/builders/Linux%20x64/builds/21385/steps/compile/logs/stdio R=brettw@chromium.org BUG=108171 TEST= Review URL: http://codereview.chromium.org/9185026 TBR=tedvessenes@gmail.com Review URL: http://codereview.chromium.org/9215005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117825 0039d316-1c4b-4281-b951-d872f2087c98
* Convert use of int ms to TimeDelta in files owned by brettw.tedvessenes@gmail.com2012-01-162-5/+5
| | | | | | | | | | | R=brettw@chromium.org BUG=108171 TEST= Review URL: http://codereview.chromium.org/9185026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117824 0039d316-1c4b-4281-b951-d872f2087c98
* Use ScopedVector instead of std::vector in case of repeated messages.mukai@chromium.org2012-01-142-48/+51
| | | | | | | | | | | | | | | During using this library, I realized that we want to use DISALLOW_COPY_AND_ASSIGN for the messages and RepeatedMessageConverter is inconsistent with such ones because it uses a copy constructor as "push_back(NestedType())". Then I now think to use ScopedVector. BUG=109375 TEST=passed locally Review URL: http://codereview.chromium.org/9187047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117786 0039d316-1c4b-4281-b951-d872f2087c98
* Allow tracing in third_party librariesjbates@chromium.org2012-01-137-572/+819
| | | | | | | | | | | | | | | | This is step 1 -- refactor the code to allow us to split up trace_event.h into trace_event.h and trace_event_export.h/cc. Step 2 is to cut out trace_event_export.h/cc. The _export.h/cc will be laid out so they can be copied to other third_party libraries and then tweaked to call through to chromium's internal tracing API via platform APIs or function pointers. To make these APIs easily exportable, this change primarily aims to eliminate the custom objects (ie: TraceValue) and types that will cause problems when defined in multiple libraries. The macros and internal namespace are destined for trace_event_export.h/cc in a future CL. BUG=109779 Review URL: http://codereview.chromium.org/9155024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117598 0039d316-1c4b-4281-b951-d872f2087c98
* Add custom field converter to JSONValueConverter.mukai@chromium.org2012-01-132-0/+85
| | | | | | | | | | | | | | | | In the real JSON results, sometimes string value does not literally mean a string, but labels (enum), URLs, or timestamps. Custom field accepts those string values and converting functions for such fields. See http://codereview.chromium.org/9147060 for the real use cases. BUG=109375 TEST=passed Review URL: http://codereview.chromium.org/9184002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117580 0039d316-1c4b-4281-b951-d872f2087c98
* Remove usage of using namespace, and cleanup trace_analyzer namespacejbates@chromium.org2012-01-123-169/+201
| | | | | | Review URL: http://codereview.chromium.org/9187015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117517 0039d316-1c4b-4281-b951-d872f2087c98
* [Coverity] Fixed call by value to by referencegroby@chromium.org2012-01-121-2/+2
| | | | | | | | | | | | CID=102901 BUG=none TEST=none Review URL: http://codereview.chromium.org/9148018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117360 0039d316-1c4b-4281-b951-d872f2087c98
* Allow construction and assignment of one scoped_ptr from another if the ↵ajwong@chromium.org2012-01-112-6/+95
| | | | | | | | | | | | | | | | | | | | | | types are convertible. This allows for depth subtyping during a move operation on a scoped_ptr. With the additional constructor and operator=, we maintain move semantics but allow a scoped_ptr<A> to be constructed from a scoped_ptr<B> if B can be converted to A. =DEFICIENCY= This conversion sequence will _not_ implicitly work when calling an API. Specifically, if you have void Func(scoped_ptr<Parent> p); scoped_ptr<Child> c; Func(c.Pass()); // COMPILE ERROR This is a limitation of C++03 move emulation. The workaround is Func(scoped_ptr<Parent>(c.Pass()); BUG=109026 TEST=new unittests Review URL: http://codereview.chromium.org/8968032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117317 0039d316-1c4b-4281-b951-d872f2087c98
* Functions to return locations of various Chrome bundles.jeremy@chromium.org2012-01-113-0/+151
| | | | | | | | | | TEST=None, code is currently not called. BUG=None Review URL: http://codereview.chromium.org/9147031 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117293 0039d316-1c4b-4281-b951-d872f2087c98
* mach_port_deallocate() the result of mach_thread_self(), which obtains a ↵rsesek@chromium.org2012-01-113-22/+24
| | | | | | | | | | | port send right. BUG=105513 TEST=none Review URL: http://codereview.chromium.org/9169016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117127 0039d316-1c4b-4281-b951-d872f2087c98
* Resolve an ambiguous function call error in string_piece_unittest.ccpeter@chromium.org2012-01-101-3/+3
| | | | | | | | | BUG= TEST= Review URL: http://codereview.chromium.org/9167008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117050 0039d316-1c4b-4281-b951-d872f2087c98
* Add comment to NumberFormatWrapper.avi@chromium.org2012-01-101-1/+3
| | | | | | | | | | | As noted in readability review. BUG=none TEST=none Review URL: http://codereview.chromium.org/9117001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117049 0039d316-1c4b-4281-b951-d872f2087c98
* Fix POSIX and Mac Time::Explode().viettrungluu@chromium.org2012-01-103-14/+171
| | | | | | | | | | Also add a test for the case that failed. BUG=109437,109465 Review URL: http://codereview.chromium.org/9124016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116969 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 116816 - Hook up the SequencedWorkerPool to the browser thread.msw@chromium.org2012-01-072-53/+15
| | | | | | | | | | | | This does some refactoring of the static data in the browser thread so we only have one global object instead of a bunch fo separate arrays. It also hooks up the visited link master's I/O to use this new system as a proof of concept. Review URL: http://codereview.chromium.org/9065009 TBR=brettw@chromium.org Review URL: http://codereview.chromium.org/9122022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116817 0039d316-1c4b-4281-b951-d872f2087c98
* Hook up the SequencedWorkerPool to the browser thread.brettw@chromium.org2012-01-072-15/+53
| | | | | | | | | This does some refactoring of the static data in the browser thread so we only have one global object instead of a bunch fo separate arrays. It also hooks up the visited link master's I/O to use this new system as a proof of concept. Review URL: http://codereview.chromium.org/9065009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116816 0039d316-1c4b-4281-b951-d872f2087c98
* Remove task.h and finish base::Bind() migration.ajwong@chromium.org2012-01-0617-100/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Over 341 CLs, in ~3 months, touching 3251 unique files! Top 5 most CLs: (121) jhawkins ( 45) dcheng ( 24) achuith ( 23) csilv ( 12) tfarina ( 12) groby ~1000 files touched: (918) jhawkins 100+ files touched: (486) ajwong (385) willchan (372) dcheng (126) csilv (123) fischman (112) sergeyu 49+ files touched: (65) tfarina (57) acolwell (52) adamk (49) tzik BUG=35223 TEST=existing Review URL: http://codereview.chromium.org/9114020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116748 0039d316-1c4b-4281-b951-d872f2087c98
* Change over IgnoreReturn to IgnoreResult. remove IgnoreReturn.ajwong@chromium.org2012-01-061-12/+0
| | | | | | | | | BUG=98919 TEST=existing Review URL: http://codereview.chromium.org/9111032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116631 0039d316-1c4b-4281-b951-d872f2087c98
* Prevent calling internal metrics code with invalid values.rkc@chromium.org2012-01-062-4/+19
| | | | | | | | | | | | | | | Currently we can call the internal metrics code in Chrome from the metrics extension with completely arbitrary values; some of which can cause the creation of invalid histograms which in turn can Chrome to crash. This CL sanitizes the inputs to the extension so that the histogram constructed is valid. Currently this is causing one crash due to code from http://codereview.chromium.org/8819013 This CL fixes the issue with the extension and fixes the crash. The issues with the JS code still needs to be fixed in another CL. R=jar@chromium.org BUG=chromium:24115 TEST=Tried the repro case for the crash several times to confirm that it isn't happening anymore. Review URL: http://codereview.chromium.org/9113002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116627 0039d316-1c4b-4281-b951-d872f2087c98
* Fix scoped_refptr assignment operator in the case of having it as a member.mnaganov@chromium.org2012-01-052-4/+33
| | | | | | | | | | | | If a class holds a reference to itself in scoped_refptr, assigning to it a new value leads to calling Release while in destructor. R=levin@chromium.org TEST=RefCountedUnitTest.ScopedRefPtrToSelf Review URL: http://codereview.chromium.org/9021020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116480 0039d316-1c4b-4281-b951-d872f2087c98
* Returns a bool for JSONValueConverter::Convert()mukai@chromium.org2012-01-052-29/+117
| | | | | | | | | | | | | | | | | As I see a real use scenario in chrome/browser/chromeos/gdata/ gdata_parser.cc, I realized that sometimes structural validity matters. It also introduce string16 whose code is almost equivalent to std::string. BUG=none TEST=passed Review URL: http://codereview.chromium.org/8952029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116473 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Remove Task.jhawkins@chromium.org2012-01-0514-445/+69
| | | | | | | | | | BUG=none TEST=none R=awong Review URL: http://codereview.chromium.org/9086002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116439 0039d316-1c4b-4281-b951-d872f2087c98
* Re-remove ReleasePointer.dcheng@chromium.org2012-01-041-5/+0
| | | | | | | | | | | This was accidentally reintroduced in r116250. BUG=none TEST=none Review URL: http://codereview.chromium.org/9008061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116367 0039d316-1c4b-4281-b951-d872f2087c98
* Fix prctl ERROR messages on Linux debug builds.rbyers@chromium.org2012-01-041-4/+5
| | | | | | | | | | | | In sandboxed processes, prctl(PR_SET_NAME) will fail with EPERM. Don't generate DLOGs for that case - just silently ignore failures like release builds do. This is just a debugging tool, working just in the browser process is good enough for now. BUG=109124 TEST= Review URL: http://codereview.chromium.org/9030023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116351 0039d316-1c4b-4281-b951-d872f2087c98
* Enable ThreadChecker in non-debug builds if DCHECK_ALWAYS_ON isjoi@chromium.org2012-01-043-15/+35
| | | | | | | | | | | | | defined. This brings thread checking to e.g. the *_rel trybots. BUG=108227 Review URL: http://codereview.chromium.org/9020008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116350 0039d316-1c4b-4281-b951-d872f2087c98
* Update Sleep() calls in base/test to use TimeDelta instead of int.tedvessenes@gmail.com2012-01-042-8/+10
| | | | | | | | | | | R=phajdan.jr@chromium.org BUG=108171 TEST= Review URL: http://codereview.chromium.org/9057001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116320 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Remove CancelableTask and ScopedTaskRunner.jhawkins@chromium.org2012-01-043-105/+2
| | | | | | | | | | BUG=none TEST=none R=groby Review URL: http://codereview.chromium.org/9071023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116269 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Try to minimize copying of string information when reading /proc data.erg@chromium.org2012-01-041-12/+12
| | | | | | | | | | BUG=108760 TEST=none Review URL: http://codereview.chromium.org/9071020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116254 0039d316-1c4b-4281-b951-d872f2087c98
* And now NewRunnableMethod(), you die.ajwong@chromium.org2012-01-046-320/+8
| | | | | | | | | | | Kill off NewRunnableMethod() and remove silly declarations of unused ScopedRunnableMethodFactory(s). BUG=none TEST=existing. Review URL: http://codereview.chromium.org/9034032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116250 0039d316-1c4b-4281-b951-d872f2087c98
* chromeos: Implement power button animations for Aura.derat@chromium.org2012-01-041-2/+3
| | | | | | | | | | | | | | | This adds animated transitions first to the lock screen and then to shutdown similar to those currently implemented in the Chrome OS power manager and X window manager. I'll add support for the lock key in a later change. BUG=98328 TEST=added tests; also did a lot of manual testing TBR=evan@chromium.org Review URL: http://codereview.chromium.org/8976012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116245 0039d316-1c4b-4281-b951-d872f2087c98
* [Coverity] Fixed uninitialized membergroby@chromium.org2012-01-041-2/+3
| | | | | | | | | | | | CID=102873 BUG=none TEST=none Review URL: http://codereview.chromium.org/9016055 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116237 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Remove ScopedRunnableMethodFactory.jhawkins@chromium.org2012-01-031-143/+1
| | | | | | | | | | BUG=none TEST=none R=groby,awong,csilv Review URL: http://codereview.chromium.org/9071001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116198 0039d316-1c4b-4281-b951-d872f2087c98
* Add TimeDelay interfaces to TestTimeouts.tedvessenes@gmail.com2012-01-031-1/+29
| | | | | | | | | | | R=brettw@chromium.org BUG=108171 TEST= Review URL: http://codereview.chromium.org/8952022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116194 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Remove callback_old.h.jhawkins@chromium.org2012-01-034-278/+21
| | | | | | | | | | BUG=none TEST=none R=groby,awong,csilv Review URL: http://codereview.chromium.org/9028009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116169 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Remove scoped_callback_factory.h.jhawkins@chromium.org2012-01-032-134/+0
| | | | | | | | | | BUG=none TEST=none R=groby Review URL: http://codereview.chromium.org/9032010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116148 0039d316-1c4b-4281-b951-d872f2087c98
* Remove DeleteTask and convert remaining users.dcheng@chromium.org2012-01-021-20/+2
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/9015021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116107 0039d316-1c4b-4281-b951-d872f2087c98
* Add a sequenced worker pool.brettw@chromium.org2012-01-015-0/+1244
| | | | | | | This allows tasks to be put in the worker pool with optional sequencing semantics for consumers that must run a bunch of stuff in order on a background thread, but don't particularly care about which thread. Review URL: http://codereview.chromium.org/8416019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116078 0039d316-1c4b-4281-b951-d872f2087c98
* base::Bind: Remove NewRunnableFunction.jhawkins@chromium.org2012-01-016-187/+86
| | | | | | | | | | BUG=none TEST=none R=groby,ajwong Review URL: http://codereview.chromium.org/8960011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116072 0039d316-1c4b-4281-b951-d872f2087c98
* Change code in base (primarily unit tests) to use Sleep(TimeDelta).tedvessenes@gmail.com2011-12-3123-75/+86
| | | | | | | | | | BUG=108171 TEST= Review URL: http://codereview.chromium.org/9055001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116065 0039d316-1c4b-4281-b951-d872f2087c98