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

Side by Side Diff: components/crash/content/app/crashpad.cc

Issue 2353133003: Removing dcheck in SetUploadConsentImpl. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/crash/content/app/crashpad.h" 5 #include "components/crash/content/app/crashpad.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 300
301 } // namespace crash_reporter 301 } // namespace crash_reporter
302 302
303 #if defined(OS_WIN) 303 #if defined(OS_WIN)
304 304
305 extern "C" { 305 extern "C" {
306 306
307 // This function is used in chrome_metrics_services_manager_client.cc to trigger 307 // This function is used in chrome_metrics_services_manager_client.cc to trigger
308 // changes to the upload-enabled state. This is done when the metrics services 308 // changes to the upload-enabled state. This is done when the metrics services
309 // are initialized, and when the user changes their consent for uploads. See 309 // are initialized, and when the user changes their consent for uploads. See
310 // crash_reporter::SetUploadConsent for effects. 310 // crash_reporter::SetUploadConsent for effects. The given consent value should
311 // be consistent with
312 // crash_reporter::GetCrashReporterClient()->GetCollectStatsConsent(), but it's
313 // not enforced to avoid blocking startup code on synchronizing them.
311 void __declspec(dllexport) __cdecl SetUploadConsentImpl(bool consent) { 314 void __declspec(dllexport) __cdecl SetUploadConsentImpl(bool consent) {
312 DCHECK_EQ(consent,
313 crash_reporter::GetCrashReporterClient()->GetCollectStatsConsent());
314 crash_reporter::SetUploadConsent(consent); 315 crash_reporter::SetUploadConsent(consent);
315 } 316 }
316 317
317 // NOTE: This function is used by SyzyASAN to annotate crash reports. If you 318 // NOTE: This function is used by SyzyASAN to annotate crash reports. If you
318 // change the name or signature of this function you will break SyzyASAN 319 // change the name or signature of this function you will break SyzyASAN
319 // instrumented releases of Chrome. Please contact syzygy-team@chromium.org 320 // instrumented releases of Chrome. Please contact syzygy-team@chromium.org
320 // before doing so! See also http://crbug.com/567781. 321 // before doing so! See also http://crbug.com/567781.
321 void __declspec(dllexport) __cdecl SetCrashKeyValueImpl(const wchar_t* key, 322 void __declspec(dllexport) __cdecl SetCrashKeyValueImpl(const wchar_t* key,
322 const wchar_t* value) { 323 const wchar_t* value) {
323 crash_reporter::SetCrashKeyValue(base::UTF16ToUTF8(key), 324 crash_reporter::SetCrashKeyValue(base::UTF16ToUTF8(key),
324 base::UTF16ToUTF8(value)); 325 base::UTF16ToUTF8(value));
325 } 326 }
326 327
327 void __declspec(dllexport) __cdecl ClearCrashKeyValueImpl(const wchar_t* key) { 328 void __declspec(dllexport) __cdecl ClearCrashKeyValueImpl(const wchar_t* key) {
328 crash_reporter::ClearCrashKey(base::UTF16ToUTF8(key)); 329 crash_reporter::ClearCrashKey(base::UTF16ToUTF8(key));
329 } 330 }
330 331
331 // This helper is invoked by code in chrome.dll to request a single crash report 332 // This helper is invoked by code in chrome.dll to request a single crash report
332 // upload. See CrashUploadListCrashpad. 333 // upload. See CrashUploadListCrashpad.
333 void __declspec(dllexport) 334 void __declspec(dllexport)
334 RequestSingleCrashUploadImpl(const std::string& local_id) { 335 RequestSingleCrashUploadImpl(const std::string& local_id) {
335 crash_reporter::RequestSingleCrashUpload(local_id); 336 crash_reporter::RequestSingleCrashUpload(local_id);
336 } 337 }
337 } // extern "C" 338 } // extern "C"
338 339
339 #endif // OS_WIN 340 #endif // OS_WIN
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698