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

Issue 2606873002: Move the offline URL trimming to GetFormattedURL. (Closed)

Created:
3 years, 11 months ago by Olivier
Modified:
3 years, 11 months ago
CC:
chromium-reviews, stkhapugin, pkl (ping after 24h if needed), noyau+watch_chromium.org, sdefresne+watch_chromium.org, jif
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move the offline URL trimming to GetFormattedURL. Changing directly the URL may have side effects beside hiding the scheme. Move the formatting to GetFormattedURL. Also refactor ToolbarModelIOS to inherit ToolbarModel. BUG=674986 Committed: https://crrev.com/b65b86e30213aec954229d11b48663ca4f894f6e Cr-Commit-Position: refs/heads/master@{#440955}

Patch Set 1 #

Patch Set 2 : fix DCHECK #

Patch Set 3 : clean #

Total comments: 19

Patch Set 4 : added unittest + added removed_chars length #

Patch Set 5 : cleaning #

Patch Set 6 : fix DEPS #

Unified diffs Side-by-side diffs Delta from patch set Stats (+250 lines, -50 lines) Patch
M ios/chrome/browser/reading_list/offline_url_utils.h View 1 2 3 2 chunks +8 lines, -0 lines 0 comments Download
M ios/chrome/browser/reading_list/offline_url_utils.cc View 1 2 3 2 chunks +26 lines, -0 lines 0 comments Download
M ios/chrome/browser/reading_list/offline_url_utils_unittest.cc View 1 2 3 3 chunks +35 lines, -0 lines 0 comments Download
M ios/chrome/browser/ui/toolbar/BUILD.gn View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M ios/chrome/browser/ui/toolbar/test_toolbar_model_ios.h View 1 2 2 chunks +12 lines, -1 line 0 comments Download
M ios/chrome/browser/ui/toolbar/test_toolbar_model_ios.mm View 1 2 2 chunks +30 lines, -1 line 0 comments Download
M ios/chrome/browser/ui/toolbar/toolbar_model_delegate_ios.mm View 1 2 3 2 chunks +1 line, -20 lines 0 comments Download
M ios/chrome/browser/ui/toolbar/toolbar_model_impl_ios.h View 2 chunks +11 lines, -1 line 0 comments Download
M ios/chrome/browser/ui/toolbar/toolbar_model_impl_ios.mm View 1 2 3 3 chunks +57 lines, -16 lines 0 comments Download
M ios/chrome/browser/ui/toolbar/toolbar_model_impl_ios_unittest.mm View 1 2 3 4 3 chunks +59 lines, -1 line 0 comments Download
M ios/chrome/browser/ui/toolbar/toolbar_model_ios.h View 1 chunk +1 line, -6 lines 0 comments Download
M ios/chrome/browser/ui/toolbar/web_toolbar_controller.mm View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download
M ios/web/public/test/test_navigation_manager.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M ios/web/public/test/test_navigation_manager.mm View 1 2 3 4 1 chunk +5 lines, -2 lines 0 comments Download

Messages

Total messages: 18 (9 generated)
Olivier
3 years, 11 months ago (2016-12-28 11:40:31 UTC) #2
Eugene But (OOO till 7-30)
Could you please add some tests to toolbar_model_impl_ios_unittest. Other than that lgtm and thanks a ...
3 years, 11 months ago (2016-12-28 17:03:00 UTC) #3
Olivier
Done, thanks https://codereview.chromium.org/2606873002/diff/40001/ios/chrome/browser/reading_list/offline_url_utils.cc File ios/chrome/browser/reading_list/offline_url_utils.cc (right): https://codereview.chromium.org/2606873002/diff/40001/ios/chrome/browser/reading_list/offline_url_utils.cc#newcode80 ios/chrome/browser/reading_list/offline_url_utils.cc:80: online_url, base::UTF8ToUTF16(base::StringPrintf( On 2016/12/28 17:02:59, Eugene But ...
3 years, 11 months ago (2016-12-29 12:37:20 UTC) #4
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/2606873002/80001
3 years, 11 months ago (2016-12-29 12:37:38 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/128726)
3 years, 11 months ago (2016-12-29 12:43:25 UTC) #9
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/2606873002/100001
3 years, 11 months ago (2016-12-29 13:05:25 UTC) #12
commit-bot: I haz the power
Committed patchset #6 (id:100001)
3 years, 11 months ago (2016-12-29 14:40:13 UTC) #15
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/b65b86e30213aec954229d11b48663ca4f894f6e Cr-Commit-Position: refs/heads/master@{#440955}
3 years, 11 months ago (2017-01-02 15:52:16 UTC) #17
rohitrao (ping after 24h)
3 years, 11 months ago (2017-01-06 13:16:35 UTC) #18
Message was sent while issue was closed.
Found the CL I was looking for, but it took some digging =)

https://chromereviews.googleplex.com/19697013/

We made a conscious decision to not use inheritance here, because doing so is
incorrect.

The issue is that ToolbarModel::input_in_progress() is not a virtual function. 
This means that ToolbarModelIOSImpl now has two implementations of that
function, backed by two different ivars.  One version is called when the
compiler thinks you have a ToolbarModelIOS*, and the other is called when the
compiler thinks you have a ToolbarModel*.  There is nothing to keep the two in
sync.

Powered by Google App Engine
This is Rietveld 408576698