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

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

Issue 2273783002: Move policy generated files to components/policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missed headers 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 unified diff | Download patch
« no previous file with comments | « chrome/app/DEPS ('k') | chrome/browser/bookmarks/managed_bookmark_service_factory.cc » ('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_crash_reporter_client.h" 5 #include "chrome/app/chrome_crash_reporter_client.h"
6 6
7 #include <CoreFoundation/CoreFoundation.h> 7 #include <CoreFoundation/CoreFoundation.h>
8 8
9 #include "base/mac/scoped_cftyperef.h" 9 #include "base/mac/scoped_cftyperef.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
11 #include "policy/policy_constants.h" 11 #include "components/policy/policy_constants.h"
12 12
13 #if !defined(DISABLE_NACL) 13 #if !defined(DISABLE_NACL)
14 #include "base/command_line.h" 14 #include "base/command_line.h"
15 #include "chrome/common/chrome_switches.h" 15 #include "chrome/common/chrome_switches.h"
16 #include "components/nacl/common/nacl_switches.h" 16 #include "components/nacl/common/nacl_switches.h"
17 #include "native_client/src/trusted/service_runtime/osx/crash_filter.h" 17 #include "native_client/src/trusted/service_runtime/osx/crash_filter.h"
18 #endif 18 #endif
19 19
20 bool ChromeCrashReporterClient::ReportingIsEnforcedByPolicy( 20 bool ChromeCrashReporterClient::ReportingIsEnforcedByPolicy(
21 bool* breakpad_enabled) { 21 bool* breakpad_enabled) {
22 base::ScopedCFTypeRef<CFStringRef> key( 22 base::ScopedCFTypeRef<CFStringRef> key(
23 base::SysUTF8ToCFStringRef(policy::key::kMetricsReportingEnabled)); 23 base::SysUTF8ToCFStringRef(policy::key::kMetricsReportingEnabled));
24 Boolean key_valid; 24 Boolean key_valid;
25 Boolean metrics_reporting_enabled = CFPreferencesGetAppBooleanValue(key, 25 Boolean metrics_reporting_enabled = CFPreferencesGetAppBooleanValue(key,
26 kCFPreferencesCurrentApplication, &key_valid); 26 kCFPreferencesCurrentApplication, &key_valid);
27 if (key_valid && 27 if (key_valid &&
28 CFPreferencesAppValueIsForced(key, kCFPreferencesCurrentApplication)) { 28 CFPreferencesAppValueIsForced(key, kCFPreferencesCurrentApplication)) {
29 *breakpad_enabled = metrics_reporting_enabled; 29 *breakpad_enabled = metrics_reporting_enabled;
30 return true; 30 return true;
31 } 31 }
32 return false; 32 return false;
33 } 33 }
OLDNEW
« no previous file with comments | « chrome/app/DEPS ('k') | chrome/browser/bookmarks/managed_bookmark_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698