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 <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1258 if (loaded_locale.empty() && | 1258 if (loaded_locale.empty() && |
1259 !parsed_command_line().HasSwitch(switches::kNoErrorDialogs)) { | 1259 !parsed_command_line().HasSwitch(switches::kNoErrorDialogs)) { |
1260 ShowMissingLocaleMessageBox(); | 1260 ShowMissingLocaleMessageBox(); |
1261 return chrome::RESULT_CODE_MISSING_DATA; | 1261 return chrome::RESULT_CODE_MISSING_DATA; |
1262 } | 1262 } |
1263 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; | 1263 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; |
1264 browser_process_->SetApplicationLocale(loaded_locale); | 1264 browser_process_->SetApplicationLocale(loaded_locale); |
1265 | 1265 |
1266 FilePath resources_pack_path; | 1266 FilePath resources_pack_path; |
1267 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); | 1267 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); |
1268 ResourceBundle::GetSharedInstance().AddDataPack(resources_pack_path); | 1268 ResourceBundle::GetSharedInstance().AddDataPack(resources_pack_path, 1.0); |
1269 #endif // defined(OS_MACOSX) | 1269 #endif // defined(OS_MACOSX) |
1270 } | 1270 } |
1271 | 1271 |
1272 #if defined(TOOLKIT_GTK) | 1272 #if defined(TOOLKIT_GTK) |
1273 g_set_application_name(l10n_util::GetStringUTF8(IDS_PRODUCT_NAME).c_str()); | 1273 g_set_application_name(l10n_util::GetStringUTF8(IDS_PRODUCT_NAME).c_str()); |
1274 #endif | 1274 #endif |
1275 | 1275 |
1276 std::string try_chrome = | 1276 std::string try_chrome = |
1277 parsed_command_line().GetSwitchValueASCII(switches::kTryChromeAgain); | 1277 parsed_command_line().GetSwitchValueASCII(switches::kTryChromeAgain); |
1278 if (!try_chrome.empty()) { | 1278 if (!try_chrome.empty()) { |
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1979 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1979 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1980 uma_name += "_XP"; | 1980 uma_name += "_XP"; |
1981 | 1981 |
1982 uma_name += "_PreRead_"; | 1982 uma_name += "_PreRead_"; |
1983 uma_name += pre_read_percentage; | 1983 uma_name += pre_read_percentage; |
1984 AddPreReadHistogramTime(uma_name.c_str(), time); | 1984 AddPreReadHistogramTime(uma_name.c_str(), time); |
1985 } | 1985 } |
1986 #endif | 1986 #endif |
1987 #endif | 1987 #endif |
1988 } | 1988 } |
OLD | NEW |