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 1296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1307 if (loaded_locale.empty() && | 1307 if (loaded_locale.empty() && |
1308 !parsed_command_line().HasSwitch(switches::kNoErrorDialogs)) { | 1308 !parsed_command_line().HasSwitch(switches::kNoErrorDialogs)) { |
1309 ShowMissingLocaleMessageBox(); | 1309 ShowMissingLocaleMessageBox(); |
1310 return chrome::RESULT_CODE_MISSING_DATA; | 1310 return chrome::RESULT_CODE_MISSING_DATA; |
1311 } | 1311 } |
1312 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; | 1312 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; |
1313 browser_process_->SetApplicationLocale(loaded_locale); | 1313 browser_process_->SetApplicationLocale(loaded_locale); |
1314 | 1314 |
1315 FilePath resources_pack_path; | 1315 FilePath resources_pack_path; |
1316 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); | 1316 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); |
1317 ResourceBundle::GetSharedInstance().AddDataPack( | 1317 ResourceBundle::GetSharedInstance().AddDataPackFromPath( |
1318 resources_pack_path, ui::SCALE_FACTOR_100P); | 1318 resources_pack_path, ui::SCALE_FACTOR_100P); |
1319 #endif // defined(OS_MACOSX) | 1319 #endif // defined(OS_MACOSX) |
1320 } | 1320 } |
1321 | 1321 |
1322 #if defined(TOOLKIT_GTK) | 1322 #if defined(TOOLKIT_GTK) |
1323 g_set_application_name(l10n_util::GetStringUTF8(IDS_PRODUCT_NAME).c_str()); | 1323 g_set_application_name(l10n_util::GetStringUTF8(IDS_PRODUCT_NAME).c_str()); |
1324 #endif | 1324 #endif |
1325 | 1325 |
1326 std::string try_chrome = | 1326 std::string try_chrome = |
1327 parsed_command_line().GetSwitchValueASCII(switches::kTryChromeAgain); | 1327 parsed_command_line().GetSwitchValueASCII(switches::kTryChromeAgain); |
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2058 if (base::win::GetVersion() <= base::win::VERSION_XP) | 2058 if (base::win::GetVersion() <= base::win::VERSION_XP) |
2059 uma_name += "_XP"; | 2059 uma_name += "_XP"; |
2060 | 2060 |
2061 uma_name += "_PreRead_"; | 2061 uma_name += "_PreRead_"; |
2062 uma_name += pre_read_percentage; | 2062 uma_name += pre_read_percentage; |
2063 AddPreReadHistogramTime(uma_name.c_str(), time); | 2063 AddPreReadHistogramTime(uma_name.c_str(), time); |
2064 } | 2064 } |
2065 #endif | 2065 #endif |
2066 #endif | 2066 #endif |
2067 } | 2067 } |
OLD | NEW |