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