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 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 #include "chrome/browser/metrics/tracking_synchronizer.h" | 63 #include "chrome/browser/metrics/tracking_synchronizer.h" |
64 #include "chrome/browser/metrics/variations/variations_service.h" | 64 #include "chrome/browser/metrics/variations/variations_service.h" |
65 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" | 65 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" |
66 #include "chrome/browser/net/chrome_net_log.h" | 66 #include "chrome/browser/net/chrome_net_log.h" |
67 #include "chrome/browser/net/crl_set_fetcher.h" | 67 #include "chrome/browser/net/crl_set_fetcher.h" |
68 #include "chrome/browser/notifications/desktop_notification_service.h" | 68 #include "chrome/browser/notifications/desktop_notification_service.h" |
69 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 69 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
70 #include "chrome/browser/performance_monitor/performance_monitor.h" | 70 #include "chrome/browser/performance_monitor/performance_monitor.h" |
71 #include "chrome/browser/performance_monitor/startup_timer.h" | 71 #include "chrome/browser/performance_monitor/startup_timer.h" |
72 #include "chrome/browser/plugins/plugin_prefs.h" | 72 #include "chrome/browser/plugins/plugin_prefs.h" |
| 73 #include "chrome/browser/power/process_power_collector.h" |
73 #include "chrome/browser/pref_service_flags_storage.h" | 74 #include "chrome/browser/pref_service_flags_storage.h" |
74 #include "chrome/browser/prefs/chrome_pref_service_factory.h" | 75 #include "chrome/browser/prefs/chrome_pref_service_factory.h" |
75 #include "chrome/browser/prefs/command_line_pref_store.h" | 76 #include "chrome/browser/prefs/command_line_pref_store.h" |
76 #include "chrome/browser/prefs/pref_metrics_service.h" | 77 #include "chrome/browser/prefs/pref_metrics_service.h" |
77 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" | 78 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" |
78 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.
h" | 79 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory.
h" |
79 #include "chrome/browser/process_singleton.h" | 80 #include "chrome/browser/process_singleton.h" |
80 #include "chrome/browser/profiles/profile.h" | 81 #include "chrome/browser/profiles/profile.h" |
81 #include "chrome/browser/profiles/profile_manager.h" | 82 #include "chrome/browser/profiles/profile_manager.h" |
82 #include "chrome/browser/profiles/profiles_state.h" | 83 #include "chrome/browser/profiles/profiles_state.h" |
(...skipping 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1538 | 1539 |
1539 run_message_loop_ = true; | 1540 run_message_loop_ = true; |
1540 } else { | 1541 } else { |
1541 run_message_loop_ = false; | 1542 run_message_loop_ = false; |
1542 } | 1543 } |
1543 browser_creator_.reset(); | 1544 browser_creator_.reset(); |
1544 #endif // !defined(OS_ANDROID) | 1545 #endif // !defined(OS_ANDROID) |
1545 | 1546 |
1546 performance_monitor::PerformanceMonitor::GetInstance()->Initialize(); | 1547 performance_monitor::PerformanceMonitor::GetInstance()->Initialize(); |
1547 | 1548 |
| 1549 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
| 1550 process_power_collector_.reset(new ProcessPowerCollector); |
| 1551 process_power_collector_->StartUpdating(); |
| 1552 #endif |
| 1553 |
1548 PostBrowserStart(); | 1554 PostBrowserStart(); |
1549 | 1555 |
1550 if (parameters().ui_task) { | 1556 if (parameters().ui_task) { |
1551 // We end the startup timer here if we have parameters to run, because we | 1557 // We end the startup timer here if we have parameters to run, because we |
1552 // never start to run the main loop (where we normally stop the timer). | 1558 // never start to run the main loop (where we normally stop the timer). |
1553 startup_timer_->SignalStartupComplete( | 1559 startup_timer_->SignalStartupComplete( |
1554 performance_monitor::StartupTimer::STARTUP_TEST); | 1560 performance_monitor::StartupTimer::STARTUP_TEST); |
1555 parameters().ui_task->Run(); | 1561 parameters().ui_task->Run(); |
1556 delete parameters().ui_task; | 1562 delete parameters().ui_task; |
1557 run_message_loop_ = false; | 1563 run_message_loop_ = false; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1663 chromeos::CrosSettings::Shutdown(); | 1669 chromeos::CrosSettings::Shutdown(); |
1664 #endif | 1670 #endif |
1665 #endif | 1671 #endif |
1666 } | 1672 } |
1667 | 1673 |
1668 // Public members: | 1674 // Public members: |
1669 | 1675 |
1670 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1676 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1671 chrome_extra_parts_.push_back(parts); | 1677 chrome_extra_parts_.push_back(parts); |
1672 } | 1678 } |
OLD | NEW |