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

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: stevenjb@'s latest code review (small tweaks) 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 #include "chromeos/network/portal_detector/network_portal_detector_strategy.h" 92 #include "chromeos/network/portal_detector/network_portal_detector_strategy.h"
93 #include "chromeos/settings/cros_settings_names.h" 93 #include "chromeos/settings/cros_settings_names.h"
94 #include "components/arc/arc_bridge_service.h" 94 #include "components/arc/arc_bridge_service.h"
95 #include "components/arc/arc_service_manager.h" 95 #include "components/arc/arc_service_manager.h"
96 #include "components/component_updater/component_updater_service.h" 96 #include "components/component_updater/component_updater_service.h"
97 #include "components/flags_ui/pref_service_flags_storage.h" 97 #include "components/flags_ui/pref_service_flags_storage.h"
98 #include "components/policy/core/common/cloud/cloud_policy_constants.h" 98 #include "components/policy/core/common/cloud/cloud_policy_constants.h"
99 #include "components/prefs/pref_member.h" 99 #include "components/prefs/pref_member.h"
100 #include "components/prefs/pref_registry_simple.h" 100 #include "components/prefs/pref_registry_simple.h"
101 #include "components/prefs/pref_service.h" 101 #include "components/prefs/pref_service.h"
102 #include "components/quirks/quirks_manager.h"
102 #include "components/session_manager/core/session_manager.h" 103 #include "components/session_manager/core/session_manager.h"
103 #include "components/signin/core/account_id/account_id.h" 104 #include "components/signin/core/account_id/account_id.h"
104 #include "components/signin/core/browser/account_tracker_service.h" 105 #include "components/signin/core/browser/account_tracker_service.h"
105 #include "components/signin/core/browser/signin_manager_base.h" 106 #include "components/signin/core/browser/signin_manager_base.h"
106 #include "components/user_manager/known_user.h" 107 #include "components/user_manager/known_user.h"
107 #include "components/user_manager/user.h" 108 #include "components/user_manager/user.h"
108 #include "components/user_manager/user_manager.h" 109 #include "components/user_manager/user_manager.h"
109 #include "components/user_manager/user_type.h" 110 #include "components/user_manager/user_type.h"
110 #include "content/public/browser/browser_thread.h" 111 #include "content/public/browser/browser_thread.h"
111 #include "content/public/browser/notification_service.h" 112 #include "content/public/browser/notification_service.h"
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 profile, base::Bind(&UserSessionManager::OnTokenHandleObtained, 1166 profile, base::Bind(&UserSessionManager::OnTokenHandleObtained,
1166 weak_factory_.GetWeakPtr())); 1167 weak_factory_.GetWeakPtr()));
1167 } 1168 }
1168 } 1169 }
1169 } 1170 }
1170 1171
1171 // Now that profile is ready, proceed to either alternative login flows or 1172 // Now that profile is ready, proceed to either alternative login flows or
1172 // launch browser. 1173 // launch browser.
1173 bool browser_launched = InitializeUserSession(profile); 1174 bool browser_launched = InitializeUserSession(profile);
1174 1175
1176 // Only allow Quirks downloads after login is finished.
1177 quirks::QuirksManager::Get()->OnLoginCompleted();
1178
1175 // If needed, create browser observer to display first run OOBE Goodies page. 1179 // If needed, create browser observer to display first run OOBE Goodies page.
1176 first_run::GoodiesDisplayer::Init(); 1180 first_run::GoodiesDisplayer::Init();
1177 1181
1178 // TODO(nkostylev): This pointer should probably never be NULL, but it looks 1182 // TODO(nkostylev): This pointer should probably never be NULL, but it looks
1179 // like OnProfileCreated() may be getting called before 1183 // like OnProfileCreated() may be getting called before
1180 // UserSessionManager::PrepareProfile() has set |delegate_| when Chrome is 1184 // UserSessionManager::PrepareProfile() has set |delegate_| when Chrome is
1181 // killed during shutdown in tests -- see http://crosbug.com/18269. Replace 1185 // killed during shutdown in tests -- see http://crosbug.com/18269. Replace
1182 // this 'if' statement with a CHECK(delegate_) once the underlying issue is 1186 // this 'if' statement with a CHECK(delegate_) once the underlying issue is
1183 // resolved. 1187 // resolved.
1184 if (delegate_) 1188 if (delegate_)
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
1799 token_handle_util_.reset(); 1803 token_handle_util_.reset();
1800 first_run::GoodiesDisplayer::Delete(); 1804 first_run::GoodiesDisplayer::Delete();
1801 } 1805 }
1802 1806
1803 void UserSessionManager::CreateTokenUtilIfMissing() { 1807 void UserSessionManager::CreateTokenUtilIfMissing() {
1804 if (!token_handle_util_.get()) 1808 if (!token_handle_util_.get())
1805 token_handle_util_.reset(new TokenHandleUtil()); 1809 token_handle_util_.reset(new TokenHandleUtil());
1806 } 1810 }
1807 1811
1808 } // namespace chromeos 1812 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698