Skip to content

Commit

Permalink
Get rid of CookieMonster::Delegate typedef.
Browse files Browse the repository at this point in the history
Almost everything's switched to the new one by now. Finish the job.

BUG=none

Review URL: https://codereview.chromium.org/1392973005

Cr-Commit-Position: refs/heads/master@{#353586}
  • Loading branch information
davidben authored and Commit bot committed Oct 12, 2015
1 parent 2bbefb5 commit 2a03078
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 16 deletions.
10 changes: 5 additions & 5 deletions chrome/browser/extensions/api/cookies/cookies_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -148,23 +148,23 @@ void CookiesEventRouter::CookieChanged(
// Map the internal cause to an external string.
std::string cause;
switch (details->cause) {
case net::CookieMonster::Delegate::CHANGE_COOKIE_EXPLICIT:
case net::CookieMonsterDelegate::CHANGE_COOKIE_EXPLICIT:
cause = keys::kExplicitChangeCause;
break;

case net::CookieMonster::Delegate::CHANGE_COOKIE_OVERWRITE:
case net::CookieMonsterDelegate::CHANGE_COOKIE_OVERWRITE:
cause = keys::kOverwriteChangeCause;
break;

case net::CookieMonster::Delegate::CHANGE_COOKIE_EXPIRED:
case net::CookieMonsterDelegate::CHANGE_COOKIE_EXPIRED:
cause = keys::kExpiredChangeCause;
break;

case net::CookieMonster::Delegate::CHANGE_COOKIE_EVICTED:
case net::CookieMonsterDelegate::CHANGE_COOKIE_EVICTED:
cause = keys::kEvictedChangeCause;
break;

case net::CookieMonster::Delegate::CHANGE_COOKIE_EXPIRED_OVERWRITE:
case net::CookieMonsterDelegate::CHANGE_COOKIE_EXPIRED_OVERWRITE:
cause = keys::kExpiredOverwriteChangeCause;
break;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ ExtensionCookieMonsterDelegate::ExtensionCookieMonsterDelegate(Profile* profile)
DCHECK(profile);
}

// net::CookieMonster::Delegate implementation.
// net::CookieMonsterDelegate implementation.
void ExtensionCookieMonsterDelegate::OnCookieChanged(
const net::CanonicalCookie& cookie,
bool removed,
net::CookieMonster::Delegate::ChangeCause cause) {
net::CookieMonsterDelegate::ChangeCause cause) {
content::BrowserThread::PostTask(
content::BrowserThread::UI, FROM_HERE,
base::Bind(&ExtensionCookieMonsterDelegate::OnCookieChangedAsyncHelper,
Expand All @@ -46,7 +46,7 @@ ExtensionCookieMonsterDelegate::~ExtensionCookieMonsterDelegate() {}
void ExtensionCookieMonsterDelegate::OnCookieChangedAsyncHelper(
const net::CanonicalCookie& cookie,
bool removed,
net::CookieMonster::Delegate::ChangeCause cause) {
net::CookieMonsterDelegate::ChangeCause cause) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
Profile* profile = profile_getter_.Run();
if (profile) {
Expand Down
6 changes: 3 additions & 3 deletions chrome/browser/extensions/extension_cookie_monster_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ class ExtensionCookieMonsterDelegate : public net::CookieMonsterDelegate {
public:
explicit ExtensionCookieMonsterDelegate(Profile* profile);

// net::CookieMonster::Delegate implementation.
// net::CookieMonsterDelegate implementation.
void OnCookieChanged(
const net::CanonicalCookie& cookie,
bool removed,
net::CookieMonster::Delegate::ChangeCause cause) override;
net::CookieMonsterDelegate::ChangeCause cause) override;

private:
~ExtensionCookieMonsterDelegate() override;

void OnCookieChangedAsyncHelper(
const net::CanonicalCookie& cookie,
bool removed,
net::CookieMonster::Delegate::ChangeCause cause);
net::CookieMonsterDelegate::ChangeCause cause);

const base::Callback<Profile*(void)> profile_getter_;

Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/net/chrome_cookie_notification_details.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ struct ChromeCookieDetails {
public:
ChromeCookieDetails(const net::CanonicalCookie* cookie_copy,
bool is_removed,
net::CookieMonster::Delegate::ChangeCause cause)
net::CookieMonsterDelegate::ChangeCause cause)
: cookie(cookie_copy),
removed(is_removed),
cause(cause) {
}

const net::CanonicalCookie* cookie;
bool removed;
net::CookieMonster::Delegate::ChangeCause cause;
net::CookieMonsterDelegate::ChangeCause cause;
};

#endif // CHROME_BROWSER_NET_CHROME_COOKIE_NOTIFICATION_DETAILS_H_
2 changes: 1 addition & 1 deletion chrome/browser/profiles/profile_io_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ class ProfileIOData {
scoped_refptr<content_settings::CookieSettings> cookie_settings;
scoped_refptr<HostContentSettingsMap> host_content_settings_map;
scoped_refptr<net::SSLConfigService> ssl_config_service;
scoped_refptr<net::CookieMonster::Delegate> cookie_monster_delegate;
scoped_refptr<net::CookieMonsterDelegate> cookie_monster_delegate;
#if defined(ENABLE_EXTENSIONS)
scoped_refptr<extensions::InfoMap> extension_info_map;
#endif
Expand Down
1 change: 0 additions & 1 deletion net/cookies/cookie_monster.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ class ParsedCookie;
class NET_EXPORT CookieMonster : public CookieStore {
public:
class PersistentCookieStore;
typedef CookieMonsterDelegate Delegate;

// Terminology:
// * The 'top level domain' (TLD) of an internet domain name is
Expand Down
2 changes: 1 addition & 1 deletion net/cookies/cookie_monster_store_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ MockCookieMonsterDelegate::MockCookieMonsterDelegate() {
void MockCookieMonsterDelegate::OnCookieChanged(
const CanonicalCookie& cookie,
bool removed,
CookieMonster::Delegate::ChangeCause cause) {
CookieMonsterDelegate::ChangeCause cause) {
CookieNotification notification(cookie, removed);
changes_.push_back(notification);
}
Expand Down

0 comments on commit 2a03078

Please sign in to comment.