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

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

Issue 1253353004: WIP: Teach "First-Party-Only" cookies about the requestor origin. Base URL: https://chromium.googlesource.com/chromium/src.git@cookie-options
Patch Set: Created 5 years, 4 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
« no previous file with comments | « net/cookies/canonical_cookie_unittest.cc ('k') | net/cookies/cookie_options.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #include "base/memory/scoped_ptr.h" 56 #include "base/memory/scoped_ptr.h"
57 #include "base/metrics/field_trial.h" 57 #include "base/metrics/field_trial.h"
58 #include "base/metrics/histogram.h" 58 #include "base/metrics/histogram.h"
59 #include "base/profiler/scoped_tracker.h" 59 #include "base/profiler/scoped_tracker.h"
60 #include "base/single_thread_task_runner.h" 60 #include "base/single_thread_task_runner.h"
61 #include "base/strings/string_util.h" 61 #include "base/strings/string_util.h"
62 #include "base/strings/stringprintf.h" 62 #include "base/strings/stringprintf.h"
63 #include "base/thread_task_runner_handle.h" 63 #include "base/thread_task_runner_handle.h"
64 #include "net/base/registry_controlled_domains/registry_controlled_domain.h" 64 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
65 #include "net/cookies/canonical_cookie.h" 65 #include "net/cookies/canonical_cookie.h"
66 #include "net/cookies/cookie_options.h"
66 #include "net/cookies/cookie_util.h" 67 #include "net/cookies/cookie_util.h"
67 #include "net/cookies/parsed_cookie.h" 68 #include "net/cookies/parsed_cookie.h"
68 69
69 using base::Time; 70 using base::Time;
70 using base::TimeDelta; 71 using base::TimeDelta;
71 using base::TimeTicks; 72 using base::TimeTicks;
72 73
73 // In steady state, most cookie requests can be satisfied by the in memory 74 // In steady state, most cookie requests can be satisfied by the in memory
74 // cookie monster store. If the cookie request cannot be satisfied by the in 75 // cookie monster store. If the cookie request cannot be satisfied by the in
75 // memory store, the relevant cookies must be fetched from the persistent 76 // memory store, the relevant cookies must be fetched from the persistent
(...skipping 2365 matching lines...) Expand 10 before | Expand all | Expand 10 after
2441 it != hook_map_.end(); ++it) { 2442 it != hook_map_.end(); ++it) {
2442 std::pair<GURL, std::string> key = it->first; 2443 std::pair<GURL, std::string> key = it->first;
2443 if (cookie.IncludeForRequestURL(key.first, opts) && 2444 if (cookie.IncludeForRequestURL(key.first, opts) &&
2444 cookie.Name() == key.second) { 2445 cookie.Name() == key.second) {
2445 it->second->Notify(cookie, removed); 2446 it->second->Notify(cookie, removed);
2446 } 2447 }
2447 } 2448 }
2448 } 2449 }
2449 2450
2450 } // namespace net 2451 } // namespace net
OLDNEW
« no previous file with comments | « net/cookies/canonical_cookie_unittest.cc ('k') | net/cookies/cookie_options.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698