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

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

Issue 2471183004: Updates comments in the src files to remove gender specific terms. (Closed)
Patch Set: Created 4 years, 1 month 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/user_cloud_policy_token_forwarder.h" 5 #include "chrome/browser/chromeos/policy/user_cloud_policy_token_forwarder.h"
6 6
7 #include "chrome/browser/chrome_notification_types.h" 7 #include "chrome/browser/chrome_notification_types.h"
8 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h" 8 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h"
9 #include "components/policy/core/common/cloud/cloud_policy_core.h" 9 #include "components/policy/core/common/cloud/cloud_policy_core.h"
10 #include "components/signin/core/browser/profile_oauth2_token_service.h" 10 #include "components/signin/core/browser/profile_oauth2_token_service.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 manager_->OnAccessTokenAvailable(access_token); 51 manager_->OnAccessTokenAvailable(access_token);
52 // All done here. 52 // All done here.
53 Shutdown(); 53 Shutdown();
54 } 54 }
55 55
56 void UserCloudPolicyTokenForwarder::OnGetTokenFailure( 56 void UserCloudPolicyTokenForwarder::OnGetTokenFailure(
57 const OAuth2TokenService::Request* request, 57 const OAuth2TokenService::Request* request,
58 const GoogleServiceAuthError& error) { 58 const GoogleServiceAuthError& error) {
59 // This should seldom happen: if the user is signing in for the first time 59 // This should seldom happen: if the user is signing in for the first time
60 // then this was an online signin and network errors are unlikely; if the 60 // then this was an online signin and network errors are unlikely; if the
61 // user had already signed in before then he should have policy cached, and 61 // user had already signed in before then they should have policy cached, and
62 // RequestAccessToken() wouldn't have been invoked. 62 // RequestAccessToken() wouldn't have been invoked.
63 // Still, something just went wrong (server 500, or something). Currently 63 // Still, something just went wrong (server 500, or something). Currently
64 // we don't recover in this case, and we'll just try to register for policy 64 // we don't recover in this case, and we'll just try to register for policy
65 // again on the next signin. 65 // again on the next signin.
66 // TODO(joaodasilva, atwilson): consider blocking signin when this happens, 66 // TODO(joaodasilva, atwilson): consider blocking signin when this happens,
67 // so that the user has to try again before getting into the session. That 67 // so that the user has to try again before getting into the session. That
68 // would guarantee that a session always has fresh policy, or at least 68 // would guarantee that a session always has fresh policy, or at least
69 // enforces a cached policy. 69 // enforces a cached policy.
70 Shutdown(); 70 Shutdown();
71 } 71 }
(...skipping 17 matching lines...) Expand all
89 89
90 void UserCloudPolicyTokenForwarder::RequestAccessToken() { 90 void UserCloudPolicyTokenForwarder::RequestAccessToken() {
91 OAuth2TokenService::ScopeSet scopes; 91 OAuth2TokenService::ScopeSet scopes;
92 scopes.insert(GaiaConstants::kDeviceManagementServiceOAuth); 92 scopes.insert(GaiaConstants::kDeviceManagementServiceOAuth);
93 scopes.insert(GaiaConstants::kOAuthWrapBridgeUserInfoScope); 93 scopes.insert(GaiaConstants::kOAuthWrapBridgeUserInfoScope);
94 request_ = token_service_->StartRequest( 94 request_ = token_service_->StartRequest(
95 signin_manager_->GetAuthenticatedAccountId(), scopes, this); 95 signin_manager_->GetAuthenticatedAccountId(), scopes, this);
96 } 96 }
97 97
98 } // namespace policy 98 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/policy/policy_cert_service_factory.cc ('k') | chrome/browser/download/download_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698