1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #import "ios/chrome/browser/ui/size_class_support_util.h"
7 #include "base/logging.h"
9 UIImage* GetImageForSizeClass(NSString* image_name, SizeClassIdiom idiom) {
10 DCHECK(image_name.length);
11 NSString* name = idiom == REGULAR
12 ? [NSString stringWithFormat:@"%@_large", image_name]
14 return [UIImage imageNamed:name];