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

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: Simpler test setup using an uninitialized store Created 8 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 | 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/policy/browser_policy_connector.h" 34 #include "chrome/browser/policy/policy_service.h"
34 #include "chrome/browser/prefs/pref_service.h" 35 #include "chrome/browser/prefs/pref_service.h"
35 #include "chrome/browser/prefs/session_startup_pref.h" 36 #include "chrome/browser/prefs/session_startup_pref.h"
36 #include "chrome/browser/profiles/profile_manager.h" 37 #include "chrome/browser/profiles/profile_manager.h"
37 #include "chrome/browser/ui/dialog_style.h" 38 #include "chrome/browser/ui/dialog_style.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"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 88
88 // Delay for transferring the auth cache to the system profile. 89 // Delay for transferring the auth cache to the system profile.
89 const long int kAuthCacheTransferDelayMs = 2000; 90 const long int kAuthCacheTransferDelayMs = 2000;
90 91
91 // Delay for restarting the ui if safe-mode login has failed. 92 // Delay for restarting the ui if safe-mode login has failed.
92 const long int kSafeModeRestartUiDelayMs = 30000; 93 const long int kSafeModeRestartUiDelayMs = 30000;
93 94
94 // Makes a call to the policy subsystem to reload the policy when we detect 95 // Makes a call to the policy subsystem to reload the policy when we detect
95 // authentication change. 96 // authentication change.
96 void RefreshPoliciesOnUIThread() { 97 void RefreshPoliciesOnUIThread() {
97 if (g_browser_process->browser_policy_connector()) 98 if (g_browser_process->policy_service())
98 g_browser_process->browser_policy_connector()->RefreshPolicies(); 99 g_browser_process->policy_service()->RefreshPolicies(base::Closure());
99 } 100 }
100 101
101 // Copies any authentication details that were entered in the login profile in 102 // Copies any authentication details that were entered in the login profile in
102 // the mail profile to make sure all subsystems of Chrome can access the network 103 // the mail profile to make sure all subsystems of Chrome can access the network
103 // with the provided authentication which are possibly for a proxy server. 104 // with the provided authentication which are possibly for a proxy server.
104 void TransferContextAuthenticationsOnIOThread( 105 void TransferContextAuthenticationsOnIOThread(
105 net::URLRequestContextGetter* default_profile_context_getter, 106 net::URLRequestContextGetter* default_profile_context_getter,
106 net::URLRequestContextGetter* browser_process_context_getter) { 107 net::URLRequestContextGetter* browser_process_context_getter) {
107 net::HttpAuthCache* new_cache = 108 net::HttpAuthCache* new_cache =
108 browser_process_context_getter->GetURLRequestContext()-> 109 browser_process_context_getter->GetURLRequestContext()->
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 // Invalidate OAuth token, since it can't be correct after password is 778 // Invalidate OAuth token, since it can't be correct after password is
778 // changed. 779 // changed.
779 UserManager::Get()->SaveUserOAuthStatus(username, 780 UserManager::Get()->SaveUserOAuthStatus(username,
780 User::OAUTH_TOKEN_STATUS_INVALID); 781 User::OAUTH_TOKEN_STATUS_INVALID);
781 782
782 login_display_->SetUIEnabled(true); 783 login_display_->SetUIEnabled(true);
783 login_display_->ShowGaiaPasswordChanged(username); 784 login_display_->ShowGaiaPasswordChanged(username);
784 } 785 }
785 786
786 } // namespace chromeos 787 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698