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

Side by Side Diff: components/signin/core/browser/signin_cookie_changed_subscription.cc

Issue 2349823003: Pass a RemovalCause to CookieChangedCallback (Closed)
Patch Set: Fix compilation errors Created 4 years, 3 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "components/signin/core/browser/signin_cookie_changed_subscription.h" 5 #include "components/signin/core/browser/signin_cookie_changed_subscription.h"
6 6
7 #include "base/threading/thread_task_runner_handle.h" 7 #include "base/threading/thread_task_runner_handle.h"
8 #include "net/cookies/cookie_store.h" 8 #include "net/cookies/cookie_store.h"
9 #include "net/url_request/url_request_context.h" 9 #include "net/url_request/url_request_context.h"
10 #include "net/url_request/url_request_context_getter.h" 10 #include "net/url_request/url_request_context_getter.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 DCHECK(cookie_store); 80 DCHECK(cookie_store);
81 out_subscription_holder->subscription = 81 out_subscription_holder->subscription =
82 cookie_store->AddCallbackForCookie(url, name, callback); 82 cookie_store->AddCallbackForCookie(url, name, callback);
83 } 83 }
84 84
85 // static 85 // static
86 void SigninCookieChangedSubscription::RunAsyncOnCookieChanged( 86 void SigninCookieChangedSubscription::RunAsyncOnCookieChanged(
87 scoped_refptr<base::TaskRunner> proxy, 87 scoped_refptr<base::TaskRunner> proxy,
88 base::WeakPtr<SigninCookieChangedSubscription> subscription, 88 base::WeakPtr<SigninCookieChangedSubscription> subscription,
89 const net::CanonicalCookie& cookie, 89 const net::CanonicalCookie& cookie,
90 bool removed) { 90 bool removed,
91 net::CookieStore::RemovalCause cause) {
91 proxy->PostTask(FROM_HERE, 92 proxy->PostTask(FROM_HERE,
92 base::Bind(&SigninCookieChangedSubscription::OnCookieChanged, 93 base::Bind(&SigninCookieChangedSubscription::OnCookieChanged,
93 subscription, 94 subscription, cookie, removed, cause));
94 cookie,
95 removed));
96 } 95 }
97 96
98 void SigninCookieChangedSubscription::OnCookieChanged( 97 void SigninCookieChangedSubscription::OnCookieChanged(
99 const net::CanonicalCookie& cookie, 98 const net::CanonicalCookie& cookie,
100 bool removed) { 99 bool removed,
100 net::CookieStore::RemovalCause cause) {
101 DCHECK(thread_checker_.CalledOnValidThread()); 101 DCHECK(thread_checker_.CalledOnValidThread());
102 if (!callback_.is_null()) { 102 if (!callback_.is_null()) {
103 callback_.Run(cookie, removed); 103 callback_.Run(cookie, removed, cause);
104 } 104 }
105 } 105 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698