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

Side by Side Diff: chrome/browser/browser_hangs_experiment.cc

Issue 1905293003: Use CONTINUE_ON_SHUTDOWN for IncidentReportingService tasks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/browser_hangs_experiment.h"
6
7 #include <string>
8
9 #include "base/command_line.h"
10 #include "base/metrics/field_trial.h"
grt (UTC plus 2) 2016/04/25 13:37:53 use base/feature_list.h instead of field_trial.h?
Patrick Monette 2016/04/25 18:14:27 Ooohh shiny!
11 #include "base/strings/string_util.h"
12
13 bool IsBrowserHangsExperimentEnabled() {
14 using base::CommandLine;
15
16 // Note: It's important to query the field trial state first, to ensure that
17 // UMA reports the correct group.
manzagop (departed) 2016/04/25 13:37:39 For my benefit, what gets reported in the case of
Patrick Monette 2016/04/25 18:14:27 The whole experiment is set server-side. There is
18 const std::string group_name =
19 base::FieldTrialList::FindFullName("BrowserHangsExperiment");
20 if (CommandLine::ForCurrentProcess()->HasSwitch(
manzagop (departed) 2016/04/25 13:37:39 Need to check InitializedForCurrentProcess first?
Patrick Monette 2016/04/25 18:14:27 No longer using CommandLine::ForCurrentProcess().
21 "disable-browser-hangs-experiment"))
22 return false;
23 if (CommandLine::ForCurrentProcess()->HasSwitch(
24 "enable-browser-hangs-experiment"))
25 return true;
26
27 return base::StartsWith(group_name, "Enabled", base::CompareCase::SENSITIVE);
manzagop (departed) 2016/04/25 13:37:39 Where does "Enabled" come from? Is it a standard g
Patrick Monette 2016/04/25 18:14:27 The only place it'll be reuse is in the finch conf
28 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698