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

Unified Diff: content/gpu/gpu_child_thread.cc

Issue 9401025: Collect GPU info before enabling sandbox. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 10 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 | « content/gpu/gpu_child_thread.h ('k') | content/gpu/gpu_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/gpu/gpu_child_thread.cc
===================================================================
--- content/gpu/gpu_child_thread.cc (revision 122391)
+++ content/gpu/gpu_child_thread.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -13,7 +13,6 @@
#include "build/build_config.h"
#include "content/common/child_process.h"
#include "content/common/gpu/gpu_messages.h"
-#include "content/public/common/content_client.h"
#include "content/public/common/content_switches.h"
#include "content/gpu/gpu_info_collector.h"
#include "content/gpu/gpu_watchdog_thread.h"
@@ -37,8 +36,10 @@
} // namespace
-GpuChildThread::GpuChildThread(bool dead_on_arrival)
- : dead_on_arrival_(dead_on_arrival) {
+GpuChildThread::GpuChildThread(bool dead_on_arrival,
+ const content::GPUInfo& gpu_info)
+ : dead_on_arrival_(dead_on_arrival),
+ gpu_info_(gpu_info) {
#if defined(OS_WIN)
target_services_ = NULL;
collecting_dx_diagnostics_ = false;
@@ -52,6 +53,9 @@
target_services_ = NULL;
collecting_dx_diagnostics_ = false;
#endif
+ if (!gpu_info_collector::CollectGraphicsInfo(&gpu_info_)) {
+ LOG(INFO) << "gpu_info_collector::CollectGraphicsInfo failed";
+ }
}
@@ -103,13 +107,6 @@
!CommandLine::ForCurrentProcess()->HasSwitch(switches::kInProcessGPU))
logging::SetLogMessageHandler(GpuProcessLogMessageHandler);
- // Always set gpu info and send it back, even if there's an error and it's
- // impartially collected.
- bool succeeded = gpu_info_collector::CollectGraphicsInfo(&gpu_info_);
- content::GetContentClient()->SetGpuInfo(gpu_info_);
- LOG(INFO) << "gpu_info_collector::CollectGraphicsInfo complete. success = " <<
- succeeded;
-
// Record initialization only after collecting the GPU info because that can
// take a significant amount of time.
gpu_info_.initialization_time = base::Time::Now() - process_start_time_;
« no previous file with comments | « content/gpu/gpu_child_thread.h ('k') | content/gpu/gpu_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698