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

Unified Diff: base/nsimage_cache_mac.mm

Issue 243100: Move nsimage_cache into base so that it can be accessed from outside of chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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 | « base/nsimage_cache_mac.h ('k') | chrome/browser/autocomplete/autocomplete_popup_view_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/nsimage_cache_mac.mm
===================================================================
--- base/nsimage_cache_mac.mm (revision 27995)
+++ base/nsimage_cache_mac.mm (working copy)
@@ -2,8 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/cocoa/nsimage_cache.h"
+#include "base/nsimage_cache_mac.h"
+#import <AppKit/AppKit.h>
+
#include "base/logging.h"
#include "base/mac_util.h"
@@ -18,9 +20,9 @@
namespace nsimage_cache {
-static NSMutableDictionary *image_cache = nil;
+static NSMutableDictionary* image_cache = nil;
-NSImage *ImageNamed(NSString *name) {
+NSImage* ImageNamed(NSString* name) {
DCHECK(name);
// NOTE: to make this thread safe, we'd have to sync on the cache and
@@ -31,12 +33,12 @@
DCHECK(image_cache);
}
- NSImage *result = [image_cache objectForKey:name];
+ NSImage* result = [image_cache objectForKey:name];
if (!result) {
DLOG_IF(INFO, [[name pathExtension] length] == 0)
<< "Suggest including the extension in the image name";
- NSString *path = [mac_util::MainAppBundle() pathForImageResource:name];
+ NSString* path = [mac_util::MainAppBundle() pathForImageResource:name];
if (path) {
@try {
result = [[[NSImage alloc] initWithContentsOfFile:path] autorelease];
« no previous file with comments | « base/nsimage_cache_mac.h ('k') | chrome/browser/autocomplete/autocomplete_popup_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698