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

Unified Diff: chrome/app/main_dll_loader_win.cc

Issue 2250263002: Fix ASAN canary crashes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add ananta and scottmg to owners for main_loader_dll_win.cc and chrome_crash_reporter_client_win.cc Created 4 years, 4 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/app/OWNERS ('k') | chrome/installer/setup/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/main_dll_loader_win.cc
diff --git a/chrome/app/main_dll_loader_win.cc b/chrome/app/main_dll_loader_win.cc
index d91560341e204f5fb0f351c98fb34228aa2aa101..1a451be8695e0170c464aba02e977b8d6c3a2efc 100644
--- a/chrome/app/main_dll_loader_win.cc
+++ b/chrome/app/main_dll_loader_win.cc
@@ -43,8 +43,6 @@
#include "chrome/installer/util/install_util.h"
#include "chrome/installer/util/module_util_win.h"
#include "chrome/installer/util/util_constants.h"
-#include "components/crash/content/app/crash_reporter_client.h"
-#include "components/crash/content/app/crashpad.h"
#include "components/startup_metric_utils/common/pre_read_field_trial_utils_win.h"
#include "content/public/app/sandbox_helper_win.h"
#include "content/public/common/content_switches.h"
@@ -224,8 +222,17 @@ void ChromeDllLoader::OnBeforeLaunch(const std::string& process_type,
if (process_type.empty()) {
RecordDidRun(dll_path);
+ typedef bool (*GetUploadsEnabledFunction)(void);
+ static GetUploadsEnabledFunction get_uploads_enabled = nullptr;
+ if (!get_uploads_enabled) {
+ get_uploads_enabled = reinterpret_cast<GetUploadsEnabledFunction>(
+ GetProcAddress(GetModuleHandle(chrome::kChromeElfDllName),
+ "GetUploadsEnabled"));
+ CHECK(get_uploads_enabled);
+ }
+
// Launch the watcher process if stats collection consent has been granted.
- if (crash_reporter::GetUploadsEnabled()) {
+ if (get_uploads_enabled()) {
base::FilePath exe_path;
if (PathService::Get(base::FILE_EXE, &exe_path)) {
chrome_watcher_client_.reset(new ChromeWatcherClient(
« no previous file with comments | « chrome/app/OWNERS ('k') | chrome/installer/setup/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698