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