| OLD | NEW |
| 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/chrome_browser_main_chromeos.h" | 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 std::string username = | 383 std::string username = |
| 384 parsed_command_line().GetSwitchValueASCII(switches::kLoginUser); | 384 parsed_command_line().GetSwitchValueASCII(switches::kLoginUser); |
| 385 VLOG(1) << "Relaunching browser for user: " << username; | 385 VLOG(1) << "Relaunching browser for user: " << username; |
| 386 chromeos::UserManager::Get()->UserLoggedIn(username); | 386 chromeos::UserManager::Get()->UserLoggedIn(username); |
| 387 | 387 |
| 388 // Redirects Chrome logging to the user data dir. | 388 // Redirects Chrome logging to the user data dir. |
| 389 logging::RedirectChromeLogging(parsed_command_line()); | 389 logging::RedirectChromeLogging(parsed_command_line()); |
| 390 | 390 |
| 391 // Initialize user policy before creating the profile so the profile | 391 // Initialize user policy before creating the profile so the profile |
| 392 // initialization code sees policy settings. | 392 // initialization code sees policy settings. |
| 393 const bool wait_for_policy_fetch = false; |
| 394 base::Closure ready_callback; |
| 393 g_browser_process->browser_policy_connector()->InitializeUserPolicy( | 395 g_browser_process->browser_policy_connector()->InitializeUserPolicy( |
| 394 username, false /* wait_for_policy_fetch */); | 396 username, wait_for_policy_fetch, ready_callback); |
| 395 content::NotificationService::current()->Notify( | 397 content::NotificationService::current()->Notify( |
| 396 chrome::NOTIFICATION_SESSION_STARTED, | 398 chrome::NOTIFICATION_SESSION_STARTED, |
| 397 content::NotificationService::AllSources(), | 399 content::NotificationService::AllSources(), |
| 398 content::NotificationService::NoDetails()); | 400 content::NotificationService::NoDetails()); |
| 399 } else if (parsed_command_line().HasSwitch(switches::kLoginManager)) { | 401 } else if (parsed_command_line().HasSwitch(switches::kLoginManager)) { |
| 400 // Initialize status area mode early on. | 402 // Initialize status area mode early on. |
| 401 chromeos::StatusAreaViewChromeos:: | 403 chromeos::StatusAreaViewChromeos:: |
| 402 SetScreenMode(chromeos::StatusAreaViewChromeos::LOGIN_MODE_WEBUI); | 404 SetScreenMode(chromeos::StatusAreaViewChromeos::LOGIN_MODE_WEBUI); |
| 403 } | 405 } |
| 404 | 406 |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 // Let VideoPropertyWriter unregister itself as an observer of the ash::Shell | 535 // Let VideoPropertyWriter unregister itself as an observer of the ash::Shell |
| 534 // singleton before the shell is destroyed. | 536 // singleton before the shell is destroyed. |
| 535 video_property_writer_.reset(); | 537 video_property_writer_.reset(); |
| 536 // Remove PowerButtonObserver attached to a D-Bus client before | 538 // Remove PowerButtonObserver attached to a D-Bus client before |
| 537 // DBusThreadManager is shut down. | 539 // DBusThreadManager is shut down. |
| 538 power_button_observer_.reset(); | 540 power_button_observer_.reset(); |
| 539 #endif | 541 #endif |
| 540 | 542 |
| 541 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); | 543 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); |
| 542 } | 544 } |
| OLD | NEW |