| OLD | NEW |
| 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/chromeos/login/existing_user_controller.h" | 5 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 #include "chrome/browser/chromeos/login/helper.h" | 30 #include "chrome/browser/chromeos/login/helper.h" |
| 31 #include "chrome/browser/chromeos/login/login_display_host.h" | 31 #include "chrome/browser/chromeos/login/login_display_host.h" |
| 32 #include "chrome/browser/chromeos/login/login_utils.h" | 32 #include "chrome/browser/chromeos/login/login_utils.h" |
| 33 #include "chrome/browser/chromeos/login/startup_utils.h" | 33 #include "chrome/browser/chromeos/login/startup_utils.h" |
| 34 #include "chrome/browser/chromeos/login/user_manager.h" | 34 #include "chrome/browser/chromeos/login/user_manager.h" |
| 35 #include "chrome/browser/chromeos/login/wizard_controller.h" | 35 #include "chrome/browser/chromeos/login/wizard_controller.h" |
| 36 #include "chrome/browser/chromeos/policy/device_local_account.h" | 36 #include "chrome/browser/chromeos/policy/device_local_account.h" |
| 37 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 37 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
| 38 #include "chrome/browser/chromeos/settings/cros_settings.h" | 38 #include "chrome/browser/chromeos/settings/cros_settings.h" |
| 39 #include "chrome/browser/google/google_util.h" | 39 #include "chrome/browser/google/google_util.h" |
| 40 #include "chrome/browser/policy/policy_service.h" | |
| 41 #include "chrome/browser/prefs/session_startup_pref.h" | 40 #include "chrome/browser/prefs/session_startup_pref.h" |
| 42 #include "chrome/common/chrome_switches.h" | 41 #include "chrome/common/chrome_switches.h" |
| 43 #include "chrome/common/chrome_version_info.h" | 42 #include "chrome/common/chrome_version_info.h" |
| 44 #include "chrome/common/pref_names.h" | 43 #include "chrome/common/pref_names.h" |
| 45 #include "chrome/common/url_constants.h" | 44 #include "chrome/common/url_constants.h" |
| 46 #include "chromeos/chromeos_switches.h" | 45 #include "chromeos/chromeos_switches.h" |
| 47 #include "chromeos/dbus/dbus_thread_manager.h" | 46 #include "chromeos/dbus/dbus_thread_manager.h" |
| 48 #include "chromeos/dbus/power_manager_client.h" | 47 #include "chromeos/dbus/power_manager_client.h" |
| 49 #include "chromeos/dbus/session_manager_client.h" | 48 #include "chromeos/dbus/session_manager_client.h" |
| 50 #include "chromeos/settings/cros_settings_names.h" | 49 #include "chromeos/settings/cros_settings_names.h" |
| 50 #include "components/policy/core/common/policy_service.h" |
| 51 #include "content/public/browser/browser_thread.h" | 51 #include "content/public/browser/browser_thread.h" |
| 52 #include "content/public/browser/notification_service.h" | 52 #include "content/public/browser/notification_service.h" |
| 53 #include "content/public/browser/notification_types.h" | 53 #include "content/public/browser/notification_types.h" |
| 54 #include "content/public/browser/user_metrics.h" | 54 #include "content/public/browser/user_metrics.h" |
| 55 #include "google_apis/gaia/gaia_auth_util.h" | 55 #include "google_apis/gaia/gaia_auth_util.h" |
| 56 #include "google_apis/gaia/google_service_auth_error.h" | 56 #include "google_apis/gaia/google_service_auth_error.h" |
| 57 #include "grit/generated_resources.h" | 57 #include "grit/generated_resources.h" |
| 58 #include "net/http/http_auth_cache.h" | 58 #include "net/http/http_auth_cache.h" |
| 59 #include "net/http/http_network_session.h" | 59 #include "net/http/http_network_session.h" |
| 60 #include "net/http/http_transaction_factory.h" | 60 #include "net/http/http_transaction_factory.h" |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 if (type == chrome::NOTIFICATION_AUTH_SUPPLIED) { | 250 if (type == chrome::NOTIFICATION_AUTH_SUPPLIED) { |
| 251 // Possibly the user has authenticated against a proxy server and we might | 251 // Possibly the user has authenticated against a proxy server and we might |
| 252 // need the credentials for enrollment and other system requests from the | 252 // need the credentials for enrollment and other system requests from the |
| 253 // main |g_browser_process| request context (see bug | 253 // main |g_browser_process| request context (see bug |
| 254 // http://crosbug.com/24861). So we transfer any credentials to the global | 254 // http://crosbug.com/24861). So we transfer any credentials to the global |
| 255 // request context here. | 255 // request context here. |
| 256 // The issue we have here is that the NOTIFICATION_AUTH_SUPPLIED is sent | 256 // The issue we have here is that the NOTIFICATION_AUTH_SUPPLIED is sent |
| 257 // just after the UI is closed but before the new credentials were stored | 257 // just after the UI is closed but before the new credentials were stored |
| 258 // in the profile. Therefore we have to give it some time to make sure it | 258 // in the profile. Therefore we have to give it some time to make sure it |
| 259 // has been updated before we copy it. | 259 // has been updated before we copy it. |
| 260 LOG(INFO) << "Authentication was entered manually, possibly for proxyauth."; | 260 VLOG(1) << "Authentication was entered manually, possibly for proxyauth."; |
| 261 scoped_refptr<net::URLRequestContextGetter> browser_process_context_getter = | 261 scoped_refptr<net::URLRequestContextGetter> browser_process_context_getter = |
| 262 g_browser_process->system_request_context(); | 262 g_browser_process->system_request_context(); |
| 263 Profile* signin_profile = ProfileHelper::GetSigninProfile(); | 263 Profile* signin_profile = ProfileHelper::GetSigninProfile(); |
| 264 scoped_refptr<net::URLRequestContextGetter> signin_profile_context_getter = | 264 scoped_refptr<net::URLRequestContextGetter> signin_profile_context_getter = |
| 265 signin_profile->GetRequestContext(); | 265 signin_profile->GetRequestContext(); |
| 266 DCHECK(browser_process_context_getter.get()); | 266 DCHECK(browser_process_context_getter.get()); |
| 267 DCHECK(signin_profile_context_getter.get()); | 267 DCHECK(signin_profile_context_getter.get()); |
| 268 content::BrowserThread::PostDelayedTask( | 268 content::BrowserThread::PostDelayedTask( |
| 269 content::BrowserThread::IO, FROM_HERE, | 269 content::BrowserThread::IO, FROM_HERE, |
| 270 base::Bind(&TransferContextAuthenticationsOnIOThread, | 270 base::Bind(&TransferContextAuthenticationsOnIOThread, |
| (...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1105 } | 1105 } |
| 1106 | 1106 |
| 1107 void ExistingUserController::SendAccessibilityAlert( | 1107 void ExistingUserController::SendAccessibilityAlert( |
| 1108 const std::string& alert_text) { | 1108 const std::string& alert_text) { |
| 1109 AccessibilityAlertInfo event(ProfileHelper::GetSigninProfile(), alert_text); | 1109 AccessibilityAlertInfo event(ProfileHelper::GetSigninProfile(), alert_text); |
| 1110 SendControlAccessibilityNotification( | 1110 SendControlAccessibilityNotification( |
| 1111 ui::AccessibilityTypes::EVENT_VALUE_CHANGED, &event); | 1111 ui::AccessibilityTypes::EVENT_VALUE_CHANGED, &event); |
| 1112 } | 1112 } |
| 1113 | 1113 |
| 1114 } // namespace chromeos | 1114 } // namespace chromeos |
| OLD | NEW |