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

Side by Side Diff: chrome/app/chrome_breakpad_client_mac.mm

Issue 27031002: Move checking of configured policy on win to breakpad client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « chrome/app/chrome_breakpad_client.cc ('k') | components/breakpad/breakpad_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/app/chrome_breakpad_client.h" 5 #include "chrome/app/chrome_breakpad_client.h"
6 6
7 #include <CoreFoundation/CoreFoundation.h> 7 #include <CoreFoundation/CoreFoundation.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/mac/scoped_cftyperef.h" 10 #include "base/mac/scoped_cftyperef.h"
(...skipping 24 matching lines...) Expand all
35 35
36 void ChromeBreakpadClient::InstallAdditionalFilters(BreakpadRef breakpad) { 36 void ChromeBreakpadClient::InstallAdditionalFilters(BreakpadRef breakpad) {
37 #if !defined(DISABLE_NACL) 37 #if !defined(DISABLE_NACL)
38 if (CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 38 if (CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
39 switches::kProcessType) == switches::kNaClLoaderProcess) { 39 switches::kProcessType) == switches::kNaClLoaderProcess) {
40 BreakpadSetFilterCallback(breakpad, NaClBreakpadCrashFilter, NULL); 40 BreakpadSetFilterCallback(breakpad, NaClBreakpadCrashFilter, NULL);
41 } 41 }
42 #endif 42 #endif
43 } 43 }
44 44
45 bool ChromeBreakpadClient::ReportingIsEnforcedByPolicy() { 45 bool ChromeBreakpadClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
46 base::ScopedCFTypeRef<CFStringRef> key( 46 base::ScopedCFTypeRef<CFStringRef> key(
47 base::SysUTF8ToCFStringRef(policy::key::kMetricsReportingEnabled)); 47 base::SysUTF8ToCFStringRef(policy::key::kMetricsReportingEnabled));
48 Boolean key_valid; 48 Boolean key_valid;
49 Boolean metrics_reporting_enabled = CFPreferencesGetAppBooleanValue(key, 49 Boolean metrics_reporting_enabled = CFPreferencesGetAppBooleanValue(key,
50 kCFPreferencesCurrentApplication, &key_valid); 50 kCFPreferencesCurrentApplication, &key_valid);
51 return key_valid && 51 if (key_valid &&
52 CFPreferencesAppValueIsForced(key, kCFPreferencesCurrentApplication) && 52 CFPreferencesAppValueIsForced(key, kCFPreferencesCurrentApplication)) {
53 metrics_reporting_enabled; 53 *breakpad_enabled = metrics_reporting_enabled;
54 return true;
55 }
56 return false;
54 } 57 }
55 58
56 } // namespace chrome 59 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/app/chrome_breakpad_client.cc ('k') | components/breakpad/breakpad_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698