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

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

Issue 16917011: mac: Replace base::mac::ScopedCFTypeRef with base::ScopedCFTypeRef. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: with fixed off-by-1 in git-clang-format Created 7 years, 6 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 | « base/time_mac.cc ('k') | chrome/browser/extensions/api/file_system/file_system_api.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 (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 #import "chrome/app/breakpad_mac.h" 5 #import "chrome/app/breakpad_mac.h"
6 6
7 #include <CoreFoundation/CoreFoundation.h> 7 #include <CoreFoundation/CoreFoundation.h>
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 // the browser process, so the browser passes the decision to them on the 175 // the browser process, so the browser passes the decision to them on the
176 // command line. 176 // command line.
177 NSBundle* main_bundle = base::mac::FrameworkBundle(); 177 NSBundle* main_bundle = base::mac::FrameworkBundle();
178 bool is_browser = !base::mac::IsBackgroundOnlyProcess(); 178 bool is_browser = !base::mac::IsBackgroundOnlyProcess();
179 bool enable_breakpad = false; 179 bool enable_breakpad = false;
180 CommandLine* command_line = CommandLine::ForCurrentProcess(); 180 CommandLine* command_line = CommandLine::ForCurrentProcess();
181 181
182 if (is_browser) { 182 if (is_browser) {
183 // Since the configuration management infrastructure is possibly not 183 // Since the configuration management infrastructure is possibly not
184 // initialized when this code runs, read the policy preference directly. 184 // initialized when this code runs, read the policy preference directly.
185 base::mac::ScopedCFTypeRef<CFStringRef> key( 185 base::ScopedCFTypeRef<CFStringRef> key(
186 base::SysUTF8ToCFStringRef(policy::key::kMetricsReportingEnabled)); 186 base::SysUTF8ToCFStringRef(policy::key::kMetricsReportingEnabled));
187 Boolean key_valid; 187 Boolean key_valid;
188 Boolean metrics_reporting_enabled = CFPreferencesGetAppBooleanValue(key, 188 Boolean metrics_reporting_enabled = CFPreferencesGetAppBooleanValue(key,
189 kCFPreferencesCurrentApplication, &key_valid); 189 kCFPreferencesCurrentApplication, &key_valid);
190 if (key_valid && 190 if (key_valid &&
191 CFPreferencesAppValueIsForced(key, kCFPreferencesCurrentApplication)) { 191 CFPreferencesAppValueIsForced(key, kCFPreferencesCurrentApplication)) {
192 // Controlled by configuration manangement. 192 // Controlled by configuration manangement.
193 enable_breakpad = metrics_reporting_enabled; 193 enable_breakpad = metrics_reporting_enabled;
194 } else { 194 } else {
195 // Controlled by the user. The crash reporter may be enabled by 195 // Controlled by the user. The crash reporter may be enabled by
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 318
319 #if !defined(DISABLE_NACL) 319 #if !defined(DISABLE_NACL)
320 if (process_type_switch == switches::kNaClLoaderProcess) { 320 if (process_type_switch == switches::kNaClLoaderProcess) {
321 BreakpadSetFilterCallback(gBreakpadRef, NaClBreakpadCrashFilter, NULL); 321 BreakpadSetFilterCallback(gBreakpadRef, NaClBreakpadCrashFilter, NULL);
322 } 322 }
323 #endif 323 #endif
324 324
325 // Store process type in crash dump. 325 // Store process type in crash dump.
326 SetCrashKeyValue(@"ptype", process_type); 326 SetCrashKeyValue(@"ptype", process_type);
327 } 327 }
OLDNEW
« no previous file with comments | « base/time_mac.cc ('k') | chrome/browser/extensions/api/file_system/file_system_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698