Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Issue 2953943003: base::OffsetAdjuster: Refactor offset limiting logic into the base::OffsetAdjuster (Closed)

Created:
3 years, 6 months ago by tommycli
Modified:
3 years, 5 months ago
CC:
chromium-reviews, danakj+watch_chromium.org, jshin+watch_chromium.org, vmpstr+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

base::OffsetAdjuster: Refactor offset limiting logic into the base::OffsetAdjuster Previously, almost all usages of OffsetAdjuster applied a post-processing step to clamp the resulting offsets to a "sane" range. This refactor moves the clamping into the base function, but as an optional parameter. This also reduces the API surface by removing the LimitOffset class. BUG=732582 Review-Url: https://codereview.chromium.org/2953943003 Cr-Commit-Position: refs/heads/master@{#486205} Committed: https://chromium.googlesource.com/chromium/src/+/7a4241c698a71a5cc10ec6135060f4d99af2b96c

Patch Set 1 #

Patch Set 2 : fix #

Patch Set 3 : fix #

Patch Set 4 : fix an issue #

Patch Set 5 : fix #

Total comments: 6

Patch Set 6 : merge #

Patch Set 7 : fix #

Patch Set 8 : fix #

Total comments: 2

Patch Set 9 : fix test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -60 lines) Patch
M base/strings/utf_offset_string_conversions.h View 3 chunks +8 lines, -22 lines 0 comments Download
M base/strings/utf_offset_string_conversions.cc View 1 2 3 4 5 6 7 4 chunks +19 lines, -13 lines 0 comments Download
M base/strings/utf_offset_string_conversions_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -6 lines 0 comments Download
M components/url_formatter/url_formatter.cc View 1 2 3 4 5 3 chunks +13 lines, -19 lines 0 comments Download

Messages

Total messages: 46 (30 generated)
tommycli
pkasting: PTAL, this is a potential refactor we could do based on our previous discussion ...
3 years, 6 months ago (2017-06-23 21:17:18 UTC) #5
Justin Donnelly
This looks like a nice improvement to me. https://codereview.chromium.org/2953943003/diff/80001/components/omnibox/browser/autocomplete_match.cc File components/omnibox/browser/autocomplete_match.cc (left): https://codereview.chromium.org/2953943003/diff/80001/components/omnibox/browser/autocomplete_match.cc#oldcode507 components/omnibox/browser/autocomplete_match.cc:507: base::string16 ...
3 years, 5 months ago (2017-06-27 15:28:46 UTC) #12
tommycli
On 2017/06/27 15:28:46, Justin Donnelly wrote: > This looks like a nice improvement to me. ...
3 years, 5 months ago (2017-06-28 16:34:52 UTC) #13
tommycli
pkasting: PTAL. This is ready for review now.
3 years, 5 months ago (2017-07-07 19:25:30 UTC) #20
tommycli
jdonnelly: I didn't forget your comments. I think they have been overcome by other events ...
3 years, 5 months ago (2017-07-07 19:27:10 UTC) #21
Peter Kasting
LGTM https://codereview.chromium.org/2953943003/diff/140001/base/strings/utf_offset_string_conversions_unittest.cc File base/strings/utf_offset_string_conversions_unittest.cc (right): https://codereview.chromium.org/2953943003/diff/140001/base/strings/utf_offset_string_conversions_unittest.cc#newcode80 base/strings/utf_offset_string_conversions_unittest.cc:80: OffsetAdjuster::Adjustments no_adjustments; Nit: const? constexpr? Name kNoAdjustments? Maybe ...
3 years, 5 months ago (2017-07-08 02:23:20 UTC) #24
tommycli
thanks! https://codereview.chromium.org/2953943003/diff/140001/base/strings/utf_offset_string_conversions_unittest.cc File base/strings/utf_offset_string_conversions_unittest.cc (right): https://codereview.chromium.org/2953943003/diff/140001/base/strings/utf_offset_string_conversions_unittest.cc#newcode80 base/strings/utf_offset_string_conversions_unittest.cc:80: OffsetAdjuster::Adjustments no_adjustments; On 2017/07/08 02:23:20, Peter Kasting wrote: ...
3 years, 5 months ago (2017-07-10 17:10:30 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2953943003/160001
3 years, 5 months ago (2017-07-10 17:10:56 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/484536)
3 years, 5 months ago (2017-07-10 17:21:15 UTC) #33
tommycli
brettw: PTAL owners stamp needed. last days of rietveld
3 years, 5 months ago (2017-07-10 20:04:05 UTC) #35
brettw
lgtm
3 years, 5 months ago (2017-07-12 19:50:13 UTC) #36
tommycli
On 2017/07/12 19:50:13, brettw wrote: > lgtm thank you, submitting
3 years, 5 months ago (2017-07-12 20:40:01 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2953943003/160001
3 years, 5 months ago (2017-07-12 20:40:31 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: android_n5x_swarming_rel on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_n5x_swarming_rel/builds/219068)
3 years, 5 months ago (2017-07-12 21:16:40 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2953943003/160001
3 years, 5 months ago (2017-07-12 21:21:42 UTC) #43
commit-bot: I haz the power
3 years, 5 months ago (2017-07-13 01:37:52 UTC) #46
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://chromium.googlesource.com/chromium/src/+/7a4241c698a71a5cc10ec6135060...

Powered by Google App Engine
This is Rietveld 408576698