| OLD | NEW | 
|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/login/login_utils.h" | 5 #include "chrome/browser/chromeos/login/login_utils.h" | 
| 6 | 6 | 
| 7 #include <vector> | 7 #include <vector> | 
| 8 | 8 | 
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" | 
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" | 
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 172   net::URLRequestContextGetter* auth_context_; | 172   net::URLRequestContextGetter* auth_context_; | 
| 173   Profile* new_profile_; | 173   Profile* new_profile_; | 
| 174   net::URLRequestContextGetter* new_context_; | 174   net::URLRequestContextGetter* new_context_; | 
| 175 | 175 | 
| 176   DISALLOW_COPY_AND_ASSIGN(TransferDefaultCookiesOnIOThreadTask); | 176   DISALLOW_COPY_AND_ASSIGN(TransferDefaultCookiesOnIOThreadTask); | 
| 177 }; | 177 }; | 
| 178 | 178 | 
| 179 // Fetches an OAuth token and initializes user policy with it. | 179 // Fetches an OAuth token and initializes user policy with it. | 
| 180 class PolicyOAuthFetcher : public GaiaOAuthConsumer { | 180 class PolicyOAuthFetcher : public GaiaOAuthConsumer { | 
| 181  public: | 181  public: | 
| 182   explicit PolicyOAuthFetcher(Profile* profile, | 182   PolicyOAuthFetcher(Profile* profile, | 
| 183                               const std::string& oauth1_token, | 183                      const std::string& oauth1_token, | 
| 184                               const std::string& oauth1_secret) | 184                      const std::string& oauth1_secret) | 
| 185       : oauth_fetcher_(this, | 185       : oauth_fetcher_(this, | 
| 186                        profile->GetRequestContext(), | 186                        profile->GetRequestContext(), | 
| 187                        profile, | 187                        profile, | 
| 188                        kServiceScopeChromeOSDeviceManagement), | 188                        kServiceScopeChromeOSDeviceManagement), | 
| 189         oauth1_token_(oauth1_token), | 189         oauth1_token_(oauth1_token), | 
| 190         oauth1_secret_(oauth1_secret) { | 190         oauth1_secret_(oauth1_secret) { | 
| 191     oauth_fetcher_.SetAutoFetchLimit( | 191     oauth_fetcher_.SetAutoFetchLimit( | 
| 192         GaiaOAuthFetcher::OAUTH2_SERVICE_ACCESS_TOKEN); | 192         GaiaOAuthFetcher::OAUTH2_SERVICE_ACCESS_TOKEN); | 
| 193   } | 193   } | 
| 194   virtual ~PolicyOAuthFetcher() {} | 194   virtual ~PolicyOAuthFetcher() {} | 
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 824   // Mark login host for deletion after browser starts.  This | 824   // Mark login host for deletion after browser starts.  This | 
| 825   // guarantees that the message loop will be referenced by the | 825   // guarantees that the message loop will be referenced by the | 
| 826   // browser before it is dereferenced by the login host. | 826   // browser before it is dereferenced by the login host. | 
| 827   if (login_host) { | 827   if (login_host) { | 
| 828     login_host->OnSessionStart(); | 828     login_host->OnSessionStart(); | 
| 829     login_host = NULL; | 829     login_host = NULL; | 
| 830   } | 830   } | 
| 831 } | 831 } | 
| 832 | 832 | 
| 833 }  // namespace chromeos | 833 }  // namespace chromeos | 
| OLD | NEW | 
|---|