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

Side by Side Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 9310002: Deliver NOTIFICATION_SESSION_STARTED if the browser crashes and is restarted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with master. Created 8 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/common/chrome_notification_types.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "chrome/browser/chromeos/web_socket_proxy_controller.h" 44 #include "chrome/browser/chromeos/web_socket_proxy_controller.h"
45 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" 45 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h"
46 #include "chrome/browser/defaults.h" 46 #include "chrome/browser/defaults.h"
47 #include "chrome/browser/metrics/metrics_service.h" 47 #include "chrome/browser/metrics/metrics_service.h"
48 #include "chrome/browser/oom_priority_manager.h" 48 #include "chrome/browser/oom_priority_manager.h"
49 #include "chrome/browser/policy/browser_policy_connector.h" 49 #include "chrome/browser/policy/browser_policy_connector.h"
50 #include "chrome/browser/prefs/pref_service.h" 50 #include "chrome/browser/prefs/pref_service.h"
51 #include "chrome/browser/profiles/profile.h" 51 #include "chrome/browser/profiles/profile.h"
52 #include "chrome/browser/profiles/profile_manager.h" 52 #include "chrome/browser/profiles/profile_manager.h"
53 #include "chrome/browser/ui/views/browser_dialogs.h" 53 #include "chrome/browser/ui/views/browser_dialogs.h"
54 #include "chrome/common/chrome_notification_types.h"
54 #include "chrome/common/chrome_switches.h" 55 #include "chrome/common/chrome_switches.h"
55 #include "chrome/common/logging_chrome.h" 56 #include "chrome/common/logging_chrome.h"
56 #include "chrome/common/pref_names.h" 57 #include "chrome/common/pref_names.h"
58 #include "content/public/browser/notification_service.h"
57 #include "content/public/common/main_function_params.h" 59 #include "content/public/common/main_function_params.h"
58 #include "grit/platform_locale_settings.h" 60 #include "grit/platform_locale_settings.h"
59 #include "net/base/network_change_notifier.h" 61 #include "net/base/network_change_notifier.h"
60 #include "net/url_request/url_request.h" 62 #include "net/url_request/url_request.h"
61 #include "ui/base/l10n/l10n_util.h" 63 #include "ui/base/l10n/l10n_util.h"
62 64
63 #if defined(TOOLKIT_USES_GTK) 65 #if defined(TOOLKIT_USES_GTK)
64 #include <gtk/gtk.h> 66 #include <gtk/gtk.h>
65 #endif 67 #endif
66 68
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 VLOG(1) << "Relaunching browser for user: " << username; 383 VLOG(1) << "Relaunching browser for user: " << username;
382 chromeos::UserManager::Get()->UserLoggedIn(username); 384 chromeos::UserManager::Get()->UserLoggedIn(username);
383 385
384 // Redirects Chrome logging to the user data dir. 386 // Redirects Chrome logging to the user data dir.
385 logging::RedirectChromeLogging(parsed_command_line()); 387 logging::RedirectChromeLogging(parsed_command_line());
386 388
387 // Initialize user policy before creating the profile so the profile 389 // Initialize user policy before creating the profile so the profile
388 // initialization code sees policy settings. 390 // initialization code sees policy settings.
389 g_browser_process->browser_policy_connector()->InitializeUserPolicy( 391 g_browser_process->browser_policy_connector()->InitializeUserPolicy(
390 username, false /* wait_for_policy_fetch */); 392 username, false /* wait_for_policy_fetch */);
393 content::NotificationService::current()->Notify(
394 chrome::NOTIFICATION_SESSION_STARTED,
395 content::NotificationService::AllSources(),
396 content::NotificationService::NoDetails());
391 } else if (parsed_command_line().HasSwitch(switches::kLoginManager)) { 397 } else if (parsed_command_line().HasSwitch(switches::kLoginManager)) {
392 // Initialize status area mode early on. 398 // Initialize status area mode early on.
393 chromeos::StatusAreaViewChromeos:: 399 chromeos::StatusAreaViewChromeos::
394 SetScreenMode(chromeos::StatusAreaViewChromeos::LOGIN_MODE_WEBUI); 400 SetScreenMode(chromeos::StatusAreaViewChromeos::LOGIN_MODE_WEBUI);
395 } 401 }
396 402
397 // In Aura builds this will initialize ash::Shell. 403 // In Aura builds this will initialize ash::Shell.
398 ChromeBrowserMainPartsLinux::PreProfileInit(); 404 ChromeBrowserMainPartsLinux::PreProfileInit();
399 } 405 }
400 406
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 // Let VideoPropertyWriter unregister itself as an observer of the ash::Shell 526 // Let VideoPropertyWriter unregister itself as an observer of the ash::Shell
521 // singleton before the shell is destroyed. 527 // singleton before the shell is destroyed.
522 video_property_writer_.reset(); 528 video_property_writer_.reset();
523 // Remove PowerButtonObserver attached to a D-Bus client before 529 // Remove PowerButtonObserver attached to a D-Bus client before
524 // DBusThreadManager is shut down. 530 // DBusThreadManager is shut down.
525 power_button_observer_.reset(); 531 power_button_observer_.reset();
526 #endif 532 #endif
527 533
528 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); 534 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun();
529 } 535 }
OLDNEW
« no previous file with comments | « no previous file | chrome/common/chrome_notification_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698