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

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

Issue 12676017: Adding policy support to the new network configuration stack. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comments to local helper functions and fixed some nits. Created 7 years, 8 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/shell.h" 10 #include "ash/shell.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "chrome/browser/chromeos/login/screen_locker.h" 47 #include "chrome/browser/chromeos/login/screen_locker.h"
48 #include "chrome/browser/chromeos/login/user_manager.h" 48 #include "chrome/browser/chromeos/login/user_manager.h"
49 #include "chrome/browser/chromeos/login/wallpaper_manager.h" 49 #include "chrome/browser/chromeos/login/wallpaper_manager.h"
50 #include "chrome/browser/chromeos/login/wizard_controller.h" 50 #include "chrome/browser/chromeos/login/wizard_controller.h"
51 #include "chrome/browser/chromeos/memory/low_memory_observer.h" 51 #include "chrome/browser/chromeos/memory/low_memory_observer.h"
52 #include "chrome/browser/chromeos/memory/oom_priority_manager.h" 52 #include "chrome/browser/chromeos/memory/oom_priority_manager.h"
53 #include "chrome/browser/chromeos/net/connectivity_state_helper.h" 53 #include "chrome/browser/chromeos/net/connectivity_state_helper.h"
54 #include "chrome/browser/chromeos/net/cros_network_change_notifier_factory.h" 54 #include "chrome/browser/chromeos/net/cros_network_change_notifier_factory.h"
55 #include "chrome/browser/chromeos/net/network_change_notifier_network_library.h" 55 #include "chrome/browser/chromeos/net/network_change_notifier_network_library.h"
56 #include "chrome/browser/chromeos/net/network_portal_detector.h" 56 #include "chrome/browser/chromeos/net/network_portal_detector.h"
57 #include "chrome/browser/chromeos/policy/network_configuration_updater.h"
58 #include "chrome/browser/chromeos/policy/network_configuration_updater2.h"
57 #include "chrome/browser/chromeos/power/brightness_observer.h" 59 #include "chrome/browser/chromeos/power/brightness_observer.h"
58 #include "chrome/browser/chromeos/power/idle_action_warning_observer.h" 60 #include "chrome/browser/chromeos/power/idle_action_warning_observer.h"
59 #include "chrome/browser/chromeos/power/power_button_observer.h" 61 #include "chrome/browser/chromeos/power/power_button_observer.h"
60 #include "chrome/browser/chromeos/power/resume_observer.h" 62 #include "chrome/browser/chromeos/power/resume_observer.h"
61 #include "chrome/browser/chromeos/power/screen_lock_observer.h" 63 #include "chrome/browser/chromeos/power/screen_lock_observer.h"
62 #include "chrome/browser/chromeos/power/suspend_observer.h" 64 #include "chrome/browser/chromeos/power/suspend_observer.h"
63 #include "chrome/browser/chromeos/power/user_activity_notifier.h" 65 #include "chrome/browser/chromeos/power/user_activity_notifier.h"
64 #include "chrome/browser/chromeos/power/video_activity_notifier.h" 66 #include "chrome/browser/chromeos/power/video_activity_notifier.h"
65 #include "chrome/browser/chromeos/screensaver/screensaver_controller.h" 67 #include "chrome/browser/chromeos/screensaver/screensaver_controller.h"
66 #include "chrome/browser/chromeos/settings/device_settings_service.h" 68 #include "chrome/browser/chromeos/settings/device_settings_service.h"
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
582 profile()->GetPrefs()->SetBoolean(prefs::kUseSharedProxies, false); 584 profile()->GetPrefs()->SetBoolean(prefs::kUseSharedProxies, false);
583 585
584 // This is done in LoginUtils::OnProfileCreated during normal login. 586 // This is done in LoginUtils::OnProfileCreated during normal login.
585 LoginUtils::Get()->InitRlzDelayed(profile()); 587 LoginUtils::Get()->InitRlzDelayed(profile());
586 } 588 }
587 589
588 // Make sure the NetworkConfigurationUpdater is ready so that it pushes ONC 590 // Make sure the NetworkConfigurationUpdater is ready so that it pushes ONC
589 // configuration before login. 591 // configuration before login.
590 policy::BrowserPolicyConnector* connector = 592 policy::BrowserPolicyConnector* connector =
591 g_browser_process->browser_policy_connector(); 593 g_browser_process->browser_policy_connector();
592 connector->GetNetworkConfigurationUpdater(); 594 if (parsed_command_line().HasSwitch(
595 chromeos::switches::kUseNewNetworkConfigurationHandlers)) {
596 connector->GetNetworkConfigurationUpdater2();
597 } else {
598 connector->GetNetworkConfigurationUpdater();
599 }
593 600
594 // Make sure that wallpaper boot transition and other delays in OOBE 601 // Make sure that wallpaper boot transition and other delays in OOBE
595 // are disabled for tests by default. 602 // are disabled for tests by default.
596 // Individual tests may enable them if they want. 603 // Individual tests may enable them if they want.
597 if (parsed_command_line().HasSwitch(::switches::kTestType)) 604 if (parsed_command_line().HasSwitch(::switches::kTestType))
598 WizardController::SetZeroDelays(); 605 WizardController::SetZeroDelays();
599 606
600 // Start loading the machine statistics. Note: if we start loading machine 607 // Start loading the machine statistics. Note: if we start loading machine
601 // statistics early in PreEarlyInitialization() then the crossystem tool 608 // statistics early in PreEarlyInitialization() then the crossystem tool
602 // sometimes hangs for unknown reasons, see http://crbug.com/167671. 609 // sometimes hangs for unknown reasons, see http://crbug.com/167671.
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); 881 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0);
875 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); 882 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0);
876 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); 883 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0);
877 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); 884 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0);
878 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); 885 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0);
879 // This is necessary to start the experiment as a side effect. 886 // This is necessary to start the experiment as a side effect.
880 trial->group(); 887 trial->group();
881 } 888 }
882 889
883 } // namespace chromeos 890 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698