| Index: chrome/browser/chrome_to_mobile_service.cc
|
| diff --git a/chrome/browser/chrome_to_mobile_service.cc b/chrome/browser/chrome_to_mobile_service.cc
|
| index 744153b54edd91f8405f29897b87adbf6e35cb3a..552bf25c601d96e9284a67ef30700ccf2613f9f7 100644
|
| --- a/chrome/browser/chrome_to_mobile_service.cc
|
| +++ b/chrome/browser/chrome_to_mobile_service.cc
|
| @@ -17,6 +17,10 @@
|
| #include "chrome/browser/prefs/pref_service.h"
|
| #include "chrome/browser/printing/cloud_print/cloud_print_url.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"
|
| #include "chrome/browser/signin/token_service_factory.h"
|
| #include "chrome/browser/sync/profile_sync_service.h"
|
| @@ -431,6 +435,16 @@ void ChromeToMobileService::OnGetTokenSuccess(
|
| NOTREACHED();
|
| }
|
|
|
| + // Let SigninInternals know about the token fetch.
|
| + DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
|
| + DCHECK(profile_);
|
| + // TODO(vishwath): This can be removed when refactoring this class to use
|
| + // OAuth2TokenService instead.
|
| + AboutSigninInternalsFactory::GetForProfile(profile_)->
|
| + NotifyTokenReceivedSuccess(signin_internals_util::kChromeToMobileToken,
|
| + access_token,
|
| + true);
|
| +
|
| while (!task_queue_.empty()) {
|
| // Post all tasks that were queued and waiting on a valid access token.
|
| if (!content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
|
| @@ -459,6 +473,16 @@ void ChromeToMobileService::OnGetTokenFailure(
|
| auth_retry_timer_.Start(FROM_HERE, delay, this,
|
| &ChromeToMobileService::RequestAccessToken);
|
|
|
| + // Let SigninInternals know about the failed token fetch.
|
| + DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
|
| + DCHECK(profile_);
|
| + // TODO(vishwath): This can be removed when refactoring this class to use
|
| + // OAuth2TokenService instead.
|
| + AboutSigninInternalsFactory::GetForProfile(profile_)->
|
| + NotifyTokenReceivedFailure(signin_internals_util::kChromeToMobileToken,
|
| + error.ToString());
|
| +
|
| +
|
| // Clear the mobile list, which may be (or become) out of date.
|
| ListValue empty;
|
| profile_->GetPrefs()->Set(prefs::kChromeToMobileDeviceList, empty);
|
|
|