summaryrefslogtreecommitdiffstats
path: root/base/string_util.cc
Commit message (Collapse)AuthorAgeFilesLines
* Move string files in base/ to the string subdirectory.avi@chromium.org2013-06-081-1012/+0
| | | | | | | | | BUG=247723 TEST=no change Review URL: https://chromiumcodereview.appspot.com/16331011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205050 0039d316-1c4b-4281-b951-d872f2087c98
* Use a direct include of utf_string_conversions.h in android_webview/, apps/, ↵avi@chromium.org2013-06-071-1/+1
| | | | | | | | | | | ash/, base/. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/15735027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204874 0039d316-1c4b-4281-b951-d872f2087c98
* Pull string constants into separate .cc for split dll buildscottmg@chromium.org2013-05-211-48/+0
| | | | | | | | | | | | Requires https://codereview.chromium.org/15310002/ before landing. TBR=brettw@chromium.org R=cpu@chromium.org BUG=237249 Review URL: https://chromiumcodereview.appspot.com/15300017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201264 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 184353brettw@chromium.org2013-02-241-6/+2
| | | | | | | | | | | | | | | | | > Move WideToASCII to the base namespace. > > I accidentally changed some callers to use "base::" for this call. Since the > plan is to move this to the base namespace eventually, I went ahead and added > it with a "using" (to keep the non-converted code compiling) rather than revert > my other changes. > > TBR=sky > Review URL: https://codereview.chromium.org/12330103 TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/12326094 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184354 0039d316-1c4b-4281-b951-d872f2087c98
* Move WideToASCII to the base namespace.brettw@chromium.org2013-02-241-2/+6
| | | | | | | | | | | | I accidentally changed some callers to use "base::" for this call. Since the plan is to move this to the base namespace eventually, I went ahead and added it with a "using" (to keep the non-converted code compiling) rather than revert my other changes. TBR=sky Review URL: https://codereview.chromium.org/12330103 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184353 0039d316-1c4b-4281-b951-d872f2087c98
* Move utf_offset_string_conversions and utf_string_conversion_utils to strings.brettw@chromium.org2013-02-071-1/+1
| | | | | | Review URL: https://codereview.chromium.org/12087115 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181183 0039d316-1c4b-4281-b951-d872f2087c98
* Add support for joining strings on strings rather than just chars.smckay@chromium.org2012-08-271-4/+13
| | | | | | | | | BUG= Review URL: https://chromiumcodereview.appspot.com/10828217 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@153568 0039d316-1c4b-4281-b951-d872f2087c98
* Rewrite base::JSONReader to be 35-40% faster, depending on the input string.rsesek@chromium.org2012-05-161-1/+1
| | | | | | | | | | | | | | | | This change does the following: * Parses the input string and generates the object representation in O(n) time. * Optimizes string decoding by using StringPiece where possible, which also introduces the JSON_DETACHABLE_CHILDREN parser option. * Makes JSONReader a simpler interface by hiding the parser details in an internal JSONParser class. BUG=49212,111581,121469 TEST=Hopefully covered by all test suites. New tests added for edge cases. Review URL: https://chromiumcodereview.appspot.com/10035042 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137430 0039d316-1c4b-4281-b951-d872f2087c98
* Modify ui::ElideRectangleText() to honor trailing newlines.asvitkine@chromium.org2012-05-151-5/+1
| | | | | | | | | | | | | | | | Trailing whitespace without a \n character is still trimmed away. Adds additional tests for this. Also, makes the code use ContainsOnlyWhitespace() from base and makes the implementation of ContainsOnlyWhitespace() shorter (based on the code that was in text_elider.cc.) BUG=126297 TEST=New tests in text_elider_unittest.cc Review URL: https://chromiumcodereview.appspot.com/10386016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137061 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: fix bookmarks with & in them not showing correctly in the wrench menu.mdm@chromium.org2012-02-151-4/+4
| | | | | | | | | | | | As a side effect, also fix a bug in ReplaceChars() where it would go into an infinite loop (and probably also eventually run out of memory) if the replacement string contained any of the characters to be replaced. BUG=109546 Review URL: http://codereview.chromium.org/9348106 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122022 0039d316-1c4b-4281-b951-d872f2087c98
* Fix AutocompleteMatch DCHECK() triggered by ↵asvitkine@chromium.org2011-11-101-8/+23
| | | | | | | | | | | | | | | | | | | |RenderViewContextMenu::AppendSearchProvider()|. Makes |AppendSearchProvider()| sanitize the text by replacing unwanted whitespace characters with spaces. Do this instead of calling |AutocompleteMatch::SanitizeString()|, since we want to preserve the whitespace between words separated by newlines here, rather than appending such words together. Added |ReplaceChars()| to base/string_util to support replacing any occurence of the given characters with a replacement string. BUG=103338 TEST=Right click on multiline text in a text area in a Debug build. A DCHECK() shouldn't trigger. Review URL: http://codereview.chromium.org/8502027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109430 0039d316-1c4b-4281-b951-d872f2087c98
* Remove an unused include.thakis@chromium.org2011-11-031-1/+0
| | | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/8423068 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108415 0039d316-1c4b-4281-b951-d872f2087c98
* Upstream android string implementation etc.michaelbai@google.com2011-06-271-0/+4
| | | | | | | | | BUG= TEST= Review URL: http://codereview.chromium.org/7238018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90616 0039d316-1c4b-4281-b951-d872f2087c98
* Localize strings, speeds.avi@chromium.org2011-06-221-72/+22
| | | | | | | | | BUG=86527 TEST=run in non-English. For European languages, during a download the decimal separators should be commas (e.g. "0,0 MB"). (The speeds are in strings files and might take a little time to run through the translation machinery.) Review URL: http://codereview.chromium.org/7189076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90092 0039d316-1c4b-4281-b951-d872f2087c98
* Support more than 9 arguments for ReplaceStringPlaceholders()tony@chromium.org2011-06-071-2/+8
| | | | | | | | | | | | | | | | - support more than 9 arguments ($1, $2, $3, ..., $9 and $10, $11, $12, ...) for ReplaceStringPlaceholders() - add the unittest named ReplaceStringPlaceholdersMoreThan9Replacements for testing more than 9 arguments for ReplaceStringPlaceholders() BUG=16963 TEST=string_util_unittest:StringUtilTest.ReplaceStringPlaceholdersMoreThan9Replacements Patch by haraken@google.com. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=82405 Review URL: http://codereview.chromium.org/6877008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88190 0039d316-1c4b-4281-b951-d872f2087c98
* wstring: remove wstring version of RemoveCharsevan@chromium.org2011-05-171-8/+0
| | | | | | | | BUG=23581 Review URL: http://codereview.chromium.org/7037014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85672 0039d316-1c4b-4281-b951-d872f2087c98
* wstring: remove wstring version of TrimWhitespaceevan@chromium.org2011-05-101-8/+0
| | | | | | | | | | And fix the one caller. BUG=23581 Review URL: http://codereview.chromium.org/6932056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84806 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 82405 - Support more than 9 arguments for ↵nsylvain@chromium.org2011-04-211-8/+2
| | | | | | | | | ReplaceStringPlaceholders()- support more than 9 arguments ($1, $2, $3, ..., $9 and $10, $11, $12, ...) for ReplaceStringPlaceholders()- add the unittest named ReplaceStringPlaceholdersMoreThan9Replacements for testing more than 9 arguments for ReplaceStringPlaceholders()BUG=16963TEST=string_util_unittest:StringUtilTest.ReplaceStringPlaceholdersMoreThan9ReplacementsPatch by haraken@google.com.Review URL: http://codereview.chromium.org/6877008 TBR=tony@chromium.org Review URL: http://codereview.chromium.org/6882108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82423 0039d316-1c4b-4281-b951-d872f2087c98
* Support more than 9 arguments for ReplaceStringPlaceholders()tony@chromium.org2011-04-201-2/+8
| | | | | | | | | | | | | | - support more than 9 arguments ($1, $2, $3, ..., $9 and $10, $11, $12, ...) for ReplaceStringPlaceholders() - add the unittest named ReplaceStringPlaceholdersMoreThan9Replacements for testing more than 9 arguments for ReplaceStringPlaceholders() BUG=16963 TEST=string_util_unittest:StringUtilTest.ReplaceStringPlaceholdersMoreThan9Replacements Patch by haraken@google.com. Review URL: http://codereview.chromium.org/6877008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@82405 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Change other usages of .size() to .empty() when applicable.erg@google.com2011-03-041-1/+2
| | | | | | | | | BUG=carnitas TEST=compiles Review URL: http://codereview.chromium.org/6609008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76962 0039d316-1c4b-4281-b951-d872f2087c98
* Pure pedantry: Replace all ".size() == 0" with ".empty()".erg@google.com2011-03-021-1/+1
| | | | | | | | | BUG=carnitas TEST=compiles; existing unit tests. Review URL: http://codereview.chromium.org/6602049 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76467 0039d316-1c4b-4281-b951-d872f2087c98
* Move ElideString() from base/string_util.cc to app/text_elider.cc to jschuh@google.com2010-12-171-37/+0
| | | | | | | | | | | | | reduce size of widely-included base libraries. Committing for tsepez. BUG=49747 TEST=TextEliderTest.* Review URL: http://codereview.chromium.org/6017001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69555 0039d316-1c4b-4281-b951-d872f2087c98
* This CL add a GetInstance() method to singleton classes instead of relying ↵satish@chromium.org2010-12-041-3/+7
| | | | | | | | | | | | | | | | | on the callers to use Singleton<T>. In some cases I have used the LazyInstance<T> pattern as that was simpler. This is a small step towards making all singleton classes use the Singleton<T> pattern within their code and not expect the callers to know about it. I have selected all files under src/app and src/base which use Singleton<T> in this CL. Once this CL goes in I'll work on the rest of the files. BUG=65298 TEST=all existing tests should continue to pass. Review URL: http://codereview.chromium.org/5527004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68300 0039d316-1c4b-4281-b951-d872f2087c98
* base: Move StringSplitAlongWhitespace to string_split.htfarina@chromium.org2010-11-151-57/+0
| | | | | | | | | BUG=None TEST=trybots Review URL: http://codereview.chromium.org/5004002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66181 0039d316-1c4b-4281-b951-d872f2087c98
* Fix clang build by moving ToLowerASCII into base namespace.tfarina@chromium.org2010-11-031-1/+1
| | | | | | | | | BUG=None TEST=trybots Review URL: http://codereview.chromium.org/4371001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64879 0039d316-1c4b-4281-b951-d872f2087c98
* base: Move CaseInsensitiveCompare traits into the base namespace.tfarina@chromium.org2010-11-031-2/+2
| | | | | | | | | | | | | | | This should fix conflicts like: 2>d:\src\chromium_src2\src\base/string_util.h(480) : error C2904: 'CaseInsensitiveCompare' : name already used for a template in the current scope 2> d:\src\chromium_src2\src\third_party\xulrunner-sdk\win\include\xpcom\nsStringAPI.h(1406) : see declaration of 'CaseInsensitiveCompare' Reported-by: Jeff Timanus <twiz@google.com> BUG=None TEST=trybots Review URL: http://codereview.chromium.org/4366001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64877 0039d316-1c4b-4281-b951-d872f2087c98
* base: remove various unused string utility functionsevan@chromium.org2010-10-141-14/+0
| | | | | | | | 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
* fixes issue 52839 (MatchPattern timeout)andybons@chromium.org2010-10-061-0/+4
| | | | | | | | | | | | | 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
* 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
* Implemented VLOG() et al.akalin@chromium.org2010-09-291-3/+4
| | | | | | | | | | | | | | Implemented VLOG(), VLOG_IF(), VLOG_IS_ON(). Added --v and --vmodule switches. Changed some spammy sync-related logs to use VLOG. BUG=56965 TEST=New unittests Review URL: http://codereview.chromium.org/3448028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60976 0039d316-1c4b-4281-b951-d872f2087c98
* base: Finish moving the SplitString functions from string_util.h to ↵tfarina@chromium.org2010-09-241-45/+0
| | | | | | | | | | | string_split.h BUG=None TEST=trybos Review URL: http://codereview.chromium.org/3447008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60422 0039d316-1c4b-4281-b951-d872f2087c98
* base: Move SplitStringDontTrim functions from string_util.h to string_split.htfarina@chromium.org2010-09-151-20/+2
| | | | | | | | | BUG=None TEST=trybots Review URL: http://codereview.chromium.org/3366011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59493 0039d316-1c4b-4281-b951-d872f2087c98
* Make the glob matcher support UTF8 strings.mnissler@chromium.org2010-09-101-41/+78
| | | | | | | | | | | This generalizes the existing pattern matching code to support UTF8 strings. BUG=53158 TEST=string_util_unittests.cc Review URL: http://codereview.chromium.org/3295018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59071 0039d316-1c4b-4281-b951-d872f2087c98
* base: Move SplitStringUsingSubstr functions from string_util.h to string_split.htfarina@chromium.org2010-09-021-34/+0
| | | | | | | | | BUG=None TEST=trybots Review URL: http://codereview.chromium.org/3284005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58300 0039d316-1c4b-4281-b951-d872f2087c98
* Add an accordian effect to NTP.aa@chromium.org2010-08-311-1/+5
| | | | | | | | BUG=53248 Review URL: http://codereview.chromium.org/3250002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57966 0039d316-1c4b-4281-b951-d872f2087c98
* Convert FormatBytes to string16.evan@chromium.org2010-08-191-23/+23
| | | | | | | | | | I considered ASCII, but it's producing what is intended to be a human-readable string. For example, in theory the "bytes/s" annotation could be localized into a language where the "b" is non-ASCII. Review URL: http://codereview.chromium.org/3107021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56771 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Convert FormatBytes to string16."evan@chromium.org2010-08-181-23/+23
| | | | | | This reverts commit r56603. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56608 0039d316-1c4b-4281-b951-d872f2087c98
* Convert FormatBytes to string16.evan@chromium.org2010-08-181-23/+23
| | | | | | | | | | I considered ASCII, but it's producing what is intended to be a human-readable string. For example, in theory the "bytes/s" annotation could be localized into a language where the "b" is non-ASCII. Review URL: http://codereview.chromium.org/3107021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56603 0039d316-1c4b-4281-b951-d872f2087c98
* Move StringPrintf into its own file and use the base namespace. Currently ↵brettw@chromium.org2010-08-171-157/+0
| | | | | | | | | | | | | | this has using directives for the functions so I don't have to change all files to use the namespace. No code changes to logic. TEST=it compiles + the included unit tests BUG=none Review URL: http://codereview.chromium.org/3181016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56299 0039d316-1c4b-4281-b951-d872f2087c98
* Remove number conversion functions from string_util. These moved to ↵brettw@chromium.org2010-08-031-503/+0
| | | | | | | | | | string_number_conversions. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3054036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54747 0039d316-1c4b-4281-b951-d872f2087c98
* Move ASCIIToWide and ASCIIToUTF16 to utf_string_conversions.h. I've found itbrettw@chromium.org2010-07-311-10/+1
| | | | | | | | | | | | | | | | | | | | | | | weird that UTF8ToWide is in utf_string_conversions, but ASCIIToWide is in string_util.h. This should help some dependencies since string_util changes much more frequently than utf_string_conversions and fewer files will now need string_utils. Since this requires a lot of changes, this keeps a forward-declaration in string_util so I can update the entire project incrementally. This change updates base and net only. I removed some includes of string_util from header files in net. In particular, url_request_context which involved creating a new .cc file to implement a function (already virtual so there's no speed penalty). It turns out a lot of files were getting string_util from this include, so I had to update a bunch of random files to now explicitly include string_util.h TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3076013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54456 0039d316-1c4b-4281-b951-d872f2087c98
* Made changes to TruncateUtF8ToByteSize to cleanup the code. jerrica@google.com2010-06-171-4/+5
| | | | | | | | | | | I made some corrections to my previously submitted function TruncateUTF8ToByteSize, in order to clean up the code, and use it to truncate sync node titles above 255 bytes. BUG=43675 TEST=base/string_util_unittest.cc Review URL: http://codereview.chromium.org/2632005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50112 0039d316-1c4b-4281-b951-d872f2087c98
* Add Tokenize() for StringPiece.mbelshe@chromium.org2010-06-021-0/+6
| | | | | | | | | BUG=none TEST=StringUtilTest.TokenizeStringPiece Review URL: http://codereview.chromium.org/2463007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48792 0039d316-1c4b-4281-b951-d872f2087c98
* Add a method that truncates strings to the end point of a valid UTF8 ↵nick@chromium.org2010-05-281-0/+35
| | | | | | | | | | | | | character, leaving the string's size to be less than or equal to a specified byte size. BUG=43675 TEST=base/string_util_unittest.cc Patch contributed by to Jerrica Jones (jerrica@chromium.org). Review URL: http://codereview.chromium.org/2239007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48518 0039d316-1c4b-4281-b951-d872f2087c98
* Use HttpRequestHeaders for extra_headers.willchan@chromium.org2010-04-201-14/+0
| | | | | | | | BUG=22588 Review URL: http://codereview.chromium.org/1604011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45096 0039d316-1c4b-4281-b951-d872f2087c98
* Rejigger how we format the display of bytes.evan@chromium.org2010-04-151-12/+6
| | | | | | | | | | | | | | | | | | | | | | | (Note that this does *not* touch the mega/mebi issue, despite my recent discussion of it.) What had been bugging me was that when downloading a file, you'd see it count up 10.7, 10.8, 10.9, *11*, 11.1. That is, previously when we rounded to displaying a trailing zero, we'd clip it off, which would make a download display like "11.1 / 50.2MB" jiggle to the left every time the trailing digit lined up. Now we try to always display three digits, which means we count up like 98.8, 98.9, *99.0*, 99.1, ... 99.9, 100, ... 101. This code is after fiddling the test into the shape I wanted it to be, then making the code produce that behavior. TEST=covered by unit test, updated with new expected behavior Review URL: http://codereview.chromium.org/1558025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44671 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r42300: "HttpRequestHeaders refactor."willchan@chromium.org2010-03-291-0/+48
| | | | | | | | | Adds a fix and tests for empty header values. The particular bug happened when the value was non-empty, but was all LWS, so it was effectively empty. BUG=22588 Review URL: http://codereview.chromium.org/1370001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43000 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Reland r42300: "HttpRequestHeaders refactor."""willchan@chromium.org2010-03-231-48/+0
| | | | | | | | Broke another layout test. Review URL: http://codereview.chromium.org/1223001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42387 0039d316-1c4b-4281-b951-d872f2087c98
* Reland r42300: "HttpRequestHeaders refactor.""willchan@chromium.org2010-03-231-0/+48
| | | | | | | | | | | | This time, make sure HttpRequestHeaders::FindHeader() checks key lengths are equal. * Create HttpRequestHeaders. * Switch HttpNetworkTransaction to build request headers. TODO: Change extra_headers to use HttpRequestHeaders. BUG=22588 Review URL: http://codereview.chromium.org/1110014 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42376 0039d316-1c4b-4281-b951-d872f2087c98