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

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

Issue 109743002: Move policy code into components/policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moar fixes Created 7 years 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 (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 "chrome/browser/policy/cloud/cloud_policy_core.h"
10 #include "chrome/browser/signin/profile_oauth2_token_service.h" 9 #include "chrome/browser/signin/profile_oauth2_token_service.h"
10 #include "components/policy/core/common/cloud/cloud_policy_core.h"
11 #include "content/public/browser/notification_source.h" 11 #include "content/public/browser/notification_source.h"
12 #include "google_apis/gaia/gaia_constants.h" 12 #include "google_apis/gaia/gaia_constants.h"
13 13
14 namespace policy { 14 namespace policy {
15 15
16 UserCloudPolicyTokenForwarder::UserCloudPolicyTokenForwarder( 16 UserCloudPolicyTokenForwarder::UserCloudPolicyTokenForwarder(
17 UserCloudPolicyManagerChromeOS* manager, 17 UserCloudPolicyManagerChromeOS* manager,
18 ProfileOAuth2TokenService* token_service) 18 ProfileOAuth2TokenService* token_service)
19 : manager_(manager), 19 : manager_(manager),
20 token_service_(token_service) { 20 token_service_(token_service) {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 } 87 }
88 88
89 void UserCloudPolicyTokenForwarder::RequestAccessToken() { 89 void UserCloudPolicyTokenForwarder::RequestAccessToken() {
90 OAuth2TokenService::ScopeSet scopes; 90 OAuth2TokenService::ScopeSet scopes;
91 scopes.insert(GaiaConstants::kDeviceManagementServiceOAuth); 91 scopes.insert(GaiaConstants::kDeviceManagementServiceOAuth);
92 request_ = token_service_->StartRequest( 92 request_ = token_service_->StartRequest(
93 token_service_->GetPrimaryAccountId(), scopes, this); 93 token_service_->GetPrimaryAccountId(), scopes, this);
94 } 94 }
95 95
96 } // namespace policy 96 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698