Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(486)

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 10907098: Revert 155218 - Move gpu blacklist to content side. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chrome_browser_field_trials.cc ('k') | chrome/browser/chrome_gpu_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
===================================================================
--- chrome/browser/chrome_browser_main.cc (revision 155222)
+++ chrome/browser/chrome_browser_main.cc (working copy)
@@ -34,7 +34,6 @@
#include "chrome/browser/browser_process_impl.h"
#include "chrome/browser/browser_shutdown.h"
#include "chrome/browser/chrome_browser_main_extra_parts.h"
-#include "chrome/browser/chrome_gpu_util.h"
#include "chrome/browser/defaults.h"
#include "chrome/browser/extensions/extension_protocols.h"
#include "chrome/browser/extensions/extension_service.h"
@@ -42,6 +41,7 @@
#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"
@@ -424,6 +424,25 @@
return NULL;
}
+// 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)) {
+ return;
+ }
+
+ 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();
+}
+
#if defined(OS_MACOSX)
OSStatus KeychainCallback(SecKeychainEvent keychain_event,
SecKeychainCallbackInfo* info, void* context) {
@@ -1336,8 +1355,8 @@
CloudPrintProxyServiceFactory::GetForProfile(profile_);
#endif
- // Load GPU Blacklist; load preliminary GPU info.
- gpu_util::InitializeGpuDataManager(parsed_command_line());
+ // Load GPU Blacklist.
+ InitializeGpuDataManager(parsed_command_line());
// Start watching all browser threads for responsiveness.
ThreadWatcherList::StartWatchingAll(parsed_command_line());
« no previous file with comments | « chrome/browser/chrome_browser_field_trials.cc ('k') | chrome/browser/chrome_gpu_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698