summaryrefslogtreecommitdiffstats
path: root/base/string_util.cc
Commit message (Collapse)AuthorAgeFilesLines
* Remove the locale parameter from the StringToDouble andtc@google.com2008-11-181-104/+60
| | | | | | | | | | | | DoubleToString methods and only leave the locale independent methods. It turns out this code is only used in the json code and if people want locale formatting, they should use ICU. Review URL: http://codereview.chromium.org/11423 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5585 0039d316-1c4b-4281-b951-d872f2087c98
* Fix the mac build to add dmg_fp to the libbase.a.tony@chromium.org2008-11-151-1/+1
| | | | | | | | | Remove third_party/dmg_fp complete since nothing else depends on it. Review URL: http://codereview.chromium.org/10963 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5525 0039d316-1c4b-4281-b951-d872f2087c98
* fix bug in locale dependence checktc@google.com2008-11-141-1/+1
| | | | | | | | | this caused us to always go down the language independent path Review URL: http://codereview.chromium.org/10713 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5479 0039d316-1c4b-4281-b951-d872f2087c98
* Make unit_tests pass with pt_BR.UTF-8 locale.tc@google.com2008-11-121-38/+109
| | | | | | | | | | | BUG=3675 Patch from Paweł Hajdan jr <phajdan.jr@gmail.com> original issue: http://codereview.chromium.org/9509 Review URL: http://codereview.chromium.org/11002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5319 0039d316-1c4b-4281-b951-d872f2087c98
* This CL adds the autofill UI in forms.jcampan@chromium.org2008-11-051-0/+13
| | | | | | | | | | | | 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
* This CL adds prompting for dangerous types of files (executable) when they ↵jcampan@chromium.org2008-10-101-0/+36
| | | | | | | | | | | | | | | | are automatically downloaded. The file is saved with a temporary name (dangerous_download_xxxx.download) in the download directory and the user is presented (in the download shelf and the download tab if opened) with a warning message and buttons to save/discard the download. If discarded the download is removed (and its file deleted). If saved, download goes as usual. Dangerous downloads not confirmed by the user are deleted on shutdown. TEST=Download a small exe file, try using the save/discard button from the download shelf and from the download tab (the intent is that the file has been entirely downloaded by the time you take action). Try again with a slow/big download (that time the download is expected not to be finished when approved/discarded). Review URL: http://codereview.chromium.org/6043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3228 0039d316-1c4b-4281-b951-d872f2087c98
* Add UTF-8 check for JSON deserializer.jungshik@google.com2008-09-251-6/+7
| | | | | | | | | | | Add tests for IsStringUTF8 Make IsStringUTF8 accept std::string/std::wstring rather than char*/wchar_t* Review URL: http://codereview.chromium.org/4268 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2610 0039d316-1c4b-4281-b951-d872f2087c98
* Use COMPILE_ASSERT instead of DCHECK for compile-time constant checksmmentovai@google.com2008-08-271-4/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1418 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
* crosstool's gcc gives lots of warnings likedkegel@google.com2008-08-211-5/+5
| | | | | | | | "warning: suggest parentheses around && within ||" For base/string_util.cc, just add the suggested parentheses. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1175 0039d316-1c4b-4281-b951-d872f2087c98
* Fix some more warnings.evanm@google.com2008-08-201-2/+2
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1130 0039d316-1c4b-4281-b951-d872f2087c98
* DCHECK vswprintf format string cross-platform portability. Use %ls, not %s, ↵mmentovai@google.com2008-08-141-0/+42
| | | | | | for wchar_t* fields. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@849 0039d316-1c4b-4281-b951-d872f2087c98
* Implement an interface compatible wcslcpy and strlcpy. Possibly slightlydeanm@google.com2008-08-131-0/+31
| | | | | | | | | | slower than the OpenBSD implementation, but a bit clearer and fits our style. Move file_util_posix to use it now that we have it everywhere. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@798 0039d316-1c4b-4281-b951-d872f2087c98
* Implement IntToString-type methods without using a format string. I'm not ↵deanm@google.com2008-08-131-11/+90
| | | | | | sure if this will actually be more efficient. Also will make Int64ToString work on other platforms, since the old code used msvc-only %I64. Added a bunch of methods to have the whole Int/Int64 String/WString suite. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@784 0039d316-1c4b-4281-b951-d872f2087c98
* Fix string_util and its tests for the Mac, GCC, UTF-32 wchar_t platforms, ↵mmentovai@google.com2008-08-131-35/+56
| | | | | | and POSIX systems generally. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@771 0039d316-1c4b-4281-b951-d872f2087c98
* Back out r736 due to breakagemmentovai@google.com2008-08-121-56/+35
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@738 0039d316-1c4b-4281-b951-d872f2087c98
* Fix string_util and its tests for the Mac, GCC, UTF-32 wchar_t platforms, ↵mmentovai@google.com2008-08-121-35/+56
| | | | | | and POSIX systems generally. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@736 0039d316-1c4b-4281-b951-d872f2087c98
* Fix ToUnsigned for 4-byte wchar_t platforms.mmentovai@google.com2008-08-121-0/+4
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@712 0039d316-1c4b-4281-b951-d872f2087c98
* Rename and remove a bunch of string functions.evanm@google.com2008-08-071-7/+9
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@527 0039d316-1c4b-4281-b951-d872f2087c98
* Cross-platform portability fixes for JSONReader. Adds generic ↵mmentovai@google.com2008-08-071-6/+52
| | | | | | | | string-to-double parsing and tests in string_util. There is one behavior change here: numbers which "look" like integers by virtue of being free of '.', 'e', and 'E' are no longer rejected if they're not within the [INT_MIN .. INT_MAX] range. Instead, they'll be parsed and stored internally as doubles. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@519 0039d316-1c4b-4281-b951-d872f2087c98
* Allow string-to-int conversions to provide a return value indicating ↵mmentovai@google.com2008-08-051-1/+214
| | | | | | success. Implement them consistently on all platforms. Fill in a couple of necessary missing pieces. Eliminate the need for many uses of sscanf. Add tests. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@405 0039d316-1c4b-4281-b951-d872f2087c98
* Revert my UTF change until we can figure out what to do with the sandbox.brettw@google.com2008-08-011-21/+0
| | | | | | BUG=1201008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@215 0039d316-1c4b-4281-b951-d872f2087c98
* Write our own utf8<->wide conversion functions. This gives us more control ↵brettw@google.com2008-08-011-0/+21
| | | | | | over error handling instead of getting a blank string for invalid encodings. It also allows us to decrease the amount of platform-specific code. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211 0039d316-1c4b-4281-b951-d872f2087c98
* Add base to the repository.initial.commit2008-07-261-0/+1021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8 0039d316-1c4b-4281-b951-d872f2087c98