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

Side by Side Diff: chrome/browser/extensions/extension_cookie_monster_delegate.cc

Issue 2349823003: Pass a RemovalCause to CookieChangedCallback (Closed)
Patch Set: rebase Created 4 years, 2 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/extensions/extension_cookie_monster_delegate.h" 5 #include "chrome/browser/extensions/extension_cookie_monster_delegate.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "chrome/browser/browser_process.h" 9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 16 matching lines...) Expand all
27 g_browser_process->profile_manager(), 27 g_browser_process->profile_manager(),
28 profile)) { 28 profile)) {
29 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 29 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
30 DCHECK(profile); 30 DCHECK(profile);
31 } 31 }
32 32
33 // net::CookieMonsterDelegate implementation. 33 // net::CookieMonsterDelegate implementation.
34 void ExtensionCookieMonsterDelegate::OnCookieChanged( 34 void ExtensionCookieMonsterDelegate::OnCookieChanged(
35 const net::CanonicalCookie& cookie, 35 const net::CanonicalCookie& cookie,
36 bool removed, 36 bool removed,
37 net::CookieMonsterDelegate::ChangeCause cause) { 37 net::CookieStore::ChangeCause cause) {
38 content::BrowserThread::PostTask( 38 content::BrowserThread::PostTask(
39 content::BrowserThread::UI, FROM_HERE, 39 content::BrowserThread::UI, FROM_HERE,
40 base::Bind(&ExtensionCookieMonsterDelegate::OnCookieChangedAsyncHelper, 40 base::Bind(&ExtensionCookieMonsterDelegate::OnCookieChangedAsyncHelper,
41 this, cookie, removed, cause)); 41 this, cookie, removed, cause));
42 } 42 }
43 43
44 ExtensionCookieMonsterDelegate::~ExtensionCookieMonsterDelegate() {} 44 ExtensionCookieMonsterDelegate::~ExtensionCookieMonsterDelegate() {}
45 45
46 void ExtensionCookieMonsterDelegate::OnCookieChangedAsyncHelper( 46 void ExtensionCookieMonsterDelegate::OnCookieChangedAsyncHelper(
47 const net::CanonicalCookie& cookie, 47 const net::CanonicalCookie& cookie,
48 bool removed, 48 bool removed,
49 net::CookieMonsterDelegate::ChangeCause cause) { 49 net::CookieStore::ChangeCause cause) {
50 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 50 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
51 Profile* profile = profile_getter_.Run(); 51 Profile* profile = profile_getter_.Run();
52 if (profile) { 52 if (profile) {
53 ChromeCookieDetails cookie_details(&cookie, removed, cause); 53 ChromeCookieDetails cookie_details(&cookie, removed, cause);
54 content::NotificationService::current()->Notify( 54 content::NotificationService::current()->Notify(
55 chrome::NOTIFICATION_COOKIE_CHANGED_FOR_EXTENSIONS, 55 chrome::NOTIFICATION_COOKIE_CHANGED_FOR_EXTENSIONS,
56 content::Source<Profile>(profile), 56 content::Source<Profile>(profile),
57 content::Details<ChromeCookieDetails>(&cookie_details)); 57 content::Details<ChromeCookieDetails>(&cookie_details));
58 } 58 }
59 } 59 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_cookie_monster_delegate.h ('k') | chrome/browser/net/chrome_cookie_notification_details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698