summaryrefslogtreecommitdiffstats
path: root/base/string_piece.h
Commit message (Collapse)AuthorAgeFilesLines
* Move operator<< for StringPiece into string_piece.{h,cc}akalin@chromium.org2012-01-201-1/+5
| | | | | | | | | 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
* Extract common code from StringPiece and StringPiece16 into a templated base ↵erikwright@chromium.org2011-12-221-135/+224
| | | | | | | | | | | | | | | | | class. Convert copy-and-pasted unit tests into TYPED_TESTs. The motivation is that I wish to add constructors for string::iterator ranges and I don't want to do it twice. The motivation for adding the string::iterator range constructors is to reduce the number of overloads in string_number_conversions.h . BUG=87634 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=114242 Review URL: http://codereview.chromium.org/8659047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115616 0039d316-1c4b-4281-b951-d872f2087c98
* Standardize StringToInt{,64} interface.tedvessenes@gmail.com2011-12-191-0/+8
| | | | | | | | | | | | | | | | | | | | | | | These changes address issue #106655. All variants of StringToInt have been converted to use the StringPiece class. One instance of conversion, in chrome/browser/history/text_database.cc, required copying an underlying string. This is because the string type in question could use 8 or 16 bit characters depending on the OS type, and because StringPiece is not implemented as a template, the code cannot specify whether to create a StringPiece or StringPiece16. This should be remedied in a future CL. R=erikwright@chromium.org BUG=106655 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=114929 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=114944 Review URL: http://codereview.chromium.org/8921006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114993 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 114944 - Standardize StringToInt{,64} interface.battre@chromium.org2011-12-181-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Revert due to compile breakage on ChromeOS. These changes address issue #106655. All variants of StringToInt have been converted to use the StringPiece class. One instance of conversion, in chrome/browser/history/text_database.cc, required copying an underlying string. This is because the string type in question could use 8 or 16 bit characters depending on the OS type, and because StringPiece is not implemented as a template, the code cannot specify whether to create a StringPiece or StringPiece16. This should be remedied in a future CL. R=erikwright@chromium.org BUG=106655 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=114929 Review URL: http://codereview.chromium.org/8921006 TBR=tedvessenes@gmail.com Review URL: http://codereview.chromium.org/8990002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114945 0039d316-1c4b-4281-b951-d872f2087c98
* Standardize StringToInt{,64} interface.tedvessenes@gmail.com2011-12-181-0/+8
| | | | | | | | | | | | | | | | | | | | | These changes address issue #106655. All variants of StringToInt have been converted to use the StringPiece class. One instance of conversion, in chrome/browser/history/text_database.cc, required copying an underlying string. This is because the string type in question could use 8 or 16 bit characters depending on the OS type, and because StringPiece is not implemented as a template, the code cannot specify whether to create a StringPiece or StringPiece16. This should be remedied in a future CL. R=erikwright@chromium.org BUG=106655 TEST= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=114929 Review URL: http://codereview.chromium.org/8921006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114944 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 114929 - Standardize StringToInt{,64} interface.rsleevi@chromium.org2011-12-171-8/+0
| | | | | | | | | | | | | | | | | | | | | | These changes address issue #106655. All variants of StringToInt have been converted to use the StringPiece class. One instance of conversion, in chrome/browser/history/text_database.cc, required copying an underlying string. This is because the string type in question could use 8 or 16 bit characters depending on the OS type, and because StringPiece is not implemented as a template, the code cannot specify whether to create a StringPiece or StringPiece16. This should be remedied in a future CL. R=erikwright@chromium.org BUG=106655 TEST= Review URL: http://codereview.chromium.org/8921006 TBR=tedvessenes@gmail.com Review URL: http://codereview.chromium.org/8984007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114930 0039d316-1c4b-4281-b951-d872f2087c98
* Standardize StringToInt{,64} interface.tedvessenes@gmail.com2011-12-171-0/+8
| | | | | | | | | | | | | | | | | | | These changes address issue #106655. All variants of StringToInt have been converted to use the StringPiece class. One instance of conversion, in chrome/browser/history/text_database.cc, required copying an underlying string. This is because the string type in question could use 8 or 16 bit characters depending on the OS type, and because StringPiece is not implemented as a template, the code cannot specify whether to create a StringPiece or StringPiece16. This should be remedied in a future CL. R=erikwright@chromium.org BUG=106655 TEST= Review URL: http://codereview.chromium.org/8921006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114929 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Extract common code from StringPiece and StringPiece16 into a ↵erikwright@chromium.org2011-12-131-126/+132
| | | | | | | | | | | | | | | templated base class.... ... Convert copy-and-pasted unit tests into TYPED_TESTs." This reverts commit 20543ba53ab8737affb06a21149c15f772246aed. BUG= TEST= Review URL: http://codereview.chromium.org/8933012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114255 0039d316-1c4b-4281-b951-d872f2087c98
* Extract common code from StringPiece and StringPiece16 into a templated base ↵erikwright@chromium.org2011-12-131-132/+126
| | | | | | | | | | | | | | | class. Convert copy-and-pasted unit tests into TYPED_TESTs. The motivation is that I wish to add constructors for string::iterator ranges and I don't want to do it twice. The motivation for adding the string::iterator range constructors is to reduce the number of overloads in string_number_conversions.h . BUG=87634 TEST= Review URL: http://codereview.chromium.org/8659047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114242 0039d316-1c4b-4281-b951-d872f2087c98
* Optimize phishing page term feature extraction.gcasto@chromium.org2011-08-091-0/+156
| | | | | | | | | | | | | | | | | | | | | | | We've been seeing in the histograms that for some users, page feature extraction is taking much longer than we would like, up to 200ms between stops. This could possibly contribute to jankiness in the UI. These are some timings from my desktop for how long it takes to extract features before and after these changes. Obviously this is on much better hardware than the use case we are worried about, but hopefully the increase is speed is proportional. Before After CNN 19 7.5 ESPN 22 9.5 Google 12 4 Salon 40 12 BUG= TEST=Ran associated unit tests. Review URL: http://codereview.chromium.org/7549003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96097 0039d316-1c4b-4281-b951-d872f2087c98
* Rename BASE_API to BASE_EXPORT.darin@chromium.org2011-08-051-3/+3
| | | | | | | R=rvargas Review URL: http://codereview.chromium.org/7461141 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@95618 0039d316-1c4b-4281-b951-d872f2087c98
* Base: First pass at having base.dll: definition ofrvargas@google.com2011-03-221-2/+3
| | | | | | | | | | BASE_API and a few files that use it. BUG=76996 TEST=none Review URL: http://codereview.chromium.org/6725001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79056 0039d316-1c4b-4281-b951-d872f2087c98
* Change UTF8ToUTF16 to accept const StringPiece&.suzhe@google.com2011-01-281-8/+4
| | | | | | | | | BUG=70936 TEST=All unit tests should pass. Review URL: http://codereview.chromium.org/6317016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72921 0039d316-1c4b-4281-b951-d872f2087c98
* Start sorting methods in class declarations.erg@google.com2011-01-071-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | A lot of our headers are a mess and aren't organized. Impose the following order on files in the base/ directory: class Blah { each public/protected/private section: typedefs; enums; static constants; ctors; dtors; methods; overridden virtual methods; data members; }; BUG=68682 TEST=compiles Review URL: http://codereview.chromium.org/6081007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70749 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-261-0/+1
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Style cleanup in preparation for auto-linting base/.erg@google.com2010-01-261-2/+8
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/552004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37164 0039d316-1c4b-4281-b951-d872f2087c98
* Move StringPiece into the base namespace. It is collidingtony@chromium.org2009-09-101-0/+4
| | | | | | | | | | with the StringPiece class in icu4.2, which is a problem when trying to use the system version of icu. Review URL: http://codereview.chromium.org/193072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25920 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGE. Update string_piece.h to new include style, and remove ↵deanm@chromium.org2008-11-081-4/+3
| | | | | | | | Ben's trailing whitespace. Really just want a buildbot run :\ Review URL: http://codereview.chromium.org/9730 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5075 0039d316-1c4b-4281-b951-d872f2087c98
* Use a more compact license header in source files.license.bot2008-08-241-28/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1287 0039d316-1c4b-4281-b951-d872f2087c98
* Add base to the repository.initial.commit2008-07-261-0/+209
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8 0039d316-1c4b-4281-b951-d872f2087c98