| OLD | NEW |
| 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/signin/chrome_signin_client.h" | 5 #include "chrome/browser/signin/chrome_signin_client.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 #include "chrome/browser/browser_process.h" | 13 #include "chrome/browser/browser_process.h" |
| 14 #include "chrome/browser/content_settings/cookie_settings_factory.h" | 14 #include "chrome/browser/content_settings/cookie_settings_factory.h" |
| 15 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" | 15 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" |
| 16 #include "chrome/browser/profiles/profile_attributes_entry.h" | 16 #include "chrome/browser/profiles/profile_attributes_entry.h" |
| 17 #include "chrome/browser/profiles/profile_attributes_storage.h" | 17 #include "chrome/browser/profiles/profile_attributes_storage.h" |
| 18 #include "chrome/browser/profiles/profile_manager.h" | 18 #include "chrome/browser/profiles/profile_manager.h" |
| 19 #include "chrome/browser/profiles/profile_metrics.h" | 19 #include "chrome/browser/profiles/profile_metrics.h" |
| 20 #include "chrome/browser/profiles/profile_window.h" | 20 #include "chrome/browser/profiles/profile_window.h" |
| 21 #include "chrome/browser/signin/local_auth.h" | 21 #include "chrome/browser/signin/local_auth.h" |
| 22 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 22 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
| 23 #include "chrome/browser/signin/signin_manager_factory.h" | 23 #include "chrome/browser/signin/signin_manager_factory.h" |
| 24 #include "chrome/browser/web_data_service_factory.h" | 24 #include "chrome/browser/web_data_service_factory.h" |
| 25 #include "chrome/common/channel_info.h" | 25 #include "chrome/common/channel_info.h" |
| 26 #include "chrome/common/features.h" |
| 26 #include "components/content_settings/core/browser/cookie_settings.h" | 27 #include "components/content_settings/core/browser/cookie_settings.h" |
| 27 #include "components/metrics/metrics_service.h" | 28 #include "components/metrics/metrics_service.h" |
| 28 #include "components/prefs/pref_service.h" | 29 #include "components/prefs/pref_service.h" |
| 29 #include "components/signin/core/browser/profile_oauth2_token_service.h" | 30 #include "components/signin/core/browser/profile_oauth2_token_service.h" |
| 30 #include "components/signin/core/browser/signin_cookie_changed_subscription.h" | 31 #include "components/signin/core/browser/signin_cookie_changed_subscription.h" |
| 31 #include "components/signin/core/browser/signin_header_helper.h" | 32 #include "components/signin/core/browser/signin_header_helper.h" |
| 32 #include "components/signin/core/common/profile_management_switches.h" | 33 #include "components/signin/core/common/profile_management_switches.h" |
| 33 #include "components/signin/core/common/signin_pref_names.h" | 34 #include "components/signin/core/common/signin_pref_names.h" |
| 34 #include "components/signin/core/common/signin_switches.h" | 35 #include "components/signin/core/common/signin_switches.h" |
| 35 #include "google_apis/gaia/gaia_constants.h" | 36 #include "google_apis/gaia/gaia_constants.h" |
| 36 #include "google_apis/gaia/gaia_urls.h" | 37 #include "google_apis/gaia/gaia_urls.h" |
| 37 #include "net/url_request/url_request_context_getter.h" | 38 #include "net/url_request/url_request_context_getter.h" |
| 38 #include "url/gurl.h" | 39 #include "url/gurl.h" |
| 39 | 40 |
| 40 #if defined(ENABLE_SUPERVISED_USERS) | 41 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) |
| 41 #include "chrome/browser/supervised_user/supervised_user_constants.h" | 42 #include "chrome/browser/supervised_user/supervised_user_constants.h" |
| 42 #endif | 43 #endif |
| 43 | 44 |
| 44 #if defined(OS_CHROMEOS) | 45 #if defined(OS_CHROMEOS) |
| 45 #include "chrome/browser/chromeos/net/delay_network_call.h" | 46 #include "chrome/browser/chromeos/net/delay_network_call.h" |
| 46 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 47 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 47 #include "components/user_manager/known_user.h" | 48 #include "components/user_manager/known_user.h" |
| 48 #include "components/user_manager/user_manager.h" | 49 #include "components/user_manager/user_manager.h" |
| 49 #endif | 50 #endif |
| 50 | 51 |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 ProfileOAuth2TokenService* token_service = | 378 ProfileOAuth2TokenService* token_service = |
| 378 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_); | 379 ProfileOAuth2TokenServiceFactory::GetForProfile(profile_); |
| 379 OAuth2TokenService::ScopeSet scopes; | 380 OAuth2TokenService::ScopeSet scopes; |
| 380 scopes.insert(GaiaConstants::kGoogleUserInfoEmail); | 381 scopes.insert(GaiaConstants::kGoogleUserInfoEmail); |
| 381 oauth_request_ = token_service->StartRequest(account_id, scopes, this); | 382 oauth_request_ = token_service->StartRequest(account_id, scopes, this); |
| 382 } | 383 } |
| 383 } | 384 } |
| 384 } | 385 } |
| 385 #endif | 386 #endif |
| 386 } | 387 } |
| OLD | NEW |