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

Issue 2908443002: Initial implementation of Cookie service.

Created:
3 years, 7 months ago by Randy Smith (Not in Mondays)
Modified:
3 years, 5 months ago
Reviewers:
yzshen1
CC:
chromium-reviews, cbentzel+watch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, darin (slow to review), net-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Initial implementation of Cookie service. BUG=721395

Patch Set 1 #

Patch Set 2 : Got initial implementation compiling. #

Total comments: 13

Patch Set 3 : Merged past dependency CLs to p482652. #

Total comments: 3

Patch Set 4 : Sample build with failing Traits<> compile. #

Patch Set 5 : Fixed Traits compile & defaulting. #

Patch Set 6 : Incorporated rest of comments. #

Patch Set 7 : Finished implementing service. #

Patch Set 8 : Switched to targeted types on the PredicateWrapper. #

Patch Set 9 : Partially written test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+997 lines, -4 lines) Patch
M content/common/BUILD.gn View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -0 lines 0 comments Download
A content/common/cookie.mojom View 1 2 3 4 5 6 7 8 1 chunk +155 lines, -0 lines 0 comments Download
A content/common/cookie.typemap View 1 2 3 4 5 6 7 8 1 chunk +18 lines, -0 lines 0 comments Download
A content/common/cookie_service_impl.h View 1 2 3 4 5 6 7 8 1 chunk +88 lines, -0 lines 0 comments Download
A content/common/cookie_service_impl.cc View 1 2 3 4 5 6 7 1 chunk +217 lines, -0 lines 0 comments Download
A content/common/cookie_service_impl_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +224 lines, -0 lines 0 comments Download
A content/common/cookie_traits.h View 1 2 3 4 5 6 7 8 1 chunk +172 lines, -0 lines 0 comments Download
A content/common/cookie_traits.cc View 1 2 3 4 5 6 7 8 1 chunk +107 lines, -0 lines 0 comments Download
M content/common/typemaps.gni View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M net/cookies/canonical_cookie.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M net/cookies/cookie_options.h View 1 chunk +1 line, -0 lines 0 comments Download
M net/cookies/cookie_options.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M net/cookies/cookie_store.h View 1 2 3 4 5 6 2 chunks +6 lines, -4 lines 0 comments Download

Messages

Total messages: 16 (11 generated)
Randy Smith (Not in Mondays)
Yuzhu: Would you be willing to take a look at this CL and give me ...
3 years, 6 months ago (2017-06-17 19:48:46 UTC) #2
yzshen1
In general I think naming and file locations look good. I only have some nits. ...
3 years, 6 months ago (2017-06-20 18:33:17 UTC) #3
Randy Smith (Not in Mondays)
Yuzhu: Thanks very much for the comments so far! Before integrating them, I'm trying to ...
3 years, 5 months ago (2017-06-27 17:41:40 UTC) #8
yzshen1
https://codereview.chromium.org/2908443002/diff/40001/content/common/cookies.mojom File content/common/cookies.mojom (right): https://codereview.chromium.org/2908443002/diff/40001/content/common/cookies.mojom#newcode35 content/common/cookies.mojom:35: CookieSameSiteFilter cookie_same_site_filter = DO_NOT_INCLUDE; On 2017/06/27 17:41:40, Randy Smith ...
3 years, 5 months ago (2017-06-28 07:00:37 UTC) #9
Randy Smith (Not in Mondays)
3 years, 5 months ago (2017-06-28 12:42:44 UTC) #10
https://codereview.chromium.org/2908443002/diff/40001/content/common/cookies....
File content/common/cookies.mojom (right):

https://codereview.chromium.org/2908443002/diff/40001/content/common/cookies....
content/common/cookies.mojom:35: CookieSameSiteFilter cookie_same_site_filter =
DO_NOT_INCLUDE;
On 2017/06/28 07:00:37, yzshen1 wrote:
> On 2017/06/27 17:41:40, Randy Smith (Not in Mondays) wrote:
> > I'm getting a compilation error in the generated file at the code
> corresponding
> > to this site:
> > 
> > gen/content/common/cookies.mojom.cc:35:7: error: cannot initialize a member
> > subobject of type 'net::CookieOptions::SameSiteCookieMode' with an rvalue of
> > type 'content::mojom::CookieSameSiteFilter'
> >       cookie_same_site_filter(CookieSameSiteFilter::DO_NOT_INCLUDE),
> >       ^                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > 
> > I assume this is based on the typemap I setup between CookieSameSiteFilter
and
> > net::CookieOptions::SameSiteCookieMode.  However, it still seems a bit weird
> to
> > me, since I'd think the .mojom file would be self-consistent, and the
typemap
> > would control how values were mapped to the outside world.   So before I
went
> > through and converted all the default values over to the values they're
> > typemapped from I wanted to confirm that that's intended best practice
rather
> > than a .mojom -> .cc compilation glitch?
> 
> Sorry about this. I don't think we have carefully looked at the default value
> initialization logic to make sure it works with mapped types. In this case we
> should be able to use EnumTraits to map the value.
> 
> I could fix that when I get back to the office on Thursday. WDYT?

Sure; I can find a workaround, or just work on my next CL until then.  Thanks!

Powered by Google App Engine
This is Rietveld 408576698