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

Side by Side Diff: chrome/browser/chromeos/login/existing_user_controller.cc

Issue 13633003: Part of multiprofile implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: m Created 7 years, 8 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
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/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 13 matching lines...) Expand all
24 #include "chrome/browser/chromeos/boot_times_loader.h" 24 #include "chrome/browser/chromeos/boot_times_loader.h"
25 #include "chrome/browser/chromeos/cros/cros_library.h" 25 #include "chrome/browser/chromeos/cros/cros_library.h"
26 #include "chrome/browser/chromeos/customization_document.h" 26 #include "chrome/browser/chromeos/customization_document.h"
27 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" 27 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
28 #include "chrome/browser/chromeos/login/helper.h" 28 #include "chrome/browser/chromeos/login/helper.h"
29 #include "chrome/browser/chromeos/login/login_display_host.h" 29 #include "chrome/browser/chromeos/login/login_display_host.h"
30 #include "chrome/browser/chromeos/login/login_utils.h" 30 #include "chrome/browser/chromeos/login/login_utils.h"
31 #include "chrome/browser/chromeos/login/user_manager.h" 31 #include "chrome/browser/chromeos/login/user_manager.h"
32 #include "chrome/browser/chromeos/login/wizard_controller.h" 32 #include "chrome/browser/chromeos/login/wizard_controller.h"
33 #include "chrome/browser/chromeos/net/connectivity_state_helper.h" 33 #include "chrome/browser/chromeos/net/connectivity_state_helper.h"
34 #include "chrome/browser/chromeos/profiles/profile_helper.h"
34 #include "chrome/browser/chromeos/settings/cros_settings.h" 35 #include "chrome/browser/chromeos/settings/cros_settings.h"
35 #include "chrome/browser/chromeos/settings/cros_settings_names.h" 36 #include "chrome/browser/chromeos/settings/cros_settings_names.h"
36 #include "chrome/browser/chromeos/system/statistics_provider.h" 37 #include "chrome/browser/chromeos/system/statistics_provider.h"
37 #include "chrome/browser/google/google_util.h" 38 #include "chrome/browser/google/google_util.h"
38 #include "chrome/browser/policy/policy_service.h" 39 #include "chrome/browser/policy/policy_service.h"
39 #include "chrome/browser/prefs/session_startup_pref.h" 40 #include "chrome/browser/prefs/session_startup_pref.h"
40 #include "chrome/browser/profiles/profile_manager.h"
41 #include "chrome/common/chrome_notification_types.h" 41 #include "chrome/common/chrome_notification_types.h"
42 #include "chrome/common/chrome_switches.h" 42 #include "chrome/common/chrome_switches.h"
43 #include "chrome/common/chrome_version_info.h" 43 #include "chrome/common/chrome_version_info.h"
44 #include "chrome/common/pref_names.h" 44 #include "chrome/common/pref_names.h"
45 #include "chrome/common/url_constants.h" 45 #include "chrome/common/url_constants.h"
46 #include "chromeos/dbus/dbus_thread_manager.h" 46 #include "chromeos/dbus/dbus_thread_manager.h"
47 #include "chromeos/dbus/power_manager_client.h" 47 #include "chromeos/dbus/power_manager_client.h"
48 #include "chromeos/dbus/session_manager_client.h" 48 #include "chromeos/dbus/session_manager_client.h"
49 #include "content/public/browser/browser_thread.h" 49 #include "content/public/browser/browser_thread.h"
50 #include "content/public/browser/notification_service.h" 50 #include "content/public/browser/notification_service.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 // main |g_browser_process| request context (see bug 268 // main |g_browser_process| request context (see bug
269 // http://crosbug.com/24861). So we transfer any credentials to the global 269 // http://crosbug.com/24861). So we transfer any credentials to the global
270 // request context here. 270 // request context here.
271 // The issue we have here is that the NOTIFICATION_AUTH_SUPPLIED is sent 271 // The issue we have here is that the NOTIFICATION_AUTH_SUPPLIED is sent
272 // just after the UI is closed but before the new credentials were stored 272 // just after the UI is closed but before the new credentials were stored
273 // in the profile. Therefore we have to give it some time to make sure it 273 // in the profile. Therefore we have to give it some time to make sure it
274 // has been updated before we copy it. 274 // has been updated before we copy it.
275 LOG(INFO) << "Authentication was entered manually, possibly for proxyauth."; 275 LOG(INFO) << "Authentication was entered manually, possibly for proxyauth.";
276 scoped_refptr<net::URLRequestContextGetter> browser_process_context_getter = 276 scoped_refptr<net::URLRequestContextGetter> browser_process_context_getter =
277 g_browser_process->system_request_context(); 277 g_browser_process->system_request_context();
278 Profile* default_profile = ProfileManager::GetDefaultProfile(); 278 Profile* signin_profile = ProfileHelper::GetSigninProfile();
279 scoped_refptr<net::URLRequestContextGetter> default_profile_context_getter = 279 scoped_refptr<net::URLRequestContextGetter> signin_profile_context_getter =
280 default_profile->GetRequestContext(); 280 signin_profile->GetRequestContext();
281 DCHECK(browser_process_context_getter.get()); 281 DCHECK(browser_process_context_getter.get());
282 DCHECK(default_profile_context_getter.get()); 282 DCHECK(signin_profile_context_getter.get());
283 content::BrowserThread::PostDelayedTask( 283 content::BrowserThread::PostDelayedTask(
284 content::BrowserThread::IO, FROM_HERE, 284 content::BrowserThread::IO, FROM_HERE,
285 base::Bind(&TransferContextAuthenticationsOnIOThread, 285 base::Bind(&TransferContextAuthenticationsOnIOThread,
286 default_profile_context_getter, 286 signin_profile_context_getter,
287 browser_process_context_getter), 287 browser_process_context_getter),
288 base::TimeDelta::FromMilliseconds(kAuthCacheTransferDelayMs)); 288 base::TimeDelta::FromMilliseconds(kAuthCacheTransferDelayMs));
289 } 289 }
290 if (type != chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED) 290 if (type != chrome::NOTIFICATION_LOGIN_USER_IMAGE_CHANGED)
291 return; 291 return;
292 login_display_->OnUserImageChanged(*content::Details<User>(details).ptr()); 292 login_display_->OnUserImageChanged(*content::Details<User>(details).ptr());
293 } 293 }
294 294
295 //////////////////////////////////////////////////////////////////////////////// 295 ////////////////////////////////////////////////////////////////////////////////
296 // ExistingUserController, private: 296 // ExistingUserController, private:
(...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
1101 // changed. 1101 // changed.
1102 UserManager::Get()->SaveUserOAuthStatus( 1102 UserManager::Get()->SaveUserOAuthStatus(
1103 username, 1103 username,
1104 User::OAUTH2_TOKEN_STATUS_INVALID); 1104 User::OAUTH2_TOKEN_STATUS_INVALID);
1105 1105
1106 login_display_->SetUIEnabled(true); 1106 login_display_->SetUIEnabled(true);
1107 login_display_->ShowGaiaPasswordChanged(username); 1107 login_display_->ShowGaiaPasswordChanged(username);
1108 } 1108 }
1109 1109
1110 } // namespace chromeos 1110 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/captive_portal_window_proxy.cc ('k') | chrome/browser/chromeos/login/help_app_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698