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

Issue 597031: Avoid showing the user a garbage path attribute when the cookie doesn't have ... (Closed)

Created:
10 years, 10 months ago by darin (slow to review)
Modified:
9 years, 7 months ago
Reviewers:
Peter Kasting
CC:
chromium-reviews, ben+cc_chromium.org
Visibility:
Public.

Description

Avoid showing the user a garbage path attribute when the cookie doesn't have an explicit path set. This CL also ensures that we set the expiry info properly. This means using CanonPath and CanonExpiration from cookie_monster.cc. Instead of exposing those methods, I just expose a CanonicalCookie constructor that takes a ParsedCookie. R=pkasting BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=38984

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 10

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+42 lines, -39 lines) Patch
M chrome/browser/cookie_modal_dialog.h View 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/cookie_modal_dialog.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/cookie_modal_dialog_views.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/message_box_handler.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/message_box_handler.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/net/chrome_cookie_policy.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/views/cookie_info_view.h View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/views/cookie_info_view.cc View 1 1 chunk +4 lines, -16 lines 0 comments Download
M chrome/browser/views/cookie_prompt_view.h View 3 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/views/cookie_prompt_view.cc View 2 4 chunks +6 lines, -7 lines 0 comments Download
M net/base/cookie_monster.h View 2 2 chunks +2 lines, -1 line 0 comments Download
M net/base/cookie_monster.cc View 2 2 chunks +15 lines, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
darin (slow to review)
10 years, 10 months ago (2010-02-11 00:34:33 UTC) #1
Peter Kasting
LGTM
10 years, 10 months ago (2010-02-11 00:52:03 UTC) #2
Peter Kasting
On Wed, Feb 10, 2010 at 4:52 PM, <pkasting@chromium.org> wrote: > LGTM Actually maybe we ...
10 years, 10 months ago (2010-02-11 00:53:49 UTC) #3
darin (slow to review)
Ah yes... it should be "/" instead of "". I'll look into sharing code for ...
10 years, 10 months ago (2010-02-11 08:27:20 UTC) #4
darin (slow to review)
Actually, it looks like we need to use the CanonPath function defined in cookie_monster.cc. It ...
10 years, 10 months ago (2010-02-11 08:30:57 UTC) #5
darin (slow to review)
10 years, 10 months ago (2010-02-11 22:09:02 UTC) #6
darin (slow to review)
Hi Peter, This change got much more interesting. Please take another look :) -Darin On ...
10 years, 10 months ago (2010-02-11 22:13:25 UTC) #7
Peter Kasting
LGTM http://codereview.chromium.org/597031/diff/1003/15 File chrome/browser/net/chrome_cookie_policy.cc (right): http://codereview.chromium.org/597031/diff/1003/15#newcode149 chrome/browser/net/chrome_cookie_policy.cc:149: const std::string& host = data.url.host(); You're welcome to ...
10 years, 10 months ago (2010-02-11 22:20:58 UTC) #8
darin (slow to review)
10 years, 10 months ago (2010-02-12 06:24:02 UTC) #9
http://codereview.chromium.org/597031/diff/1003/15
File chrome/browser/net/chrome_cookie_policy.cc (right):

http://codereview.chromium.org/597031/diff/1003/15#newcode149
chrome/browser/net/chrome_cookie_policy.cc:149: const std::string& host =
data.url.host();
On 2010/02/11 22:20:58, Peter Kasting wrote:
> You're welcome to also add a const GURL& url temp here if you want.

naw, that wouldn't buy much.  data.url is just as cheap.  the host temp avoids
having to recreate the string object returned by url.host().

http://codereview.chromium.org/597031/diff/1003/11
File chrome/browser/views/cookie_prompt_view.cc (right):

http://codereview.chromium.org/597031/diff/1003/11#newcode286
chrome/browser/views/cookie_prompt_view.cc:286: if (cookie_ui_) {
On 2010/02/11 22:20:58, Peter Kasting wrote:
> Nit: No {}.  I'd just do
> host_ = cookie_ui_ ? url_.host() : local_storage_info_.host;

Done.

http://codereview.chromium.org/597031/diff/1003/11#newcode291
chrome/browser/views/cookie_prompt_view.cc:291: DCHECK(host_.empty() || host_[0]
!= '.');
The host shouldn't be empty.  I'm actually going to remove this assert.  It is
leftovers from a time when this code thought it was displaying a domain string.

http://codereview.chromium.org/597031/diff/1003/6
File net/base/cookie_monster.cc (right):

http://codereview.chromium.org/597031/diff/1003/6#newcode1
net/base/cookie_monster.cc:1: // Copyright (c) 2006-2008 The Chromium Authors.
All rights reserved.
On 2010/02/11 22:20:58, Peter Kasting wrote:
> Nit: 2010

Done.

http://codereview.chromium.org/597031/diff/1003/5
File net/base/cookie_monster.h (right):

http://codereview.chromium.org/597031/diff/1003/5#newcode1
net/base/cookie_monster.h:1: // Copyright (c) 2006-2008 The Chromium Authors.
All rights reserved.
On 2010/02/11 22:20:58, Peter Kasting wrote:
> Nit: 2010

Done.

Powered by Google App Engine
This is Rietveld 408576698