| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
worldview to an "offsets point between characters" worldview.
This more closely aligns with how the omnibox autocomplete code (which is what
this was originally written for) expects things to behave.
Direct fallout from this change:
* An input offset of 0 will always map to an output offset of 0.
* An input offset of (length of string) will always map to the length of the
output string, instead of npos.
* It's possible for multiple unique input offsets to map to a single non-npos
output offset, if they e.g. point to the start and end of a collapsed
sequence.
* Input offsets pointing into the middle of a completely-removed sequence may
not be set to npos if they fall on the boundaries of a subsequence processed
by the transformer. For example, when running FormatUrlWithOffsets() on
"http://user:pass@domain.com/" and directing it to omit both the scheme and
username/password, an input offset of "7" that points in between the scheme
and the username/password will be transformed to an output offset of 0
instead of npos.
Indirect fallout:
* A caller like SearchProvider::NavigationToMatch() will now mark certain
matches as "allowed to be default" that it didn't before. Specifically, if
the user's input string ends at the same point as the desired
|fill_into_edit|, the autocomplete offset will be calculated as (length of
string) instead of npos, and thus the match will be thought of as "inlinable"
and thus "allowed to be default".
BUG=284781
TEST=none
R=msw@chromium.org, willchan@chromium.org
Review URL: https://codereview.chromium.org/23619016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222426 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See original discussion at https://codereview.chromium.org/18656004/
Reverted as: https://codereview.chromium.org/23463010/
Added a new base::strings::SafeSPrintf() function that can
safely be called from all restricted (e.g. async-signal-safe)
environments. It is roughly equivalent to snprintf(). But
it is easier to use, as it uses C++ to be type-safe.
In release builds, this function is guaranteed to never call
any other library function nor any system calls. In debug
builds, we call RAW_CHECK() in some circumstances.
This code is needed for (at least) the seccomp sandbox and
to clean up code in the stack tracer. Those changes are
pending and will be submitted as separate CLs.
BUG=285499
TEST=base_unittests
TBR=willchan@chromium.org
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/23777003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221322 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Revert "Disable EmitNULL test for Widows x64."
This reverts r220773 and 220746.
r220746 broke ChromiumOS build.
BUG=283595
TBR=markus@chromium.org
Review URL: https://codereview.chromium.org/23463010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220777 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
TBR=markus@chromium.org
BUG=283595
Review URL: https://codereview.chromium.org/23851004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220773 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
safely be called from all restricted (e.g. async-signal-safe)
environments. It is roughly equivalent to snprintf(). But
it is easier to use, as it uses C++ to be type-safe.
In release builds, this function is guaranteed to never call
any other library function nor any system calls. In debug
builds, we call RAW_CHECK() in some circumstances.
This code is needed for (at least) the seccomp sandbox and
to clean up code in the stack tracer. Those changes are
pending and will be submitted as separate CLs.
BUG=none
TEST=base_unittests
Review URL: https://chromiumcodereview.appspot.com/18656004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@220746 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This experiment, which runs as part of the bundled omnibox field trial,
uses the field trial parameters to demote results of particular types
(e.g., HISTORY_TITLE results), possibly depending on context (e.g.,
search results page doing search term replacement).
It also improves the testing framework for field trial parameters,
allowing them to be cleared between consecutive TEST_F()s.
Tested via unit tests and by setting up my local variations server with
some parameters and making sure results can be demoted or
omitted.
BUG=264066
Review URL: https://chromiumcodereview.appspot.com/22031002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216633 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL was created fully mechanically by running
git grep -l base::mac::ScopedCFTypeRef | xargs sed -i -e 's/base::mac::ScopedCFTypeRef/base::ScopedCFTypeRef/g'
git commit -a -m.
git clang-format HEAD^ --style=Chromium
git commit -a -m.
git cl upload -t $TITLE
BUG=251957
TBR=mark@chromium.org
Review URL: https://codereview.chromium.org/16917011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208245 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=247723
TEST=everything compiles OK
TBR=ben@chromium.org
Review URL: https://codereview.chromium.org/17390010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207507 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=247723
TEST=compile works
TBR=brettw@chromium.org
Review URL: https://chromiumcodereview.appspot.com/17385006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207165 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: https://chromiumcodereview.appspot.com/17327004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206922 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
Change the default constructor to set is_null_ to true. This makes NullableString16 act more like a WebKit::WebString, which is really the reason NullableString16 exists at all.
R=brettw@chromium.org
Review URL: https://codereview.chromium.org/17289005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206805 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
BUG=247723
TEST=no change
TBR=brettw@chromium.org
Review URL: https://codereview.chromium.org/16415016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206066 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Add unit tests for the following functions in base:
StringToUint
StringToUint64
StringToSizeT
Review URL: https://chromiumcodereview.appspot.com/15521004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@206031 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Remove forwarding header
BUG=
R=avi@chromium.org
Review URL: https://codereview.chromium.org/16667019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205584 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
|
|
|
|
|
|
|
|
|
| |
BUG=247723
TEST=no change
Review URL: https://chromiumcodereview.appspot.com/16331011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@205050 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
ash/, base/.
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/15735027
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204874 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately, we can't keep this function in webkit/glue because not everyone
who links in Blink depends on webkit/glue. For example, cc uses WebString but
doesn't depend on webkit/glue.
IMHO, the best solution to all these constraints is to put this function in
base. It's concerned with concepts that make sense in base (strings and
character sets). The only thing odd about the function is that it accepts
Latin-1 or UTF-16, which is because of the underlying string representation in
Blink.
Review URL: https://chromiumcodereview.appspot.com/15732022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203003 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change generates "integer constant is too large for 'unsigned long' type" compile error on "Google Chrome Linux" buildbot
> add more string -> unsigned number conversion unit tests
>
> Add unit tests for the following functions in base:
> StringToUint
> StringToUint64
> StringToSizeT
>
> Review URL: https://chromiumcodereview.appspot.com/14794002
TBR=mostynb@opera.com
Review URL: https://codereview.chromium.org/15464016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201237 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
Add unit tests for the following functions in base:
StringToUint
StringToUint64
StringToSizeT
Review URL: https://chromiumcodereview.appspot.com/14794002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@201204 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
This keeps a forwarding header in the old location and adds "using" statements to avoid changing all callers.
BUG=None
R=tfarina@chromium.org
Review URL: https://codereview.chromium.org/14126006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198542 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
| |
BUG=None
TEST=new tests added
Review URL: https://chromiumcodereview.appspot.com/14749003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198001 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
(the closest value in the datatype's range).
Review URL: https://chromiumcodereview.appspot.com/14109020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@197614 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
C++11 is picker about narrowing inside initializers. Avoid errors related to
that by explicitly casting to the appropriate types or changing the types in
function declarations where possible.
BUG=
TEST=Build with gcc and -Wnarrowing.
Review URL: https://chromiumcodereview.appspot.com/13878015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@195114 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
| |
TBR:felipeg1
Review URL: https://codereview.chromium.org/13956013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193966 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
| |
BUG=
Review URL: https://chromiumcodereview.appspot.com/14103008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193933 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch was generated by running the empty_string clang tool
across the Chromium Linux compilation database. Implicitly or
explicitly constructing std::string() with a "" argument is
inefficient as the caller needs to emit extra instructions to
pass an argument, and the constructor needlessly copies a byte
into internal storage. Rewriting these instances to simply call
the default constructor appears to save ~14-18 kilobytes on an
optimized release build.
BUG=none
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=193020
Review URL: https://codereview.chromium.org/13145003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193040 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit e59558b78e8c6a1b0bd916a724724b638c3c91b6.
Revert "Fix build after r193020."
This reverts commit 558a35897f6b3ffbcaefde927c1f150b815d140a.
Revert "Really fix build after r193020."
This reverts commit e3748a79b523a8d365d4a33ef986eebb4186fa78.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193030 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch was generated by running the empty_string clang tool
across the Chromium Linux compilation database. Implicitly or
explicitly constructing std::string() with a "" argument is
inefficient as the caller needs to emit extra instructions to
pass an argument, and the constructor needlessly copies a byte
into internal storage. Rewriting these instances to simply call
the default constructor appears to save ~14-18 kilobytes on an
optimized release build.
BUG=none
Review URL: https://codereview.chromium.org/13145003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193020 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
| |
string_piece.h was moved into base/strings/ in r191206 -
https://chromiumcodereview.appspot.com/12982018/
TBR=brettw@chromium.org
Review URL: https://codereview.chromium.org/13374002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191508 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
| |
This keeps a forwarding header and does not update any code to use the new location. This will be updated in a later pass.
BUG=
Review URL: https://codereview.chromium.org/12982018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@191206 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This header was moved in r181161 (https://codereview.chromium.org/12092078)
but the header guard macro wasn't updated.
R=brettw@chromium.org
BUG=none
TEST=none
Review URL: https://chromiumcodereview.appspot.com/12648009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189280 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 updates callers in base but I left a forwarding header so I can the rest in pieces (there are >300).
Review URL: https://codereview.chromium.org/12213061
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181345 0039d316-1c4b-4281-b951-d872f2087c98
|
|
|
|
|
|
| |
Review URL: https://codereview.chromium.org/12087115
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181183 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=
Review URL: https://codereview.chromium.org/12087091
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180211 0039d316-1c4b-4281-b951-d872f2087c98
|
|
This removes the unused L-string macros in the file.
BUG=
Review URL: https://codereview.chromium.org/12090083
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@179926 0039d316-1c4b-4281-b951-d872f2087c98
|