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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 #include "components/signin/core/common/profile_management_switches.h" | 111 #include "components/signin/core/common/profile_management_switches.h" |
112 #include "components/startup_metric_utils/startup_metric_utils.h" | 112 #include "components/startup_metric_utils/startup_metric_utils.h" |
113 #include "components/translate/content/common/cld_data_source.h" | 113 #include "components/translate/content/common/cld_data_source.h" |
114 #include "components/translate/core/browser/translate_download_manager.h" | 114 #include "components/translate/core/browser/translate_download_manager.h" |
115 #include "components/variations/net/variations_http_header_provider.h" | 115 #include "components/variations/net/variations_http_header_provider.h" |
116 #include "content/public/browser/browser_thread.h" | 116 #include "content/public/browser/browser_thread.h" |
117 #include "content/public/browser/notification_observer.h" | 117 #include "content/public/browser/notification_observer.h" |
118 #include "content/public/browser/notification_registrar.h" | 118 #include "content/public/browser/notification_registrar.h" |
119 #include "content/public/browser/notification_service.h" | 119 #include "content/public/browser/notification_service.h" |
120 #include "content/public/browser/notification_types.h" | 120 #include "content/public/browser/notification_types.h" |
| 121 #include "content/public/browser/power_usage_monitor.h" |
121 #include "content/public/browser/site_instance.h" | 122 #include "content/public/browser/site_instance.h" |
122 #include "content/public/common/content_client.h" | 123 #include "content/public/common/content_client.h" |
123 #include "content/public/common/content_switches.h" | 124 #include "content/public/common/content_switches.h" |
124 #include "content/public/common/main_function_params.h" | 125 #include "content/public/common/main_function_params.h" |
125 #include "grit/platform_locale_settings.h" | 126 #include "grit/platform_locale_settings.h" |
126 #include "net/base/net_module.h" | 127 #include "net/base/net_module.h" |
127 #include "net/base/sdch_manager.h" | 128 #include "net/base/sdch_manager.h" |
128 #include "net/cookies/cookie_monster.h" | 129 #include "net/cookies/cookie_monster.h" |
129 #include "net/http/http_network_layer.h" | 130 #include "net/http/http_network_layer.h" |
130 #include "net/http/http_stream_factory.h" | 131 #include "net/http/http_stream_factory.h" |
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1582 translate::TranslateDownloadManager::RequestLanguageList( | 1583 translate::TranslateDownloadManager::RequestLanguageList( |
1583 profile_->GetPrefs()); | 1584 profile_->GetPrefs()); |
1584 } | 1585 } |
1585 | 1586 |
1586 run_message_loop_ = true; | 1587 run_message_loop_ = true; |
1587 } else { | 1588 } else { |
1588 run_message_loop_ = false; | 1589 run_message_loop_ = false; |
1589 } | 1590 } |
1590 browser_creator_.reset(); | 1591 browser_creator_.reset(); |
1591 | 1592 |
| 1593 #if !defined(OS_LINUX) || defined(OS_CHROMEOS) // http://crbug.com/426393 |
| 1594 if (g_browser_process->metrics_service()->reporting_active()) |
| 1595 content::StartPowerUsageMonitor(); |
| 1596 #endif |
| 1597 |
1592 process_power_collector_.reset(new ProcessPowerCollector); | 1598 process_power_collector_.reset(new ProcessPowerCollector); |
1593 process_power_collector_->Initialize(); | 1599 process_power_collector_->Initialize(); |
1594 #endif // !defined(OS_ANDROID) | 1600 #endif // !defined(OS_ANDROID) |
1595 | 1601 |
1596 PostBrowserStart(); | 1602 PostBrowserStart(); |
1597 | 1603 |
1598 if (parameters().ui_task) { | 1604 if (parameters().ui_task) { |
1599 parameters().ui_task->Run(); | 1605 parameters().ui_task->Run(); |
1600 delete parameters().ui_task; | 1606 delete parameters().ui_task; |
1601 run_message_loop_ = false; | 1607 run_message_loop_ = false; |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1711 chromeos::CrosSettings::Shutdown(); | 1717 chromeos::CrosSettings::Shutdown(); |
1712 #endif | 1718 #endif |
1713 #endif | 1719 #endif |
1714 } | 1720 } |
1715 | 1721 |
1716 // Public members: | 1722 // Public members: |
1717 | 1723 |
1718 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1724 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1719 chrome_extra_parts_.push_back(parts); | 1725 chrome_extra_parts_.push_back(parts); |
1720 } | 1726 } |
OLD | NEW |