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

Issue 10536017: Refactoring CookiesTreeModel to support multiple data sources. (Closed)

Created:
8 years, 6 months ago by nasko
Modified:
8 years, 3 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Refactoring CookiesTreeModel to support multiple data sources. BUG=126093 TEST=Unit tests and manual verification.

Patch Set 1 #

Patch Set 2 : Almost working, needs fixing the Remove(All) buttons. #

Patch Set 3 : Mostly working, just need to refresh properly on Remove All #

Total comments: 8

Patch Set 4 : Remove All now works. #

Patch Set 5 : Some cleanup performed. #

Patch Set 6 : More cleanup done. #

Total comments: 34

Patch Set 7 : Fixing based on review feedback. #

Patch Set 8 : Moving from wstring to string16. #

Total comments: 77

Patch Set 9 : Another wave of fixes to Markus' review. #

Patch Set 10 : Refactoring common code and style fixes. #

Total comments: 24

Patch Set 11 : Fixed all comments by Evan. #

Total comments: 55

Patch Set 12 : Fixes for commes by James and Evan. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1521 lines, -746 lines) Patch
M chrome/browser/cookies_tree_model.h View 1 2 3 4 5 6 7 8 9 10 11 13 chunks +119 lines, -96 lines 0 comments Download
M chrome/browser/cookies_tree_model.cc View 1 2 3 4 5 6 7 8 9 10 11 19 chunks +565 lines, -382 lines 0 comments Download
M chrome/browser/cookies_tree_model_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 42 chunks +323 lines, -191 lines 0 comments Download
A chrome/browser/local_data_container.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +139 lines, -0 lines 0 comments Download
A chrome/browser/local_data_container.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +179 lines, -0 lines 0 comments Download
M chrome/browser/resources/options2/cookies_list.js View 1 2 3 4 5 6 7 8 9 10 3 chunks +23 lines, -4 lines 0 comments Download
M chrome/browser/resources/options2/cookies_view.js View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +18 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/content_settings/collected_cookies_mac.mm View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +39 lines, -22 lines 0 comments Download
M chrome/browser/ui/gtk/collected_cookies_gtk.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +33 lines, -22 lines 0 comments Download
M chrome/browser/ui/views/collected_cookies_views.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +35 lines, -22 lines 0 comments Download
M chrome/browser/ui/webui/cookies_tree_model_util.cc View 1 2 3 4 5 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/options2/cookies_view_handler2.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +38 lines, -6 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
markusheintz_
Since this CL needed to be so huge I will review in several chucks. I'm ...
8 years, 6 months ago (2012-06-13 23:40:39 UTC) #1
nasko
Fixes for most comments, answers on some, wstring->string16 will happen in a separate update. https://chromiumcodereview.appspot.com/10536017/diff/14003/chrome/browser/cookies_tree_model.h ...
8 years, 6 months ago (2012-06-14 18:46:42 UTC) #2
markusheintz_
Thanks a lot for replacing all the wstrings. Here a some more comments. http://codereview.chromium.org/10536017/diff/5013/chrome/browser/cookies_tree_model.cc File ...
8 years, 6 months ago (2012-06-18 16:52:41 UTC) #3
nasko
Fixes based on comments. I've kept the logging for debugging purposes, but I've removed it ...
8 years, 6 months ago (2012-06-18 19:59:14 UTC) #4
markusheintz_
Thanks for your patience and sorry for the delay. Please check all for loop for ...
8 years, 6 months ago (2012-06-19 20:01:33 UTC) #5
nasko
I've addressed all the comments. https://chromiumcodereview.appspot.com/10536017/diff/14003/chrome/browser/cookies_tree_model.h File chrome/browser/cookies_tree_model.h (right): https://chromiumcodereview.appspot.com/10536017/diff/14003/chrome/browser/cookies_tree_model.h#newcode675 chrome/browser/cookies_tree_model.h:675: virtual void PopulateAppCacheInfoWithFilter(const string16* ...
8 years, 6 months ago (2012-06-19 22:22:40 UTC) #6
nasko
Including area owners jeremy@chromium.org for ui/cocoa jeremy@chromium.org for ui/gtk jhawkins@chromium.org for everything else
8 years, 6 months ago (2012-06-19 23:32:56 UTC) #7
nasko
Wrong reviewer for ui/gtk in the previous email. Adding estade@chromium.org.
8 years, 6 months ago (2012-06-19 23:37:42 UTC) #8
Evan Stade
https://chromiumcodereview.appspot.com/10536017/diff/31001/chrome/browser/cookies_tree_model.h File chrome/browser/cookies_tree_model.h (right): https://chromiumcodereview.appspot.com/10536017/diff/31001/chrome/browser/cookies_tree_model.h#newcode797 chrome/browser/cookies_tree_model.h:797: // LocalDataContainer --------------------------------------------------------- please create a new file for ...
8 years, 6 months ago (2012-06-19 23:43:50 UTC) #9
jeremy
Rubberstamp LGTM for ui/cocoa .
8 years, 6 months ago (2012-06-20 10:00:11 UTC) #10
nasko
Thanks for the quick review Evan! I've responded to most of the comments and will ...
8 years, 6 months ago (2012-06-20 15:49:37 UTC) #11
markusheintz_
LGTM On 2012/06/20 15:49:37, nasko wrote: > Thanks for the quick review Evan! I've responded ...
8 years, 6 months ago (2012-06-20 21:04:04 UTC) #12
Evan Stade
https://chromiumcodereview.appspot.com/10536017/diff/31001/chrome/browser/cookies_tree_model.h File chrome/browser/cookies_tree_model.h (right): https://chromiumcodereview.appspot.com/10536017/diff/31001/chrome/browser/cookies_tree_model.h#newcode797 chrome/browser/cookies_tree_model.h:797: // LocalDataContainer --------------------------------------------------------- On 2012/06/20 15:49:37, nasko wrote: > ...
8 years, 6 months ago (2012-06-20 21:06:30 UTC) #13
nasko
Including jhawkins@ for review. https://chromiumcodereview.appspot.com/10536017/diff/31001/chrome/browser/cookies_tree_model.h File chrome/browser/cookies_tree_model.h (right): https://chromiumcodereview.appspot.com/10536017/diff/31001/chrome/browser/cookies_tree_model.h#newcode797 chrome/browser/cookies_tree_model.h:797: // LocalDataContainer --------------------------------------------------------- On 2012/06/20 ...
8 years, 6 months ago (2012-06-20 22:32:32 UTC) #14
James Hawkins
https://chromiumcodereview.appspot.com/10536017/diff/36001/chrome/browser/cookies_tree_model.cc File chrome/browser/cookies_tree_model.cc (right): https://chromiumcodereview.appspot.com/10536017/diff/36001/chrome/browser/cookies_tree_model.cc#newcode33 chrome/browser/cookies_tree_model.cc:33: LocalDataContainer* GetLocalDataContainerForNode(const CookieTreeNode* node) { nit: Document function. https://chromiumcodereview.appspot.com/10536017/diff/36001/chrome/browser/cookies_tree_model.cc#newcode34 ...
8 years, 6 months ago (2012-06-21 00:04:12 UTC) #15
Evan Stade
https://chromiumcodereview.appspot.com/10536017/diff/36001/chrome/browser/local_data_container.h File chrome/browser/local_data_container.h (right): https://chromiumcodereview.appspot.com/10536017/diff/36001/chrome/browser/local_data_container.h#newcode28 chrome/browser/local_data_container.h:28: typedef std::map<std::string, LocalDataContainer*> ContainerMap; don't indent inside namespaces. https://chromiumcodereview.appspot.com/10536017/diff/36001/chrome/browser/resources/options2/cookies_list.js ...
8 years, 6 months ago (2012-06-21 04:01:41 UTC) #16
nasko
Including ben@chromium.org, as ui/views is not covered yet. https://chromiumcodereview.appspot.com/10536017/diff/36001/chrome/browser/cookies_tree_model.cc File chrome/browser/cookies_tree_model.cc (right): https://chromiumcodereview.appspot.com/10536017/diff/36001/chrome/browser/cookies_tree_model.cc#newcode33 chrome/browser/cookies_tree_model.cc:33: LocalDataContainer* ...
8 years, 6 months ago (2012-06-21 16:22:12 UTC) #17
Evan Stade
https://chromiumcodereview.appspot.com/10536017/diff/36001/chrome/browser/resources/options2/cookies_list.js File chrome/browser/resources/options2/cookies_list.js (right): https://chromiumcodereview.appspot.com/10536017/diff/36001/chrome/browser/resources/options2/cookies_list.js#newcode837 chrome/browser/resources/options2/cookies_list.js:837: if (parentId) { On 2012/06/21 16:22:12, nasko wrote: > ...
8 years, 6 months ago (2012-06-21 18:40:02 UTC) #18
nasko
https://chromiumcodereview.appspot.com/10536017/diff/36001/chrome/browser/resources/options2/cookies_list.js File chrome/browser/resources/options2/cookies_list.js (right): https://chromiumcodereview.appspot.com/10536017/diff/36001/chrome/browser/resources/options2/cookies_list.js#newcode837 chrome/browser/resources/options2/cookies_list.js:837: if (parentId) { On 2012/06/21 18:40:02, Evan Stade wrote: ...
8 years, 6 months ago (2012-06-21 18:49:47 UTC) #19
Ben Goodger (Google)
ui/views lgtm
8 years, 6 months ago (2012-06-21 21:48:47 UTC) #20
Evan Stade
bear with me here... https://chromiumcodereview.appspot.com/10536017/diff/36001/chrome/browser/resources/options2/cookies_list.js File chrome/browser/resources/options2/cookies_list.js (right): https://chromiumcodereview.appspot.com/10536017/diff/36001/chrome/browser/resources/options2/cookies_list.js#newcode837 chrome/browser/resources/options2/cookies_list.js:837: if (parentId) { On 2012/06/21 ...
8 years, 6 months ago (2012-06-22 00:59:47 UTC) #21
nasko
8 years, 6 months ago (2012-06-22 17:59:35 UTC) #22
Yes, I understood what you mean now and I agree. I will update the code later,
since there is a chance this CL will be abandoned :(

https://chromiumcodereview.appspot.com/10536017/diff/36001/chrome/browser/res...
File chrome/browser/resources/options2/cookies_list.js (right):

https://chromiumcodereview.appspot.com/10536017/diff/36001/chrome/browser/res...
chrome/browser/resources/options2/cookies_list.js:837: if (parentId) {
On 2012/06/22 00:59:47, Evan Stade wrote:
> On 2012/06/21 18:49:47, nasko wrote:
> > On 2012/06/21 18:40:02, Evan Stade wrote:
> > > On 2012/06/21 16:22:12, nasko wrote:
> > > > On 2012/06/21 04:01:41, Evan Stade wrote:
> > > > > I think parentId has to be truthy at this point, because if it were
> falsey
> > > > then
> > > > > |parent| would already equal |this|.
> > > > 
> > > > Since I've added a new level in the tree, it no longer starts at the
root
> of
> > > the
> > > > tree, rather at the app level. In this case, the parent ID is valid (not
> the
> > > > root), but also we haven't inserted the parent in the parentLookup.
> > > 
> > > if the parentId is valid then why are you checking it?
> > 
> > Because, while there is a parent node (the root node), it is not in the
lookup
> > table. So in the case where we have valid parentId (the app node has parent
of
> > root), but it is not in the lookup table, we want to use the cookie view as
> the
> > parent to add items to.
> 
> I'm not really following you any more. And I don't think you're following me.
> Explain to me how the code you have here is any different from:
> 
> var parent = parentLookup[parentId] || this;

I see what your point is. You are indeed correct.

Powered by Google App Engine
This is Rietveld 408576698