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

Side by Side Diff: chrome/browser/chromeos/login/session/user_session_manager.cc

Issue 1528963002: Quirks Client for downloading and providing display profiles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Minor review fixes, delay download until after login Created 4 years, 9 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 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/chromeos/login/session/user_session_manager.h" 5 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 #include "chromeos/network/portal_detector/network_portal_detector_strategy.h" 91 #include "chromeos/network/portal_detector/network_portal_detector_strategy.h"
92 #include "chromeos/settings/cros_settings_names.h" 92 #include "chromeos/settings/cros_settings_names.h"
93 #include "components/arc/arc_bridge_service.h" 93 #include "components/arc/arc_bridge_service.h"
94 #include "components/arc/arc_service_manager.h" 94 #include "components/arc/arc_service_manager.h"
95 #include "components/component_updater/component_updater_service.h" 95 #include "components/component_updater/component_updater_service.h"
96 #include "components/flags_ui/pref_service_flags_storage.h" 96 #include "components/flags_ui/pref_service_flags_storage.h"
97 #include "components/policy/core/common/cloud/cloud_policy_constants.h" 97 #include "components/policy/core/common/cloud/cloud_policy_constants.h"
98 #include "components/prefs/pref_member.h" 98 #include "components/prefs/pref_member.h"
99 #include "components/prefs/pref_registry_simple.h" 99 #include "components/prefs/pref_registry_simple.h"
100 #include "components/prefs/pref_service.h" 100 #include "components/prefs/pref_service.h"
101 #include "components/quirks/quirks_manager.h"
101 #include "components/session_manager/core/session_manager.h" 102 #include "components/session_manager/core/session_manager.h"
102 #include "components/signin/core/account_id/account_id.h" 103 #include "components/signin/core/account_id/account_id.h"
103 #include "components/signin/core/browser/account_tracker_service.h" 104 #include "components/signin/core/browser/account_tracker_service.h"
104 #include "components/signin/core/browser/signin_manager_base.h" 105 #include "components/signin/core/browser/signin_manager_base.h"
105 #include "components/user_manager/known_user.h" 106 #include "components/user_manager/known_user.h"
106 #include "components/user_manager/user.h" 107 #include "components/user_manager/user.h"
107 #include "components/user_manager/user_manager.h" 108 #include "components/user_manager/user_manager.h"
108 #include "components/user_manager/user_type.h" 109 #include "components/user_manager/user_type.h"
109 #include "content/public/browser/browser_thread.h" 110 #include "content/public/browser/browser_thread.h"
110 #include "content/public/browser/notification_service.h" 111 #include "content/public/browser/notification_service.h"
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 profile, base::Bind(&UserSessionManager::OnTokenHandleObtained, 1163 profile, base::Bind(&UserSessionManager::OnTokenHandleObtained,
1163 weak_factory_.GetWeakPtr())); 1164 weak_factory_.GetWeakPtr()));
1164 } 1165 }
1165 } 1166 }
1166 } 1167 }
1167 1168
1168 // Now that profile is ready, proceed to either alternative login flows or 1169 // Now that profile is ready, proceed to either alternative login flows or
1169 // launch browser. 1170 // launch browser.
1170 bool browser_launched = InitializeUserSession(profile); 1171 bool browser_launched = InitializeUserSession(profile);
1171 1172
1173 // Only allow Quirks downloads after login is finished.
1174 quirks::QuirksManager::OnLoginCompleted();
1175
1172 // If needed, create browser observer to display first run OOBE Goodies page. 1176 // If needed, create browser observer to display first run OOBE Goodies page.
1173 first_run::GoodiesDisplayer::Init(); 1177 first_run::GoodiesDisplayer::Init();
1174 1178
1175 // TODO(nkostylev): This pointer should probably never be NULL, but it looks 1179 // TODO(nkostylev): This pointer should probably never be NULL, but it looks
1176 // like OnProfileCreated() may be getting called before 1180 // like OnProfileCreated() may be getting called before
1177 // UserSessionManager::PrepareProfile() has set |delegate_| when Chrome is 1181 // UserSessionManager::PrepareProfile() has set |delegate_| when Chrome is
1178 // killed during shutdown in tests -- see http://crosbug.com/18269. Replace 1182 // killed during shutdown in tests -- see http://crosbug.com/18269. Replace
1179 // this 'if' statement with a CHECK(delegate_) once the underlying issue is 1183 // this 'if' statement with a CHECK(delegate_) once the underlying issue is
1180 // resolved. 1184 // resolved.
1181 if (delegate_) 1185 if (delegate_)
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
1796 token_handle_util_.reset(); 1800 token_handle_util_.reset();
1797 first_run::GoodiesDisplayer::Delete(); 1801 first_run::GoodiesDisplayer::Delete();
1798 } 1802 }
1799 1803
1800 void UserSessionManager::CreateTokenUtilIfMissing() { 1804 void UserSessionManager::CreateTokenUtilIfMissing() {
1801 if (!token_handle_util_.get()) 1805 if (!token_handle_util_.get())
1802 token_handle_util_.reset(new TokenHandleUtil()); 1806 token_handle_util_.reset(new TokenHandleUtil());
1803 } 1807 }
1804 1808
1805 } // namespace chromeos 1809 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698