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

Side by Side Diff: ios/chrome/app/startup/setup_debugging.mm

Issue 2877703004: Whitelist voice_icon as not found image (Closed)
Patch Set: Created 3 years, 7 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ios/chrome/app/startup/setup_debugging.h" 5 #include "ios/chrome/app/startup/setup_debugging.h"
6 6
7 #include <objc/runtime.h> 7 #include <objc/runtime.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/sys_string_conversions.h" 10 #include "base/strings/sys_string_conversions.h"
(...skipping 15 matching lines...) Expand all
26 26
27 // TODO(crbug.com/720337): Add missing image. 27 // TODO(crbug.com/720337): Add missing image.
28 [whiteList addObject:@"card_close_button_pressed_incognito"]; 28 [whiteList addObject:@"card_close_button_pressed_incognito"];
29 // TODO(crbug.com/720355): Add missing image. 29 // TODO(crbug.com/720355): Add missing image.
30 [whiteList addObject:@"find_close_pressed_incognito"]; 30 [whiteList addObject:@"find_close_pressed_incognito"];
31 // TODO(crbug.com/720338): Add missing images. 31 // TODO(crbug.com/720338): Add missing images.
32 [whiteList addObject:@"glif-mic-to-dots-large_37"]; 32 [whiteList addObject:@"glif-mic-to-dots-large_37"];
33 [whiteList addObject:@"glif-google-to-dots_28"]; 33 [whiteList addObject:@"glif-google-to-dots_28"];
34 // TODO(crbug.com/721338): Add missing image. 34 // TODO(crbug.com/721338): Add missing image.
35 [whiteList addObject:@"voice_icon_keyboard_accessory"]; 35 [whiteList addObject:@"voice_icon_keyboard_accessory"];
36 [whiteList addObject:@"voice_icon"];
36 37
37 // The original implementation of [UIImage imageNamed:]. 38 // The original implementation of [UIImage imageNamed:].
38 // Called by the new implementation. 39 // Called by the new implementation.
39 static IMP originalImp; 40 static IMP originalImp;
40 IMP* originalImpPtr = &originalImp; 41 IMP* originalImpPtr = &originalImp;
41 42
42 id swizzleBlock = ^(id self, NSString* imageName) { 43 id swizzleBlock = ^(id self, NSString* imageName) {
43 // Call the original [UIImage imageNamed:] method. 44 // Call the original [UIImage imageNamed:] method.
44 IMP imp = *originalImpPtr; 45 IMP imp = *originalImpPtr;
45 Class aClass = objc_getClass("UIImage"); 46 Class aClass = objc_getClass("UIImage");
(...skipping 25 matching lines...) Expand all
71 DCHECK(ObjcEvilDoers::ZombieEnable(true, 10000)); 72 DCHECK(ObjcEvilDoers::ZombieEnable(true, 10000));
72 #endif 73 #endif
73 74
74 // Enable the detection of missing image assets. 75 // Enable the detection of missing image assets.
75 #ifndef NDEBUG 76 #ifndef NDEBUG
76 swizzleUIImageImageNamed(); 77 swizzleUIImageImageNamed();
77 #endif 78 #endif
78 } 79 }
79 80
80 @end 81 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698