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 <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
63 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" | 63 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h" |
64 #include "chrome/browser/chromeos/web_socket_proxy_controller.h" | 64 #include "chrome/browser/chromeos/web_socket_proxy_controller.h" |
65 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" | 65 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" |
66 #include "chrome/browser/defaults.h" | 66 #include "chrome/browser/defaults.h" |
67 #include "chrome/browser/metrics/metrics_service.h" | 67 #include "chrome/browser/metrics/metrics_service.h" |
68 #include "chrome/browser/net/chrome_network_delegate.h" | 68 #include "chrome/browser/net/chrome_network_delegate.h" |
69 #include "chrome/browser/policy/browser_policy_connector.h" | 69 #include "chrome/browser/policy/browser_policy_connector.h" |
70 #include "chrome/browser/prefs/pref_service.h" | 70 #include "chrome/browser/prefs/pref_service.h" |
71 #include "chrome/browser/profiles/profile.h" | 71 #include "chrome/browser/profiles/profile.h" |
72 #include "chrome/browser/profiles/profile_manager.h" | 72 #include "chrome/browser/profiles/profile_manager.h" |
73 #include "chrome/browser/rlz/rlz.h" | |
73 #include "chrome/browser/signin/token_service_factory.h" | 74 #include "chrome/browser/signin/token_service_factory.h" |
74 #include "chrome/browser/system_monitor/removable_device_notifications_chromeos. h" | 75 #include "chrome/browser/system_monitor/removable_device_notifications_chromeos. h" |
75 #include "chrome/common/chrome_notification_types.h" | 76 #include "chrome/common/chrome_notification_types.h" |
76 #include "chrome/common/chrome_switches.h" | 77 #include "chrome/common/chrome_switches.h" |
77 #include "chrome/common/chrome_version_info.h" | 78 #include "chrome/common/chrome_version_info.h" |
78 #include "chrome/common/logging_chrome.h" | 79 #include "chrome/common/logging_chrome.h" |
79 #include "chrome/common/pref_names.h" | 80 #include "chrome/common/pref_names.h" |
80 #include "chromeos/chromeos_switches.h" | 81 #include "chromeos/chromeos_switches.h" |
81 #include "chromeos/cryptohome/async_method_caller.h" | 82 #include "chromeos/cryptohome/async_method_caller.h" |
82 #include "chromeos/dbus/dbus_thread_manager.h" | 83 #include "chromeos/dbus/dbus_thread_manager.h" |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
489 // Initialize magnification manager before ash tray is created. And this must | 490 // Initialize magnification manager before ash tray is created. And this must |
490 // be placed after UserManager::SessionStarted(); | 491 // be placed after UserManager::SessionStarted(); |
491 chromeos::MagnificationManager::Initialize(); | 492 chromeos::MagnificationManager::Initialize(); |
492 | 493 |
493 #if defined(USE_LINUX_BREAKPAD) | 494 #if defined(USE_LINUX_BREAKPAD) |
494 cros_version_loader_.GetVersion(VersionLoader::VERSION_FULL, | 495 cros_version_loader_.GetVersion(VersionLoader::VERSION_FULL, |
495 base::Bind(&ChromeOSVersionCallback), | 496 base::Bind(&ChromeOSVersionCallback), |
496 &tracker_); | 497 &tracker_); |
497 #endif | 498 #endif |
498 | 499 |
500 #if defined(ENABLE_RLZ) | |
501 if (parsed_command_line().HasSwitch(::switches::kTestType)) | |
502 RLZTracker::EnableZeroDelayForTesting(); | |
Peter Kasting
2012/12/17 20:14:03
Must we call this here? Can we instead enable in
Ivan Korotkov
2012/12/20 09:20:42
I'd like to leave it here (like WizardController::
Peter Kasting
2012/12/20 19:32:00
Then can we make one of the following happen inste
Ivan Korotkov
2012/12/21 09:59:48
Ok, let's do the 1st option.
| |
503 #endif | |
504 | |
499 // In Aura builds this will initialize ash::Shell. | 505 // In Aura builds this will initialize ash::Shell. |
500 ChromeBrowserMainPartsLinux::PreProfileInit(); | 506 ChromeBrowserMainPartsLinux::PreProfileInit(); |
501 } | 507 } |
502 | 508 |
503 void ChromeBrowserMainPartsChromeos::PostProfileInit() { | 509 void ChromeBrowserMainPartsChromeos::PostProfileInit() { |
504 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 510 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
505 // -- just after CreateProfile(). | 511 // -- just after CreateProfile(). |
506 | 512 |
507 policy::BrowserPolicyConnector* connector = | 513 policy::BrowserPolicyConnector* connector = |
508 g_browser_process->browser_policy_connector(); | 514 g_browser_process->browser_policy_connector(); |
509 | 515 |
510 if (parsed_command_line().HasSwitch(::switches::kLoginUser) && | 516 if (parsed_command_line().HasSwitch(::switches::kLoginUser) && |
511 !parsed_command_line().HasSwitch(::switches::kLoginPassword)) { | 517 !parsed_command_line().HasSwitch(::switches::kLoginPassword)) { |
512 // Pass the TokenService pointer to the policy connector so user policy can | 518 // Pass the TokenService pointer to the policy connector so user policy can |
513 // grab a token and register with the policy server. | 519 // grab a token and register with the policy server. |
514 // TODO(mnissler): Remove once OAuth is the only authentication mechanism. | 520 // TODO(mnissler): Remove once OAuth is the only authentication mechanism. |
515 connector->SetUserPolicyTokenService( | 521 connector->SetUserPolicyTokenService( |
516 TokenServiceFactory::GetForProfile(profile())); | 522 TokenServiceFactory::GetForProfile(profile())); |
517 | 523 |
518 // Make sure we flip every profile to not share proxies if the user hasn't | 524 // Make sure we flip every profile to not share proxies if the user hasn't |
519 // specified so explicitly. | 525 // specified so explicitly. |
520 const PrefService::Preference* use_shared_proxies_pref = | 526 const PrefService::Preference* use_shared_proxies_pref = |
521 profile()->GetPrefs()->FindPreference(prefs::kUseSharedProxies); | 527 profile()->GetPrefs()->FindPreference(prefs::kUseSharedProxies); |
522 if (use_shared_proxies_pref->IsDefaultValue()) | 528 if (use_shared_proxies_pref->IsDefaultValue()) |
523 profile()->GetPrefs()->SetBoolean(prefs::kUseSharedProxies, false); | 529 profile()->GetPrefs()->SetBoolean(prefs::kUseSharedProxies, false); |
530 | |
531 // This is done in LoginUtils::OnProfileCreated during normal login. | |
532 LoginUtils::Get()->InitRlzDelayed(profile()); | |
524 } | 533 } |
525 | 534 |
526 // Make sure the NetworkConfigurationUpdater is ready so that it pushes ONC | 535 // Make sure the NetworkConfigurationUpdater is ready so that it pushes ONC |
527 // configuration before login. | 536 // configuration before login. |
528 connector->GetNetworkConfigurationUpdater(); | 537 connector->GetNetworkConfigurationUpdater(); |
529 | 538 |
530 // Make sure that wallpaper boot transition and other delays in OOBE | 539 // Make sure that wallpaper boot transition and other delays in OOBE |
531 // are disabled for tests by default. | 540 // are disabled for tests by default. |
532 // Individual tests may enable them if they want. | 541 // Individual tests may enable them if they want. |
533 if (parsed_command_line().HasSwitch(::switches::kTestType)) | 542 if (parsed_command_line().HasSwitch(::switches::kTestType)) |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
729 } else if (trial->group() == margin_200mb) { | 738 } else if (trial->group() == margin_200mb) { |
730 LOG(WARNING) << "low_mem: Part of '200MB' experiment"; | 739 LOG(WARNING) << "low_mem: Part of '200MB' experiment"; |
731 LowMemoryObserver::SetLowMemoryMargin(200); | 740 LowMemoryObserver::SetLowMemoryMargin(200); |
732 } else { | 741 } else { |
733 LOG(WARNING) << "low_mem: Part of 'default' experiment"; | 742 LOG(WARNING) << "low_mem: Part of 'default' experiment"; |
734 } | 743 } |
735 } | 744 } |
736 } | 745 } |
737 | 746 |
738 } // namespace chromeos | 747 } // namespace chromeos |
OLD | NEW |