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

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

Issue 190063004: chromeos: Delete old, unused contacts code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: undo unwanted indenting changes Created 6 years, 9 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 12 matching lines...) Expand all
23 #include "base/sys_info.h" 23 #include "base/sys_info.h"
24 #include "chrome/browser/browser_process.h" 24 #include "chrome/browser/browser_process.h"
25 #include "chrome/browser/browser_process_platform_part_chromeos.h" 25 #include "chrome/browser/browser_process_platform_part_chromeos.h"
26 #include "chrome/browser/chrome_notification_types.h" 26 #include "chrome/browser/chrome_notification_types.h"
27 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 27 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
28 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" 28 #include "chrome/browser/chromeos/accessibility/magnification_manager.h"
29 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" 29 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h"
30 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" 30 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h"
31 #include "chrome/browser/chromeos/app_mode/kiosk_mode_idle_app_name_notification .h" 31 #include "chrome/browser/chromeos/app_mode/kiosk_mode_idle_app_name_notification .h"
32 #include "chrome/browser/chromeos/boot_times_loader.h" 32 #include "chrome/browser/chromeos/boot_times_loader.h"
33 #include "chrome/browser/chromeos/contacts/contact_manager.h"
34 #include "chrome/browser/chromeos/dbus/cros_dbus_service.h" 33 #include "chrome/browser/chromeos/dbus/cros_dbus_service.h"
35 #include "chrome/browser/chromeos/events/event_rewriter.h" 34 #include "chrome/browser/chromeos/events/event_rewriter.h"
36 #include "chrome/browser/chromeos/events/system_key_event_listener.h" 35 #include "chrome/browser/chromeos/events/system_key_event_listener.h"
37 #include "chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener .h" 36 #include "chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener .h"
38 #include "chrome/browser/chromeos/extensions/default_app_order.h" 37 #include "chrome/browser/chromeos/extensions/default_app_order.h"
39 #include "chrome/browser/chromeos/extensions/extension_system_event_observer.h" 38 #include "chrome/browser/chromeos/extensions/extension_system_event_observer.h"
40 #include "chrome/browser/chromeos/external_metrics.h" 39 #include "chrome/browser/chromeos/external_metrics.h"
41 #include "chrome/browser/chromeos/imageburner/burn_manager.h" 40 #include "chrome/browser/chromeos/imageburner/burn_manager.h"
42 #include "chrome/browser/chromeos/input_method/input_method_configuration.h" 41 #include "chrome/browser/chromeos/input_method/input_method_configuration.h"
43 #include "chrome/browser/chromeos/input_method/input_method_util.h" 42 #include "chrome/browser/chromeos/input_method/input_method_util.h"
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 g_browser_process->profile_manager(); 480 g_browser_process->profile_manager();
482 481
483 // ProfileHelper has to be initialized after UserManager instance is created. 482 // ProfileHelper has to be initialized after UserManager instance is created.
484 g_browser_process->platform_part()->profile_helper()->Initialize(); 483 g_browser_process->platform_part()->profile_helper()->Initialize();
485 484
486 // TODO(abarth): Should this move to InitializeNetworkOptions()? 485 // TODO(abarth): Should this move to InitializeNetworkOptions()?
487 // Allow access to file:// on ChromeOS for tests. 486 // Allow access to file:// on ChromeOS for tests.
488 if (parsed_command_line().HasSwitch(::switches::kAllowFileAccess)) 487 if (parsed_command_line().HasSwitch(::switches::kAllowFileAccess))
489 ChromeNetworkDelegate::AllowAccessToAllFiles(); 488 ChromeNetworkDelegate::AllowAccessToAllFiles();
490 489
491 if (parsed_command_line().HasSwitch(::switches::kEnableContacts)) {
492 contact_manager_.reset(new contacts::ContactManager());
493 contact_manager_->Init();
494 }
495
496 // There are two use cases for kLoginUser: 490 // There are two use cases for kLoginUser:
497 // 1) if passed in tandem with kLoginPassword, to drive a "StubLogin" 491 // 1) if passed in tandem with kLoginPassword, to drive a "StubLogin"
498 // 2) if passed alone, to signal that the indicated user has already 492 // 2) if passed alone, to signal that the indicated user has already
499 // logged in and we should behave accordingly. 493 // logged in and we should behave accordingly.
500 // This handles case 2. 494 // This handles case 2.
501 bool immediate_login = 495 bool immediate_login =
502 parsed_command_line().HasSwitch(switches::kLoginUser) && 496 parsed_command_line().HasSwitch(switches::kLoginUser) &&
503 !parsed_command_line().HasSwitch(switches::kLoginPassword); 497 !parsed_command_line().HasSwitch(switches::kLoginPassword);
504 if (immediate_login){ 498 if (immediate_login){
505 // Redirects Chrome logging to the user data dir. 499 // Redirects Chrome logging to the user data dir.
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 // SystemKeyEventListener::Shutdown() is always safe to call, 785 // SystemKeyEventListener::Shutdown() is always safe to call,
792 // even if Initialize() wasn't called. 786 // even if Initialize() wasn't called.
793 SystemKeyEventListener::Shutdown(); 787 SystemKeyEventListener::Shutdown();
794 imageburner::BurnManager::Shutdown(); 788 imageburner::BurnManager::Shutdown();
795 CrasAudioHandler::Shutdown(); 789 CrasAudioHandler::Shutdown();
796 790
797 // Detach D-Bus clients before DBusThreadManager is shut down. 791 // Detach D-Bus clients before DBusThreadManager is shut down.
798 power_button_observer_.reset(); 792 power_button_observer_.reset();
799 idle_action_warning_observer_.reset(); 793 idle_action_warning_observer_.reset();
800 794
801 // Delete ContactManager while |g_browser_process| is still alive.
802 contact_manager_.reset();
803
804 MagnificationManager::Shutdown(); 795 MagnificationManager::Shutdown();
805 AccessibilityManager::Shutdown(); 796 AccessibilityManager::Shutdown();
806 797
807 media::SoundsManager::Shutdown(); 798 media::SoundsManager::Shutdown();
808 799
809 system::StatisticsProvider::GetInstance()->Shutdown(); 800 system::StatisticsProvider::GetInstance()->Shutdown();
810 801
811 // Let the UserManager and WallpaperManager unregister itself as an observer 802 // Let the UserManager and WallpaperManager unregister itself as an observer
812 // of the CrosSettings singleton before it is destroyed. This also ensures 803 // of the CrosSettings singleton before it is destroyed. This also ensures
813 // that the UserManager has no URLRequest pending (see 804 // that the UserManager has no URLRequest pending (see
(...skipping 25 matching lines...) Expand all
839 // Destroy DBus services immediately after threads are stopped. 830 // Destroy DBus services immediately after threads are stopped.
840 dbus_services_.reset(); 831 dbus_services_.reset();
841 832
842 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 833 ChromeBrowserMainPartsLinux::PostDestroyThreads();
843 834
844 // Destroy DeviceSettingsService after g_browser_process. 835 // Destroy DeviceSettingsService after g_browser_process.
845 DeviceSettingsService::Shutdown(); 836 DeviceSettingsService::Shutdown();
846 } 837 }
847 838
848 } // namespace chromeos 839 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698