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

Unified Diff: chrome/gpu/chrome_content_gpu_client.cc

Issue 2525973003: Fix field trial DCHECK when gpu process is in-process. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/gpu/chrome_content_gpu_client.cc
diff --git a/chrome/gpu/chrome_content_gpu_client.cc b/chrome/gpu/chrome_content_gpu_client.cc
index 15726af55928ff4bc0cbefb3fe8843d4fbe7028a..25085f3c8f46ec4ca60d0a1ae4031a6f309ba35a 100644
--- a/chrome/gpu/chrome_content_gpu_client.cc
+++ b/chrome/gpu/chrome_content_gpu_client.cc
@@ -13,6 +13,7 @@
#include "base/time/time.h"
#include "chrome/common/stack_sampling_configuration.h"
#include "components/metrics/child_call_stack_profile_collector.h"
+#include "content/public/common/content_switches.h"
#include "mojo/public/cpp/bindings/strong_binding.h"
#include "services/service_manager/public/cpp/connector.h"
#include "services/service_manager/public/cpp/interface_registry.h"
@@ -65,11 +66,14 @@ ChromeContentGpuClient::~ChromeContentGpuClient() {}
void ChromeContentGpuClient::Initialize(
base::FieldTrialList::Observer* observer) {
DCHECK(!field_trial_syncer_);
- field_trial_syncer_.reset(
- new chrome_variations::ChildProcessFieldTrialSyncer(observer));
const base::CommandLine& command_line =
*base::CommandLine::ForCurrentProcess();
- field_trial_syncer_->InitFieldTrialObserving(command_line);
+ // No need for field trial syncer if we're in the browser process.
+ if (!command_line.HasSwitch(switches::kInProcessGPU)) {
+ field_trial_syncer_.reset(
+ new chrome_variations::ChildProcessFieldTrialSyncer(observer));
+ field_trial_syncer_->InitFieldTrialObserving(command_line);
+ }
}
void ChromeContentGpuClient::ExposeInterfacesToBrowser(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698