summaryrefslogtreecommitdiffstats
path: root/base/string_util_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Made changes to TruncateUtF8ToByteSize to cleanup the code. jerrica@google.com2010-06-171-1/+1
| | | | | | | | | | | 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-41/+50
| | | | | | | | | 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/+171
| | | | | | | | | | | | | 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
* TTF: Re-enable SplitStringIntoKeyValuePairsTest.EmptyString. Fix the casejhawkins@chromium.org2010-05-051-0/+5
| | | | | | | | | | | | where an empty pair would cause SplitStringIntoKeyValuePairs to report an error yet add the empty pair to the pairs list. Add more tests. BUG=none TEST=SplitStringIntoKeyValuePairsTest.*, StringUtilTest.SplitString Review URL: http://codereview.chromium.org/1971001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46420 0039d316-1c4b-4281-b951-d872f2087c98
* Rejigger how we format the display of bytes.evan@chromium.org2010-04-151-6/+18
| | | | | | | | | | | | | | | | | | | | | | | (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-1/+49
| | | | | | | | | 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-49/+1
| | | | | | | | 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-1/+49
| | | | | | | | | | | | 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
* Revert r42300: "HttpRequestHeaders refactor."willchan@chromium.org2010-03-231-49/+1
| | | | | | | | | Broke access-control-basic-whitelist-request-headers.html layout test. BUG=22588 Review URL: http://codereview.chromium.org/1110012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42305 0039d316-1c4b-4281-b951-d872f2087c98
* HttpRequestHeaders refactor.willchan@chromium.org2010-03-231-1/+49
| | | | | | | | | | | * Create HttpRequestHeaders. * Switch HttpNetworkTransaction to build request headers. TODO: Change extra_headers to use HttpRequestHeaders. BUG=22588 Review URL: http://codereview.chromium.org/1039001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42300 0039d316-1c4b-4281-b951-d872f2087c98
* base: string_util.h -> utf_string_conversions.h fix.jhawkins@chromium.org2010-03-091-3/+4
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/678001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40972 0039d316-1c4b-4281-b951-d872f2087c98
* Make IsStringUTF8 reject (U+FDD0 .. U+FDEF) jschuh@google.com2010-02-261-6/+0
| | | | | | | | | | | Eliminated the old Mozilla implementation and used an ICU-based implementation. BUG=2759 TEST=base_unittests --gtest_filter=StringUtilTest.IsStringUTF8 Review URL: http://codereview.chromium.org/661205 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40178 0039d316-1c4b-4281-b951-d872f2087c98
* This CL addresses 2 issues:jcampan@chromium.org2010-02-101-0/+13
| | | | | | | | | | | | | | | | - we were not computing the max request text size correctly in some cases (by forgetting the size of the &q= string) causing assertions. - the translate server might send inconsistent response in some cases, this CL makes sure we deal with them. A common case is when sending separators only strings, which we are not doing now anymore. Other more complicated case are less clear. BUG=35055 TEST=Visit www.spiegel.de and translate the page. The page should be translated correctly. Review URL: http://codereview.chromium.org/594023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38637 0039d316-1c4b-4281-b951-d872f2087c98
* The RemoveChars utility function requires a NULL-terminated input string, so ↵jhawkins@chromium.org2010-02-051-1/+1
| | | | | | | | | | | fix the test accordingly. TBR=joth BUG=34731 TEST=StringUtilTest.RemoveChars Review URL: http://codereview.chromium.org/578018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38252 0039d316-1c4b-4281-b951-d872f2087c98
* Implement RemoveChars, a function to remove a list of characters from a ↵jhawkins@chromium.org2010-02-051-0/+16
| | | | | | | | | | string, and use it in PhoneNumber to remove extra phone number characters. BUG=none TEST=StringUtilTest.RemoveChars Review URL: http://codereview.chromium.org/572015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38162 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 36459 - Breaks 7 WebKit testsjschuh@chromium.org2010-01-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | Changes are: * base::IsValidCodepoint() now returns false on noncharacter code points. * base::IsStringUTF8() now uses ICU library (removed old Mozilla implementation). * Removed base::IsStringWideUTF8() (was unused and confusing) * file_util::ReplaceIllegalCharactersInPath() now treats Unicode replacement character (U+FFFD) as invalid. * Associated unit tests updated. BUG=2759 BUG=30662 TEST=base_unittests gtest_filter=StringUtilTest.IsStringUTF8 TEST=base_unittests gtest_filter=UTFStringConversionsTest.* TEST=base_unittests gtest_filter=FileUtilICUTestReplaceIllegalCharactersInPathTest Review URL: http://codereview.chromium.org/548017 TBR=jschuh@chromium.org Review URL: http://codereview.chromium.org/552026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36460 0039d316-1c4b-4281-b951-d872f2087c98
* Changes are:jschuh@chromium.org2010-01-161-5/+0
| | | | | | | | | | | | | | | | | * base::IsValidCodepoint() now returns false on non-character code points. * base::IsStringUTF8() now uses ICU library (removed old Mozilla implementation). * Removed base::IsStringWideUTF8() (was unused and confusing) * file_util::ReplaceIllegalCharactersInPath() now treats Unicode replacement character (U+FFFD) as invalid. * Associated unit tests updated. BUG=2759 BUG=30662 TEST=base_unittests --gtest_filter=StringUtilTest.IsStringUTF8 TEST=base_unittests --gtest_filter=UTFStringConversionsTest.* TEST=base_unittests --gtest_filter=FileUtilICUTestReplaceIllegalCharactersInPathTest Review URL: http://codereview.chromium.org/548017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36459 0039d316-1c4b-4281-b951-d872f2087c98
* This CL contains the back-end implementation of the translate feature. It ↵jcampan@chromium.org2010-01-141-0/+18
| | | | | | | | | | | | | adds a Translate method to the renderer. On invocation this method triggers a traversal of the DOM page to retrieve the text nodes. The text node contents are then sent to the browser for actual translation (at this point, we just up-case the text for testing purpose). The browser sends back the translated text to the renderer that replace the DOM text node values with the translated text. BUG=None TEST=Run the unit-tests. Review URL: http://codereview.chromium.org/547013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36258 0039d316-1c4b-4281-b951-d872f2087c98
* Mac: UI tweaks for task manager.thakis@chromium.org2010-01-131-14/+14
| | | | | | | | | | | | | | | | | | | | | | | Nib change: Reduce row height, make scrollbars smaller. Make text in task manager table slightly smaller. Show in decimal digit for %cpu. Show memory in KB/MB, not always in K. Change update frequency from 1s to 2s to match Activity Monitor's default. (all mac-only. ui team is fine with this.) Finally, turn taskman on. BUG=13156 TEST=Open task manager, look at it. Should look & feel similar to Activity Monitor. Review URL: http://codereview.chromium.org/536038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36096 0039d316-1c4b-4281-b951-d872f2087c98
* Implement ContactInfo, the FormGroup that stores contact information.jhawkins@chromium.org2010-01-041-44/+137
| | | | | | | | BUG=none TEST=StringUtilTest.Tokenizer Review URL: http://codereview.chromium.org/502103 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35475 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes to the string MatchPattern functions:tony@chromium.org2009-12-031-14/+16
| | | | | | | | | | | | | | | 1) Make it explicit that it only supports ASCII (since it iterates character by character). 2) Limit the recursion to 16 levels. We could allow more, but in the case of a ?, it has exponential complexity, so I figured 16 was a good stopping point. It seems rare that someone would have more than 16 '?' and '*'s. BUG=28645 Review URL: http://codereview.chromium.org/460047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33748 0039d316-1c4b-4281-b951-d872f2087c98
* Add compiler-specific "examine printf format" attributes to printfs.evan@chromium.org2009-11-201-13/+20
| | | | | | | | | | | | Functions that take a printf-style format get a new annotation, which produces a bunch of compiler warnings when you use printf impoperly. This change adds the annotations and fixes the warnings. We now must use PRId64 for 64-bit numbers and the PRIsz for size_t. Review URL: http://codereview.chromium.org/339059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32600 0039d316-1c4b-4281-b951-d872f2087c98
* Fix various problems with inline autocomplete and URLs that change length ↵pkasting@chromium.org2009-11-071-198/+1
| | | | | | | | | | | | | | | | | | | | during fixup: * URLs with http auth info, which gets stripped * URLs with IDN hosts * URLs with escaped values that get unescaped In cases like these, we'd inline autocomplete from the wrong locations, highlight the wrong portions of the URL as matches, and sometimes DCHECK() in debug mode. The fix is to track how fixup affects the offsets into the URL we care about. Plumbing this required an enormous number of additions :( There is also a fix here to the URL Fixer Upper, which was obviously modified at some point in the past to use the Parsed components, but without updating the comments or some of the functionality to match. Since this isn't supposed to "fix up" things that aren't simple typos, I removed some code to "fix" bogus ports, which was causing bizarre effects when typing HTTP auth URLs ("http://foo:bar" would be fixed to "http://foo" and then matched for inline autocompletion, which was clearly wrong). This is tested incidentally by one of the new History URL Provider tests (which is how I discovered it). BUG=4010 TEST=Covered by unittests Review URL: http://codereview.chromium.org/372017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31352 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the dependency on i18n/icu_string_conversions from base/string_util.h.brettw@chromium.org2009-10-101-258/+4
| | | | | | | | | | | | Fix up all files requireing this header to include it directly. Split out the ICU-dependent string util unit tests into a new file base/i18n/icu_string_util_unittest.cc TEST=none BUG=none Review URL: http://codereview.chromium.org/269034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28674 0039d316-1c4b-4281-b951-d872f2087c98
* Separate out some more ICU from base and into base/i18n.brettw@chromium.org2009-10-081-46/+0
| | | | | | | | | | | | | | | | | | | | This moves string_util_icu. I moved the number formatting function into base/i18n/number_formatting and just removed the other function in string_util_icu which was TrimWhitespaceUTF8. It is only used in a few places and isn't actually helpful (and the fact that it round-trips through UTF-16 is better for the caller to see). This takes out the sorting from the FileEnumerator. The comment says the sorting is not guaranteed. I moved it into file_util_icu as a standalone function for callers of FileEnumerator to call manually if they need sorted results. I modified the directory lister to use this sorting instead, and filed a bug on doing more optimal JS-based sorting. TEST=none BUG=none Review URL: http://codereview.chromium.org/267001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28405 0039d316-1c4b-4281-b951-d872f2087c98
* Add a version of ReplaceStringPlaceholders that operates on std::stringtony@chromium.org2009-09-291-0/+19
| | | | | | | | | | | | | | instead of string16. BUG=none TEST=base unit tests Original patch by avd@google.com at: http://codereview.chromium.org/245046 Review URL: http://codereview.chromium.org/242061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27532 0039d316-1c4b-4281-b951-d872f2087c98
* Strip .plugin off of Mac plugin names when showing the crash info bar.stuartmorgan@google.com2009-09-041-0/+19
| | | | | | | | | BUG=21029 TEST=Kill a plugin process; the plugin crash info bar shouldn't have ".plugin" in the plugin name. Review URL: http://codereview.chromium.org/197018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25487 0039d316-1c4b-4281-b951-d872f2087c98
* Move base::va_copy from a function to a macro.deanm@chromium.org2009-07-271-1/+1
| | | | | | | | | va_copy is a builtin, you can't just pass it references like we did previously. Review URL: http://codereview.chromium.org/160191 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21706 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the local directory listing, FTP directory listing and the local file ↵jshin@chromium.org2009-07-091-98/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | handling (drag'n'drop and opening from the file list). For the local file listing, use the OS file system encoding. For the FTP directory listing, use ICU's encoding detector.GetDirectoryListingEntry and GetDirectoryLisingHeader were changed to accept string16 for file/directory names. To the former, a new parameter (|raw_bytes|) was added. It can be used to make a FTP request to a file with a non-ASCII name encoded in a legacy encoding. For the local file handling on Windows, get rid of the code for 'doubly converted' UTF-8 in FileURLToFilePath, which led to issue 4619 and add a few cases to NetUtil*.FileURLConversion* test. In addition, add CodepageToUTF16 and UTF16ToCodepage along with a new unittest (ConvertBetweenCodepageAndUTF16) that shares the same set of case as ConvertBetweenCodepageAndWide. The test cases were expanded and revised a bit. BUG=2939,13229,4619 http://crbug.com/2939 http://crbug.com/13229 http://crbug.com/4619 TEST=1. Pass URLRequest*.FTP* (net_unittests) 2. Pass StringUtiltTest.ConvertBetweenCode* 3. Pass NetUtil*.GetDirectoryLis* (net_unittests) 4. Open a local directory containing files with non-ASCII names and they're displayed correctly in the directory list. On Windows and Mac OS X, it should always work. On Linux, your locale encoding (as returned by nl_langinfo(CODESET)) should match the actual encoding used in your filename. 5a. Pass NetUtil*.FileURL* (net_unittests) with the default codepage set to 1252 and 932. 5b. Make a file named 'caf챕.txt' on Windows and see if it can be opened both by clicking in the directory listing page of Chrome and by drag'n'drop. Test this with the default OS code pages set to Windows-1252, Windows-1251 (Russian) and Windows-932 (Japanese). Review URL: http://codereview.chromium.org/151065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20331 0039d316-1c4b-4281-b951-d872f2087c98
* Pass through non-character codepoints in UTF-8,16,32 and Wide conversion ↵jshin@chromium.org2009-06-241-7/+14
| | | | | | | | | | | | | | | | | | | | functions. They're structurally valid code points unlike malformed byte/surrogate sequences. I believe it's better to leave them alone in conversion functions. This CL was triggered by file_util_unittest failure on Linux/Mac with my upcoming change to file_util::ReplaceIllegalCharacters (a part of http://codereview.chromium.org/126223 ). In addition, the upper bound for the output length in CodepageToWide was tightened. TEST=pass string_util and file_util unittests BUG=NONE Review URL: http://codereview.chromium.org/147038 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19132 0039d316-1c4b-4281-b951-d872f2087c98
* add CollapseWhitespaceASCIIrafaelw@chromium.org2009-06-041-0/+30
| | | | | | | | R=erikkay Review URL: http://codereview.chromium.org/119199 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17689 0039d316-1c4b-4281-b951-d872f2087c98
* Re-land of earlier NTP theme patch; now with mac and linux compatibility.glen@chromium.org2009-05-151-4/+39
| | | | | | Review URL: http://codereview.chromium.org/115413 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16205 0039d316-1c4b-4281-b951-d872f2087c98
* Undo 16020glen@chromium.org2009-05-141-39/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16021 0039d316-1c4b-4281-b951-d872f2087c98
* Allow the new tab page to be themed (you may want to review DOMUIThemeSource ↵glen@chromium.org2009-05-141-4/+39
| | | | | | | | | | | | | as a whole and not just these changes). Change global std::strings to chars* in browser theme provider. Add ability for ReplaceStringPlaceHolder to take up to 9 replacements. BUG=11235,11685 Review URL: http://codereview.chromium.org/115172 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16020 0039d316-1c4b-4281-b951-d872f2087c98
* Lands http://codereview.chromium.org/99349 for Ryan.sky@chromium.org2009-05-041-0/+9
| | | | | | | | | | | | | | Comments from Ryan: Some small changes to get chromium building on ARM. I tested these using the standard Linux tool chain and crosstools-ng. BUG=none TEST=none Review URL: http://codereview.chromium.org/99365 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15241 0039d316-1c4b-4281-b951-d872f2087c98
* Convert the internal GetStringF to use string16. This saves atc@google.com2009-04-141-2/+6
| | | | | | | | | | | | | | | conversion from string16 to wstring on the linux side when calling GetStringFUTF8 methods. It actually adds extra conversions when calling GetStringF, but we're going to get rid of all those, right? BUG=9911 Review URL: http://codereview.chromium.org/67112 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13666 0039d316-1c4b-4281-b951-d872f2087c98
* Remove logging.h from cc files that don't use it.thestig@chromium.org2009-03-121-1/+0
| | | | | | Review URL: http://codereview.chromium.org/42155 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11593 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes Issue 7377: Regression: Omnibox trims URL ending with 0x85 (Take 2)hbono@chromium.org2009-03-051-1/+46
| | | | | | | | | This is the same change as "http://codereview.chromium.org/20219/show", which I reverted it because it caused build breaks on sandbox. To investigate this build break, it seems this build break is somehow caused by "base/string_util.cc" that includes the TrimWhiteSpaceUTF8() function. To fix this build break, I moved the TrimWhiteSpaceUTF8() function to "base/string_util_icu.cc". BUG=7377 Review URL: http://codereview.chromium.org/28310 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10970 0039d316-1c4b-4281-b951-d872f2087c98
* NO CODE CHANGE (except one global std::wstring changed to const wchar_t* ↵maruel@chromium.org2009-03-031-6/+5
| | | | | | | | | | | const per style compliance). Preliminary work to enforce new PRESUBMIT.py rules: - <=80 cols - no trailing whitespaces - svn:eol-style=LF git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10791 0039d316-1c4b-4281-b951-d872f2087c98
* Port Replace(First)SubstringsAfterOffset to string16.dsh@google.com2009-03-031-39/+41
| | | | | | Review URL: http://codereview.chromium.org/28324 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10767 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of wstring variants of StringToFoo.dsh@google.com2009-02-281-13/+19
| | | | | | Review URL: http://codereview.chromium.org/28281 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10664 0039d316-1c4b-4281-b951-d872f2087c98
* Add ToUpperASCII and StringToUpperASCII.wtc@chromium.org2009-02-271-0/+26
| | | | | | | R=darin,eroman Review URL: http://codereview.chromium.org/28227 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10576 0039d316-1c4b-4281-b951-d872f2087c98
* Reverting 10456.hbono@chromium.org2009-02-261-46/+1
| | | | | | Review URL: http://codereview.chromium.org/28180 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10458 0039d316-1c4b-4281-b951-d872f2087c98
* Fixes Issue 7377: Regression: Omnibox trims URL ending with 0x85hbono@chromium.org2009-02-261-1/+46
| | | | | | | | | | To fix this issue, this change adds a new function TrimWhitespaceUTF8(), which trims space characters (including non-printable characters and broken UTF-8 characters) from either end of a UTF-8 string. Please feel free to give me your comments since I'm not sure this implimentation is correct. (Maybe this implementation trims too aggressively.) BUG=7377 Review URL: http://codereview.chromium.org/20219 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10456 0039d316-1c4b-4281-b951-d872f2087c98
* Introduce UrlPattern. This is basically me resuming work onaa@chromium.org2009-02-021-0/+18
| | | | | | | | | | | | issue 14106, but as it is a complete rewrite, I have started a new issue. I also added supporting JoinString() and ReplaceAll() utility functions. Review URL: http://codereview.chromium.org/19704 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9031 0039d316-1c4b-4281-b951-d872f2087c98
* Add HexStringToBytes which takes an arbitrary length hex string and creates ↵erikkay@google.com2009-01-271-0/+52
| | | | | | | | a vector of bytes. Review URL: http://codereview.chromium.org/18814 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8716 0039d316-1c4b-4281-b951-d872f2087c98
* Simplify HexEncode.deanm@chromium.org2009-01-221-2/+2
| | | | | | | Review URL: http://codereview.chromium.org/18659 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8450 0039d316-1c4b-4281-b951-d872f2087c98
* Adding a HexEncode function to string_utils.tommi@chromium.org2009-01-221-0/+8
| | | | | | | | This function takes a pointer to a chunk of memory and formats the bytes as hex. Review URL: http://codereview.chromium.org/18452 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8420 0039d316-1c4b-4281-b951-d872f2087c98
* Add a replace_all param to ReplaceSubstringsAfterOffset and update call sites.aa@chromium.org2009-01-211-0/+29
| | | | | | Review URL: http://codereview.chromium.org/18603 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8413 0039d316-1c4b-4281-b951-d872f2087c98
* This CL adds the autofill UI in forms.jcampan@chromium.org2008-11-051-5/+21
| | | | | | | | | | | | When the user types text in a text field in a form, the renderer queries the browser for suggestion based on the entered text and displays the suggestions in a popup. Listeners are set on the form text field in a similar fashion than for password save. The popup showing the suggestion uses the same mechanism as the select popup. Note that a difference between the select and the autofill popup is that the autofill should not take focus, so the page still has focus and the user can still type in while it shows. The creation of the render widget was modified for that purpose so we can specify the popup should not be focused when shown. Review URL: http://codereview.chromium.org/8885 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4804 0039d316-1c4b-4281-b951-d872f2087c98