OLD | NEW |
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 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 BootTimesRecorder::Get()->OnChromeProcessStart(); | 546 BootTimesRecorder::Get()->OnChromeProcessStart(); |
547 | 547 |
548 // Initialize the network portal detector for Chrome OS. The network | 548 // Initialize the network portal detector for Chrome OS. The network |
549 // portal detector starts to listen for notifications from | 549 // portal detector starts to listen for notifications from |
550 // NetworkStateHandler and initiates captive portal detection for | 550 // NetworkStateHandler and initiates captive portal detection for |
551 // active networks. Should be called before call to CreateSessionManager, | 551 // active networks. Should be called before call to CreateSessionManager, |
552 // because it depends on NetworkPortalDetector. | 552 // because it depends on NetworkPortalDetector. |
553 NetworkPortalDetectorImpl::Initialize( | 553 NetworkPortalDetectorImpl::Initialize( |
554 g_browser_process->system_request_context()); | 554 g_browser_process->system_request_context()); |
555 { | 555 { |
556 NetworkPortalDetector* detector = NetworkPortalDetector::Get(); | |
557 #if defined(GOOGLE_CHROME_BUILD) | 556 #if defined(GOOGLE_CHROME_BUILD) |
558 bool is_official_build = true; | 557 bool is_official_build = true; |
559 #else | 558 #else |
560 bool is_official_build = false; | 559 bool is_official_build = false; |
561 #endif | 560 #endif |
562 // Enable portal detector if EULA was previously accepted or if | 561 // Enable portal detector if EULA was previously accepted or if |
563 // this is an unofficial build. | 562 // this is an unofficial build. |
564 if (!is_official_build || StartupUtils::IsEulaAccepted()) | 563 if (!is_official_build || StartupUtils::IsEulaAccepted()) |
565 detector->Enable(true); | 564 NetworkPortalDetector::Get()->Enable(true); |
566 } | 565 } |
567 | 566 |
568 // Initialize input methods. | 567 // Initialize input methods. |
569 input_method::InputMethodManager* manager = | 568 input_method::InputMethodManager* manager = |
570 input_method::InputMethodManager::Get(); | 569 input_method::InputMethodManager::Get(); |
571 UserSessionManager* session_manager = UserSessionManager::GetInstance(); | 570 UserSessionManager* session_manager = UserSessionManager::GetInstance(); |
572 DCHECK(manager); | 571 DCHECK(manager); |
573 DCHECK(session_manager); | 572 DCHECK(session_manager); |
574 | 573 |
575 manager->SetState(session_manager->GetDefaultIMEState(profile())); | 574 manager->SetState(session_manager->GetDefaultIMEState(profile())); |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 // Destroy DBus services immediately after threads are stopped. | 772 // Destroy DBus services immediately after threads are stopped. |
774 dbus_services_.reset(); | 773 dbus_services_.reset(); |
775 | 774 |
776 ChromeBrowserMainPartsLinux::PostDestroyThreads(); | 775 ChromeBrowserMainPartsLinux::PostDestroyThreads(); |
777 | 776 |
778 // Destroy DeviceSettingsService after g_browser_process. | 777 // Destroy DeviceSettingsService after g_browser_process. |
779 DeviceSettingsService::Shutdown(); | 778 DeviceSettingsService::Shutdown(); |
780 } | 779 } |
781 | 780 |
782 } // namespace chromeos | 781 } // namespace chromeos |
OLD | NEW |