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/chrome_browser_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
6 | 6 |
7 #if defined(TOOLKIT_GTK) | 7 #if defined(TOOLKIT_GTK) |
8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 #include "chrome/browser/net/crl_set_fetcher.h" | 74 #include "chrome/browser/net/crl_set_fetcher.h" |
75 #include "chrome/browser/notifications/desktop_notification_service.h" | 75 #include "chrome/browser/notifications/desktop_notification_service.h" |
76 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 76 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
77 #include "chrome/browser/page_cycler/page_cycler.h" | 77 #include "chrome/browser/page_cycler/page_cycler.h" |
78 #include "chrome/browser/performance_monitor/performance_monitor.h" | 78 #include "chrome/browser/performance_monitor/performance_monitor.h" |
79 #include "chrome/browser/performance_monitor/startup_timer.h" | 79 #include "chrome/browser/performance_monitor/startup_timer.h" |
80 #include "chrome/browser/plugins/plugin_prefs.h" | 80 #include "chrome/browser/plugins/plugin_prefs.h" |
81 #include "chrome/browser/pref_service_flags_storage.h" | 81 #include "chrome/browser/pref_service_flags_storage.h" |
82 #include "chrome/browser/prefs/chrome_pref_service_factory.h" | 82 #include "chrome/browser/prefs/chrome_pref_service_factory.h" |
83 #include "chrome/browser/prefs/command_line_pref_store.h" | 83 #include "chrome/browser/prefs/command_line_pref_store.h" |
| 84 #include "chrome/browser/prefs/pref_metrics_service.h" |
84 #include "chrome/browser/prefs/scoped_user_pref_update.h" | 85 #include "chrome/browser/prefs/scoped_user_pref_update.h" |
85 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" | 86 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" |
86 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.
h" | 87 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.
h" |
87 #include "chrome/browser/process_singleton.h" | 88 #include "chrome/browser/process_singleton.h" |
88 #include "chrome/browser/profiles/profile.h" | 89 #include "chrome/browser/profiles/profile.h" |
89 #include "chrome/browser/profiles/profile_manager.h" | 90 #include "chrome/browser/profiles/profile_manager.h" |
90 #include "chrome/browser/profiles/profiles_state.h" | 91 #include "chrome/browser/profiles/profiles_state.h" |
91 #include "chrome/browser/renderer_host/chrome_render_view_host_observer.h" | 92 #include "chrome/browser/renderer_host/chrome_render_view_host_observer.h" |
92 #include "chrome/browser/search_engines/search_engine_type.h" | 93 #include "chrome/browser/search_engines/search_engine_type.h" |
93 #include "chrome/browser/service/service_process_control.h" | 94 #include "chrome/browser/service/service_process_control.h" |
(...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1520 | 1521 |
1521 #if !defined(DISABLE_NACL) | 1522 #if !defined(DISABLE_NACL) |
1522 if (parsed_command_line().HasSwitch(switches::kPnaclDir)) { | 1523 if (parsed_command_line().HasSwitch(switches::kPnaclDir)) { |
1523 PathService::Override(chrome::DIR_PNACL_BASE, | 1524 PathService::Override(chrome::DIR_PNACL_BASE, |
1524 parsed_command_line().GetSwitchValuePath( | 1525 parsed_command_line().GetSwitchValuePath( |
1525 switches::kPnaclDir)); | 1526 switches::kPnaclDir)); |
1526 } | 1527 } |
1527 NaClProcessHost::EarlyStartup(new NaClBrowserDelegateImpl); | 1528 NaClProcessHost::EarlyStartup(new NaClBrowserDelegateImpl); |
1528 #endif | 1529 #endif |
1529 | 1530 |
| 1531 // Make sure initial prefs are recorded |
| 1532 PrefMetricsService::Factory::GetForProfile(profile_); |
| 1533 |
1530 PreBrowserStart(); | 1534 PreBrowserStart(); |
1531 | 1535 |
1532 // Instantiate the notification UI manager, as this triggers a perf timer | 1536 // Instantiate the notification UI manager, as this triggers a perf timer |
1533 // used to measure startup time. TODO(stevenjb): Figure out what is actually | 1537 // used to measure startup time. TODO(stevenjb): Figure out what is actually |
1534 // triggering the timer and call that explicitly in the approprate place. | 1538 // triggering the timer and call that explicitly in the approprate place. |
1535 // http://crbug.com/105065. | 1539 // http://crbug.com/105065. |
1536 browser_process_->notification_ui_manager(); | 1540 browser_process_->notification_ui_manager(); |
1537 | 1541 |
1538 #if defined(OS_ANDROID) | 1542 #if defined(OS_ANDROID) |
1539 chrome_variations::VariationsService* variations_service = | 1543 chrome_variations::VariationsService* variations_service = |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1736 chromeos::CrosSettings::Shutdown(); | 1740 chromeos::CrosSettings::Shutdown(); |
1737 #endif | 1741 #endif |
1738 #endif | 1742 #endif |
1739 } | 1743 } |
1740 | 1744 |
1741 // Public members: | 1745 // Public members: |
1742 | 1746 |
1743 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1747 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1744 chrome_extra_parts_.push_back(parts); | 1748 chrome_extra_parts_.push_back(parts); |
1745 } | 1749 } |
OLD | NEW |