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 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1429 // any callbacks, I just want to initialize the mechanism.) | 1429 // any callbacks, I just want to initialize the mechanism.) |
1430 SecKeychainAddCallback(&KeychainCallback, 0, NULL); | 1430 SecKeychainAddCallback(&KeychainCallback, 0, NULL); |
1431 #endif | 1431 #endif |
1432 | 1432 |
1433 CreateChildThreads(browser_process_.get()); | 1433 CreateChildThreads(browser_process_.get()); |
1434 | 1434 |
1435 #if defined(OS_CHROMEOS) | 1435 #if defined(OS_CHROMEOS) |
1436 // Now that the file thread exists we can record our stats. | 1436 // Now that the file thread exists we can record our stats. |
1437 chromeos::BootTimesLoader::Get()->RecordChromeMainStats(); | 1437 chromeos::BootTimesLoader::Get()->RecordChromeMainStats(); |
1438 | 1438 |
| 1439 #if defined(TOOLKIT_USES_GTK) |
1439 // Read locale-specific GTK resource information. | 1440 // Read locale-specific GTK resource information. |
1440 std::string gtkrc = l10n_util::GetStringUTF8(IDS_LOCALE_GTKRC); | 1441 std::string gtkrc = l10n_util::GetStringUTF8(IDS_LOCALE_GTKRC); |
1441 if (!gtkrc.empty()) | 1442 if (!gtkrc.empty()) |
1442 gtk_rc_parse_string(gtkrc.c_str()); | 1443 gtk_rc_parse_string(gtkrc.c_str()); |
| 1444 #else |
| 1445 // TODO(saintlou): Need to provide an Aura equivalent. |
| 1446 NOTIMPLEMENTED(); |
| 1447 #endif |
1443 | 1448 |
1444 // Trigger prefetching of ownership status. | 1449 // Trigger prefetching of ownership status. |
1445 chromeos::OwnershipService::GetSharedInstance()->Prewarm(); | 1450 chromeos::OwnershipService::GetSharedInstance()->Prewarm(); |
1446 #endif | 1451 #endif |
1447 | 1452 |
1448 // Record last shutdown time into a histogram. | 1453 // Record last shutdown time into a histogram. |
1449 browser_shutdown::ReadLastShutdownInfo(); | 1454 browser_shutdown::ReadLastShutdownInfo(); |
1450 | 1455 |
1451 #if defined(OS_WIN) | 1456 #if defined(OS_WIN) |
1452 // On Windows, we use our startup as an opportunity to do upgrade/uninstall | 1457 // On Windows, we use our startup as an opportunity to do upgrade/uninstall |
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2090 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && | 2095 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && |
2091 (pre_read == "0" || pre_read == "1")) { | 2096 (pre_read == "0" || pre_read == "1")) { |
2092 std::string uma_name(name); | 2097 std::string uma_name(name); |
2093 uma_name += "_PreRead"; | 2098 uma_name += "_PreRead"; |
2094 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; | 2099 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; |
2095 AddPreReadHistogramTime(uma_name.c_str(), time); | 2100 AddPreReadHistogramTime(uma_name.c_str(), time); |
2096 } | 2101 } |
2097 #endif | 2102 #endif |
2098 #endif | 2103 #endif |
2099 } | 2104 } |
OLD | NEW |