| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
|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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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 ($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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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 ($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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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 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
|
|
|
|
|
|
|
|
|
|
|
| |
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(), 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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
This reverts commit r56603.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56608 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
95% of this is removing "const" from return types, but turning this
on found one bug! (A "for" loop that expected its iterator to go negative but
which was using an unsigned type.)
BUG=34160
Review URL: http://codereview.chromium.org/570012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38266 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
|