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

Unified Diff: content/browser/devtools/protocol/system_info_handler.cc

Issue 1408363004: [DevTools] Filter any messages from previous sessions in DevToolsAgentHostImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
Index: content/browser/devtools/protocol/system_info_handler.cc
diff --git a/content/browser/devtools/protocol/system_info_handler.cc b/content/browser/devtools/protocol/system_info_handler.cc
index aa32e58e928bbdda9c41784b205fd85d1de06189..c5080a0b9d50d52e90105097d249b6132894481d 100644
--- a/content/browser/devtools/protocol/system_info_handler.cc
+++ b/content/browser/devtools/protocol/system_info_handler.cc
@@ -93,8 +93,7 @@ class SystemInfoHandlerGpuObserver : public content::GpuDataManagerObserver {
DevToolsCommandId command_id)
: handler_(handler),
command_id_(command_id),
- observer_id_(++next_observer_id_)
- {
+ observer_id_(++next_observer_id_) {
if (handler_) {
handler_->AddActiveObserverId(observer_id_);
}
@@ -154,12 +153,9 @@ Response SystemInfoHandler::GetInfo(DevToolsCommandId command_id) {
// Waiting for complete GPU info in the if-test above seems to
// frequently hit internal timeouts in the launching of the unsandboxed
// GPU process in debug builds on Windows.
- BrowserThread::PostTask(
- BrowserThread::UI,
- FROM_HERE,
- base::Bind(&SystemInfoHandler::SendGetInfoResponse,
- weak_factory_.GetWeakPtr(),
- command_id));
+ BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
+ base::Bind(&SystemInfoHandler::SendGetInfoResponse,
+ weak_factory_.GetWeakPtr(), command_id));
} else {
// We will be able to get more information from the GpuDataManager.
// Register a transient observer with it to call us back when the
@@ -167,11 +163,9 @@ Response SystemInfoHandler::GetInfo(DevToolsCommandId command_id) {
SystemInfoHandlerGpuObserver* observer = new SystemInfoHandlerGpuObserver(
weak_factory_.GetWeakPtr(), command_id);
BrowserThread::PostDelayedTask(
- BrowserThread::UI,
- FROM_HERE,
+ BrowserThread::UI, FROM_HERE,
base::Bind(&SystemInfoHandler::ObserverWatchdogCallback,
- weak_factory_.GetWeakPtr(),
- observer->GetObserverId(),
+ weak_factory_.GetWeakPtr(), observer->GetObserverId(),
command_id),
base::TimeDelta::FromMilliseconds(kGPUInfoWatchdogTimeoutMs));
GpuDataManager::GetInstance()->AddObserver(observer);
@@ -200,10 +194,10 @@ void SystemInfoHandler::SendGetInfoResponse(DevToolsCommandId command_id) {
->set_driver_bug_workarounds(GetDriverBugWorkarounds());
client_->SendGetInfoResponse(
- command_id,
- GetInfoResponse::Create()->set_gpu(gpu)
- ->set_model_name(gpu_info.machine_model_name)
- ->set_model_version(gpu_info.machine_model_version));
+ command_id, GetInfoResponse::Create()
+ ->set_gpu(gpu)
+ ->set_model_name(gpu_info.machine_model_name)
+ ->set_model_version(gpu_info.machine_model_version));
}
void SystemInfoHandler::AddActiveObserverId(int observer_id) {

Powered by Google App Engine
This is Rietveld 408576698