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

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

Issue 9555014: Revert 124288 (made mac browser and ui_tests flaky) - Add Media device notification to SystemMonito… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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);
187 186
188 #undef TYPE_NAME_FOR_CF_TYPE_DEFN 187 #undef TYPE_NAME_FOR_CF_TYPE_DEFN
189 188
190 void NSObjectRetain(void* obj) { 189 void NSObjectRetain(void* obj) {
191 id<NSObject> nsobj = static_cast<id<NSObject> >(obj); 190 id<NSObject> nsobj = static_cast<id<NSObject> >(obj);
192 [nsobj retain]; 191 [nsobj retain];
193 } 192 }
194 193
195 void NSObjectRelease(void* obj) { 194 void NSObjectRelease(void* obj) {
196 id<NSObject> nsobj = static_cast<id<NSObject> >(obj); 195 id<NSObject> nsobj = static_cast<id<NSObject> >(obj);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 CF_CAST_DEFN(CFArray); 304 CF_CAST_DEFN(CFArray);
306 CF_CAST_DEFN(CFBag); 305 CF_CAST_DEFN(CFBag);
307 CF_CAST_DEFN(CFBoolean); 306 CF_CAST_DEFN(CFBoolean);
308 CF_CAST_DEFN(CFData); 307 CF_CAST_DEFN(CFData);
309 CF_CAST_DEFN(CFDate); 308 CF_CAST_DEFN(CFDate);
310 CF_CAST_DEFN(CFDictionary); 309 CF_CAST_DEFN(CFDictionary);
311 CF_CAST_DEFN(CFNull); 310 CF_CAST_DEFN(CFNull);
312 CF_CAST_DEFN(CFNumber); 311 CF_CAST_DEFN(CFNumber);
313 CF_CAST_DEFN(CFSet); 312 CF_CAST_DEFN(CFSet);
314 CF_CAST_DEFN(CFString); 313 CF_CAST_DEFN(CFString);
315 CF_CAST_DEFN(CFURL);
316 314
317 #undef CF_CAST_DEFN 315 #undef CF_CAST_DEFN
318 316
319 std::string GetValueFromDictionaryErrorMessage( 317 std::string GetValueFromDictionaryErrorMessage(
320 CFStringRef key, const std::string& expected_type, CFTypeRef value) { 318 CFStringRef key, const std::string& expected_type, CFTypeRef value) {
321 ScopedCFTypeRef<CFStringRef> actual_type_ref( 319 ScopedCFTypeRef<CFStringRef> actual_type_ref(
322 CFCopyTypeIDDescription(CFGetTypeID(value))); 320 CFCopyTypeIDDescription(CFGetTypeID(value)));
323 return "Expected value for key " + 321 return "Expected value for key " +
324 base::SysCFStringRefToUTF8(key) + 322 base::SysCFStringRefToUTF8(key) +
325 " to be " + 323 " to be " +
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 CFDictionaryGetValue(user_info.get(), kCFErrorDescriptionKey)); 356 CFDictionaryGetValue(user_info.get(), kCFErrorDescriptionKey));
359 } 357 }
360 o << "Code: " << CFErrorGetCode(err) 358 o << "Code: " << CFErrorGetCode(err)
361 << " Domain: " << CFErrorGetDomain(err) 359 << " Domain: " << CFErrorGetDomain(err)
362 << " Desc: " << desc.get(); 360 << " Desc: " << desc.get();
363 if(errorDesc) { 361 if(errorDesc) {
364 o << "(" << errorDesc << ")"; 362 o << "(" << errorDesc << ")";
365 } 363 }
366 return o; 364 return o;
367 } 365 }
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