#include "base/command_line.h"
#include "base/metrics/histogram.h"
#include "base/prefs/pref_service.h"
+#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/first_run/first_run_controller.h"
-#include "chrome/browser/chromeos/login/users/user_manager.h"
+#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/extensions/extension_service.h"
+#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/extensions/application_launch.h"
#include "chrome/common/chrome_switches.h"
+#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/pref_names.h"
#include "chromeos/chromeos_switches.h"
#include "components/pref_registry/pref_registry_syncable.h"
+#include "components/user_manager/user_manager.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_service.h"
virtual void Observe(int type,
const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE {
+ const content::NotificationDetails& details) override {
DCHECK(type == chrome::NOTIFICATION_SESSION_STARTED);
- DCHECK(content::Details<const User>(details).ptr() ==
- UserManager::Get()->GetUserByProfile(profile_));
+ DCHECK(content::Details<const user_manager::User>(details).ptr() ==
+ ProfileHelper::Get()->GetUserByProfile(profile_));
CommandLine* command_line = CommandLine::ForCurrentProcess();
bool launched_in_test = command_line->HasSwitch(::switches::kTestType);
bool launched_in_telemetry =
command_line->HasSwitch(switches::kOobeSkipPostLogin);
- bool is_user_new = chromeos::UserManager::Get()->IsCurrentUserNew();
+ bool is_user_new = user_manager::UserManager::Get()->IsCurrentUserNew();
bool first_run_forced = command_line->HasSwitch(switches::kForceFirstRunUI);
bool first_run_seen =
profile_->GetPrefs()->GetBoolean(prefs::kFirstRunTutorialShown);
}
void MaybeLaunchDialogAfterSessionStart() {
- UserManager* user_manager = UserManager::Get();
- new DialogLauncher(
- user_manager->GetProfileByUser(user_manager->GetActiveUser()));
+ new DialogLauncher(ProfileHelper::Get()->GetProfileByUserUnsafe(
+ user_manager::UserManager::Get()->GetActiveUser()));
}
void LaunchTutorial() {