| Index: chrome/browser/extensions/app_notify_channel_setup.cc
|
| diff --git a/chrome/browser/extensions/app_notify_channel_setup.cc b/chrome/browser/extensions/app_notify_channel_setup.cc
|
| index 19b06b87450606de8902b01daf2981dccc6b4452..dfeaa09adab7c65b3555ad67a4a9fdb746ba04c2 100644
|
| --- a/chrome/browser/extensions/app_notify_channel_setup.cc
|
| +++ b/chrome/browser/extensions/app_notify_channel_setup.cc
|
| @@ -16,6 +16,8 @@
|
| #include "base/stringprintf.h"
|
| #include "chrome/browser/prefs/pref_service.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| +#include "chrome/browser/signin/about_signin_internals.h"
|
| +#include "chrome/browser/signin/about_signin_internals_factory.h"
|
| #include "chrome/browser/signin/signin_manager.h"
|
| #include "chrome/browser/signin/signin_manager_factory.h"
|
| #include "chrome/browser/signin/token_service.h"
|
| @@ -118,10 +120,31 @@ void AppNotifyChannelSetup::OnGetTokenSuccess(
|
| const std::string& access_token,
|
| const base::Time& expiration_time) {
|
| oauth2_access_token_ = access_token;
|
| +
|
| + // Let SigninInternals know about the token fetch.
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + DCHECK(profile_);
|
| + // TODO(vishwath): This can be removed when refactoring this to use
|
| + // OAuth2TokenService instead.
|
| + AboutSigninInternalsFactory::GetForProfile(profile_)->
|
| + NotifyTokenReceivedSuccess(
|
| + signin_internals_util::kAppNotifyChannelSetupToken,
|
| + access_token,
|
| + true);
|
| +
|
| EndGetAccessToken(true);
|
| }
|
| void AppNotifyChannelSetup::OnGetTokenFailure(
|
| const GoogleServiceAuthError& error) {
|
| + // Let SigninInternals know about the failed token fetch.
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| + DCHECK(profile_);
|
| + // TODO(vishwath): This can be removed when refactoring this to use
|
| + // OAuth2TokenService instead.
|
| + AboutSigninInternalsFactory::GetForProfile(profile_)->
|
| + NotifyTokenReceivedFailure(
|
| + signin_internals_util::kAppNotifyChannelSetupToken, error.ToString());
|
| +
|
| EndGetAccessToken(false);
|
| }
|
|
|
|
|