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