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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
42 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" | 42 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" |
43 #include "chrome/browser/chromeos/web_socket_proxy_controller.h" | 43 #include "chrome/browser/chromeos/web_socket_proxy_controller.h" |
44 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" | 44 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" |
45 #include "chrome/browser/defaults.h" | 45 #include "chrome/browser/defaults.h" |
46 #include "chrome/browser/metrics/metrics_service.h" | 46 #include "chrome/browser/metrics/metrics_service.h" |
47 #include "chrome/browser/oom_priority_manager.h" | 47 #include "chrome/browser/oom_priority_manager.h" |
48 #include "chrome/browser/policy/browser_policy_connector.h" | 48 #include "chrome/browser/policy/browser_policy_connector.h" |
49 #include "chrome/browser/profiles/profile.h" | 49 #include "chrome/browser/profiles/profile.h" |
50 #include "chrome/browser/profiles/profile_manager.h" | 50 #include "chrome/browser/profiles/profile_manager.h" |
51 #include "chrome/browser/ui/views/browser_dialogs.h" | 51 #include "chrome/browser/ui/views/browser_dialogs.h" |
52 #include "chrome/common/chrome_notification_types.h" | |
52 #include "chrome/common/chrome_switches.h" | 53 #include "chrome/common/chrome_switches.h" |
53 #include "chrome/common/logging_chrome.h" | 54 #include "chrome/common/logging_chrome.h" |
55 #include "content/public/browser/notification_service.h" | |
54 #include "content/public/common/main_function_params.h" | 56 #include "content/public/common/main_function_params.h" |
55 #include "grit/platform_locale_settings.h" | 57 #include "grit/platform_locale_settings.h" |
56 #include "net/base/network_change_notifier.h" | 58 #include "net/base/network_change_notifier.h" |
57 #include "net/url_request/url_request.h" | 59 #include "net/url_request/url_request.h" |
58 #include "ui/base/l10n/l10n_util.h" | 60 #include "ui/base/l10n/l10n_util.h" |
59 | 61 |
60 #if defined(TOOLKIT_USES_GTK) | 62 #if defined(TOOLKIT_USES_GTK) |
61 #include <gtk/gtk.h> | 63 #include <gtk/gtk.h> |
62 #endif | 64 #endif |
63 | 65 |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
386 VLOG(1) << "Relaunching browser for user: " << username; | 388 VLOG(1) << "Relaunching browser for user: " << username; |
387 chromeos::UserManager::Get()->UserLoggedIn(username); | 389 chromeos::UserManager::Get()->UserLoggedIn(username); |
388 | 390 |
389 // Redirects Chrome logging to the user data dir. | 391 // Redirects Chrome logging to the user data dir. |
390 logging::RedirectChromeLogging(parsed_command_line()); | 392 logging::RedirectChromeLogging(parsed_command_line()); |
391 | 393 |
392 // Initialize user policy before creating the profile so the profile | 394 // Initialize user policy before creating the profile so the profile |
393 // initialization code sees policy settings. | 395 // initialization code sees policy settings. |
394 g_browser_process->browser_policy_connector()->InitializeUserPolicy( | 396 g_browser_process->browser_policy_connector()->InitializeUserPolicy( |
395 username, false /* wait_for_policy_fetch */); | 397 username, false /* wait_for_policy_fetch */); |
398 content::NotificationService::current()->Notify( | |
399 chrome::NOTIFICATION_SESSION_STARTED, | |
400 content::NotificationService::AllSources(), | |
401 content::NotificationService::NoDetails()); | |
flackr
2012/01/31 17:53:46
This was also necessary just for browser crashes i
Nikita (slow)
2012/02/01 10:38:46
Yes.
| |
396 } else if (parsed_command_line().HasSwitch(switches::kLoginManager)) { | 402 } else if (parsed_command_line().HasSwitch(switches::kLoginManager)) { |
397 // Initialize status area mode early on. | 403 // Initialize status area mode early on. |
398 chromeos::StatusAreaViewChromeos:: | 404 chromeos::StatusAreaViewChromeos:: |
399 SetScreenMode(chromeos::StatusAreaViewChromeos::LOGIN_MODE_WEBUI); | 405 SetScreenMode(chromeos::StatusAreaViewChromeos::LOGIN_MODE_WEBUI); |
400 } | 406 } |
401 | 407 |
402 // In Aura builds this will initialize ash::Shell. | 408 // In Aura builds this will initialize ash::Shell. |
403 ChromeBrowserMainPartsLinux::PreProfileInit(); | 409 ChromeBrowserMainPartsLinux::PreProfileInit(); |
404 } | 410 } |
405 | 411 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
523 chromeos::WebSocketProxyController::Shutdown(); | 529 chromeos::WebSocketProxyController::Shutdown(); |
524 | 530 |
525 #if defined(USE_AURA) | 531 #if defined(USE_AURA) |
526 // Let VideoPropertyWriter unregister itself as an observer of the ash::Shell | 532 // Let VideoPropertyWriter unregister itself as an observer of the ash::Shell |
527 // singleton before the shell is destroyed. | 533 // singleton before the shell is destroyed. |
528 video_property_writer_.reset(); | 534 video_property_writer_.reset(); |
529 #endif | 535 #endif |
530 | 536 |
531 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); | 537 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); |
532 } | 538 } |
OLD | NEW |