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 1842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1853 BrowserThread::FILE, FROM_HERE, | 1853 BrowserThread::FILE, FROM_HERE, |
1854 base::Bind(&GpuBlacklistUpdater::SetupOnFileThread)); | 1854 base::Bind(&GpuBlacklistUpdater::SetupOnFileThread)); |
1855 | 1855 |
1856 // Start watching all browser threads for responsiveness. | 1856 // Start watching all browser threads for responsiveness. |
1857 ThreadWatcherList::StartWatchingAll(parsed_command_line()); | 1857 ThreadWatcherList::StartWatchingAll(parsed_command_line()); |
1858 | 1858 |
1859 #if !defined(DISABLE_NACL) | 1859 #if !defined(DISABLE_NACL) |
1860 NaClProcessHost::EarlyStartup(); | 1860 NaClProcessHost::EarlyStartup(); |
1861 #endif | 1861 #endif |
1862 | 1862 |
| 1863 // Instantiate the notification UI manager, as this triggers a perf timer |
| 1864 // used to measure startup time. TODO(stevenjb): Figure out what is actually |
| 1865 // triggering the timer and call that explicitly in the approprate place. |
| 1866 // http://crbug.com/105065. |
| 1867 g_browser_process->notification_ui_manager(); |
| 1868 |
1863 if (parameters().ui_task) { | 1869 if (parameters().ui_task) { |
1864 // We are in test mode. Run one task and enter the main message loop. | 1870 // We are in test mode. Run one task and enter the main message loop. |
1865 #if defined(OS_MACOSX) | 1871 #if defined(OS_MACOSX) |
1866 if (parameters().autorelease_pool) | 1872 if (parameters().autorelease_pool) |
1867 parameters().autorelease_pool->Recycle(); | 1873 parameters().autorelease_pool->Recycle(); |
1868 #endif | 1874 #endif |
1869 parameters().ui_task->Run(); | 1875 parameters().ui_task->Run(); |
1870 delete parameters().ui_task; | 1876 delete parameters().ui_task; |
1871 run_message_loop_ = false; | 1877 run_message_loop_ = false; |
1872 } else { | 1878 } else { |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2090 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2096 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
2091 (pre_read == "0" || pre_read == "1")) { | 2097 (pre_read == "0" || pre_read == "1")) { |
2092 std::string uma_name(name); | 2098 std::string uma_name(name); |
2093 uma_name += "_PreRead"; | 2099 uma_name += "_PreRead"; |
2094 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2100 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
2095 AddPreReadHistogramTime(uma_name.c_str(), time); | 2101 AddPreReadHistogramTime(uma_name.c_str(), time); |
2096 } | 2102 } |
2097 #endif | 2103 #endif |
2098 #endif | 2104 #endif |
2099 } | 2105 } |
OLD | NEW |