| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 #include "chrome/browser/google/google_util.h" | 43 #include "chrome/browser/google/google_util.h" |
| 44 #include "chrome/browser/instant/instant_field_trial.h" | 44 #include "chrome/browser/instant/instant_field_trial.h" |
| 45 #include "chrome/browser/jankometer.h" | 45 #include "chrome/browser/jankometer.h" |
| 46 #include "chrome/browser/language_usage_metrics.h" | 46 #include "chrome/browser/language_usage_metrics.h" |
| 47 #include "chrome/browser/metrics/field_trial_synchronizer.h" | 47 #include "chrome/browser/metrics/field_trial_synchronizer.h" |
| 48 #include "chrome/browser/metrics/histogram_synchronizer.h" | 48 #include "chrome/browser/metrics/histogram_synchronizer.h" |
| 49 #include "chrome/browser/metrics/metrics_log.h" | 49 #include "chrome/browser/metrics/metrics_log.h" |
| 50 #include "chrome/browser/metrics/metrics_service.h" | 50 #include "chrome/browser/metrics/metrics_service.h" |
| 51 #include "chrome/browser/metrics/thread_watcher.h" | 51 #include "chrome/browser/metrics/thread_watcher.h" |
| 52 #include "chrome/browser/metrics/tracking_synchronizer.h" | 52 #include "chrome/browser/metrics/tracking_synchronizer.h" |
| 53 #include "chrome/browser/nacl_host/nacl_process_host.h" |
| 53 #include "chrome/browser/net/chrome_dns_cert_provenance_checker.h" | 54 #include "chrome/browser/net/chrome_dns_cert_provenance_checker.h" |
| 54 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h" | 55 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h" |
| 55 #include "chrome/browser/net/chrome_net_log.h" | 56 #include "chrome/browser/net/chrome_net_log.h" |
| 56 #include "chrome/browser/net/predictor.h" | 57 #include "chrome/browser/net/predictor.h" |
| 57 #include "chrome/browser/notifications/desktop_notification_service.h" | 58 #include "chrome/browser/notifications/desktop_notification_service.h" |
| 58 #include "chrome/browser/notifications/desktop_notification_service_factory.h" | 59 #include "chrome/browser/notifications/desktop_notification_service_factory.h" |
| 59 #include "chrome/browser/plugin_prefs.h" | 60 #include "chrome/browser/plugin_prefs.h" |
| 60 #include "chrome/browser/policy/browser_policy_connector.h" | 61 #include "chrome/browser/policy/browser_policy_connector.h" |
| 61 #include "chrome/browser/prefs/pref_service.h" | 62 #include "chrome/browser/prefs/pref_service.h" |
| 62 #include "chrome/browser/prefs/pref_value_store.h" | 63 #include "chrome/browser/prefs/pref_value_store.h" |
| (...skipping 1771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1834 | 1835 |
| 1835 // Initialize GpuDataManager and collect preliminary gpu info on FILE thread. | 1836 // Initialize GpuDataManager and collect preliminary gpu info on FILE thread. |
| 1836 // Upon completion, it posts GpuBlacklist auto update task on UI thread. | 1837 // Upon completion, it posts GpuBlacklist auto update task on UI thread. |
| 1837 BrowserThread::PostTask( | 1838 BrowserThread::PostTask( |
| 1838 BrowserThread::FILE, FROM_HERE, | 1839 BrowserThread::FILE, FROM_HERE, |
| 1839 base::Bind(&GpuBlacklistUpdater::SetupOnFileThread)); | 1840 base::Bind(&GpuBlacklistUpdater::SetupOnFileThread)); |
| 1840 | 1841 |
| 1841 // Start watching all browser threads for responsiveness. | 1842 // Start watching all browser threads for responsiveness. |
| 1842 ThreadWatcherList::StartWatchingAll(parsed_command_line()); | 1843 ThreadWatcherList::StartWatchingAll(parsed_command_line()); |
| 1843 | 1844 |
| 1845 #if !defined(DISABLE_NACL) |
| 1846 NaClProcessHost::EarlyStartup(); |
| 1847 #endif |
| 1848 |
| 1844 run_message_loop_ = true; | 1849 run_message_loop_ = true; |
| 1845 return content::RESULT_CODE_NORMAL_EXIT; | 1850 return content::RESULT_CODE_NORMAL_EXIT; |
| 1846 } | 1851 } |
| 1847 | 1852 |
| 1848 // Called from MainMessageLoopRun(). | 1853 // Called from MainMessageLoopRun(). |
| 1849 void ChromeBrowserMainParts::StartBrowserOrUITask() { | 1854 void ChromeBrowserMainParts::StartBrowserOrUITask() { |
| 1850 // Still initializing, so need to allow IO. | 1855 // Still initializing, so need to allow IO. |
| 1851 base::ThreadRestrictions::ScopedAllowIO allow_io; | 1856 base::ThreadRestrictions::ScopedAllowIO allow_io; |
| 1852 | 1857 |
| 1853 // Set the notification UI manager after any desktop initialization in | 1858 // Set the notification UI manager after any desktop initialization in |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2084 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2089 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
| 2085 (pre_read == "0" || pre_read == "1")) { | 2090 (pre_read == "0" || pre_read == "1")) { |
| 2086 std::string uma_name(name); | 2091 std::string uma_name(name); |
| 2087 uma_name += "_PreRead"; | 2092 uma_name += "_PreRead"; |
| 2088 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2093 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
| 2089 AddPreReadHistogramTime(uma_name.c_str(), time); | 2094 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 2090 } | 2095 } |
| 2091 #endif | 2096 #endif |
| 2092 #endif | 2097 #endif |
| 2093 } | 2098 } |
| OLD | NEW |