summaryrefslogtreecommitdiffstats
path: root/chrome/browser/net/gaia/token_service.cc
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-10 15:52:27 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-10 15:52:27 +0000
commit43211582b1fa8c69136385250e7b0446cf364b5c (patch)
tree655ab01543012b6fd5699dee8fab92876959b7d9 /chrome/browser/net/gaia/token_service.cc
parentd43970a7ceee5fc5433787b0f28b64234a4039f2 (diff)
downloadchromium_src-43211582b1fa8c69136385250e7b0446cf364b5c.zip
chromium_src-43211582b1fa8c69136385250e7b0446cf364b5c.tar.gz
chromium_src-43211582b1fa8c69136385250e7b0446cf364b5c.tar.bz2
Moving notification types which are chrome specific to a new header file chrome_notification_types.h.
This file lives in chrome\common. The chrome specific notifications start from NOTIFICATION_CONTENT_END which defines the end of the enum used by content to define notification types. The notificaton_type.h file in content\common has been renamed to content_notification_types.h BUG=76698 Review URL: http://codereview.chromium.org/7327007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91972 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/net/gaia/token_service.cc')
-rw-r--r--chrome/browser/net/gaia/token_service.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/chrome/browser/net/gaia/token_service.cc b/chrome/browser/net/gaia/token_service.cc
index 7069165..b382861 100644
--- a/chrome/browser/net/gaia/token_service.cc
+++ b/chrome/browser/net/gaia/token_service.cc
@@ -7,6 +7,7 @@
#include "base/command_line.h"
#include "base/string_util.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/net/gaia/gaia_auth_fetcher.h"
#include "chrome/common/net/gaia/gaia_constants.h"
@@ -66,7 +67,7 @@ void TokenService::Initialize(const char* const source,
#endif
registrar_.Add(this,
- NotificationType::TOKEN_UPDATED,
+ chrome::NOTIFICATION_TOKEN_UPDATED,
NotificationService::AllSources());
}
@@ -167,7 +168,7 @@ void TokenService::FireTokenAvailableNotification(
TokenAvailableDetails details(service, auth_token);
NotificationService::current()->Notify(
- NotificationType::TOKEN_AVAILABLE,
+ chrome::NOTIFICATION_TOKEN_AVAILABLE,
Source<TokenService>(this),
Details<const TokenAvailableDetails>(&details));
}
@@ -178,7 +179,7 @@ void TokenService::FireTokenRequestFailedNotification(
TokenRequestFailedDetails details(service, error);
NotificationService::current()->Notify(
- NotificationType::TOKEN_REQUEST_FAILED,
+ chrome::NOTIFICATION_TOKEN_REQUEST_FAILED,
Source<TokenService>(this),
Details<const TokenRequestFailedDetails>(&details));
}
@@ -222,7 +223,7 @@ void TokenService::OnWebDataServiceRequestDone(WebDataService::Handle h,
}
NotificationService::current()->Notify(
- NotificationType::TOKEN_LOADING_FINISHED,
+ chrome::NOTIFICATION_TOKEN_LOADING_FINISHED,
Source<TokenService>(this),
NotificationService::NoDetails());
}
@@ -254,10 +255,10 @@ void TokenService::LoadTokensIntoMemory(
}
}
-void TokenService::Observe(NotificationType type,
+void TokenService::Observe(int type,
const NotificationSource& source,
const NotificationDetails& details) {
- DCHECK(type == NotificationType::TOKEN_UPDATED);
+ DCHECK(type == chrome::NOTIFICATION_TOKEN_UPDATED);
TokenAvailableDetails* tok_details =
Details<TokenAvailableDetails>(details).ptr();
OnIssueAuthTokenSuccess(tok_details->service(), tok_details->token());