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

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

Issue 15702004: Open Ash shell after creating Profile (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 7 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 bool is_official_build = true; 711 bool is_official_build = true;
712 #else 712 #else
713 bool is_official_build = false; 713 bool is_official_build = false;
714 #endif 714 #endif
715 // Enable portal detector if EULA was previously accepted or if 715 // Enable portal detector if EULA was previously accepted or if
716 // this is an unofficial build. 716 // this is an unofficial build.
717 if (!is_official_build || StartupUtils::IsEulaAccepted()) 717 if (!is_official_build || StartupUtils::IsEulaAccepted())
718 detector->Enable(true); 718 detector->Enable(true);
719 } 719 }
720 720
721 display_configuration_observer_.reset(
722 new DisplayConfigurationObserver());
723
724 automatic_reboot_manager_.reset(new system::AutomaticRebootManager( 721 automatic_reboot_manager_.reset(new system::AutomaticRebootManager(
725 scoped_ptr<base::TickClock>(new base::DefaultTickClock))); 722 scoped_ptr<base::TickClock>(new base::DefaultTickClock)));
726 723
727 // This observer cannot be created earlier because it requires the shell to be
728 // available.
729 idle_action_warning_observer_.reset(new IdleActionWarningObserver());
730
731 ChromeBrowserMainPartsLinux::PostProfileInit(); 724 ChromeBrowserMainPartsLinux::PostProfileInit();
732 } 725 }
733 726
734 void ChromeBrowserMainPartsChromeos::PreBrowserStart() { 727 void ChromeBrowserMainPartsChromeos::PreBrowserStart() {
735 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() 728 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun()
736 // -- just before MetricsService::LogNeedForCleanShutdown(). 729 // -- just before MetricsService::LogNeedForCleanShutdown().
730 // -- Called after ChromeBrowserMainExtraPartsAsh::PostProfileInit() which
731 // creates the Ash Shell.
732
733 // These observers cannot be created earlier because they require the Ash
734 // Shell to be available.
735 display_configuration_observer_.reset(new DisplayConfigurationObserver());
736 idle_action_warning_observer_.reset(new IdleActionWarningObserver());
737 737
738 g_browser_process->metrics_service()->StartExternalMetrics(); 738 g_browser_process->metrics_service()->StartExternalMetrics();
739 739
740 // Listen for XI_HierarchyChanged events. Note: if this is moved to 740 // Listen for XI_HierarchyChanged events. Note: if this is moved to
741 // PreMainMessageLoopRun() then desktopui_PageCyclerTests fail for unknown 741 // PreMainMessageLoopRun() then desktopui_PageCyclerTests fail for unknown
742 // reasons, see http://crosbug.com/24833. 742 // reasons, see http://crosbug.com/24833.
743 XInputHierarchyChangedEventListener::GetInstance(); 743 XInputHierarchyChangedEventListener::GetInstance();
744 744
745 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() 745 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun()
746 // -- immediately after ChildProcess::WaitForDebugger(). 746 // -- immediately after ChildProcess::WaitForDebugger().
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
909 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); 909 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0);
910 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); 910 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0);
911 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); 911 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0);
912 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); 912 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0);
913 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); 913 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0);
914 // This is necessary to start the experiment as a side effect. 914 // This is necessary to start the experiment as a side effect.
915 trial->group(); 915 trial->group();
916 } 916 }
917 917
918 } // namespace chromeos 918 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698