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

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

Issue 2715903003: Bound the impact of system instability on chrome instability. (Closed)
Patch Set: Address Siggi's comments Created 3 years, 9 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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_browser_field_trials_desktop.h" 5 #include "chrome/browser/chrome_browser_field_trials_desktop.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #endif 9 #endif
10 10
11 #include <map> 11 #include <map>
12 #include <string> 12 #include <string>
13 13
14 #include "base/command_line.h" 14 #include "base/command_line.h"
15 #include "base/debug/activity_tracker.h" 15 #include "base/debug/activity_tracker.h"
16 #include "base/feature_list.h" 16 #include "base/feature_list.h"
17 #include "base/files/file_util.h" 17 #include "base/files/file_util.h"
18 #include "base/metrics/field_trial.h" 18 #include "base/metrics/field_trial.h"
19 #include "base/metrics/histogram_macros.h" 19 #include "base/metrics/histogram_macros.h"
20 #include "base/path_service.h" 20 #include "base/path_service.h"
21 #include "base/time/time.h"
21 #include "chrome/browser/features.h" 22 #include "chrome/browser/features.h"
22 #include "chrome/browser/prerender/prerender_field_trial.h" 23 #include "chrome/browser/prerender/prerender_field_trial.h"
23 #include "chrome/common/chrome_features.h" 24 #include "chrome/common/chrome_features.h"
24 #include "chrome/common/chrome_paths.h" 25 #include "chrome/common/chrome_paths.h"
25 #include "chrome/common/chrome_switches.h" 26 #include "chrome/common/chrome_switches.h"
26 #include "components/browser_watcher/features.h" 27 #include "components/browser_watcher/features.h"
27 #include "components/browser_watcher/stability_debugging.h" 28 #include "components/browser_watcher/stability_debugging.h"
28 #include "components/variations/variations_associated_data.h" 29 #include "components/variations/variations_associated_data.h"
29 #include "content/public/common/content_switches.h" 30 #include "content/public/common/content_switches.h"
30 #include "media/media_features.h" 31 #include "media/media_features.h"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 global_data.SetString(browser_watcher::kStabilityProduct, product_name); 166 global_data.SetString(browser_watcher::kStabilityProduct, product_name);
166 global_data.SetString(browser_watcher::kStabilityVersion, version_number); 167 global_data.SetString(browser_watcher::kStabilityVersion, version_number);
167 global_data.SetString(browser_watcher::kStabilityChannel, channel_name); 168 global_data.SetString(browser_watcher::kStabilityChannel, channel_name);
168 global_data.SetString(browser_watcher::kStabilitySpecialBuild, 169 global_data.SetString(browser_watcher::kStabilitySpecialBuild,
169 special_build); 170 special_build);
170 #if defined(ARCH_CPU_X86) 171 #if defined(ARCH_CPU_X86)
171 global_data.SetString(browser_watcher::kStabilityPlatform, "Win32"); 172 global_data.SetString(browser_watcher::kStabilityPlatform, "Win32");
172 #elif defined(ARCH_CPU_X86_64) 173 #elif defined(ARCH_CPU_X86_64)
173 global_data.SetString(browser_watcher::kStabilityPlatform, "Win64"); 174 global_data.SetString(browser_watcher::kStabilityPlatform, "Win64");
174 #endif 175 #endif
176 global_data.SetInt(browser_watcher::kStabilityStartTimestamp,
177 base::Time::Now().ToInternalValue());
175 178
176 // Record information about chrome's module. We want this to be done early. 179 // Record information about chrome's module. We want this to be done early.
177 RecordChromeModuleInfo(global_tracker); 180 RecordChromeModuleInfo(global_tracker);
178 } 181 }
179 } 182 }
180 #endif // defined(OS_WIN) 183 #endif // defined(OS_WIN)
181 184
182 } // namespace 185 } // namespace
183 186
184 void SetupDesktopFieldTrials() { 187 void SetupDesktopFieldTrials() {
185 prerender::ConfigurePrerender(); 188 prerender::ConfigurePrerender();
186 SetupStunProbeTrial(); 189 SetupStunProbeTrial();
187 #if defined(OS_WIN) 190 #if defined(OS_WIN)
188 SetupStabilityDebugging(); 191 SetupStabilityDebugging();
189 base::FeatureList::IsEnabled(features::kModuleDatabase); 192 base::FeatureList::IsEnabled(features::kModuleDatabase);
190 #endif // defined(OS_WIN) 193 #endif // defined(OS_WIN)
191 // Activate the experiment as early as possible to increase its visibility 194 // Activate the experiment as early as possible to increase its visibility
192 // (e.g. the likelihood of its presence in the serialized system profile). 195 // (e.g. the likelihood of its presence in the serialized system profile).
193 // This also needs to happen before the browser rendez-vous attempt 196 // This also needs to happen before the browser rendez-vous attempt
194 // (NotifyOtherProcessOrCreate) in PreMainMessageLoopRun so the corresponding 197 // (NotifyOtherProcessOrCreate) in PreMainMessageLoopRun so the corresponding
195 // metrics are tagged. 198 // metrics are tagged.
196 base::FeatureList::IsEnabled(features::kDesktopFastShutdown); 199 base::FeatureList::IsEnabled(features::kDesktopFastShutdown);
197 } 200 }
198 201
199 } // namespace chrome 202 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | components/browser_watcher/BUILD.gn » ('j') | components/browser_watcher/fetch_system_session_events_main_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698