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 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1944 | 1944 |
1945 // This should be invoked as close to the start of the browser's | 1945 // This should be invoked as close to the start of the browser's |
1946 // UI thread message loop as possible to get a stable measurement | 1946 // UI thread message loop as possible to get a stable measurement |
1947 // across versions. | 1947 // across versions. |
1948 RecordBrowserStartupTime(); | 1948 RecordBrowserStartupTime(); |
1949 | 1949 |
1950 #if defined(USE_AURA) | 1950 #if defined(USE_AURA) |
1951 aura::Desktop::GetInstance()->Run(); | 1951 aura::Desktop::GetInstance()->Run(); |
1952 #elif defined(TOOLKIT_VIEWS) | 1952 #elif defined(TOOLKIT_VIEWS) |
1953 views::AcceleratorHandler accelerator_handler; | 1953 views::AcceleratorHandler accelerator_handler; |
1954 MessageLoopForUI::current()->Run(&accelerator_handler); | 1954 MessageLoopForUI::current()->RunWithDispatcher(&accelerator_handler); |
1955 #elif defined(USE_X11) | 1955 #elif defined(USE_X11) |
1956 MessageLoopForUI::current()->Run(NULL); | 1956 MessageLoopForUI::current()->RunWithDispatcher(NULL); |
1957 #elif defined(OS_POSIX) | 1957 #elif defined(OS_POSIX) |
1958 MessageLoopForUI::current()->Run(); | 1958 MessageLoopForUI::current()->Run(); |
1959 #endif | 1959 #endif |
1960 #if defined(OS_CHROMEOS) | 1960 #if defined(OS_CHROMEOS) |
1961 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("UIMessageLoopEnded", | 1961 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("UIMessageLoopEnded", |
1962 true); | 1962 true); |
1963 #endif | 1963 #endif |
1964 } | 1964 } |
1965 | 1965 |
1966 void ChromeBrowserMainParts::PostMainMessageLoopRun() { | 1966 void ChromeBrowserMainParts::PostMainMessageLoopRun() { |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2096 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2096 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
2097 (pre_read == "0" || pre_read == "1")) { | 2097 (pre_read == "0" || pre_read == "1")) { |
2098 std::string uma_name(name); | 2098 std::string uma_name(name); |
2099 uma_name += "_PreRead"; | 2099 uma_name += "_PreRead"; |
2100 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2100 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
2101 AddPreReadHistogramTime(uma_name.c_str(), time); | 2101 AddPreReadHistogramTime(uma_name.c_str(), time); |
2102 } | 2102 } |
2103 #endif | 2103 #endif |
2104 #endif | 2104 #endif |
2105 } | 2105 } |
OLD | NEW |