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

Side by Side Diff: chrome/browser/chromeos/policy/wildcard_login_checker.cc

Issue 257773002: Use new people.get api instead of oauth2/v1/userinfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix user image manager tests Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/policy/wildcard_login_checker.h" 5 #include "chrome/browser/chromeos/policy/wildcard_login_checker.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
11 #include "chrome/browser/chromeos/policy/policy_oauth2_token_fetcher.h" 11 #include "chrome/browser/chromeos/policy/policy_oauth2_token_fetcher.h"
12 #include "components/policy/core/browser/browser_policy_connector.h" 12 #include "components/policy/core/browser/browser_policy_connector.h"
13 #include "net/url_request/url_request_context_getter.h" 13 #include "net/url_request/url_request_context_getter.h"
14 14
15 namespace policy { 15 namespace policy {
16 16
17 namespace { 17 namespace {
18 18
19 // Presence of this key in the userinfo response indicates whether the user is 19 // Presence of this key in the userinfo response indicates whether the user is
20 // on a hosted domain. 20 // on a hosted domain.
21 const char kHostedDomainKey[] = "hd"; 21 const char kHostedDomainKey[] = "domain";
22 22
23 // UMA histogram names. 23 // UMA histogram names.
24 const char kUMADelayPolicyTokenFetch[] = 24 const char kUMADelayPolicyTokenFetch[] =
25 "Enterprise.WildcardLoginCheck.DelayPolicyTokenFetch"; 25 "Enterprise.WildcardLoginCheck.DelayPolicyTokenFetch";
26 const char kUMADelayUserInfoFetch[] = 26 const char kUMADelayUserInfoFetch[] =
27 "Enterprise.WildcardLoginCheck.DelayUserInfoFetch"; 27 "Enterprise.WildcardLoginCheck.DelayUserInfoFetch";
28 const char kUMADelayTotal[] = 28 const char kUMADelayTotal[] =
29 "Enterprise.WildcardLoginCheck.DelayTotal"; 29 "Enterprise.WildcardLoginCheck.DelayTotal";
30 30
31 } // namespace 31 } // namespace
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 new UserInfoFetcher(this, g_browser_process->system_request_context())); 106 new UserInfoFetcher(this, g_browser_process->system_request_context()));
107 user_info_fetcher_->Start(access_token); 107 user_info_fetcher_->Start(access_token);
108 } 108 }
109 109
110 void WildcardLoginChecker::OnCheckCompleted(Result result) { 110 void WildcardLoginChecker::OnCheckCompleted(Result result) {
111 if (!callback_.is_null()) 111 if (!callback_.is_null())
112 callback_.Run(result); 112 callback_.Run(result);
113 } 113 }
114 114
115 } // namespace policy 115 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698