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

Unified Diff: ui/base/resource/resource_bundle_mac.mm

Issue 6995090: Mac: Disable loading 2x bitmaps on 10.5 and 10.6 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/resource_bundle_mac.mm
diff --git a/ui/base/resource/resource_bundle_mac.mm b/ui/base/resource/resource_bundle_mac.mm
index 2c66d6088b7ce350974ddf09f4515c9c5f563971..458f74aaa0ff097d757b097baa26096205a83888 100644
--- a/ui/base/resource/resource_bundle_mac.mm
+++ b/ui/base/resource/resource_bundle_mac.mm
@@ -11,6 +11,7 @@
#include "base/mac/mac_util.h"
#include "base/memory/scoped_nsobject.h"
#include "base/synchronization/lock.h"
+#include "base/sys_info.h"
#include "base/sys_string_conversions.h"
#include "ui/gfx/image.h"
@@ -47,7 +48,16 @@ FilePath ResourceBundle::GetResourcesFilePath() {
// static
FilePath ResourceBundle::GetLargeIconResourcesFilePath() {
- return GetResourcesPakFilePath(@"theme_resources_large", nil);
+ int32 major = 0;
+ int32 minor = 0;
+ int32 bugfix = 0;
+ base::SysInfo::OperatingSystemVersionNumbers(&major, &minor, &bugfix);
+
+ // Only load the large resource pak on if we're running on 10.7 or above.
+ if (major > 10 || (major == 10 && minor >= 7))
+ return GetResourcesPakFilePath(@"theme_resources_large", nil);
+ else
+ return FilePath();
}
// static
« 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