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

Side by Side Diff: util/mac/mac_util.cc

Issue 656703002: Convert NULL to nullptr (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Fix 80-column violations Created 6 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
« no previous file with comments | « util/mac/mac_util.h ('k') | util/mac/mach_o_image_reader.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 2014 The Crashpad Authors. All rights reserved. 1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 return darwin_major_version; 93 return darwin_major_version;
94 } 94 }
95 95
96 // Helpers for the weak-imported private CoreFoundation internals. 96 // Helpers for the weak-imported private CoreFoundation internals.
97 97
98 CFDictionaryRef TryCFCopySystemVersionDictionary() { 98 CFDictionaryRef TryCFCopySystemVersionDictionary() {
99 if (_CFCopySystemVersionDictionary) { 99 if (_CFCopySystemVersionDictionary) {
100 return _CFCopySystemVersionDictionary(); 100 return _CFCopySystemVersionDictionary();
101 } 101 }
102 return NULL; 102 return nullptr;
103 } 103 }
104 104
105 CFDictionaryRef TryCFCopyServerVersionDictionary() { 105 CFDictionaryRef TryCFCopyServerVersionDictionary() {
106 if (_CFCopyServerVersionDictionary) { 106 if (_CFCopyServerVersionDictionary) {
107 return _CFCopyServerVersionDictionary(); 107 return _CFCopyServerVersionDictionary();
108 } 108 }
109 return NULL; 109 return nullptr;
110 } 110 }
111 111
112 const void* TryCFDictionaryGetValue(CFDictionaryRef dictionary, 112 const void* TryCFDictionaryGetValue(CFDictionaryRef dictionary,
113 const void* value) { 113 const void* value) {
114 if (value) { 114 if (value) {
115 return CFDictionaryGetValue(dictionary, value); 115 return CFDictionaryGetValue(dictionary, value);
116 } 116 }
117 return NULL; 117 return nullptr;
118 } 118 }
119 119
120 // Converts |version| to a triplet of version numbers on behalf of 120 // Converts |version| to a triplet of version numbers on behalf of
121 // MacOSXVersion(). Returns true on success. If |version| does not have the 121 // MacOSXVersion(). Returns true on success. If |version| does not have the
122 // expected format, returns false. |version| must be in the form "10.9.2" or 122 // expected format, returns false. |version| must be in the form "10.9.2" or
123 // just "10.9". In the latter case, |bugfix| will be set to 0. 123 // just "10.9". In the latter case, |bugfix| will be set to 0.
124 bool StringToVersionNumbers(const std::string& version, 124 bool StringToVersionNumbers(const std::string& version,
125 int* major, 125 int* major,
126 int* minor, 126 int* minor,
127 int* bugfix) { 127 int* bugfix) {
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 IORegistryEntryDataPropertyAsString(platform_expert, CFSTR("model"))); 273 IORegistryEntryDataPropertyAsString(platform_expert, CFSTR("model")));
274 board_id->assign(IORegistryEntryDataPropertyAsString(platform_expert, 274 board_id->assign(IORegistryEntryDataPropertyAsString(platform_expert,
275 CFSTR("board-id"))); 275 CFSTR("board-id")));
276 } else { 276 } else {
277 model->clear(); 277 model->clear();
278 board_id->clear(); 278 board_id->clear();
279 } 279 }
280 } 280 }
281 281
282 } // namespace crashpad 282 } // namespace crashpad
OLDNEW
« no previous file with comments | « util/mac/mac_util.h ('k') | util/mac/mach_o_image_reader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698