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

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

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 1635 matching lines...) Expand 10 before | Expand all | Expand 10 after
1646 if (!skip_httponly || !cc->IsHttpOnly()) { 1646 if (!skip_httponly || !cc->IsHttpOnly()) {
1647 histogram_cookie_delete_equivalent_->Add( 1647 histogram_cookie_delete_equivalent_->Add(
1648 COOKIE_DELETE_EQUIVALENT_WOULD_HAVE_DELETED); 1648 COOKIE_DELETE_EQUIVALENT_WOULD_HAVE_DELETED);
1649 } 1649 }
1650 } 1650 }
1651 } else if (ecc.IsEquivalent(*cc)) { 1651 } else if (ecc.IsEquivalent(*cc)) {
1652 // We should never have more than one equivalent cookie, since they should 1652 // We should never have more than one equivalent cookie, since they should
1653 // overwrite each other, unless secure cookies require secure scheme is 1653 // overwrite each other, unless secure cookies require secure scheme is
1654 // being enforced. In that case, cookies with different paths might exist 1654 // being enforced. In that case, cookies with different paths might exist
1655 // and be considered equivalent. 1655 // and be considered equivalent.
1656 CHECK(!found_equivalent_cookie) 1656 // Duplicate equivalent cookies found, cookie store is corrupted.
1657 << "Duplicate equivalent cookies found, cookie store is corrupted."; 1657 CHECK(!found_equivalent_cookie);
1658 if (skip_httponly && cc->IsHttpOnly()) { 1658 if (skip_httponly && cc->IsHttpOnly()) {
1659 skipped_httponly = true; 1659 skipped_httponly = true;
1660 } else { 1660 } else {
1661 histogram_cookie_delete_equivalent_->Add( 1661 histogram_cookie_delete_equivalent_->Add(
1662 COOKIE_DELETE_EQUIVALENT_FOUND); 1662 COOKIE_DELETE_EQUIVALENT_FOUND);
1663 InternalDeleteCookie(curit, true, already_expired 1663 InternalDeleteCookie(curit, true, already_expired
1664 ? DELETE_COOKIE_EXPIRED_OVERWRITE 1664 ? DELETE_COOKIE_EXPIRED_OVERWRITE
1665 : DELETE_COOKIE_OVERWRITE); 1665 : DELETE_COOKIE_OVERWRITE);
1666 } 1666 }
1667 found_equivalent_cookie = true; 1667 found_equivalent_cookie = true;
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
2386 it != hook_map_.end(); ++it) { 2386 it != hook_map_.end(); ++it) {
2387 std::pair<GURL, std::string> key = it->first; 2387 std::pair<GURL, std::string> key = it->first;
2388 if (cookie.IncludeForRequestURL(key.first, opts) && 2388 if (cookie.IncludeForRequestURL(key.first, opts) &&
2389 cookie.Name() == key.second) { 2389 cookie.Name() == key.second) {
2390 it->second->Notify(cookie, cause); 2390 it->second->Notify(cookie, cause);
2391 } 2391 }
2392 } 2392 }
2393 } 2393 }
2394 2394
2395 } // namespace net 2395 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698