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

Unified Diff: chrome/common/terminate_on_heap_corruption_experiment_win.cc

Issue 401913002: Revert of Experimentally disable termination on heap corrruption in order to measure the contribution of this… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « chrome/common/terminate_on_heap_corruption_experiment_win.h ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/terminate_on_heap_corruption_experiment_win.cc
diff --git a/chrome/common/terminate_on_heap_corruption_experiment_win.cc b/chrome/common/terminate_on_heap_corruption_experiment_win.cc
deleted file mode 100644
index 18237af034990f6417cda918549de01c3feba4c0..0000000000000000000000000000000000000000
--- a/chrome/common/terminate_on_heap_corruption_experiment_win.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2014 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.
-
-#include "chrome/common/terminate_on_heap_corruption_experiment_win.h"
-
-#include "base/metrics/field_trial.h"
-#include "base/win/registry.h"
-#include "chrome/common/chrome_constants.h"
-#include "chrome/common/chrome_version_info.h"
-
-#if defined(OS_WIN)
-#if defined(GOOGLE_CHROME_BUILD)
-#define PRODUCT_STRING_PATH L"Google\\Chrome"
-#elif defined(CHROMIUM_BUILD)
-#define PRODUCT_STRING_PATH L"Chromium"
-#else
-#error Unknown branding
-#endif
-#endif // defined(OS_WIN)
-
-namespace {
-
-wchar_t* GetBeaconKeyPath() {
- chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
- if (channel == chrome::VersionInfo::CHANNEL_CANARY) {
- return L"SOFTWARE\\" PRODUCT_STRING_PATH
- L"\\DisableTerminateOnProcessHeapCorruptionSxs";
- }
- return L"SOFTWARE\\" PRODUCT_STRING_PATH
- L"\\DisableTerminateOnProcessHeapCorruption";
-}
-
-} // namespace
-
-bool ShouldExperimentallyDisableTerminateOnHeapCorruption() {
- base::win::RegKey regkey(
- HKEY_CURRENT_USER, GetBeaconKeyPath(), KEY_QUERY_VALUE);
- return regkey.Valid();
-}
-
-void InitializeDisableTerminateOnHeapCorruptionExperiment() {
- base::win::RegKey regkey(HKEY_CURRENT_USER);
-
- if (base::FieldTrialList::FindFullName("TerminateOnProcessHeapCorruption") ==
- "Disabled") {
- regkey.CreateKey(GetBeaconKeyPath(), KEY_SET_VALUE);
- } else {
- regkey.DeleteKey(GetBeaconKeyPath());
- }
-}
« no previous file with comments | « chrome/common/terminate_on_heap_corruption_experiment_win.h ('k') | content/app/content_main_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698