Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(626)

Unified Diff: chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc

Issue 265563002: Revert of Use new people.get api instead of oauth2/v1/userinfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc
diff --git a/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc b/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc
index c80c62e526c6c61c4cd9238fa7a3170336ffd218..f9e490ced89eb7f3c52f73ce98fce4a5a660ddf8 100644
--- a/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc
+++ b/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc
@@ -36,7 +36,6 @@
#include "content/public/browser/notification_source.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "google_apis/gaia/gaia_constants.h"
-#include "google_apis/gaia/gaia_oauth_client.h"
#include "google_apis/gaia/google_service_auth_error.h"
#include "net/http/http_status_code.h"
#include "net/url_request/test_url_fetcher_factory.h"
@@ -75,7 +74,7 @@
const char kHostedDomainResponse[] =
"{"
- " \"domain\": \"test.com\""
+ " \"hd\": \"test.com\""
"}";
class SigninManagerFake : public FakeSigninManager {
@@ -232,15 +231,10 @@
return static_cast<FakeProfileOAuth2TokenService*>(service);
}
- // Returns true if a request for policy information is active. A request
- // is considered active if there is an active fetcher for an access token
- // hosted domain information (i.e. the gaia oauth client) or some other
- // fecther used in the code (id 0).
bool IsRequestActive() {
if (!GetTokenService()->GetPendingRequests().empty())
return true;
- return url_factory_.GetFetcherByID(0) ||
- url_factory_.GetFetcherByID(gaia::GaiaOAuthClient::kUrlFetcherId);
+ return url_factory_.GetFetcherByID(0);
}
void MakeOAuthTokenFetchSucceed() {
@@ -258,8 +252,7 @@
void ReportHostedDomainStatus(bool is_hosted_domain) {
ASSERT_TRUE(IsRequestActive());
- net::TestURLFetcher* fetcher =
- url_factory_.GetFetcherByID(gaia::GaiaOAuthClient::kUrlFetcherId);
+ net::TestURLFetcher* fetcher = url_factory_.GetFetcherByID(0);
fetcher->set_response_code(net::HTTP_OK);
fetcher->SetResponseString(is_hosted_domain ? kHostedDomainResponse : "{}");
fetcher->delegate()->OnURLFetchComplete(fetcher);
« no previous file with comments | « chrome/browser/chromeos/policy/wildcard_login_checker.cc ('k') | chrome/browser/profiles/profile_downloader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698