diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-01 18:20:14 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-01 18:20:14 +0000 |
commit | 0378bf4edc40686bac06c8e14bd25fdb3f9cfb28 (patch) | |
tree | ee5543b43dd9743d75e1aa8f16692dcfca6c813f /app | |
parent | d028296ec1c0fdfbd40e2390ca3121de7055295d (diff) | |
download | chromium_src-0378bf4edc40686bac06c8e14bd25fdb3f9cfb28.zip chromium_src-0378bf4edc40686bac06c8e14bd25fdb3f9cfb28.tar.gz chromium_src-0378bf4edc40686bac06c8e14bd25fdb3f9cfb28.tar.bz2 |
Move base/mac_util.h to base/mac and use the base::mac namespace.
Fix up callers to use the new location & namespace. Remove includes from
files where it wasn't necessary.
TEST=it compiles
BUG=none
Review URL: http://codereview.chromium.org/6046009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70359 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r-- | app/clipboard/clipboard_mac.mm | 4 | ||||
-rw-r--r-- | app/mac/nsimage_cache.mm | 4 | ||||
-rw-r--r-- | app/resource_bundle_mac.mm | 6 | ||||
-rw-r--r-- | app/test_suite.h | 12 |
4 files changed, 14 insertions, 12 deletions
diff --git a/app/clipboard/clipboard_mac.mm b/app/clipboard/clipboard_mac.mm index c587e3a..d789c58 100644 --- a/app/clipboard/clipboard_mac.mm +++ b/app/clipboard/clipboard_mac.mm @@ -8,7 +8,7 @@ #include "base/file_path.h" #include "base/logging.h" -#include "base/mac_util.h" +#include "base/mac/mac_util.h" #include "base/mac/scoped_cftyperef.h" #include "base/scoped_nsobject.h" #include "base/sys_string_conversions.h" @@ -120,7 +120,7 @@ void Clipboard::WriteBitmap(const char* pixel_data, const char* size_data) { 8, 32, size->width()*4, - mac_util::GetSRGBColorSpace(), // TODO(avi): do better + base::mac::GetSRGBColorSpace(), // TODO(avi): do better kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host, data_provider, NULL, diff --git a/app/mac/nsimage_cache.mm b/app/mac/nsimage_cache.mm index a5d645e..a399b74 100644 --- a/app/mac/nsimage_cache.mm +++ b/app/mac/nsimage_cache.mm @@ -7,7 +7,7 @@ #import <AppKit/AppKit.h> #include "base/logging.h" -#include "base/mac_util.h" +#include "base/mac/mac_util.h" // When C++ exceptions are disabled, the C++ library defines |try| and // |catch| so as to allow exception-expecting C++ code to build properly when @@ -39,7 +39,7 @@ NSImage* GetCachedImageWithName(NSString* name) { DVLOG_IF(1, [[name pathExtension] length] == 0) << "Suggest including the " "extension in the image name"; - NSString* path = [mac_util::MainAppBundle() pathForImageResource:name]; + NSString* path = [base::mac::MainAppBundle() pathForImageResource:name]; if (path) { @try { result = [[[NSImage alloc] initWithContentsOfFile:path] autorelease]; diff --git a/app/resource_bundle_mac.mm b/app/resource_bundle_mac.mm index beb1c66..23ebd7a 100644 --- a/app/resource_bundle_mac.mm +++ b/app/resource_bundle_mac.mm @@ -8,7 +8,7 @@ #include "base/basictypes.h" #include "base/file_path.h" -#include "base/mac_util.h" +#include "base/mac/mac_util.h" #include "base/sys_string_conversions.h" #include "skia/ext/skia_utils_mac.h" @@ -21,12 +21,12 @@ FilePath GetResourcesPakFilePath(NSString* name, NSString* mac_locale) { // as the already-running browser instead of using what NSBundle might pick // based on values at helper launch time. if ([mac_locale length]) { - resource_path = [mac_util::MainAppBundle() pathForResource:name + resource_path = [base::mac::MainAppBundle() pathForResource:name ofType:@"pak" inDirectory:@"" forLocalization:mac_locale]; } else { - resource_path = [mac_util::MainAppBundle() pathForResource:name + resource_path = [base::mac::MainAppBundle() pathForResource:name ofType:@"pak"]; } if (!resource_path) diff --git a/app/test_suite.h b/app/test_suite.h index 1f05e13..10e6b44 100644 --- a/app/test_suite.h +++ b/app/test_suite.h @@ -11,12 +11,14 @@ #include "app/app_paths.h" #include "app/resource_bundle.h" #include "base/path_service.h" +#include "base/mac/scoped_nsautorelease_pool.h" +#include "base/test/test_suite.h" +#include "build/build_config.h" + #if defined(OS_MACOSX) -#include "base/mac_util.h" +#include "base/mac/mac_util.h" #include "base/test/mock_chrome_application_mac.h" #endif -#include "base/mac/scoped_nsautorelease_pool.h" -#include "base/test/test_suite.h" class AppTestSuite : public base::TestSuite { public: @@ -50,7 +52,7 @@ class AppTestSuite : public base::TestSuite { #else #error Unknown branding #endif - mac_util::SetOverrideAppBundlePath(path); + base::mac::SetOverrideAppBundlePath(path); #elif defined(OS_POSIX) FilePath pak_dir; PathService::Get(base::DIR_MODULE, &pak_dir); @@ -69,7 +71,7 @@ class AppTestSuite : public base::TestSuite { ResourceBundle::CleanupSharedInstance(); #if defined(OS_MACOSX) - mac_util::SetOverrideAppBundle(NULL); + base::mac::SetOverrideAppBundle(NULL); #endif TestSuite::Shutdown(); } |