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

Side by Side Diff: base/mac/foundation_util.mm

Issue 9363008: Add Media device notification to SystemMonitor and Mac impl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Type Created 8 years, 9 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/mac/foundation_util.h ('k') | base/system_monitor/system_monitor.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 (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 #include "base/mac/foundation_util.h" 5 #include "base/mac/foundation_util.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 TYPE_NAME_FOR_CF_TYPE_DEFN(CFArray); 176 TYPE_NAME_FOR_CF_TYPE_DEFN(CFArray);
177 TYPE_NAME_FOR_CF_TYPE_DEFN(CFBag); 177 TYPE_NAME_FOR_CF_TYPE_DEFN(CFBag);
178 TYPE_NAME_FOR_CF_TYPE_DEFN(CFBoolean); 178 TYPE_NAME_FOR_CF_TYPE_DEFN(CFBoolean);
179 TYPE_NAME_FOR_CF_TYPE_DEFN(CFData); 179 TYPE_NAME_FOR_CF_TYPE_DEFN(CFData);
180 TYPE_NAME_FOR_CF_TYPE_DEFN(CFDate); 180 TYPE_NAME_FOR_CF_TYPE_DEFN(CFDate);
181 TYPE_NAME_FOR_CF_TYPE_DEFN(CFDictionary); 181 TYPE_NAME_FOR_CF_TYPE_DEFN(CFDictionary);
182 TYPE_NAME_FOR_CF_TYPE_DEFN(CFNull); 182 TYPE_NAME_FOR_CF_TYPE_DEFN(CFNull);
183 TYPE_NAME_FOR_CF_TYPE_DEFN(CFNumber); 183 TYPE_NAME_FOR_CF_TYPE_DEFN(CFNumber);
184 TYPE_NAME_FOR_CF_TYPE_DEFN(CFSet); 184 TYPE_NAME_FOR_CF_TYPE_DEFN(CFSet);
185 TYPE_NAME_FOR_CF_TYPE_DEFN(CFString); 185 TYPE_NAME_FOR_CF_TYPE_DEFN(CFString);
186 TYPE_NAME_FOR_CF_TYPE_DEFN(CFURL);
186 187
187 #undef TYPE_NAME_FOR_CF_TYPE_DEFN 188 #undef TYPE_NAME_FOR_CF_TYPE_DEFN
188 189
189 void NSObjectRetain(void* obj) { 190 void NSObjectRetain(void* obj) {
190 id<NSObject> nsobj = static_cast<id<NSObject> >(obj); 191 id<NSObject> nsobj = static_cast<id<NSObject> >(obj);
191 [nsobj retain]; 192 [nsobj retain];
192 } 193 }
193 194
194 void NSObjectRelease(void* obj) { 195 void NSObjectRelease(void* obj) {
195 id<NSObject> nsobj = static_cast<id<NSObject> >(obj); 196 id<NSObject> nsobj = static_cast<id<NSObject> >(obj);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 CF_CAST_DEFN(CFArray); 305 CF_CAST_DEFN(CFArray);
305 CF_CAST_DEFN(CFBag); 306 CF_CAST_DEFN(CFBag);
306 CF_CAST_DEFN(CFBoolean); 307 CF_CAST_DEFN(CFBoolean);
307 CF_CAST_DEFN(CFData); 308 CF_CAST_DEFN(CFData);
308 CF_CAST_DEFN(CFDate); 309 CF_CAST_DEFN(CFDate);
309 CF_CAST_DEFN(CFDictionary); 310 CF_CAST_DEFN(CFDictionary);
310 CF_CAST_DEFN(CFNull); 311 CF_CAST_DEFN(CFNull);
311 CF_CAST_DEFN(CFNumber); 312 CF_CAST_DEFN(CFNumber);
312 CF_CAST_DEFN(CFSet); 313 CF_CAST_DEFN(CFSet);
313 CF_CAST_DEFN(CFString); 314 CF_CAST_DEFN(CFString);
315 CF_CAST_DEFN(CFURL);
314 316
315 #undef CF_CAST_DEFN 317 #undef CF_CAST_DEFN
316 318
317 std::string GetValueFromDictionaryErrorMessage( 319 std::string GetValueFromDictionaryErrorMessage(
318 CFStringRef key, const std::string& expected_type, CFTypeRef value) { 320 CFStringRef key, const std::string& expected_type, CFTypeRef value) {
319 ScopedCFTypeRef<CFStringRef> actual_type_ref( 321 ScopedCFTypeRef<CFStringRef> actual_type_ref(
320 CFCopyTypeIDDescription(CFGetTypeID(value))); 322 CFCopyTypeIDDescription(CFGetTypeID(value)));
321 return "Expected value for key " + 323 return "Expected value for key " +
322 base::SysCFStringRefToUTF8(key) + 324 base::SysCFStringRefToUTF8(key) +
323 " to be " + 325 " to be " +
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 CFDictionaryGetValue(user_info.get(), kCFErrorDescriptionKey)); 358 CFDictionaryGetValue(user_info.get(), kCFErrorDescriptionKey));
357 } 359 }
358 o << "Code: " << CFErrorGetCode(err) 360 o << "Code: " << CFErrorGetCode(err)
359 << " Domain: " << CFErrorGetDomain(err) 361 << " Domain: " << CFErrorGetDomain(err)
360 << " Desc: " << desc.get(); 362 << " Desc: " << desc.get();
361 if(errorDesc) { 363 if(errorDesc) {
362 o << "(" << errorDesc << ")"; 364 o << "(" << errorDesc << ")";
363 } 365 }
364 return o; 366 return o;
365 } 367 }
OLDNEW
« no previous file with comments | « base/mac/foundation_util.h ('k') | base/system_monitor/system_monitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698