Index: chrome/browser/chrome_browser_main.cc |
=================================================================== |
--- chrome/browser/chrome_browser_main.cc (revision 155054) |
+++ chrome/browser/chrome_browser_main.cc (working copy) |
@@ -41,7 +41,6 @@ |
#include "chrome/browser/first_run/upgrade_util.h" |
#include "chrome/browser/google/google_search_counter.h" |
#include "chrome/browser/google/google_util.h" |
-#include "chrome/browser/gpu_blacklist.h" |
#include "chrome/browser/jankometer.h" |
#include "chrome/browser/language_usage_metrics.h" |
#include "chrome/browser/managed_mode.h" |
@@ -88,6 +87,7 @@ |
#include "chrome/common/chrome_paths.h" |
#include "chrome/common/chrome_result_codes.h" |
#include "chrome/common/chrome_switches.h" |
+#include "chrome/common/chrome_version_info.h" |
#include "chrome/common/env_vars.h" |
#include "chrome/common/json_pref_store.h" |
#include "chrome/common/jstemplate_builder.h" |
@@ -427,20 +427,23 @@ |
// Load GPU Blacklist, collect preliminary gpu info, and compute preliminary |
// gpu feature flags. |
void InitializeGpuDataManager(const CommandLine& parsed_command_line) { |
- content::GpuDataManager::GetInstance()->InitializeGpuInfo(); |
- if (parsed_command_line.HasSwitch(switches::kSkipGpuDataLoading) || |
- parsed_command_line.HasSwitch(switches::kIgnoreGpuBlacklist)) { |
+ if (parsed_command_line.HasSwitch(switches::kSkipGpuDataLoading)) |
return; |
+ |
+ std::string chrome_version_string = "0"; |
+ std::string gpu_blacklist_json_string; |
+ if (!parsed_command_line.HasSwitch(switches::kIgnoreGpuBlacklist)) { |
+ chrome::VersionInfo chrome_version_info; |
+ if (chrome_version_info.is_valid()) |
+ chrome_version_string = chrome_version_info.Version(); |
+ |
+ const base::StringPiece gpu_blacklist_json( |
+ ResourceBundle::GetSharedInstance().GetRawDataResource( |
+ IDR_GPU_BLACKLIST, ui::SCALE_FACTOR_NONE)); |
+ gpu_blacklist_json_string = gpu_blacklist_json.as_string(); |
} |
- |
- const base::StringPiece gpu_blacklist_json( |
- ResourceBundle::GetSharedInstance().GetRawDataResource( |
- IDR_GPU_BLACKLIST, ui::SCALE_FACTOR_NONE)); |
- GpuBlacklist* gpu_blacklist = GpuBlacklist::GetInstance(); |
- bool succeed = gpu_blacklist->LoadGpuBlacklist( |
- gpu_blacklist_json.as_string(), GpuBlacklist::kCurrentOsOnly); |
- DCHECK(succeed); |
- gpu_blacklist->UpdateGpuDataManager(); |
+ content::GpuDataManager::GetInstance()->Initialize( |
+ chrome_version_string, gpu_blacklist_json_string); |
} |
#if defined(OS_MACOSX) |