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

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

Issue 2825963003: Rewrite base::Bind to base::BindOnce with base_bind_rewriters in //chrome/browser/extensions (Closed)
Patch Set: Created 3 years, 8 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 19 matching lines...) Expand all
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::CookieStore::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::BindOnce(
41 this, cookie, removed, cause)); 41 &ExtensionCookieMonsterDelegate::OnCookieChangedAsyncHelper, this,
42 cookie, removed, cause));
42 } 43 }
43 44
44 ExtensionCookieMonsterDelegate::~ExtensionCookieMonsterDelegate() {} 45 ExtensionCookieMonsterDelegate::~ExtensionCookieMonsterDelegate() {}
45 46
46 void ExtensionCookieMonsterDelegate::OnCookieChangedAsyncHelper( 47 void ExtensionCookieMonsterDelegate::OnCookieChangedAsyncHelper(
47 const net::CanonicalCookie& cookie, 48 const net::CanonicalCookie& cookie,
48 bool removed, 49 bool removed,
49 net::CookieStore::ChangeCause cause) { 50 net::CookieStore::ChangeCause cause) {
50 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 51 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
51 Profile* profile = profile_getter_.Run(); 52 Profile* profile = profile_getter_.Run();
52 if (profile) { 53 if (profile) {
53 ChromeCookieDetails cookie_details(&cookie, removed, cause); 54 ChromeCookieDetails cookie_details(&cookie, removed, cause);
54 content::NotificationService::current()->Notify( 55 content::NotificationService::current()->Notify(
55 chrome::NOTIFICATION_COOKIE_CHANGED_FOR_EXTENSIONS, 56 chrome::NOTIFICATION_COOKIE_CHANGED_FOR_EXTENSIONS,
56 content::Source<Profile>(profile), 57 content::Source<Profile>(profile),
57 content::Details<ChromeCookieDetails>(&cookie_details)); 58 content::Details<ChromeCookieDetails>(&cookie_details));
58 } 59 }
59 } 60 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_bindings_apitest.cc ('k') | chrome/browser/extensions/extension_disabled_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698