| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/115413
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16205 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
| |
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16021 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/42155
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11593 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/28324
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10767 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/28281
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10664 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/28180
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10458 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/18659
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8450 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Review URL: http://codereview.chromium.org/18603
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8413 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|