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

Issue 2567873002: DevTools: Add ability to add and edit cookies (Closed)

Created:
4 years ago by kdzwinel
Modified:
3 years, 10 months ago
Reviewers:
phulce, dgozman, allada
CC:
apavlov+blink_chromium.org, blink-reviews, caseq+blink_chromium.org, chromium-reviews, devtools-reviews_chromium.org, kozyatinskiy+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, pfeldman
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

DevTools: Add ability to add and edit cookies How it looks in action: http://imgur.com/a/Oxdze Couple of notes (1,2,3 were discussed previously with @allada): 1) There is both front-end and back-end validation 2) Cookie is saved with default values (domain = current, path = /, expires = session) as soon as user fills out the first field (name) 3) When validation fails, DataGrid node is marked as "unsaved" 4) There can be more than one "unsaved" node at the same time 5) Any action that causes cookies to reload from back-end (e.g. refresh, delete, changed tab) causes all "unsaved" changes to be forgotten 6) Validation allows all valid domains, paths and dates. If user sets a domain or path different from the target's, or date that is in the past, node will disappear from the DataGrid 7) Setting flags (HTTP, Secure, SameSite) is done via Context Menu because ATM there are no inline checkbox/select editors TODO: - inline editors - use multitargetNetworkManager instead of targetManager BUG=166637 R=allada,phulce Review-Url: https://codereview.chromium.org/2567873002 Cr-Commit-Position: refs/heads/master@{#446473} Committed: https://chromium.googlesource.com/chromium/src/+/42d8de0ce3d18a85197a8394be1d21f0aecb6d01

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add front-end validation. Add `startEditingNextEditableColumnOfDataGridNode` method to DataGrid. Fi… #

Total comments: 10

Patch Set 3 : Code review fixes. #

Total comments: 31

Patch Set 4 : Code review fixes - part 2. #

Total comments: 7

Patch Set 5 : Code review fixes - part 3. #

Total comments: 16

Patch Set 6 : Code review fixes - part 4. #

Patch Set 7 : Code review fixes - part 5. #

Total comments: 3

Patch Set 8 : Code review fixes - part 6. #

Patch Set 9 : Remove EmptyWidget from CookieItemsView. #

Patch Set 10 : Show entries that are inactive - do not match current URL or couldn't be saved. Remove flags from c… #

Patch Set 11 : Make dirty styles of the DataGrid node more important than it's inactive styles. #

Patch Set 12 : Rebase. #

Patch Set 13 : Fix formatting. #

Total comments: 9

Patch Set 14 : Do not show cookies for non-http(s) origins. Fix cookie editing for URLs specifying port number. +… #

Patch Set 15 : Rebase. #

Total comments: 3

Patch Set 16 : Whitelist file:// & address other review comments #

Patch Set 17 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+299 lines, -46 lines) Patch
M third_party/WebKit/Source/devtools/front_end/cookie_table/CookiesTable.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 9 chunks +180 lines, -19 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/data_grid/DataGrid.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +66 lines, -1 line 0 comments Download
M third_party/WebKit/Source/devtools/front_end/data_grid/dataGrid.css View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +15 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/resources/CookieItemsView.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +3 lines, -20 lines 0 comments Download
M third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/devtools/front_end/sdk/CookieParser.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +34 lines, -5 lines 0 comments Download

Messages

Total messages: 64 (33 generated)
kdzwinel
PTAL I've created a new CL, previous one (for the record) is here: https://codereview.chromium.org/2215773002 This ...
4 years ago (2016-12-11 22:07:07 UTC) #4
phulce
Thanks for the updated CL! The automatic filtering by path, domain, and expiration is an ...
4 years ago (2016-12-12 17:58:40 UTC) #5
kdzwinel
Thanks for a review! All good points, I've addressed them. On 2016/12/12 at 17:58:40, phulce ...
4 years ago (2016-12-13 00:11:13 UTC) #6
allada
> Things disappearing is definitely not a great UX. Should I tackle that in this ...
4 years ago (2016-12-13 01:34:31 UTC) #9
kdzwinel
I've addressed most of the issues found, but I'll need a bit more clarification regarding ...
4 years ago (2016-12-14 01:32:36 UTC) #10
allada
Awesome! Hope this clarifies much of the questions. Thanks! https://codereview.chromium.org/2567873002/diff/40001/third_party/WebKit/Source/devtools/front_end/components_lazy/CookiesTable.js File third_party/WebKit/Source/devtools/front_end/components_lazy/CookiesTable.js (right): https://codereview.chromium.org/2567873002/diff/40001/third_party/WebKit/Source/devtools/front_end/components_lazy/CookiesTable.js#newcode88 third_party/WebKit/Source/devtools/front_end/components_lazy/CookiesTable.js:88: ...
4 years ago (2016-12-14 03:04:15 UTC) #11
kdzwinel
Thanks for all the clarifications! I've replied to your comments. https://codereview.chromium.org/2567873002/diff/40001/third_party/WebKit/Source/devtools/front_end/components_lazy/CookiesTable.js File third_party/WebKit/Source/devtools/front_end/components_lazy/CookiesTable.js (right): https://codereview.chromium.org/2567873002/diff/40001/third_party/WebKit/Source/devtools/front_end/components_lazy/CookiesTable.js#newcode410 ...
4 years ago (2016-12-14 14:26:50 UTC) #12
dgozman
Can we add checkboxes to DataGrid before landing this? It would be so much better! ...
4 years ago (2016-12-14 17:20:21 UTC) #14
kdzwinel
@dgozman thanks for input! I've updated the code accordingly PTAL. Regarding inline editors - we ...
4 years ago (2016-12-15 12:38:50 UTC) #15
allada
Overall is looking really good! There are some core issues that I am trying to ...
4 years ago (2016-12-15 23:45:52 UTC) #16
kdzwinel
@allada thank you for your comments! I've adjusted the code accordingly. BTW I still need ...
4 years ago (2016-12-19 01:55:04 UTC) #18
allada
This is looking really good! I applied it today and really like it. There are ...
3 years, 12 months ago (2016-12-23 00:37:11 UTC) #19
allada
I am going to also run a buildbot dryrun to check for any tests that ...
3 years, 12 months ago (2016-12-23 00:38:53 UTC) #22
kdzwinel
I'm back after a short break! @allada thank you again for your review, I've addressed ...
3 years, 11 months ago (2017-01-08 22:38:40 UTC) #29
dgozman
So, I've played with this a bit, and I don't like that cookie disappears if ...
3 years, 11 months ago (2017-01-11 00:34:22 UTC) #30
kdzwinel
Thanks for checking it out! I've removed flags from context menus and introduced 'inactive' DataGrid ...
3 years, 11 months ago (2017-01-16 02:14:41 UTC) #31
dgozman
On 2017/01/16 02:14:41, kdzwinel wrote: > Thanks for checking it out! > > I've removed ...
3 years, 11 months ago (2017-01-18 22:02:37 UTC) #32
kdzwinel
Rebased! PTAL
3 years, 11 months ago (2017-01-18 23:48:47 UTC) #33
dgozman
Works great! https://codereview.chromium.org/2567873002/diff/240001/third_party/WebKit/Source/devtools/front_end/cookie_table/CookiesTable.js File third_party/WebKit/Source/devtools/front_end/cookie_table/CookiesTable.js (right): https://codereview.chromium.org/2567873002/diff/240001/third_party/WebKit/Source/devtools/front_end/cookie_table/CookiesTable.js#newcode220 third_party/WebKit/Source/devtools/front_end/cookie_table/CookiesTable.js:220: this._addInactiveNode(this._dataGrid.rootNode(), selectedCookie, lastEditedColumnId); style: 2 spaces indent ...
3 years, 11 months ago (2017-01-20 01:54:51 UTC) #34
kdzwinel
All comments addressed. PTAL https://codereview.chromium.org/2567873002/diff/240001/third_party/WebKit/Source/devtools/front_end/cookie_table/CookiesTable.js File third_party/WebKit/Source/devtools/front_end/cookie_table/CookiesTable.js (right): https://codereview.chromium.org/2567873002/diff/240001/third_party/WebKit/Source/devtools/front_end/cookie_table/CookiesTable.js#newcode220 third_party/WebKit/Source/devtools/front_end/cookie_table/CookiesTable.js:220: this._addInactiveNode(this._dataGrid.rootNode(), selectedCookie, lastEditedColumnId); On 2017/01/20 ...
3 years, 11 months ago (2017-01-21 02:12:20 UTC) #35
dgozman
lgtm https://codereview.chromium.org/2567873002/diff/280001/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js File third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js (right): https://codereview.chromium.org/2567873002/diff/280001/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js#newcode395 third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js:395: if (!parsedURL || (parsedURL.scheme !== 'http' && parsedURL.scheme ...
3 years, 11 months ago (2017-01-24 01:23:25 UTC) #36
kdzwinel
I've fixed remaining issues. Thank you for your patience and help!
3 years, 11 months ago (2017-01-24 10:01:33 UTC) #37
allada
Awesome! Looks great. I am running them on the bots again, assuming everything comes back ...
3 years, 10 months ago (2017-01-25 22:56:39 UTC) #40
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/2567873002/320001
3 years, 10 months ago (2017-01-25 23:26:16 UTC) #45
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/220381)
3 years, 10 months ago (2017-01-26 01:06:06 UTC) #47
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/2567873002/320001
3 years, 10 months ago (2017-01-26 01:25:49 UTC) #49
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/220613)
3 years, 10 months ago (2017-01-26 04:25:38 UTC) #51
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/2567873002/320001
3 years, 10 months ago (2017-01-26 09:25:30 UTC) #53
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/220830)
3 years, 10 months ago (2017-01-26 10:40:05 UTC) #55
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/2567873002/320001
3 years, 10 months ago (2017-01-26 22:30:07 UTC) #61
commit-bot: I haz the power
3 years, 10 months ago (2017-01-26 22:40:28 UTC) #64
Message was sent while issue was closed.
Committed patchset #17 (id:320001) as
https://chromium.googlesource.com/chromium/src/+/42d8de0ce3d18a85197a8394be1d...

Powered by Google App Engine
This is Rietveld 408576698