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

Side by Side Diff: net/base/cookie_monster.cc

Issue 7355025: Creat BrowsingDataCookieHelper and CannedBrowsingDataCookieHelper for logging cookies at UI thread. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Portions of this code based on Mozilla: 5 // Portions of this code based on Mozilla:
6 // (netwerk/cookie/src/nsCookieService.cpp) 6 // (netwerk/cookie/src/nsCookieService.cpp)
7 /* ***** BEGIN LICENSE BLOCK ***** 7 /* ***** BEGIN LICENSE BLOCK *****
8 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 8 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
9 * 9 *
10 * The contents of this file are subject to the Mozilla Public License Version 10 * The contents of this file are subject to the Mozilla Public License Version
(...skipping 2080 matching lines...) Expand 10 before | Expand all | Expand 10 after
2091 expiry_date_ = CanonExpiration(pc, creation_date_, CookieOptions()); 2091 expiry_date_ = CanonExpiration(pc, creation_date_, CookieOptions());
2092 else 2092 else
2093 SetSessionCookieExpiryTime(); 2093 SetSessionCookieExpiryTime();
2094 2094
2095 // Do the best we can with the domain. 2095 // Do the best we can with the domain.
2096 std::string cookie_domain; 2096 std::string cookie_domain;
2097 std::string domain_string; 2097 std::string domain_string;
2098 if (pc.HasDomain()) { 2098 if (pc.HasDomain()) {
2099 domain_string = pc.Domain(); 2099 domain_string = pc.Domain();
2100 } 2100 }
2101 bool result 2101 GetCookieDomainWithString(url, domain_string,
erikwright (departed) 2011/07/19 14:40:33 What's the background on this change?
ycxiao1 2011/07/19 22:12:48 This canonicalcookie construct was originally used
2102 = GetCookieDomainWithString(url, domain_string,
2103 &cookie_domain); 2102 &cookie_domain);
2104 // Caller is responsible for passing in good arguments. 2103 // Caller is responsible for passing in good arguments.
2105 DCHECK(result);
2106 domain_ = cookie_domain; 2104 domain_ = cookie_domain;
2107 } 2105 }
2108 2106
2109 CookieMonster::CanonicalCookie::~CanonicalCookie() { 2107 CookieMonster::CanonicalCookie::~CanonicalCookie() {
2110 } 2108 }
2111 2109
2112 std::string CookieMonster::CanonicalCookie::GetCookieSourceFromURL( 2110 std::string CookieMonster::CanonicalCookie::GetCookieSourceFromURL(
2113 const GURL& url) { 2111 const GURL& url) {
2114 if (url.SchemeIsFile()) 2112 if (url.SchemeIsFile())
2115 return url.spec(); 2113 return url.spec();
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
2257 std::string CookieMonster::CanonicalCookie::DebugString() const { 2255 std::string CookieMonster::CanonicalCookie::DebugString() const {
2258 return base::StringPrintf( 2256 return base::StringPrintf(
2259 "name: %s value: %s domain: %s path: %s creation: %" 2257 "name: %s value: %s domain: %s path: %s creation: %"
2260 PRId64, 2258 PRId64,
2261 name_.c_str(), value_.c_str(), 2259 name_.c_str(), value_.c_str(),
2262 domain_.c_str(), path_.c_str(), 2260 domain_.c_str(), path_.c_str(),
2263 static_cast<int64>(creation_date_.ToTimeT())); 2261 static_cast<int64>(creation_date_.ToTimeT()));
2264 } 2262 }
2265 2263
2266 } // namespace 2264 } // namespace
OLDNEW
« chrome/browser/cookies_tree_model_unittest.cc ('K') | « chrome/chrome_tests.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698