Commit 9b8133df authored by flackr@chromium.org's avatar flackr@chromium.org

Deliver NOTIFICATION_SESSION_STARTED if the browser crashes and is restarted.

BUG=112109
TEST=Crash the browser and verify that screenlocker observers have been registered (i.e. short power press works).

Review URL: https://chromiumcodereview.appspot.com/9310002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120099 0039d316-1c4b-4281-b951-d872f2087c98
parent 7557d280
...@@ -51,9 +51,11 @@ ...@@ -51,9 +51,11 @@
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/views/browser_dialogs.h" #include "chrome/browser/ui/views/browser_dialogs.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h" #include "chrome/common/chrome_switches.h"
#include "chrome/common/logging_chrome.h" #include "chrome/common/logging_chrome.h"
#include "chrome/common/pref_names.h" #include "chrome/common/pref_names.h"
#include "content/public/browser/notification_service.h"
#include "content/public/common/main_function_params.h" #include "content/public/common/main_function_params.h"
#include "grit/platform_locale_settings.h" #include "grit/platform_locale_settings.h"
#include "net/base/network_change_notifier.h" #include "net/base/network_change_notifier.h"
...@@ -388,6 +390,10 @@ void ChromeBrowserMainPartsChromeos::PreProfileInit() { ...@@ -388,6 +390,10 @@ void ChromeBrowserMainPartsChromeos::PreProfileInit() {
// initialization code sees policy settings. // initialization code sees policy settings.
g_browser_process->browser_policy_connector()->InitializeUserPolicy( g_browser_process->browser_policy_connector()->InitializeUserPolicy(
username, false /* wait_for_policy_fetch */); username, false /* wait_for_policy_fetch */);
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_SESSION_STARTED,
content::NotificationService::AllSources(),
content::NotificationService::NoDetails());
} else if (parsed_command_line().HasSwitch(switches::kLoginManager)) { } else if (parsed_command_line().HasSwitch(switches::kLoginManager)) {
// Initialize status area mode early on. // Initialize status area mode early on.
chromeos::StatusAreaViewChromeos:: chromeos::StatusAreaViewChromeos::
......
...@@ -780,7 +780,8 @@ enum NotificationType { ...@@ -780,7 +780,8 @@ enum NotificationType {
// Sent when the chromium session is first started. If this is a new user this // Sent when the chromium session is first started. If this is a new user this
// will not be sent until a profile picture has been selected, unlike // will not be sent until a profile picture has been selected, unlike
// NOTIFICATION_LOGIN_USER_CHANGED which is sent after the user has logged in. // NOTIFICATION_LOGIN_USER_CHANGED which is sent immediately after the user
// has logged in. This will be sent again if the browser crashes and restarts.
NOTIFICATION_SESSION_STARTED, NOTIFICATION_SESSION_STARTED,
// Sent when user image is updated. // Sent when user image is updated.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment