| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When I moved StartsWith and EndsWith to the base namespace it became apparent that the bool parameter was frequently a source of confusion, and that the second argument is almost always a constant that we then convert to a string.
This adds new versions of StartsWith/EndsWith that takes an enum for case sensitivity and string pieces for the string inputs.
The existing functions used a locale-dependent case insensitive comparison that is marked with an old bug number that such comparisons are probably wrong. With this change, I moved the case insensitive comparisons to ASCII ones.
Only callers in base are updated. The rest of the calls go through a compatibility layer.
The compatibility layer keeps the local-dependent compares for the 16-bit string comparisons to avoid breaking things subtly. There are relatively few calls to the 16-bit version, and most use constants for the prefix/suffix (which wouldn't be affected by the locale), so there should be few callers to audit in a later pass to go to pure ASCII comparisons.
The 8-bit versions now always use the ASCII case-insensitive comparisons. This should be the only change in this patch that can affect the behavior of the program. Code doing locale-dependent 8-bit tolower() calls (what the old code ended up doing) is almost certainly wrong. UTF-8 strings will be mangled. The only 8-bit non-UTF-8 strings we have are typically Posix file paths and Posix file paths are case-sensitive. I'm not very concerned about regressions from this change.
Use StringPiece in FilePath for input arguments. This wasn't done before because we had no StringPiece16 until more recently. Constants are frequently passed as input to some of the functions, especially Append, so this will save some string allocations. Unfortunately, this is more likely to affect unit tests that the real browser. This is combined with the StartsWith/EndsWith changes because I started changing FilePath when updating its use of StartsWith.
The FilePath changes should have no observable effect on the product.
BUG=24917
Review URL: https://codereview.chromium.org/1182453004
Cr-Commit-Position: refs/heads/master@{#334555}
|
|
|
|
|
|
|
|
|
| |
BUG=464610
TEST=base_unittests
Review URL: https://codereview.chromium.org/985573003
Cr-Commit-Position: refs/heads/master@{#319806}
|
|
|
|
|
|
|
|
|
|
|
| |
Now supported: 1.02.3.4
Remains unsupported: 01.2.3.4
BUG=460642
Review URL: https://codereview.chromium.org/949573002
Cr-Commit-Position: refs/heads/master@{#317524}
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These are some of the suggestions from running include-what-you-use[1]
on the base target.
[1] https://code.google.com/p/include-what-you-use/
BUG=259043
Review URL: https://chromiumcodereview.appspot.com/23540009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221067 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
Fixes a comment in version.cc.
BUG=
Review URL: https://chromiumcodereview.appspot.com/17351015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207706 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=247723
TEST=none
TBR=ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/16320009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205284 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
Adds "using base::Version" to the header to avoid having to update everything at
once. All forward declares and the locations where the forward declares are
used are updated.
Review URL: https://chromiumcodereview.appspot.com/14099010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195456 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
R=brettw@chromium.org
Review URL: https://chromiumcodereview.appspot.com/12218059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181380 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
This only updates includes in base and keeps a forwarding header for now to keep the change under control.
BUG=
Review URL: https://codereview.chromium.org/12092078
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181161 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=none
TEST=none
TBR=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10683005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146157 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a method CompareToWildcardString that will return -1/0/1, similar to
CompareTo, when a version is smaller, equal to or greater than a wildcard
string such as "1.2.*". Added a method IsValidWildcardString that validates
the format of a wildcard string, and slightly refactored the Version class
to avoid code duplication. For example, CompareToWildcardString and CompareTo
share the new method CompareVersionComponents.
BUG=127077
TEST=See tests for VariationsService, Version
Review URL: https://chromiumcodereview.appspot.com/10576003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145468 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
Came up as in item in a component updater review. It is a common pattern used in extension updater and component updater.
TEST=included
BUG=none
Review URL: http://codereview.chromium.org/7541015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@94928 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=none
TEST=one
TBR=shess
Review URL: http://codereview.chromium.org/7131008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88145 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It turns out base/Version is really a value object but probably because of some serious accident or by
the machinations of a super villain, forgot his identity and now it thinks is a reference object,
only creatable in the heap and that could only spawn offsprings via cloning.
But fear not 'cause I've seen Version true nature; At its core is just a good 'ol vector<uint16>, which has
very respectable value semantics. Also I have removed the is_valid_ parasite as much as I could.
The old interface (GetVersionFromString and Clone) is kept so existing callers would not need to be modified.
BUG=none
TEST=included
Review URL: http://codereview.chromium.org/7105008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88143 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=68682
TEST=compiles
Review URL: http://codereview.chromium.org/6189001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70771 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
And fix callers.
BUG=23581
TEST=trybots
Review URL: http://codereview.chromium.org/5848005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70098 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=66505
TEST=test_shell_tests: PluginGroupTest.*; manual: check that issues reported and screenshotted in bug 66505 no longer occur
Review URL: http://codereview.chromium.org/5918003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69813 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
And fix callers.
BUG=23581
TEST=trybots
Review URL: http://codereview.chromium.org/5848005
TBR=evan@chromium.org
Review URL: http://codereview.chromium.org/5905006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69491 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
And fix callers.
BUG=23581
TEST=trybots
Review URL: http://codereview.chromium.org/5848005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69490 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
that it can be used from client_utils.cc which is included in both the chrome target and the chrome_nacl_win64 target.
BUG=61609
TEST=None
Review URL: http://codereview.chromium.org/4676002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65674 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=None
TEST=trybots
Review URL: http://codereview.chromium.org/3750001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62483 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
(~1.3 megs off Debug linux .a files)
BUG=none
TEST=compiles
Review URL: http://codereview.chromium.org/3556013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61587 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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the base namespace in the new file. Update callers.
I removed all wstring variants and also the string->number ones that ignore the return value. That encourages people to write code and forget about error handling.
TEST=included unit tests
BUG=none
Review URL: http://codereview.chromium.org/3056029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54355 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
| |
Made default constructor public, but DCHECK() on any use of a
default-constructed object.
BUG=none
TEST=unittests
Review URL: http://codereview.chromium.org/1364002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42681 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
Normalize end of file newlines in base/. All files end in a single newline.
Review URL: http://codereview.chromium.org/42011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11329 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
|
|
chrome/installer/util/version.*. This version has more flexible parsing rules and is more robust to detecting bogus versions, supporting arbitrary numbers of version components rather than just dotted quads. It's possible that we should switch chrome installer to use this version.
Review URL: http://codereview.chromium.org/19667
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8901 0039d316-1c4b-4281-b951-d872f2087c98
|