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

Side by Side Diff: chrome/app/main_dll_loader_win.cc

Issue 1844023002: Capture a report on failed browser rendez-vous. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revise stats consent validation 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <windows.h> // NOLINT 5 #include <windows.h> // NOLINT
6 #include <shlwapi.h> // NOLINT 6 #include <shlwapi.h> // NOLINT
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <userenv.h> // NOLINT 8 #include <userenv.h> // NOLINT
9 9
10 #include "chrome/app/main_dll_loader_win.h" 10 #include "chrome/app/main_dll_loader_win.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 #endif 217 #endif
218 }; 218 };
219 219
220 void ChromeDllLoader::OnBeforeLaunch(const std::string& process_type, 220 void ChromeDllLoader::OnBeforeLaunch(const std::string& process_type,
221 const base::FilePath& dll_path) { 221 const base::FilePath& dll_path) {
222 if (process_type.empty()) { 222 if (process_type.empty()) {
223 RecordDidRun(dll_path); 223 RecordDidRun(dll_path);
224 224
225 // Launch the watcher process if stats collection consent has been granted. 225 // Launch the watcher process if stats collection consent has been granted.
226 #if defined(GOOGLE_CHROME_BUILD) 226 #if defined(GOOGLE_CHROME_BUILD)
227 const bool stats_collection_consent = 227 const bool stats_collection_consent = crash_reporter::GetUploadsEnabled();
scottmg 2016/04/08 15:52:25 Yes, this lgtm. You could collapse out the #if def
manzagop (departed) 2016/04/08 21:15:56 I think I understood what you meant, but please va
scottmg 2016/04/08 22:20:55 Yeah, that's what I meant, sorry for the terseness
228 GoogleUpdateSettings::GetCollectStatsConsent();
229 #else 228 #else
230 const bool stats_collection_consent = false; 229 const bool stats_collection_consent = false;
231 #endif 230 #endif
232 if (stats_collection_consent) { 231 if (stats_collection_consent) {
233 base::FilePath exe_path; 232 base::FilePath exe_path;
234 if (PathService::Get(base::FILE_EXE, &exe_path)) { 233 if (PathService::Get(base::FILE_EXE, &exe_path)) {
235 chrome_watcher_client_.reset(new ChromeWatcherClient( 234 chrome_watcher_client_.reset(new ChromeWatcherClient(
236 base::Bind(&GenerateChromeWatcherCommandLine, exe_path))); 235 base::Bind(&GenerateChromeWatcherCommandLine, exe_path)));
237 if (chrome_watcher_client_->LaunchWatcher()) { 236 if (chrome_watcher_client_->LaunchWatcher()) {
238 #if BUILDFLAG(ENABLE_KASKO) 237 #if BUILDFLAG(ENABLE_KASKO)
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 } 295 }
297 }; 296 };
298 297
299 MainDllLoader* MakeMainDllLoader() { 298 MainDllLoader* MakeMainDllLoader() {
300 #if defined(GOOGLE_CHROME_BUILD) 299 #if defined(GOOGLE_CHROME_BUILD)
301 return new ChromeDllLoader(); 300 return new ChromeDllLoader();
302 #else 301 #else
303 return new ChromiumDllLoader(); 302 return new ChromiumDllLoader();
304 #endif 303 #endif
305 } 304 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698