Chromium Code Reviews| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 65 #include "chrome/browser/chromeos/web_socket_proxy_controller.h" | 65 #include "chrome/browser/chromeos/web_socket_proxy_controller.h" |
| 66 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" | 66 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h" |
| 67 #include "chrome/browser/defaults.h" | 67 #include "chrome/browser/defaults.h" |
| 68 #include "chrome/browser/metrics/metrics_service.h" | 68 #include "chrome/browser/metrics/metrics_service.h" |
| 69 #include "chrome/browser/net/chrome_network_delegate.h" | 69 #include "chrome/browser/net/chrome_network_delegate.h" |
| 70 #include "chrome/browser/policy/browser_policy_connector.h" | 70 #include "chrome/browser/policy/browser_policy_connector.h" |
| 71 #include "chrome/browser/prefs/pref_service.h" | 71 #include "chrome/browser/prefs/pref_service.h" |
| 72 #include "chrome/browser/profiles/profile.h" | 72 #include "chrome/browser/profiles/profile.h" |
| 73 #include "chrome/browser/profiles/profile_manager.h" | 73 #include "chrome/browser/profiles/profile_manager.h" |
| 74 #include "chrome/browser/rlz/rlz.h" | 74 #include "chrome/browser/rlz/rlz.h" |
| 75 #include "chrome/browser/signin/token_service_factory.h" | |
| 76 #include "chrome/browser/system_monitor/removable_device_notifications_chromeos. h" | 75 #include "chrome/browser/system_monitor/removable_device_notifications_chromeos. h" |
| 77 #include "chrome/common/chrome_notification_types.h" | 76 #include "chrome/common/chrome_notification_types.h" |
| 78 #include "chrome/common/chrome_switches.h" | 77 #include "chrome/common/chrome_switches.h" |
| 79 #include "chrome/common/chrome_version_info.h" | 78 #include "chrome/common/chrome_version_info.h" |
| 80 #include "chrome/common/logging_chrome.h" | 79 #include "chrome/common/logging_chrome.h" |
| 81 #include "chrome/common/pref_names.h" | 80 #include "chrome/common/pref_names.h" |
| 82 #include "chromeos/chromeos_switches.h" | 81 #include "chromeos/chromeos_switches.h" |
| 83 #include "chromeos/cryptohome/async_method_caller.h" | 82 #include "chromeos/cryptohome/async_method_caller.h" |
| 84 #include "chromeos/dbus/dbus_thread_manager.h" | 83 #include "chromeos/dbus/dbus_thread_manager.h" |
| 85 #include "chromeos/dbus/power_manager_client.h" | 84 #include "chromeos/dbus/power_manager_client.h" |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 530 | 529 |
| 531 // In Aura builds this will initialize ash::Shell. | 530 // In Aura builds this will initialize ash::Shell. |
| 532 ChromeBrowserMainPartsLinux::PreProfileInit(); | 531 ChromeBrowserMainPartsLinux::PreProfileInit(); |
| 533 } | 532 } |
| 534 | 533 |
| 535 void ChromeBrowserMainPartsChromeos::PostProfileInit() { | 534 void ChromeBrowserMainPartsChromeos::PostProfileInit() { |
| 536 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() | 535 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() |
| 537 // -- just after CreateProfile(). | 536 // -- just after CreateProfile(). |
| 538 | 537 |
| 539 policy::BrowserPolicyConnector* connector = | 538 policy::BrowserPolicyConnector* connector = |
| 540 g_browser_process->browser_policy_connector(); | 539 g_browser_process->browser_policy_connector(); |
|
Joao da Silva
2013/01/17 09:38:05
Move next to where it's first used now.
Mattias Nissler (ping if slow)
2013/01/22 10:31:39
Done.
| |
| 541 | 540 |
| 542 if (parsed_command_line().HasSwitch(::switches::kLoginUser) && | 541 if (parsed_command_line().HasSwitch(::switches::kLoginUser) && |
| 543 !parsed_command_line().HasSwitch(::switches::kLoginPassword)) { | 542 !parsed_command_line().HasSwitch(::switches::kLoginPassword)) { |
| 544 // Pass the TokenService pointer to the policy connector so user policy can | |
| 545 // grab a token and register with the policy server. | |
| 546 // TODO(mnissler): Remove once OAuth is the only authentication mechanism. | |
| 547 connector->SetUserPolicyTokenService( | |
| 548 TokenServiceFactory::GetForProfile(profile())); | |
| 549 | |
| 550 // Make sure we flip every profile to not share proxies if the user hasn't | 543 // Make sure we flip every profile to not share proxies if the user hasn't |
| 551 // specified so explicitly. | 544 // specified so explicitly. |
| 552 const PrefService::Preference* use_shared_proxies_pref = | 545 const PrefService::Preference* use_shared_proxies_pref = |
| 553 profile()->GetPrefs()->FindPreference(prefs::kUseSharedProxies); | 546 profile()->GetPrefs()->FindPreference(prefs::kUseSharedProxies); |
| 554 if (use_shared_proxies_pref->IsDefaultValue()) | 547 if (use_shared_proxies_pref->IsDefaultValue()) |
| 555 profile()->GetPrefs()->SetBoolean(prefs::kUseSharedProxies, false); | 548 profile()->GetPrefs()->SetBoolean(prefs::kUseSharedProxies, false); |
| 556 | 549 |
| 557 // This is done in LoginUtils::OnProfileCreated during normal login. | 550 // This is done in LoginUtils::OnProfileCreated during normal login. |
| 558 LoginUtils::Get()->InitRlzDelayed(profile()); | 551 LoginUtils::Get()->InitRlzDelayed(profile()); |
| 559 } | 552 } |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 809 trial->AppendGroup("2GB_RAM_3GB_swap", zram_group == '2' ? 1 : 0); | 802 trial->AppendGroup("2GB_RAM_3GB_swap", zram_group == '2' ? 1 : 0); |
| 810 trial->AppendGroup("4GB_RAM_no_swap", zram_group == '3' ? 1 : 0); | 803 trial->AppendGroup("4GB_RAM_no_swap", zram_group == '3' ? 1 : 0); |
| 811 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); | 804 trial->AppendGroup("4GB_RAM_4GB_swap", zram_group == '4' ? 1 : 0); |
| 812 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); | 805 trial->AppendGroup("4GB_RAM_6GB_swap", zram_group == '5' ? 1 : 0); |
| 813 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); | 806 trial->AppendGroup("snow_no_swap", zram_group == '6' ? 1 : 0); |
| 814 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); | 807 trial->AppendGroup("snow_1GB_swap", zram_group == '7' ? 1 : 0); |
| 815 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); | 808 trial->AppendGroup("snow_2GB_swap", zram_group == '8' ? 1 : 0); |
| 816 } | 809 } |
| 817 | 810 |
| 818 } // namespace chromeos | 811 } // namespace chromeos |
| OLD | NEW |