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

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

Issue 10236003: Added RefreshPolicies to PolicyService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 7 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/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"
11 #include "base/callback.h"
11 #include "base/command_line.h" 12 #include "base/command_line.h"
12 #include "base/logging.h" 13 #include "base/logging.h"
13 #include "base/message_loop.h" 14 #include "base/message_loop.h"
14 #include "base/metrics/histogram.h" 15 #include "base/metrics/histogram.h"
15 #include "base/string_util.h" 16 #include "base/string_util.h"
16 #include "base/stringprintf.h" 17 #include "base/stringprintf.h"
17 #include "base/utf_string_conversions.h" 18 #include "base/utf_string_conversions.h"
18 #include "base/values.h" 19 #include "base/values.h"
19 #include "chrome/browser/browser_process.h" 20 #include "chrome/browser/browser_process.h"
20 #include "chrome/browser/chromeos/accessibility/accessibility_util.h" 21 #include "chrome/browser/chromeos/accessibility/accessibility_util.h"
21 #include "chrome/browser/chromeos/boot_times_loader.h" 22 #include "chrome/browser/chromeos/boot_times_loader.h"
22 #include "chrome/browser/chromeos/cros/cros_library.h" 23 #include "chrome/browser/chromeos/cros/cros_library.h"
23 #include "chrome/browser/chromeos/cros/network_library.h" 24 #include "chrome/browser/chromeos/cros/network_library.h"
24 #include "chrome/browser/chromeos/cros_settings.h" 25 #include "chrome/browser/chromeos/cros_settings.h"
25 #include "chrome/browser/chromeos/customization_document.h" 26 #include "chrome/browser/chromeos/customization_document.h"
26 #include "chrome/browser/chromeos/login/helper.h" 27 #include "chrome/browser/chromeos/login/helper.h"
27 #include "chrome/browser/chromeos/login/login_display_host.h" 28 #include "chrome/browser/chromeos/login/login_display_host.h"
28 #include "chrome/browser/chromeos/login/login_utils.h" 29 #include "chrome/browser/chromeos/login/login_utils.h"
29 #include "chrome/browser/chromeos/login/user_manager.h" 30 #include "chrome/browser/chromeos/login/user_manager.h"
30 #include "chrome/browser/chromeos/login/wizard_controller.h" 31 #include "chrome/browser/chromeos/login/wizard_controller.h"
31 #include "chrome/browser/chromeos/system/statistics_provider.h" 32 #include "chrome/browser/chromeos/system/statistics_provider.h"
32 #include "chrome/browser/google/google_util.h" 33 #include "chrome/browser/google/google_util.h"
33 #include "chrome/browser/net/browser_url_util.h" 34 #include "chrome/browser/net/browser_url_util.h"
34 #include "chrome/browser/policy/browser_policy_connector.h" 35 #include "chrome/browser/policy/policy_service.h"
35 #include "chrome/browser/prefs/pref_service.h" 36 #include "chrome/browser/prefs/pref_service.h"
36 #include "chrome/browser/prefs/session_startup_pref.h" 37 #include "chrome/browser/prefs/session_startup_pref.h"
37 #include "chrome/browser/profiles/profile_manager.h" 38 #include "chrome/browser/profiles/profile_manager.h"
38 #include "chrome/common/chrome_notification_types.h" 39 #include "chrome/common/chrome_notification_types.h"
39 #include "chrome/common/chrome_switches.h" 40 #include "chrome/common/chrome_switches.h"
40 #include "chrome/common/net/gaia/google_service_auth_error.h" 41 #include "chrome/common/net/gaia/google_service_auth_error.h"
41 #include "chrome/common/pref_names.h" 42 #include "chrome/common/pref_names.h"
42 #include "chromeos/dbus/dbus_thread_manager.h" 43 #include "chromeos/dbus/dbus_thread_manager.h"
43 #include "chromeos/dbus/session_manager_client.h" 44 #include "chromeos/dbus/session_manager_client.h"
44 #include "content/public/browser/browser_thread.h" 45 #include "content/public/browser/browser_thread.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 95
95 // Delay for transferring the auth cache to the system profile. 96 // Delay for transferring the auth cache to the system profile.
96 const long int kAuthCacheTransferDelayMs = 2000; 97 const long int kAuthCacheTransferDelayMs = 2000;
97 98
98 // Delay for restarting the ui if safe-mode login has failed. 99 // Delay for restarting the ui if safe-mode login has failed.
99 const long int kSafeModeRestartUiDelayMs = 30000; 100 const long int kSafeModeRestartUiDelayMs = 30000;
100 101
101 // Makes a call to the policy subsystem to reload the policy when we detect 102 // Makes a call to the policy subsystem to reload the policy when we detect
102 // authentication change. 103 // authentication change.
103 void RefreshPoliciesOnUIThread() { 104 void RefreshPoliciesOnUIThread() {
104 if (g_browser_process->browser_policy_connector()) 105 if (g_browser_process->policy_service())
105 g_browser_process->browser_policy_connector()->RefreshPolicies(); 106 g_browser_process->policy_service()->RefreshPolicies(base::Closure());
106 } 107 }
107 108
108 // Copies any authentication details that were entered in the login profile in 109 // Copies any authentication details that were entered in the login profile in
109 // the mail profile to make sure all subsystems of Chrome can access the network 110 // the mail profile to make sure all subsystems of Chrome can access the network
110 // with the provided authentication which are possibly for a proxy server. 111 // with the provided authentication which are possibly for a proxy server.
111 void TransferContextAuthenticationsOnIOThread( 112 void TransferContextAuthenticationsOnIOThread(
112 net::URLRequestContextGetter* default_profile_context_getter, 113 net::URLRequestContextGetter* default_profile_context_getter,
113 net::URLRequestContextGetter* browser_process_context_getter) { 114 net::URLRequestContextGetter* browser_process_context_getter) {
114 net::HttpAuthCache* new_cache = 115 net::HttpAuthCache* new_cache =
115 browser_process_context_getter->GetURLRequestContext()-> 116 browser_process_context_getter->GetURLRequestContext()->
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 // Invalidate OAuth token, since it can't be correct after password is 806 // Invalidate OAuth token, since it can't be correct after password is
806 // changed. 807 // changed.
807 UserManager::Get()->SaveUserOAuthStatus(username, 808 UserManager::Get()->SaveUserOAuthStatus(username,
808 User::OAUTH_TOKEN_STATUS_INVALID); 809 User::OAUTH_TOKEN_STATUS_INVALID);
809 810
810 login_display_->SetUIEnabled(true); 811 login_display_->SetUIEnabled(true);
811 login_display_->ShowGaiaPasswordChanged(username); 812 login_display_->ShowGaiaPasswordChanged(username);
812 } 813 }
813 814
814 } // namespace chromeos 815 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/browser/policy/asynchronous_policy_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698