| 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 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 // gpu feature flags. | 419 // gpu feature flags. |
| 420 void InitializeGpuDataManager(const CommandLine& parsed_command_line) { | 420 void InitializeGpuDataManager(const CommandLine& parsed_command_line) { |
| 421 content::GpuDataManager::GetInstance(); | 421 content::GpuDataManager::GetInstance(); |
| 422 if (parsed_command_line.HasSwitch(switches::kSkipGpuDataLoading) || | 422 if (parsed_command_line.HasSwitch(switches::kSkipGpuDataLoading) || |
| 423 parsed_command_line.HasSwitch(switches::kIgnoreGpuBlacklist)) { | 423 parsed_command_line.HasSwitch(switches::kIgnoreGpuBlacklist)) { |
| 424 return; | 424 return; |
| 425 } | 425 } |
| 426 | 426 |
| 427 const base::StringPiece gpu_blacklist_json( | 427 const base::StringPiece gpu_blacklist_json( |
| 428 ResourceBundle::GetSharedInstance().GetRawDataResource( | 428 ResourceBundle::GetSharedInstance().GetRawDataResource( |
| 429 IDR_GPU_BLACKLIST)); | 429 IDR_GPU_BLACKLIST, ui::SCALE_FACTOR_NONE)); |
| 430 GpuBlacklist* gpu_blacklist = GpuBlacklist::GetInstance(); | 430 GpuBlacklist* gpu_blacklist = GpuBlacklist::GetInstance(); |
| 431 bool succeed = gpu_blacklist->LoadGpuBlacklist( | 431 bool succeed = gpu_blacklist->LoadGpuBlacklist( |
| 432 gpu_blacklist_json.as_string(), GpuBlacklist::kCurrentOsOnly); | 432 gpu_blacklist_json.as_string(), GpuBlacklist::kCurrentOsOnly); |
| 433 DCHECK(succeed); | 433 DCHECK(succeed); |
| 434 gpu_blacklist->UpdateGpuDataManager(); | 434 gpu_blacklist->UpdateGpuDataManager(); |
| 435 } | 435 } |
| 436 | 436 |
| 437 #if defined(OS_MACOSX) | 437 #if defined(OS_MACOSX) |
| 438 OSStatus KeychainCallback(SecKeychainEvent keychain_event, | 438 OSStatus KeychainCallback(SecKeychainEvent keychain_event, |
| 439 SecKeychainCallbackInfo* info, void* context) { | 439 SecKeychainCallbackInfo* info, void* context) { |
| (...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1290 !parsed_command_line().HasSwitch(switches::kNoErrorDialogs)) { | 1290 !parsed_command_line().HasSwitch(switches::kNoErrorDialogs)) { |
| 1291 ShowMissingLocaleMessageBox(); | 1291 ShowMissingLocaleMessageBox(); |
| 1292 return chrome::RESULT_CODE_MISSING_DATA; | 1292 return chrome::RESULT_CODE_MISSING_DATA; |
| 1293 } | 1293 } |
| 1294 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; | 1294 CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; |
| 1295 browser_process_->SetApplicationLocale(loaded_locale); | 1295 browser_process_->SetApplicationLocale(loaded_locale); |
| 1296 | 1296 |
| 1297 FilePath resources_pack_path; | 1297 FilePath resources_pack_path; |
| 1298 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); | 1298 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); |
| 1299 ResourceBundle::GetSharedInstance().AddDataPack( | 1299 ResourceBundle::GetSharedInstance().AddDataPack( |
| 1300 resources_pack_path, ui::ResourceHandle::kScaleFactor100x); | 1300 resources_pack_path, ui::SCALE_FACTOR_100P); |
| 1301 #endif // defined(OS_MACOSX) | 1301 #endif // defined(OS_MACOSX) |
| 1302 } | 1302 } |
| 1303 | 1303 |
| 1304 #if defined(TOOLKIT_GTK) | 1304 #if defined(TOOLKIT_GTK) |
| 1305 g_set_application_name(l10n_util::GetStringUTF8(IDS_PRODUCT_NAME).c_str()); | 1305 g_set_application_name(l10n_util::GetStringUTF8(IDS_PRODUCT_NAME).c_str()); |
| 1306 #endif | 1306 #endif |
| 1307 | 1307 |
| 1308 std::string try_chrome = | 1308 std::string try_chrome = |
| 1309 parsed_command_line().GetSwitchValueASCII(switches::kTryChromeAgain); | 1309 parsed_command_line().GetSwitchValueASCII(switches::kTryChromeAgain); |
| 1310 if (!try_chrome.empty()) { | 1310 if (!try_chrome.empty()) { |
| (...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1993 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1993 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 1994 uma_name += "_XP"; | 1994 uma_name += "_XP"; |
| 1995 | 1995 |
| 1996 uma_name += "_PreRead_"; | 1996 uma_name += "_PreRead_"; |
| 1997 uma_name += pre_read_percentage; | 1997 uma_name += pre_read_percentage; |
| 1998 AddPreReadHistogramTime(uma_name.c_str(), time); | 1998 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 1999 } | 1999 } |
| 2000 #endif | 2000 #endif |
| 2001 #endif | 2001 #endif |
| 2002 } | 2002 } |
| OLD | NEW |