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

Side by Side Diff: chrome/browser/policy/user_policy_signin_service.cc

Issue 10928017: Moving google_apis and GaiaClient to src/google_apis. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head Created 8 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/policy/user_policy_signin_service.h" 5 #include "chrome/browser/policy/user_policy_signin_service.h"
6 6
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/policy/browser_policy_connector.h" 8 #include "chrome/browser/policy/browser_policy_connector.h"
9 #include "chrome/browser/policy/cloud_policy_service.h" 9 #include "chrome/browser/policy/cloud_policy_service.h"
10 #include "chrome/browser/policy/user_cloud_policy_manager.h" 10 #include "chrome/browser/policy/user_cloud_policy_manager.h"
11 #include "chrome/browser/prefs/pref_service.h" 11 #include "chrome/browser/prefs/pref_service.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/signin/signin_manager.h" 13 #include "chrome/browser/signin/signin_manager.h"
14 #include "chrome/browser/signin/signin_manager_factory.h" 14 #include "chrome/browser/signin/signin_manager_factory.h"
15 #include "chrome/browser/signin/token_service.h" 15 #include "chrome/browser/signin/token_service.h"
16 #include "chrome/browser/signin/token_service_factory.h" 16 #include "chrome/browser/signin/token_service_factory.h"
17 #include "chrome/common/chrome_notification_types.h" 17 #include "chrome/common/chrome_notification_types.h"
18 #include "chrome/common/net/gaia/gaia_constants.h"
19 #include "chrome/common/net/gaia/gaia_urls.h"
20 #include "chrome/common/net/gaia/oauth2_access_token_fetcher.h"
21 #include "chrome/common/pref_names.h" 18 #include "chrome/common/pref_names.h"
22 #include "content/public/browser/notification_details.h" 19 #include "content/public/browser/notification_details.h"
23 #include "content/public/browser/notification_source.h" 20 #include "content/public/browser/notification_source.h"
21 #include "google_apis/gaia/gaia_constants.h"
22 #include "google_apis/gaia/gaia_urls.h"
23 #include "google_apis/gaia/oauth2_access_token_fetcher.h"
24 24
25 namespace { 25 namespace {
26 // TODO(atwilson): Move this once we add OAuth token support to TokenService. 26 // TODO(atwilson): Move this once we add OAuth token support to TokenService.
27 const char kServiceScopeChromeOSDeviceManagement[] = 27 const char kServiceScopeChromeOSDeviceManagement[] =
28 "https://www.googleapis.com/auth/chromeosdevicemanagement"; 28 "https://www.googleapis.com/auth/chromeosdevicemanagement";
29 29
30 // How long to delay before starting device policy network requests. Set to a 30 // How long to delay before starting device policy network requests. Set to a
31 // few seconds to alleviate contention during initial startup. 31 // few seconds to alleviate contention during initial startup.
32 const int64 kPolicyServiceInitializationDelayMilliseconds = 2000; 32 const int64 kPolicyServiceInitializationDelayMilliseconds = 2000;
33 } // namespace 33 } // namespace
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 void UserPolicySigninService::OnGetTokenSuccess( 181 void UserPolicySigninService::OnGetTokenSuccess(
182 const std::string& access_token, 182 const std::string& access_token,
183 const base::Time& expiration_time) { 183 const base::Time& expiration_time) {
184 // Pass along the new access token to the CloudPolicyClient. 184 // Pass along the new access token to the CloudPolicyClient.
185 DVLOG(1) << "Fetched new scoped OAuth token:" << access_token; 185 DVLOG(1) << "Fetched new scoped OAuth token:" << access_token;
186 manager_->RegisterClient(access_token); 186 manager_->RegisterClient(access_token);
187 oauth2_access_token_fetcher_.reset(); 187 oauth2_access_token_fetcher_.reset();
188 } 188 }
189 189
190 } // namespace policy 190 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/user_policy_signin_service.h ('k') | chrome/browser/policy/user_policy_signin_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698