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

Issue 2466143002: iOS: Mark HTTP pages with password fields with an omnibox icon. (Closed)

Created:
4 years, 1 month ago by lgarron
Modified:
4 years ago
CC:
chromium-reviews, gcasto+watchlist_chromium.org, mac-reviews_chromium.org, sdefresne+watch_chromium.org, vabr+watchlistpasswordmanager_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

iOS: Mark HTTP pages with password fields with an omnibox icon. BUG=647822 ================================ TEST=Use an iPhone, not an iPad. First, enable the proper flag: -------------------------------- 1. Open the Settings app 2. Scroll to Chrome Beta/Dev/Canary and press 3. Scroll down to Experimental Settings and press 4. Scroll to EXTRA FLAGS (ONE PER LINE) 5. Toggle "Append Extra Flags" to ON 6. Set Flag1 to "--mark-non-secure-as=show-non-secure-passwords-cc-ui" (without the quotes) -------------------------------- Test 3 URLs: 1) Visit https://badssl.com/input/login/ and verify that the omnibox security has a green lock security indicator to the left of the URL. 2) Visit http://http-login.badssl.com/ and verify that the omnibox security has a grey info icon ⓘ security indicator to the left of the URL. 3) Visit http://http.badssl.com/ and verify that the omnibox does *not* have a security indicator to the left of the URL. -------------------------------- 4) Set Flag1 (see above) to "--mark-non-secure-as=neutral" (without the quotes) and check that http://http-login.badssl.com/ does *not* have a security indicator to the left of the URL. ================================ Committed: https://crrev.com/5f03ba5ae3b6fa1059da663fa8c86f8846b16e31 Cr-Commit-Position: refs/heads/master@{#438721}

Patch Set 1 #

Patch Set 2 : iOS HTTP Bad. #

Patch Set 3 : iOS HTTP Bad. #

Patch Set 4 : iOS HTTP Bad. #

Total comments: 25

Patch Set 5 : IsOriginSecure() #

Total comments: 4

Patch Set 6 : Address nits. #

Patch Set 7 #

Total comments: 10

Patch Set 8 : Add comments #

Patch Set 9 : iOS HTTP Bad. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+106 lines, -1 line) Patch
M ios/chrome/browser/passwords/password_controller.mm View 1 2 3 4 5 6 7 2 chunks +10 lines, -0 lines 0 comments Download
M ios/chrome/browser/passwords/password_controller_unittest.mm View 1 2 3 4 5 6 7 8 3 chunks +51 lines, -0 lines 0 comments Download
M ios/chrome/browser/ssl/ios_security_state_tab_helper.mm View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M ios/web/public/ssl_status.h View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
M ios/web/public/test/test_web_state.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M ios/web/public/web_state/web_state.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M ios/web/web_state/ui/crw_web_controller.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M ios/web/web_state/ui/crw_web_controller.mm View 1 2 3 4 5 6 7 1 chunk +9 lines, -0 lines 0 comments Download
M ios/web/web_state/ui/crw_web_controller_unittest.mm View 1 2 3 4 5 6 7 1 chunk +13 lines, -0 lines 0 comments Download
M ios/web/web_state/web_state_impl.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M ios/web/web_state/web_state_impl.mm View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 45 (27 generated)
lgarron
eugenebut@, could you review? https://codereview.chromium.org/2466143002/diff/60001/ios/chrome/browser/passwords/password_controller.mm File ios/chrome/browser/passwords/password_controller.mm (right): https://codereview.chromium.org/2466143002/diff/60001/ios/chrome/browser/passwords/password_controller.mm#newcode45 ios/chrome/browser/passwords/password_controller.mm:45: #include "ios/web/web_state/web_state_impl.h" This is giving ...
4 years ago (2016-11-29 03:48:49 UTC) #4
estark
Cool! I left some drive-by comments. Also would suggest writing some tests. https://codereview.chromium.org/2466143002/diff/60001/ios/chrome/browser/passwords/password_controller.mm File ios/chrome/browser/passwords/password_controller.mm ...
4 years ago (2016-11-29 21:28:48 UTC) #6
Eugene But (OOO till 7-30)
+1 for writing tests https://codereview.chromium.org/2466143002/diff/60001/ios/chrome/browser/passwords/password_controller.mm File ios/chrome/browser/passwords/password_controller.mm (right): https://codereview.chromium.org/2466143002/diff/60001/ios/chrome/browser/passwords/password_controller.mm#newcode45 ios/chrome/browser/passwords/password_controller.mm:45: #include "ios/web/web_state/web_state_impl.h" On 2016/11/29 21:28:48, ...
4 years ago (2016-11-30 17:58:41 UTC) #7
lgarron
eugenebut@, could you review? I believe I've addressed everything except the transient item inconsistency. https://codereview.chromium.org/2466143002/diff/60001/ios/chrome/browser/passwords/password_controller.mm ...
4 years ago (2016-12-02 01:21:53 UTC) #10
Eugene But (OOO till 7-30)
Per Emily's comment, could you please add unit tests for WebController. Otherwise everything looks good. ...
4 years ago (2016-12-02 01:53:12 UTC) #12
lgarron
Still trying to figure out how to use TestWebState to test this. Doing a CQ ...
4 years ago (2016-12-06 01:38:36 UTC) #13
lgarron
Still trying to figure out how to use TestWebState to test this. Doing a CQ ...
4 years ago (2016-12-06 01:38:36 UTC) #14
estark
On 2016/12/06 01:38:36, lgarron wrote: > Still trying to figure out how to use TestWebState ...
4 years ago (2016-12-07 18:09:18 UTC) #19
lgarron
Now with 100% more unit tests! eugenebut@, could you review?
4 years ago (2016-12-08 00:39:37 UTC) #21
Eugene But (OOO till 7-30)
lgtm! Thank you for the tests. https://codereview.chromium.org/2466143002/diff/180001/ios/chrome/browser/passwords/password_controller_unittest.mm File ios/chrome/browser/passwords/password_controller_unittest.mm (right): https://codereview.chromium.org/2466143002/diff/180001/ios/chrome/browser/passwords/password_controller_unittest.mm#newcode32 ios/chrome/browser/passwords/password_controller_unittest.mm:32: #include "ios/web/public/navigation_item.h" s/include/import ...
4 years ago (2016-12-08 01:48:44 UTC) #22
estark
lgtm % Eugene's comments. And per discussion IRL last night, I don't fully understand how ...
4 years ago (2016-12-08 18:36:58 UTC) #28
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/2466143002/180001
4 years ago (2016-12-15 01:56:39 UTC) #32
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/123266) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years ago (2016-12-15 01:58:30 UTC) #34
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/2466143002/240001
4 years ago (2016-12-15 02:49:12 UTC) #38
lgarron
HTTP_SHOW_WARNING will be handled by [1] and [2]. [1] https://codereview.chromium.org/2574733003 [2] https://chromereviews.googleplex.com/556027013 Emily and I ...
4 years ago (2016-12-15 03:04:31 UTC) #39
commit-bot: I haz the power
Committed patchset #9 (id:240001)
4 years ago (2016-12-15 03:06:16 UTC) #42
commit-bot: I haz the power
Patchset 9 (id:??) landed as https://crrev.com/5f03ba5ae3b6fa1059da663fa8c86f8846b16e31 Cr-Commit-Position: refs/heads/master@{#438721}
4 years ago (2016-12-15 03:08:41 UTC) #44
Eugene But (OOO till 7-30)
4 years ago (2016-12-15 03:45:36 UTC) #45
Message was sent while issue was closed.
https://codereview.chromium.org/2466143002/diff/180001/ios/chrome/browser/pas...
File ios/chrome/browser/passwords/password_controller_unittest.mm (right):

https://codereview.chromium.org/2466143002/diff/180001/ios/chrome/browser/pas...
ios/chrome/browser/passwords/password_controller_unittest.mm:32: #include
"ios/web/public/navigation_item.h"
On 2016/12/15 03:04:31, lgarron wrote:
> On 2016/12/08 at 01:48:43, Eugene But wrote:
> > s/include/import
> 
> I originally had import, but all these three imports have C++ classes, and at
> least one is accompanied by a .cc file.
> How do I tell which do use? (I can't find any documentation on it.)
Style Guide sais "#import Objective-C/Objective-C++ headers, and #include C/C++
headers":
https://google.github.io/styleguide/objcguide.xml#_import_and__include

So if you see #import or @ in the header, it is an Objective-C header for sure
and it can not be compiled by C++ compiler. This rule will work for 99% of
cases.

https://codereview.chromium.org/2466143002/diff/180001/ios/chrome/browser/pas...
ios/chrome/browser/passwords/password_controller_unittest.mm:1303:
TEST_F(PasswordControllerTest, HTTPNoPassword) {
On 2016/12/15 03:04:31, lgarron wrote:
> On 2016/12/08 at 01:48:43, Eugene But wrote:
> > s/HTTPNoPassword/HttpNoPassword
> 
> Comments added.
> 
> This file also has a test called SaveOnNonHTMLLandingPage, so I followed that
> convention.
> If CamelCase is the correct choice, should I rename the other to
> SaveOnNonHtmlLandingPage?
Camel case is correct choice per C++ Style Guide, but Chromium code is extremely
inconsistent with it so if surrounding code uses all caps, then it's perfectly
fine to keep all caps.

Powered by Google App Engine
This is Rietveld 408576698