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

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

Issue 2642783003: Move more utility functions to arc_util. (Closed)
Patch Set: Revert IsIntentHelperAvailable fix. Created 3 years, 11 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/chrome_session_manager.h" 5 #include "chrome/browser/chromeos/login/session/chrome_session_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 15 matching lines...) Expand all
26 #include "chrome/browser/profiles/profile.h" 26 #include "chrome/browser/profiles/profile.h"
27 #include "chrome/browser/signin/signin_manager_factory.h" 27 #include "chrome/browser/signin/signin_manager_factory.h"
28 #include "chrome/browser/ui/ash/ash_util.h" 28 #include "chrome/browser/ui/ash/ash_util.h"
29 #include "chrome/common/chrome_switches.h" 29 #include "chrome/common/chrome_switches.h"
30 #include "chrome/common/pref_names.h" 30 #include "chrome/common/pref_names.h"
31 #include "chromeos/audio/cras_audio_handler.h" 31 #include "chromeos/audio/cras_audio_handler.h"
32 #include "chromeos/chromeos_switches.h" 32 #include "chromeos/chromeos_switches.h"
33 #include "chromeos/cryptohome/cryptohome_parameters.h" 33 #include "chromeos/cryptohome/cryptohome_parameters.h"
34 #include "chromeos/dbus/dbus_thread_manager.h" 34 #include "chromeos/dbus/dbus_thread_manager.h"
35 #include "chromeos/dbus/session_manager_client.h" 35 #include "chromeos/dbus/session_manager_client.h"
36 #include "components/arc/arc_bridge_service.h" 36 #include "components/arc/arc_util.h"
37 #include "components/prefs/pref_service.h" 37 #include "components/prefs/pref_service.h"
38 #include "components/signin/core/account_id/account_id.h" 38 #include "components/signin/core/account_id/account_id.h"
39 #include "components/signin/core/browser/signin_manager.h" 39 #include "components/signin/core/browser/signin_manager.h"
40 #include "components/user_manager/user_manager.h" 40 #include "components/user_manager/user_manager.h"
41 #include "components/user_manager/user_names.h" 41 #include "components/user_manager/user_names.h"
42 #include "content/public/browser/notification_service.h" 42 #include "content/public/browser/notification_service.h"
43 #include "content/public/common/content_switches.h" 43 #include "content/public/common/content_switches.h"
44 44
45 namespace chromeos { 45 namespace chromeos {
46 46
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // This is possible if crash occured after profile removal 99 // This is possible if crash occured after profile removal
100 // (see crbug.com/178290 for some more info). 100 // (see crbug.com/178290 for some more info).
101 LOG(ERROR) << "Could not get active user after crash."; 101 LOG(ERROR) << "Could not get active user after crash.";
102 return; 102 return;
103 } 103 }
104 user_session_mgr->InitRlz(user_profile); 104 user_session_mgr->InitRlz(user_profile);
105 user_session_mgr->InitializeCerts(user_profile); 105 user_session_mgr->InitializeCerts(user_profile);
106 user_session_mgr->InitializeCRLSetFetcher(user); 106 user_session_mgr->InitializeCRLSetFetcher(user);
107 user_session_mgr->InitializeCertificateTransparencyComponents(user); 107 user_session_mgr->InitializeCertificateTransparencyComponents(user);
108 108
109 if (arc::ArcBridgeService::GetEnabled( 109 if (arc::util::IsArcEnabled()) {
110 base::CommandLine::ForCurrentProcess())) {
111 arc::ArcServiceLauncher::Get()->OnPrimaryUserProfilePrepared( 110 arc::ArcServiceLauncher::Get()->OnPrimaryUserProfilePrepared(
112 user_profile); 111 user_profile);
113 } 112 }
114 113
115 // Send the PROFILE_PREPARED notification and call SessionStarted() 114 // Send the PROFILE_PREPARED notification and call SessionStarted()
116 // so that the Launcher and other Profile dependent classes are created. 115 // so that the Launcher and other Profile dependent classes are created.
117 content::NotificationService::current()->Notify( 116 content::NotificationService::current()->Notify(
118 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, 117 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
119 content::NotificationService::AllSources(), 118 content::NotificationService::AllSources(),
120 content::Details<Profile>(user_profile)); 119 content::Details<Profile>(user_profile));
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 const std::string& user_id_hash, 234 const std::string& user_id_hash,
236 bool browser_restart) { 235 bool browser_restart) {
237 BootTimesRecorder* btl = BootTimesRecorder::Get(); 236 BootTimesRecorder* btl = BootTimesRecorder::Get();
238 btl->AddLoginTimeMarker("UserLoggedIn-Start", false); 237 btl->AddLoginTimeMarker("UserLoggedIn-Start", false);
239 session_manager::SessionManager::NotifyUserLoggedIn( 238 session_manager::SessionManager::NotifyUserLoggedIn(
240 user_account_id, user_id_hash, browser_restart); 239 user_account_id, user_id_hash, browser_restart);
241 btl->AddLoginTimeMarker("UserLoggedIn-End", false); 240 btl->AddLoginTimeMarker("UserLoggedIn-End", false);
242 } 241 }
243 242
244 } // namespace chromeos 243 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698