Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / extensions / api / identity / identity_signin_flow.cc
index a0aa85e..65fd649 100644 (file)
@@ -7,6 +7,8 @@
 #include "chrome/browser/app_mode/app_mode_utils.h"
 #include "chrome/browser/signin/profile_oauth2_token_service.h"
 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
+#include "chrome/browser/signin/signin_manager.h"
+#include "chrome/browser/signin/signin_manager_factory.h"
 #include "chrome/browser/ui/webui/signin/login_ui_service.h"
 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
 
@@ -43,8 +45,8 @@ void IdentitySigninFlow::Start() {
 
 void IdentitySigninFlow::OnRefreshTokenAvailable(
     const std::string& account_id) {
-  if (ProfileOAuth2TokenServiceFactory::GetForProfile(profile_)->
-          GetPrimaryAccountId() == account_id) {
+  if (SigninManagerFactory::GetForProfile(profile_)->
+      GetAuthenticatedAccountId() == account_id) {
     delegate_->SigninSuccess();
   }
 }