summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/clipboard/clipboard_mac.mm4
-rw-r--r--app/mac/nsimage_cache.mm4
-rw-r--r--app/resource_bundle_mac.mm6
-rw-r--r--app/test_suite.h12
-rw-r--r--base/base.gyp2
-rw-r--r--base/base.gypi4
-rw-r--r--base/base_paths_mac.mm8
-rw-r--r--base/file_version_info_mac.mm6
-rw-r--r--base/mac/mac_util.h (renamed from base/mac_util.h)12
-rw-r--r--base/mac/mac_util.mm (renamed from base/mac_util.mm)30
-rw-r--r--base/mac/mac_util_unittest.mm (renamed from base/mac_util_unittest.mm)17
-rw-r--r--chrome/app/breakpad_mac.mm6
-rw-r--r--chrome/app/chrome_main.cc12
-rw-r--r--chrome/browser/app_controller_mac.mm4
-rw-r--r--chrome/browser/autocomplete/autocomplete_popup_view_mac.mm1
-rw-r--r--chrome/browser/autocomplete/history_url_provider_unittest.cc3
-rw-r--r--chrome/browser/autofill/autofill_address_sheet_controller_mac.mm4
-rw-r--r--chrome/browser/autofill/autofill_credit_card_sheet_controller_mac.mm4
-rw-r--r--chrome/browser/autofill/autofill_dialog_controller_mac.mm4
-rw-r--r--chrome/browser/background_mode_manager_mac.mm10
-rw-r--r--chrome/browser/browser_main_mac.mm6
-rw-r--r--chrome/browser/bug_report_util.h12
-rw-r--r--chrome/browser/dom_ui/bug_report_ui.cc4
-rw-r--r--chrome/browser/history/history_database.cc6
-rw-r--r--chrome/browser/history/thumbnail_database.cc6
-rw-r--r--chrome/browser/importer/importer_list.cc6
-rw-r--r--chrome/browser/memory_details_mac.cc4
-rw-r--r--chrome/browser/page_info_model.cc6
-rw-r--r--chrome/browser/password_manager/password_store_mac.cc7
-rw-r--r--chrome/browser/platform_util_mac.mm2
-rw-r--r--chrome/browser/plugin_process_host.cc12
-rw-r--r--chrome/browser/plugin_process_host_mac.cc18
-rw-r--r--chrome/browser/renderer_host/backing_store_mac.mm6
-rw-r--r--chrome/browser/shell_integration_mac.mm4
-rw-r--r--chrome/browser/ui/cocoa/about_ipc_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/about_window_controller.mm6
-rw-r--r--chrome/browser/ui/cocoa/animatable_image.mm4
-rw-r--r--chrome/browser/ui/cocoa/authorization_util.mm6
-rw-r--r--chrome/browser/ui/cocoa/base_bubble_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/browser_window_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/browser_window_controller_private.mm1
-rw-r--r--chrome/browser/ui/cocoa/bug_report_window_controller.mm6
-rw-r--r--chrome/browser/ui/cocoa/chrome_event_processing_window_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/clear_browsing_data_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/cocoa_test_helper.h1
-rw-r--r--chrome/browser/ui/cocoa/cocoa_test_helper.mm6
-rw-r--r--chrome/browser/ui/cocoa/collected_cookies_mac.mm4
-rw-r--r--chrome/browser/ui/cocoa/confirm_quit_panel_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/content_exceptions_window_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/content_settings_dialog_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/cookie_details_view_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/cookies_window_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/download/download_item_cell.mm1
-rw-r--r--chrome/browser/ui/cocoa/download/download_item_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/download/download_shelf_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/edit_search_engine_cocoa_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/extension_installed_bubble_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/extensions/extension_install_prompt_controller.mm6
-rw-r--r--chrome/browser/ui/cocoa/file_metadata.mm4
-rw-r--r--chrome/browser/ui/cocoa/find_bar_cocoa_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/first_run_dialog.mm4
-rw-r--r--chrome/browser/ui/cocoa/floating_bar_backing_view.mm4
-rw-r--r--chrome/browser/ui/cocoa/font_language_settings_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/fullscreen_controller.h4
-rw-r--r--chrome/browser/ui/cocoa/fullscreen_controller.mm33
-rw-r--r--chrome/browser/ui/cocoa/fullscreen_window.mm1
-rw-r--r--chrome/browser/ui/cocoa/hung_renderer_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/import_progress_dialog.mm4
-rw-r--r--chrome/browser/ui/cocoa/import_settings_dialog.mm4
-rw-r--r--chrome/browser/ui/cocoa/importer_lock_dialog.mm1
-rw-r--r--chrome/browser/ui/cocoa/infobar_container_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/infobar_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/install_from_dmg.mm4
-rw-r--r--chrome/browser/ui/cocoa/instant_confirm_window_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/keystone_glue.mm12
-rw-r--r--chrome/browser/ui/cocoa/keyword_editor_cocoa_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/location_bar/instant_opt_in_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/notifications/balloon_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/nsimage_cache_unittest.mm6
-rw-r--r--chrome/browser/ui/cocoa/preferences_window_controller.mm11
-rw-r--r--chrome/browser/ui/cocoa/previewable_contents_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/sad_tab_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/search_engine_dialog_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/shell_dialogs_mac.mm4
-rw-r--r--chrome/browser/ui/cocoa/simple_content_exceptions_window_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/speech_input_window_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/tab_contents_controller.mm1
-rw-r--r--chrome/browser/ui/cocoa/tab_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/tab_strip_controller.mm1
-rw-r--r--chrome/browser/ui/cocoa/tab_strip_view.mm4
-rw-r--r--chrome/browser/ui/cocoa/tab_view.mm6
-rw-r--r--chrome/browser/ui/cocoa/tabpose_window.mm4
-rw-r--r--chrome/browser/ui/cocoa/task_manager_mac.mm4
-rw-r--r--chrome/browser/ui/cocoa/toolbar_controller.mm4
-rw-r--r--chrome/browser/ui/cocoa/translate/translate_infobar_base.mm1
-rw-r--r--chrome/browser/ui/login/login_prompt_mac.mm4
-rw-r--r--chrome/common/chrome_paths.cc12
-rw-r--r--chrome/common/chrome_paths_mac.mm12
-rw-r--r--chrome/common/font_loader_mac.mm4
-rw-r--r--chrome/common/sandbox_mac.mm10
-rw-r--r--chrome/plugin/plugin_thread.cc4
-rw-r--r--chrome/plugin/webplugin_proxy.cc6
-rw-r--r--chrome/renderer/render_process_impl.cc4
-rw-r--r--chrome/renderer/webplugin_delegate_pepper.cc4
-rw-r--r--chrome/test/in_process_browser_test.cc4
-rw-r--r--chrome/test/unit/chrome_test_suite.cc6
-rw-r--r--gfx/blit.cc1
-rw-r--r--gfx/scoped_image.h4
-rw-r--r--gfx/scoped_image_unittest.cc4
-rw-r--r--gfx/test_suite.h14
-rw-r--r--net/proxy/proxy_config_service_mac.cc8
-rw-r--r--net/proxy/proxy_resolver_mac.cc4
-rw-r--r--net/proxy/proxy_server_mac.cc6
-rw-r--r--skia/ext/bitmap_platform_device_mac.cc4
-rw-r--r--webkit/plugins/npapi/plugin_list_mac.mm4
-rw-r--r--webkit/plugins/ppapi/ppapi_plugin_instance.cc4
-rw-r--r--webkit/plugins/ppapi/ppb_graphics_2d_impl.cc7
-rw-r--r--webkit/support/platform_support_mac.mm6
-rw-r--r--webkit/support/test_webkit_client.cc4
-rw-r--r--webkit/tools/test_shell/run_all_tests.cc4
-rw-r--r--webkit/tools/test_shell/test_shell.cc4
-rw-r--r--webkit/tools/test_shell/test_shell_mac.mm12
127 files changed, 349 insertions, 357 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();
}
diff --git a/base/base.gyp b/base/base.gyp
index 97cb3e0..6e62c84 100644
--- a/base/base.gyp
+++ b/base/base.gyp
@@ -99,7 +99,7 @@
'linked_ptr_unittest.cc',
'lock_unittest.cc',
'logging_unittest.cc',
- 'mac_util_unittest.mm',
+ 'mac/mac_util_unittest.mm',
'message_loop_proxy_impl_unittest.cc',
'message_loop_unittest.cc',
'message_pump_glib_unittest.cc',
diff --git a/base/base.gypi b/base/base.gypi
index bbb25fc..ee794fd 100644
--- a/base/base.gypi
+++ b/base/base.gypi
@@ -111,9 +111,9 @@
'logging.cc',
'logging.h',
'logging_win.cc',
- 'mac_util.h',
- 'mac_util.mm',
'mac/cocoa_protocols.h',
+ 'mac/mac_util.h',
+ 'mac/mac_util.mm',
'mac/os_crash_dumps.cc',
'mac/os_crash_dumps.h',
'mac/scoped_aedesc.h',
diff --git a/base/base_paths_mac.mm b/base/base_paths_mac.mm
index 97413ba..1210834 100644
--- a/base/base_paths_mac.mm
+++ b/base/base_paths_mac.mm
@@ -11,7 +11,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/path_service.h"
#include "base/string_util.h"
@@ -48,15 +48,15 @@ bool PathProviderMac(int key, FilePath* result) {
return GetNSExecutablePath(result);
}
case base::DIR_CACHE:
- return mac_util::GetUserDirectory(NSCachesDirectory, result);
+ return base::mac::GetUserDirectory(NSCachesDirectory, result);
case base::DIR_APP_DATA:
- return mac_util::GetUserDirectory(NSApplicationSupportDirectory, result);
+ return base::mac::GetUserDirectory(NSApplicationSupportDirectory, result);
case base::DIR_SOURCE_ROOT: {
// Go through PathService to catch overrides.
if (PathService::Get(base::FILE_EXE, result)) {
// Start with the executable's directory.
*result = result->DirName();
- if (mac_util::AmIBundled()) {
+ if (base::mac::AmIBundled()) {
// The bundled app executables (Chromium, TestShell, etc) live five
// levels down, eg:
// src/xcodebuild/{Debug|Release}/Chromium.app/Contents/MacOS/Chromium
diff --git a/base/file_version_info_mac.mm b/base/file_version_info_mac.mm
index fa97df8..f716ccc 100644
--- a/base/file_version_info_mac.mm
+++ b/base/file_version_info_mac.mm
@@ -8,15 +8,15 @@
#include "base/file_path.h"
#include "base/logging.h"
+#include "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
-#include "base/mac_util.h"
FileVersionInfoMac::FileVersionInfoMac(NSBundle *bundle) : bundle_(bundle) {
}
// static
FileVersionInfo* FileVersionInfo::CreateFileVersionInfoForCurrentModule() {
- return CreateFileVersionInfo(mac_util::MainAppBundlePath());
+ return CreateFileVersionInfo(base::mac::MainAppBundlePath());
}
// static
@@ -97,7 +97,7 @@ bool FileVersionInfoMac::is_official_build() {
string16 FileVersionInfoMac::GetString16Value(CFStringRef name) {
if (bundle_) {
- NSString *ns_name = mac_util::CFToNSCast(name);
+ NSString *ns_name = base::mac::CFToNSCast(name);
NSString* value = [bundle_ objectForInfoDictionaryKey:ns_name];
if (value) {
return base::SysNSStringToUTF16(value);
diff --git a/base/mac_util.h b/base/mac/mac_util.h
index 076865d..7e5dddb 100644
--- a/base/mac_util.h
+++ b/base/mac/mac_util.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef BASE_MAC_UTIL_H_
-#define BASE_MAC_UTIL_H_
+#ifndef BASE_MAC_MAC_UTIL_H_
+#define BASE_MAC_MAC_UTIL_H_
#pragma once
#include <Carbon/Carbon.h>
@@ -34,7 +34,8 @@ typedef unsigned int NSSearchPathDirectory;
typedef unsigned int NSSearchPathDomainMask;
#endif
-namespace mac_util {
+namespace base {
+namespace mac {
// Full screen modes, in increasing order of priority. More permissive modes
// take predecence.
@@ -242,6 +243,7 @@ CF_TO_NS_CAST(CFWriteStreamRef, NSOutputStream);
#endif // __OBJC__
-} // namespace mac_util
+} // namespace mac
+} // namespace base
-#endif // BASE_MAC_UTIL_H_
+#endif // BASE_MAC_MAC_UTIL_H_
diff --git a/base/mac_util.mm b/base/mac/mac_util.mm
index 598f69b..21213ba 100644
--- a/base/mac_util.mm
+++ b/base/mac/mac_util.mm
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#import <Cocoa/Cocoa.h>
@@ -13,13 +13,14 @@
#include "base/scoped_nsobject.h"
#include "base/sys_string_conversions.h"
-using base::mac::ScopedCFTypeRef;
+namespace base {
+namespace mac {
namespace {
// a count of currently outstanding requests for full screen mode from browser
// windows, plugins, etc.
-int g_full_screen_requests[mac_util::kNumFullScreenModes] = { 0, 0, 0};
+int g_full_screen_requests[kNumFullScreenModes] = { 0, 0, 0};
// Sets the appropriate SystemUIMode based on the current full screen requests.
// Since only one SystemUIMode can be active at a given time, full screen
@@ -39,12 +40,12 @@ void SetUIMode() {
// HideDock.
SystemUIMode desired_mode = kUIModeNormal;
SystemUIOptions desired_options = 0;
- if (g_full_screen_requests[mac_util::kFullScreenModeAutoHideAll] > 0) {
+ if (g_full_screen_requests[kFullScreenModeAutoHideAll] > 0) {
desired_mode = kUIModeAllHidden;
desired_options = kUIOptionAutoShowMenuBar;
- } else if (g_full_screen_requests[mac_util::kFullScreenModeHideDock] > 0) {
+ } else if (g_full_screen_requests[kFullScreenModeHideDock] > 0) {
desired_mode = kUIModeContentHidden;
- } else if (g_full_screen_requests[mac_util::kFullScreenModeHideAll] > 0) {
+ } else if (g_full_screen_requests[kFullScreenModeHideAll] > 0) {
desired_mode = kUIModeAllHidden;
}
@@ -56,16 +57,16 @@ bool WasLaunchedAsLoginItem() {
ProcessSerialNumber psn = { 0, kCurrentProcess };
scoped_nsobject<NSDictionary> process_info(
- mac_util::CFToNSCast(ProcessInformationCopyDictionary(&psn,
- kProcessDictionaryIncludeAllInformationMask)));
+ CFToNSCast(ProcessInformationCopyDictionary(&psn,
+ kProcessDictionaryIncludeAllInformationMask)));
long long temp = [[process_info objectForKey:@"ParentPSN"] longLongValue];
ProcessSerialNumber parent_psn =
{ (temp >> 32) & 0x00000000FFFFFFFFLL, temp & 0x00000000FFFFFFFFLL };
scoped_nsobject<NSDictionary> parent_info(
- mac_util::CFToNSCast(ProcessInformationCopyDictionary(&parent_psn,
- kProcessDictionaryIncludeAllInformationMask)));
+ CFToNSCast(ProcessInformationCopyDictionary(&parent_psn,
+ kProcessDictionaryIncludeAllInformationMask)));
// Check that creator process code is that of loginwindow.
BOOL result =
@@ -87,7 +88,7 @@ LSSharedFileListItemRef GetLoginItemForApp() {
}
scoped_nsobject<NSArray> login_items_array(
- mac_util::CFToNSCast(LSSharedFileListCopySnapshot(login_items, NULL)));
+ CFToNSCast(LSSharedFileListCopySnapshot(login_items, NULL)));
NSURL* url = [NSURL fileURLWithPath:[[NSBundle mainBundle] bundlePath]];
@@ -125,9 +126,7 @@ bool IsHiddenLoginItem(LSSharedFileListItemRef item) {
return hidden && hidden == kCFBooleanTrue;
}
-} // end namespace
-
-namespace mac_util {
+} // namespace
std::string PathFromFSRef(const FSRef& ref) {
ScopedCFTypeRef<CFURLRef> url(
@@ -713,4 +712,5 @@ void NSObjectRelease(void* obj) {
[nsobj release];
}
-} // namespace mac_util
+} // namespace mac
+} // namespace base
diff --git a/base/mac_util_unittest.mm b/base/mac/mac_util_unittest.mm
index 63ea9b2..47ecebf 100644
--- a/base/mac_util_unittest.mm
+++ b/base/mac/mac_util_unittest.mm
@@ -5,7 +5,7 @@
#import <Cocoa/Cocoa.h>
#include <vector>
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/file_path.h"
#include "base/file_util.h"
@@ -16,7 +16,8 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
-namespace mac_util {
+namespace base {
+namespace mac {
namespace {
@@ -151,7 +152,7 @@ TEST_F(MacUtilTest, TestExcludeFileFromBackups) {
}
TEST_F(MacUtilTest, TestGetValueFromDictionary) {
- base::mac::ScopedCFTypeRef<CFMutableDictionaryRef> dict(
+ ScopedCFTypeRef<CFMutableDictionaryRef> dict(
CFDictionaryCreateMutable(0, 0,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks));
@@ -175,8 +176,7 @@ TEST_F(MacUtilTest, CopyNSImageToCGImage) {
NSRectFill(rect);
[nsImage unlockFocus];
- base::mac::ScopedCFTypeRef<CGImageRef> cgImage(
- mac_util::CopyNSImageToCGImage(nsImage.get()));
+ ScopedCFTypeRef<CGImageRef> cgImage(CopyNSImageToCGImage(nsImage.get()));
EXPECT_TRUE(cgImage.get());
}
@@ -184,13 +184,14 @@ TEST_F(MacUtilTest, NSObjectRetainRelease) {
scoped_nsobject<NSArray> array([[NSArray alloc] initWithObjects:@"foo", nil]);
EXPECT_EQ(1U, [array retainCount]);
- mac_util::NSObjectRetain(array);
+ NSObjectRetain(array);
EXPECT_EQ(2U, [array retainCount]);
- mac_util::NSObjectRelease(array);
+ NSObjectRelease(array);
EXPECT_EQ(1U, [array retainCount]);
}
} // namespace
-} // namespace mac_util
+} // namespace mac
+} // namespace base
diff --git a/chrome/app/breakpad_mac.mm b/chrome/app/breakpad_mac.mm
index de14e92..caa46cc 100644
--- a/chrome/app/breakpad_mac.mm
+++ b/chrome/app/breakpad_mac.mm
@@ -13,7 +13,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
#import "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
#import "base/mac/scoped_nsautorelease_pool.h"
#include "base/path_service.h"
@@ -55,8 +55,8 @@ void InitCrashReporter() {
// Helper processes may not have access to the disk or to the same data as
// the browser process, so the browser passes the decision to them on the
// command line.
- NSBundle* main_bundle = mac_util::MainAppBundle();
- bool is_browser = !mac_util::IsBackgroundOnlyProcess();
+ NSBundle* main_bundle = base::mac::MainAppBundle();
+ bool is_browser = !base::mac::IsBackgroundOnlyProcess();
bool enable_breakpad = false;
CommandLine* command_line = CommandLine::ForCurrentProcess();
diff --git a/chrome/app/chrome_main.cc b/chrome/app/chrome_main.cc
index e916f95..56e8981 100644
--- a/chrome/app/chrome_main.cc
+++ b/chrome/app/chrome_main.cc
@@ -48,8 +48,8 @@
#if defined(OS_MACOSX)
#include "app/l10n_util_mac.h"
+#include "base/mac/mac_util.h"
#include "base/mac/os_crash_dumps.h"
-#include "base/mac_util.h"
#include "base/mach_ipc_mac.h"
#include "chrome/app/breakpad_mac.h"
#include "chrome/browser/mach_broker_mac.h"
@@ -411,7 +411,7 @@ void SetMacProcessName(const std::string& process_type) {
}
if (name_id) {
NSString* app_name = l10n_util::GetNSString(name_id);
- mac_util::SetProcessName(reinterpret_cast<CFStringRef>(app_name));
+ base::mac::SetProcessName(reinterpret_cast<CFStringRef>(app_name));
}
}
@@ -641,7 +641,7 @@ int ChromeMain(int argc, char** argv) {
command_line.GetSwitchValueASCII(switches::kProcessType);
#if defined(OS_MACOSX)
- mac_util::SetOverrideAppBundlePath(chrome::GetFrameworkBundlePath());
+ base::mac::SetOverrideAppBundlePath(chrome::GetFrameworkBundlePath());
#endif // OS_MACOSX
// If we are in diagnostics mode this is the end of the line. After the
@@ -747,7 +747,7 @@ int ChromeMain(int argc, char** argv) {
// Browser process in release mode.
if (!command_line.HasSwitch(switches::kDisableBreakpad)) {
bool disable_apple_crash_reporter = is_debug_build
- || mac_util::IsBackgroundOnlyProcess();
+ || base::mac::IsBackgroundOnlyProcess();
if (!IsCrashReporterEnabled() && disable_apple_crash_reporter) {
base::mac::DisableOSCrashDumps();
}
@@ -760,11 +760,11 @@ int ChromeMain(int argc, char** argv) {
// the helper should always have a --type switch.
//
// This check is done this late so there is already a call to
- // mac_util::IsBackgroundOnlyProcess(), so there is no change in
+ // base::mac::IsBackgroundOnlyProcess(), so there is no change in
// startup/initialization order.
// The helper's Info.plist marks it as a background only app.
- if (mac_util::IsBackgroundOnlyProcess()) {
+ if (base::mac::IsBackgroundOnlyProcess()) {
CHECK(command_line.HasSwitch(switches::kProcessType))
<< "Helper application requires --type.";
} else {
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index 428f375..2156f19 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -9,7 +9,7 @@
#include "base/auto_reset.h"
#include "base/command_line.h"
#include "base/file_path.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/message_loop.h"
#include "base/string_number_conversions.h"
#include "base/sys_string_conversions.h"
@@ -995,7 +995,7 @@ void RecordLastRunAppBundlePath() {
static BOOL doneOnce = NO;
if (!doneOnce) {
doneOnce = YES;
- if (mac_util::WasLaunchedAsHiddenLoginItem()) {
+ if (base::mac::WasLaunchedAsHiddenLoginItem()) {
SessionService* sessionService =
[self defaultProfile]->GetSessionService();
if (sessionService &&
diff --git a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
index 950cf08..d0b84e7 100644
--- a/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
+++ b/chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
@@ -8,7 +8,6 @@
#include "app/resource_bundle.h"
#include "app/text_elider.h"
-#include "base/mac_util.h"
#include "base/stl_util-inl.h"
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
diff --git a/chrome/browser/autocomplete/history_url_provider_unittest.cc b/chrome/browser/autocomplete/history_url_provider_unittest.cc
index 89ed06c..b0f3cbd 100644
--- a/chrome/browser/autocomplete/history_url_provider_unittest.cc
+++ b/chrome/browser/autocomplete/history_url_provider_unittest.cc
@@ -13,9 +13,6 @@
#include "chrome/browser/history/history.h"
#include "chrome/test/testing_profile.h"
#include "testing/gtest/include/gtest/gtest.h"
-#if defined(OS_MACOSX)
-#include "base/mac_util.h"
-#endif
using base::Time;
using base::TimeDelta;
diff --git a/chrome/browser/autofill/autofill_address_sheet_controller_mac.mm b/chrome/browser/autofill/autofill_address_sheet_controller_mac.mm
index 80f0aac..d2f6938 100644
--- a/chrome/browser/autofill/autofill_address_sheet_controller_mac.mm
+++ b/chrome/browser/autofill/autofill_address_sheet_controller_mac.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/autofill/autofill_address_sheet_controller_mac.h"
#include "app/l10n_util.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
#import "chrome/browser/autofill/autofill_address_model_mac.h"
#import "chrome/browser/autofill/autofill_dialog_controller_mac.h"
@@ -18,7 +18,7 @@
- (id)initWithProfile:(const AutoFillProfile&)profile
mode:(AutoFillAddressMode)mode {
- NSString* nibPath = [mac_util::MainAppBundle()
+ NSString* nibPath = [base::mac::MainAppBundle()
pathForResource:@"AutoFillAddressSheet"
ofType:@"nib"];
self = [super initWithWindowNibPath:nibPath owner:self];
diff --git a/chrome/browser/autofill/autofill_credit_card_sheet_controller_mac.mm b/chrome/browser/autofill/autofill_credit_card_sheet_controller_mac.mm
index 95eb140..ae72117 100644
--- a/chrome/browser/autofill/autofill_credit_card_sheet_controller_mac.mm
+++ b/chrome/browser/autofill/autofill_credit_card_sheet_controller_mac.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/autofill/autofill_credit_card_sheet_controller_mac.h"
#include "app/l10n_util.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
#import "chrome/browser/autofill/autofill_credit_card_model_mac.h"
#import "chrome/browser/autofill/autofill_dialog_controller_mac.h"
@@ -33,7 +33,7 @@
- (id)initWithCreditCard:(const CreditCard&)creditCard
mode:(AutoFillCreditCardMode)mode {
- NSString* nibPath = [mac_util::MainAppBundle()
+ NSString* nibPath = [base::mac::MainAppBundle()
pathForResource:@"AutoFillCreditCardSheet"
ofType:@"nib"];
self = [super initWithWindowNibPath:nibPath owner:self];
diff --git a/chrome/browser/autofill/autofill_dialog_controller_mac.mm b/chrome/browser/autofill/autofill_dialog_controller_mac.mm
index 713c172..892160f 100644
--- a/chrome/browser/autofill/autofill_dialog_controller_mac.mm
+++ b/chrome/browser/autofill/autofill_dialog_controller_mac.mm
@@ -6,7 +6,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
#include "base/lazy_instance.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
#import "chrome/browser/autofill/autofill_address_model_mac.h"
#import "chrome/browser/autofill/autofill_address_sheet_controller_mac.h"
@@ -664,7 +664,7 @@ class PreferenceObserver : public NotificationObserver {
DCHECK(profile);
// Use initWithWindowNibPath: instead of initWithWindowNibName: so we
// can override it in a unit test.
- NSString* nibpath = [mac_util::MainAppBundle()
+ NSString* nibpath = [base::mac::MainAppBundle()
pathForResource:@"AutoFillDialog"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
diff --git a/chrome/browser/background_mode_manager_mac.mm b/chrome/browser/background_mode_manager_mac.mm
index cc6ab4b..40b958d 100644
--- a/chrome/browser/background_mode_manager_mac.mm
+++ b/chrome/browser/background_mode_manager_mac.mm
@@ -4,7 +4,7 @@
#include "app/l10n_util.h"
#include "base/command_line.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "chrome/browser/background_mode_manager.h"
#include "chrome/browser/browser_thread.h"
#include "chrome/common/app_mode_common_mac.h"
@@ -40,18 +40,18 @@ void DisableLaunchOnStartupTask::Run() {
// Check if Chrome is not a login Item, or is a Login Item but w/o 'hidden'
// flag - most likely user has modified the setting, don't override it.
bool is_hidden = false;
- if (!mac_util::CheckLoginItemStatus(&is_hidden) || !is_hidden)
+ if (!base::mac::CheckLoginItemStatus(&is_hidden) || !is_hidden)
return;
- mac_util::RemoveFromLoginItems();
+ base::mac::RemoveFromLoginItems();
}
void EnableLaunchOnStartupTask::Run() {
// Return if Chrome is already a Login Item (avoid overriding user choice).
- if (mac_util::CheckLoginItemStatus(NULL))
+ if (base::mac::CheckLoginItemStatus(NULL))
return;
- mac_util::AddToLoginItems(true); // Hide on startup.
+ base::mac::AddToLoginItems(true); // Hide on startup.
CFPreferencesSetAppValue(kLaunchOnStartupResetAllowedPrefsKey,
kCFBooleanTrue,
app_mode::kAppPrefsID);
diff --git a/chrome/browser/browser_main_mac.mm b/chrome/browser/browser_main_mac.mm
index 619be2d..fa88bc8 100644
--- a/chrome/browser/browser_main_mac.mm
+++ b/chrome/browser/browser_main_mac.mm
@@ -12,7 +12,7 @@
#include "base/command_line.h"
#include "base/debug/debugger.h"
#include "base/file_path.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/nss_util.h"
#include "base/path_service.h"
#include "base/scoped_nsobject.h"
@@ -70,7 +70,7 @@ class BrowserMainPartsMac : public BrowserMainPartsPosix {
virtual void PreEarlyInitialization() {
BrowserMainPartsPosix::PreEarlyInitialization();
- if (mac_util::WasLaunchedAsHiddenLoginItem()) {
+ if (base::mac::WasLaunchedAsHiddenLoginItem()) {
CommandLine* singleton_command_line = CommandLine::ForCurrentProcess();
singleton_command_line->AppendSwitch(switches::kNoStartupWindow);
}
@@ -113,7 +113,7 @@ class BrowserMainPartsMac : public BrowserMainPartsPosix {
// Now load the nib (from the right bundle).
scoped_nsobject<NSNib>
nib([[NSNib alloc] initWithNibNamed:@"MainMenu"
- bundle:mac_util::MainAppBundle()]);
+ bundle:base::mac::MainAppBundle()]);
// TODO(viettrungluu): crbug.com/20504 - This currently leaks, so if you
// change this, you'll probably need to change the Valgrind suppression.
[nib instantiateNibWithOwner:NSApp topLevelObjects:nil];
diff --git a/chrome/browser/bug_report_util.h b/chrome/browser/bug_report_util.h
index 61835d6..3bb9ee3 100644
--- a/chrome/browser/bug_report_util.h
+++ b/chrome/browser/bug_report_util.h
@@ -9,18 +9,16 @@
#include <string>
#include "base/basictypes.h"
-#if defined(OS_MACOSX)
-#include "base/mac_util.h"
-#include "base/sys_info.h"
-#elif defined(OS_WIN)
-#include "base/win/windows_version.h"
-#endif
#include "chrome/browser/userfeedback/proto/common.pb.h"
#include "chrome/browser/userfeedback/proto/extension.pb.h"
#include "chrome/browser/userfeedback/proto/math.pb.h"
#include "gfx/rect.h"
-#if defined(OS_CHROMEOS)
+#if defined(OS_MACOSX)
+#include "base/sys_info.h"
+#elif defined(OS_WIN)
+#include "base/win/windows_version.h"
+#elif defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/cros/syslogs_library.h"
#include "chrome/browser/chromeos/cros/cros_library.h"
#endif
diff --git a/chrome/browser/dom_ui/bug_report_ui.cc b/chrome/browser/dom_ui/bug_report_ui.cc
index 1583243..654c48c 100644
--- a/chrome/browser/dom_ui/bug_report_ui.cc
+++ b/chrome/browser/dom_ui/bug_report_ui.cc
@@ -39,7 +39,7 @@
#if defined(USE_X11)
#include "app/x11_util.h"
#elif defined(OS_MACOSX)
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#elif defined(OS_WIN)
#include "app/win/win_util.h"
#endif
@@ -173,7 +173,7 @@ void RefreshLastScreenshot(NSWindow* window) {
#if defined(USE_X11)
x11_util::GrabWindowSnapshot(window, last_screenshot_png);
#elif defined(OS_MACOSX)
- mac_util::GrabWindowSnapshot(window, last_screenshot_png, &width, &height);
+ base::mac::GrabWindowSnapshot(window, last_screenshot_png, &width, &height);
#elif defined(OS_WIN)
app::win::GrabWindowSnapshot(window, last_screenshot_png);
#endif
diff --git a/chrome/browser/history/history_database.cc b/chrome/browser/history/history_database.cc
index f0c546c..c5478b8 100644
--- a/chrome/browser/history/history_database.cc
+++ b/chrome/browser/history/history_database.cc
@@ -17,7 +17,7 @@
#include "chrome/common/chrome_switches.h"
#if defined(OS_MACOSX)
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#endif
namespace history {
@@ -99,11 +99,11 @@ sql::InitStatus HistoryDatabase::Init(const FilePath& history_name,
#if defined(OS_MACOSX)
// Exclude the history file and its journal from backups.
- mac_util::SetFileBackupExclusion(history_name, true);
+ base::mac::SetFileBackupExclusion(history_name, true);
FilePath::StringType history_name_string(history_name.value());
history_name_string += "-journal";
FilePath history_journal_name(history_name_string);
- mac_util::SetFileBackupExclusion(history_journal_name, true);
+ base::mac::SetFileBackupExclusion(history_journal_name, true);
#endif
// Prime the cache.
diff --git a/chrome/browser/history/thumbnail_database.cc b/chrome/browser/history/thumbnail_database.cc
index e1054ac..7fa8bd1 100644
--- a/chrome/browser/history/thumbnail_database.cc
+++ b/chrome/browser/history/thumbnail_database.cc
@@ -22,7 +22,7 @@
#include "third_party/skia/include/core/SkBitmap.h"
#if defined(OS_MACOSX)
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#endif
namespace history {
@@ -53,11 +53,11 @@ sql::InitStatus ThumbnailDatabase::Init(
#if defined(OS_MACOSX)
// Exclude the thumbnails file and its journal from backups.
- mac_util::SetFileBackupExclusion(db_name, true);
+ base::mac::SetFileBackupExclusion(db_name, true);
FilePath::StringType db_name_string(db_name.value());
db_name_string += "-journal";
FilePath db_journal_name(db_name_string);
- mac_util::SetFileBackupExclusion(db_journal_name, true);
+ base::mac::SetFileBackupExclusion(db_journal_name, true);
#endif
// Create the tables.
diff --git a/chrome/browser/importer/importer_list.cc b/chrome/browser/importer/importer_list.cc
index 5579725..ce3f316 100644
--- a/chrome/browser/importer/importer_list.cc
+++ b/chrome/browser/importer/importer_list.cc
@@ -23,7 +23,7 @@
#include "chrome/browser/password_manager/ie7_password.h"
#endif
#if defined(OS_MACOSX)
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "chrome/browser/importer/safari_importer.h"
#endif
@@ -46,7 +46,7 @@ void DetectIEProfiles(std::vector<importer::ProfileInfo*>* profiles) {
#if defined(OS_MACOSX)
void DetectSafariProfiles(std::vector<importer::ProfileInfo*>* profiles) {
uint16 items = importer::NONE;
- if (!SafariImporter::CanImport(mac_util::GetUserLibraryPath(), &items))
+ if (!SafariImporter::CanImport(base::mac::GetUserLibraryPath(), &items))
return;
importer::ProfileInfo* safari = new importer::ProfileInfo();
@@ -133,7 +133,7 @@ Importer* ImporterList::CreateImporterByType(importer::ProfileType type) {
return new Toolbar5Importer();
#if defined(OS_MACOSX)
case importer::SAFARI:
- return new SafariImporter(mac_util::GetUserLibraryPath());
+ return new SafariImporter(base::mac::GetUserLibraryPath());
#endif // OS_MACOSX
case importer::NO_PROFILE_TYPE:
NOTREACHED();
diff --git a/chrome/browser/memory_details_mac.cc b/chrome/browser/memory_details_mac.cc
index 2ecac8d..fbc4d98 100644
--- a/chrome/browser/memory_details_mac.cc
+++ b/chrome/browser/memory_details_mac.cc
@@ -11,7 +11,7 @@
#include "base/basictypes.h"
#include "base/file_path.h"
#include "base/file_version_info.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/string_util.h"
#include "base/process_util.h"
#include "base/threading/thread.h"
@@ -146,7 +146,7 @@ void MemoryDetails::CollectProcessData(
if (process_info.GetProcInfo(info.pid, &proc_info)) {
if (proc_info.command.length() > 1 && proc_info.command[0] == '/') {
FilePath bundle_name =
- mac_util::GetAppBundlePath(FilePath(proc_info.command));
+ base::mac::GetAppBundlePath(FilePath(proc_info.command));
if (!bundle_name.empty()) {
version_info.reset(FileVersionInfo::CreateFileVersionInfo(
bundle_name));
diff --git a/chrome/browser/page_info_model.cc b/chrome/browser/page_info_model.cc
index 750c45b..471962e 100644
--- a/chrome/browser/page_info_model.cc
+++ b/chrome/browser/page_info_model.cc
@@ -26,7 +26,7 @@
#include "net/base/x509_certificate.h"
#if defined(OS_MACOSX)
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#endif
PageInfoModel::PageInfoModel(Profile* profile,
@@ -277,7 +277,7 @@ PageInfoModel::~PageInfoModel() {
// Release the NSImages.
for (std::vector<gfx::NativeImage>::iterator it = icons_.begin();
it != icons_.end(); ++it) {
- mac_util::NSObjectRelease(*it);
+ base::mac::NSObjectRelease(*it);
}
#endif
}
@@ -355,7 +355,7 @@ gfx::NativeImage PageInfoModel::GetBitmapNamed(int resource_id) {
#if defined(OS_MACOSX)
// Unlike other platforms, the Mac ResourceBundle does not keep a shared image
// cache. These are released in the dtor.
- mac_util::NSObjectRetain(image);
+ base::mac::NSObjectRetain(image);
#endif
return image;
}
diff --git a/chrome/browser/password_manager/password_store_mac.cc b/chrome/browser/password_manager/password_store_mac.cc
index f45200a..abdb9c7 100644
--- a/chrome/browser/password_manager/password_store_mac.cc
+++ b/chrome/browser/password_manager/password_store_mac.cc
@@ -11,7 +11,7 @@
#include <vector>
#include "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/message_loop.h"
#include "base/stl_util-inl.h"
#include "base/string_util.h"
@@ -565,7 +565,8 @@ bool MacKeychainPasswordFormAdapter::AddPassword(const PasswordForm& form) {
password.size(), password.c_str(), &new_item);
if (result == noErr) {
- SetKeychainItemCreatorCode(new_item, mac_util::CreatorCodeForApplication());
+ SetKeychainItemCreatorCode(new_item,
+ base::mac::CreatorCodeForApplication());
keychain_->Free(new_item);
} else if (result == errSecDuplicateItem) {
// If we collide with an existing item, find and update it instead.
@@ -722,7 +723,7 @@ bool MacKeychainPasswordFormAdapter::SetKeychainItemCreatorCode(
}
OSType MacKeychainPasswordFormAdapter::CreatorCodeForSearch() {
- return finds_only_owned_ ? mac_util::CreatorCodeForApplication() : 0;
+ return finds_only_owned_ ? base::mac::CreatorCodeForApplication() : 0;
}
#pragma mark -
diff --git a/chrome/browser/platform_util_mac.mm b/chrome/browser/platform_util_mac.mm
index 719183d..5306598 100644
--- a/chrome/browser/platform_util_mac.mm
+++ b/chrome/browser/platform_util_mac.mm
@@ -4,6 +4,7 @@
#include "chrome/browser/platform_util.h"
+#include <Carbon/Carbon.h>
#import <Cocoa/Cocoa.h>
#import <CoreServices/CoreServices.h>
@@ -11,7 +12,6 @@
#include "app/l10n_util_mac.h"
#include "base/file_path.h"
#include "base/logging.h"
-#include "base/mac_util.h"
#include "base/mac/scoped_aedesc.h"
#include "base/sys_string_conversions.h"
#include "googleurl/src/gurl.h"
diff --git a/chrome/browser/plugin_process_host.cc b/chrome/browser/plugin_process_host.cc
index cb99a80..7bbb5a7 100644
--- a/chrome/browser/plugin_process_host.cc
+++ b/chrome/browser/plugin_process_host.cc
@@ -48,7 +48,7 @@
#endif
#if defined(OS_MACOSX)
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "chrome/common/plugin_carbon_interpose_constants_mac.h"
#include "gfx/rect.h"
#endif
@@ -148,22 +148,22 @@ PluginProcessHost::~PluginProcessHost() {
window_index != plugin_fullscreen_windows_set_.end();
window_index++) {
if (BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- mac_util::ReleaseFullScreen(mac_util::kFullScreenModeHideAll);
+ base::mac::ReleaseFullScreen(base::mac::kFullScreenModeHideAll);
} else {
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
- NewRunnableFunction(mac_util::ReleaseFullScreen,
- mac_util::kFullScreenModeHideAll));
+ NewRunnableFunction(base::mac::ReleaseFullScreen,
+ base::mac::kFullScreenModeHideAll));
}
}
// If the plugin hid the cursor, reset that.
if (!plugin_cursor_visible_) {
if (BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- mac_util::SetCursorVisibility(true);
+ base::mac::SetCursorVisibility(true);
} else {
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
- NewRunnableFunction(mac_util::SetCursorVisibility,
+ NewRunnableFunction(base::mac::SetCursorVisibility,
true));
}
}
diff --git a/chrome/browser/plugin_process_host_mac.cc b/chrome/browser/plugin_process_host_mac.cc
index cf05894..d976369 100644
--- a/chrome/browser/plugin_process_host_mac.cc
+++ b/chrome/browser/plugin_process_host_mac.cc
@@ -9,7 +9,7 @@
#include <vector>
#include "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "chrome/browser/browser_thread.h"
#include "chrome/browser/plugin_process_host.h"
#include "chrome/common/plugin_messages.h"
@@ -44,8 +44,8 @@ void PluginProcessHost::OnPluginShowWindow(uint32 window_id,
// otherwise our refcounting can get skewed).
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
- NewRunnableFunction(mac_util::RequestFullScreen,
- mac_util::kFullScreenModeHideAll));
+ NewRunnableFunction(base::mac::RequestFullScreen,
+ base::mac::kFullScreenModeHideAll));
}
}
@@ -55,10 +55,10 @@ void PluginProcessHost::OnPluginShowWindow(uint32 window_id,
static void ReleasePluginFullScreen(pid_t plugin_pid) {
// Releasing full screen only works if we are the frontmost process; grab
// focus, but give it back to the plugin process if requested.
- mac_util::ActivateProcess(base::GetCurrentProcId());
- mac_util::ReleaseFullScreen(mac_util::kFullScreenModeHideAll);
+ base::mac::ActivateProcess(base::GetCurrentProcId());
+ base::mac::ReleaseFullScreen(base::mac::kFullScreenModeHideAll);
if (plugin_pid != -1) {
- mac_util::ActivateProcess(plugin_pid);
+ base::mac::ActivateProcess(plugin_pid);
}
}
@@ -83,7 +83,7 @@ void PluginProcessHost::OnPluginHideWindow(uint32 window_id,
if (browser_needs_activation) {
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
- NewRunnableFunction(mac_util::ActivateProcess,
+ NewRunnableFunction(base::mac::ActivateProcess,
base::GetCurrentProcId()));
}
}
@@ -96,7 +96,7 @@ void PluginProcessHost::OnAppActivation() {
if (!plugin_modal_windows_set_.empty()) {
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
- NewRunnableFunction(mac_util::ActivateProcess, handle()));
+ NewRunnableFunction(base::mac::ActivateProcess, handle()));
}
}
@@ -105,7 +105,7 @@ void PluginProcessHost::OnPluginSetCursorVisibility(bool visible) {
plugin_cursor_visible_ = visible;
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
- NewRunnableFunction(mac_util::SetCursorVisibility,
+ NewRunnableFunction(base::mac::SetCursorVisibility,
visible));
}
}
diff --git a/chrome/browser/renderer_host/backing_store_mac.mm b/chrome/browser/renderer_host/backing_store_mac.mm
index 5754839..ede4d19 100644
--- a/chrome/browser/renderer_host/backing_store_mac.mm
+++ b/chrome/browser/renderer_host/backing_store_mac.mm
@@ -8,7 +8,7 @@
#include "app/surface/transport_dib.h"
#include "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/sys_info.h"
#include "chrome/browser/renderer_host/render_process_host.h"
@@ -69,7 +69,7 @@ void BackingStoreMac::PaintToBackingStore(
base::mac::ScopedCFTypeRef<CGImageRef> bitmap_image(
CGImageCreate(bitmap_rect.width(), bitmap_rect.height(), 8, 32,
- 4 * bitmap_rect.width(), mac_util::GetSystemColorSpace(),
+ 4 * bitmap_rect.width(), base::mac::GetSystemColorSpace(),
kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host,
data_provider, NULL, false, kCGRenderingIntentDefault));
@@ -233,7 +233,7 @@ CGContextRef BackingStoreMac::CreateCGBitmapContext() {
CGContextRef context = CGBitmapContextCreate(NULL,
size().width(), size().height(),
8, size().width() * 4,
- mac_util::GetSystemColorSpace(),
+ base::mac::GetSystemColorSpace(),
kCGImageAlphaPremultipliedFirst |
kCGBitmapByteOrder32Host);
DCHECK(context);
diff --git a/chrome/browser/shell_integration_mac.mm b/chrome/browser/shell_integration_mac.mm
index 035507b..15258a9 100644
--- a/chrome/browser/shell_integration_mac.mm
+++ b/chrome/browser/shell_integration_mac.mm
@@ -4,13 +4,13 @@
#include "chrome/browser/shell_integration.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#import "third_party/mozilla/NSWorkspace+Utils.h"
// Sets Chromium as default browser (only for current user). Returns false if
// this operation fails (which we can't check for).
bool ShellIntegration::SetAsDefaultBrowser() {
- // We really do want the main bundle here, not mac_util::MainAppBundle(),
+ // We really do want the main bundle here, not base::mac::MainAppBundle(),
// which is the bundle for the framework.
NSString* identifier = [[NSBundle mainBundle] bundleIdentifier];
[[NSWorkspace sharedWorkspace] setDefaultBrowserWithIdentifier:identifier];
diff --git a/chrome/browser/ui/cocoa/about_ipc_controller.mm b/chrome/browser/ui/cocoa/about_ipc_controller.mm
index f7f7c31..89e0db7 100644
--- a/chrome/browser/ui/cocoa/about_ipc_controller.mm
+++ b/chrome/browser/ui/cocoa/about_ipc_controller.mm
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
#include "base/time.h"
@@ -86,7 +86,7 @@ AboutIPCController* gSharedController = nil;
}
- (id)init {
- NSString* nibpath = [mac_util::MainAppBundle() pathForResource:@"AboutIPC"
+ NSString* nibpath = [base::mac::MainAppBundle() pathForResource:@"AboutIPC"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
// Default to all on
diff --git a/chrome/browser/ui/cocoa/about_window_controller.mm b/chrome/browser/ui/cocoa/about_window_controller.mm
index f6da6ab..d87b5c1 100644
--- a/chrome/browser/ui/cocoa/about_window_controller.mm
+++ b/chrome/browser/ui/cocoa/about_window_controller.mm
@@ -8,7 +8,7 @@
#include "app/l10n_util_mac.h"
#include "app/resource_bundle.h"
#include "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
@@ -100,7 +100,7 @@ void AttributedStringAppendHyperlink(NSMutableAttributedString* attr_str,
@implementation AboutWindowController
- (id)initWithProfile:(Profile*)profile {
- NSString* nibPath = [mac_util::MainAppBundle() pathForResource:@"About"
+ NSString* nibPath = [base::mac::MainAppBundle() pathForResource:@"About"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibPath owner:self])) {
profile_ = profile;
@@ -128,7 +128,7 @@ void AttributedStringAppendHyperlink(NSMutableAttributedString* attr_str,
static BOOL recentShownUserActionFailedStatus = NO;
- (void)awakeFromNib {
- NSBundle* bundle = mac_util::MainAppBundle();
+ NSBundle* bundle = base::mac::MainAppBundle();
NSString* chromeVersion =
[bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"];
diff --git a/chrome/browser/ui/cocoa/animatable_image.mm b/chrome/browser/ui/cocoa/animatable_image.mm
index a73f5a4..2d09bf0 100644
--- a/chrome/browser/ui/cocoa/animatable_image.mm
+++ b/chrome/browser/ui/cocoa/animatable_image.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/ui/cocoa/animatable_image.h"
#include "base/logging.h"
-#import "base/mac_util.h"
+#import "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
#import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h"
@@ -131,7 +131,7 @@
// rasterize PDF resources.
- (void)setLayerContents:(CALayer*)layer {
base::mac::ScopedCFTypeRef<CGImageRef> image(
- mac_util::CopyNSImageToCGImage(image_.get()));
+ base::mac::CopyNSImageToCGImage(image_.get()));
// Create the layer that will be animated.
[layer setContents:(id)image.get()];
}
diff --git a/chrome/browser/ui/cocoa/authorization_util.mm b/chrome/browser/ui/cocoa/authorization_util.mm
index 5893711..9c434f3 100644
--- a/chrome/browser/ui/cocoa/authorization_util.mm
+++ b/chrome/browser/ui/cocoa/authorization_util.mm
@@ -12,7 +12,7 @@
#include "base/basictypes.h"
#include "base/eintr_wrapper.h"
#include "base/logging.h"
-#import "base/mac_util.h"
+#import "base/mac/mac_util.h"
#include "base/string_number_conversions.h"
#include "base/string_util.h"
#include "chrome/browser/ui/cocoa/scoped_authorizationref.h"
@@ -41,14 +41,14 @@ AuthorizationRef AuthorizationCreateToRunAsRoot(CFStringRef prompt) {
// product_logo_32.png is used instead of app.icns because Authorization
// Services can't deal with .icns files.
NSString* icon_path =
- [mac_util::MainAppBundle() pathForResource:@"product_logo_32"
+ [base::mac::MainAppBundle() pathForResource:@"product_logo_32"
ofType:@"png"];
const char* icon_path_c = [icon_path fileSystemRepresentation];
size_t icon_path_length = icon_path_c ? strlen(icon_path_c) : 0;
// The OS will append " Type an administrator's name and password to allow
// <CFBundleDisplayName> to make changes."
- NSString* prompt_ns = mac_util::CFToNSCast(prompt);
+ NSString* prompt_ns = base::mac::CFToNSCast(prompt);
const char* prompt_c = [prompt_ns UTF8String];
size_t prompt_length = prompt_c ? strlen(prompt_c) : 0;
diff --git a/chrome/browser/ui/cocoa/base_bubble_controller.mm b/chrome/browser/ui/cocoa/base_bubble_controller.mm
index 3c1e9d2..768e9f1 100644
--- a/chrome/browser/ui/cocoa/base_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/base_bubble_controller.mm
@@ -6,7 +6,7 @@
#include "app/l10n_util.h"
#include "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/scoped_nsobject.h"
#include "base/string_util.h"
#import "chrome/browser/ui/cocoa/info_bubble_view.h"
@@ -54,7 +54,7 @@ class Bridge : public NotificationObserver {
- (id)initWithWindowNibPath:(NSString*)nibPath
parentWindow:(NSWindow*)parentWindow
anchoredAt:(NSPoint)anchoredAt {
- nibPath = [mac_util::MainAppBundle() pathForResource:nibPath
+ nibPath = [base::mac::MainAppBundle() pathForResource:nibPath
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibPath owner:self])) {
parentWindow_ = parentWindow;
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
index c08aae0..261c742 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.mm
@@ -6,7 +6,7 @@
#include "app/l10n_util_mac.h"
#include "app/resource_bundle.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_editor.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
@@ -211,7 +211,7 @@ const NSTimeInterval kBookmarkBarAnimationDuration = 0.12;
delegate:(id<BookmarkBarControllerDelegate>)delegate
resizeDelegate:(id<ViewResizer>)resizeDelegate {
if ((self = [super initWithNibName:@"BookmarkBar"
- bundle:mac_util::MainAppBundle()])) {
+ bundle:base::mac::MainAppBundle()])) {
// Initialize to an invalid state.
visualState_ = bookmarks::kInvalidState;
lastVisualState_ = bookmarks::kInvalidState;
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
index b86aab9..86420c2 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h"
#include "app/mac/nsimage_cache.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/bookmarks/bookmark_utils.h"
@@ -114,7 +114,7 @@ const CGFloat kScrollWindowVerticalMargin = 0.0;
parentController:(BookmarkBarFolderController*)parentController
barController:(BookmarkBarController*)barController {
NSString* nibPath =
- [mac_util::MainAppBundle() pathForResource:@"BookmarkBarFolderWindow"
+ [base::mac::MainAppBundle() pathForResource:@"BookmarkBarFolderWindow"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibPath owner:self])) {
parentButton_.reset([button retain]);
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm
index ae66081..82258da 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller.h"
#include "app/l10n_util_mac.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h" // TODO(viettrungluu): remove
#include "chrome/browser/bookmarks/bookmark_model.h"
@@ -88,7 +88,7 @@ void BookmarkBubbleNotificationBridge::Observe(
node:(const BookmarkNode*)node
alreadyBookmarked:(BOOL)alreadyBookmarked {
NSString* nibPath =
- [mac_util::MainAppBundle() pathForResource:@"BookmarkBubble"
+ [base::mac::MainAppBundle() pathForResource:@"BookmarkBubble"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibPath owner:self])) {
parentWindow_ = parentWindow;
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.mm
index ffc9d69..8cce1b4 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_editor_base_controller.mm
@@ -9,7 +9,7 @@
#include "app/l10n_util.h"
#include "app/l10n_util_mac.h"
#include "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/profiles/profile.h"
@@ -161,7 +161,7 @@ class BookmarkEditorBaseControllerBridge : public BookmarkModelObserver {
profile:(Profile*)profile
parent:(const BookmarkNode*)parent
configuration:(BookmarkEditor::Configuration)configuration {
- NSString* nibpath = [mac_util::MainAppBundle()
+ NSString* nibpath = [base::mac::MainAppBundle()
pathForResource:nibName
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.mm
index b4f23d2..4db77eb 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_name_folder_controller.mm
@@ -6,7 +6,7 @@
#include "app/l10n_util.h"
#include "app/l10n_util_mac.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/cocoa/bookmarks/bookmark_model_observer_for_cocoa.h"
@@ -20,7 +20,7 @@
node:(const BookmarkNode*)node
parent:(const BookmarkNode*)parent
newIndex:(int)newIndex {
- NSString* nibpath = [mac_util::MainAppBundle()
+ NSString* nibpath = [base::mac::MainAppBundle()
pathForResource:@"BookmarkNameFolder"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm
index 589ed91..6240065 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
@@ -10,7 +10,7 @@
#include "app/l10n_util_mac.h"
#include "app/mac/scoped_nsdisable_screen_updates.h"
#include "app/mac/nsimage_cache.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#import "base/scoped_nsobject.h"
#include "base/sys_string_conversions.h"
#include "chrome/app/chrome_command_ids.h" // IDC_*
@@ -219,7 +219,7 @@
- (id)initWithBrowser:(Browser*)browser takeOwnership:(BOOL)ownIt {
// Use initWithWindowNibPath:: instead of initWithWindowNibName: so we
// can override it in a unit test.
- NSString* nibpath = [mac_util::MainAppBundle()
+ NSString* nibpath = [base::mac::MainAppBundle()
pathForResource:@"BrowserWindow"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_private.mm b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
index 702c52b..98f1718 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
@@ -4,7 +4,6 @@
#import "chrome/browser/ui/cocoa/browser_window_controller_private.h"
-#include "base/mac_util.h"
#import "base/scoped_nsobject.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/prefs/pref_service.h"
diff --git a/chrome/browser/ui/cocoa/bug_report_window_controller.mm b/chrome/browser/ui/cocoa/bug_report_window_controller.mm
index 82b3a36..5ea378a 100644
--- a/chrome/browser/ui/cocoa/bug_report_window_controller.mm
+++ b/chrome/browser/ui/cocoa/bug_report_window_controller.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/ui/cocoa/bug_report_window_controller.h"
#include "app/l10n_util_mac.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/bug_report_util.h"
#include "chrome/browser/tab_contents/tab_contents.h"
@@ -26,7 +26,7 @@
- (id)initWithTabContents:(TabContents*)currentTab
profile:(Profile*)profile {
- NSString* nibpath = [mac_util::MainAppBundle() pathForResource:@"ReportBug"
+ NSString* nibpath = [base::mac::MainAppBundle() pathForResource:@"ReportBug"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
currentTab_ = currentTab;
@@ -62,7 +62,7 @@
[self setPageURL:base::SysUTF8ToNSString(
currentTab_->controller().GetActiveEntry()->url().spec())];
[self setPageTitle:base::SysUTF16ToNSString(currentTab_->GetTitle())];
- mac_util::GrabWindowSnapshot(
+ base::mac::GrabWindowSnapshot(
currentTab_->view()->GetTopLevelNativeWindow(), &pngData_,
&pngWidth_, &pngHeight_);
} else {
diff --git a/chrome/browser/ui/cocoa/chrome_event_processing_window_unittest.mm b/chrome/browser/ui/cocoa/chrome_event_processing_window_unittest.mm
index 9cbb8e0..f2fd657 100644
--- a/chrome/browser/ui/cocoa/chrome_event_processing_window_unittest.mm
+++ b/chrome/browser/ui/cocoa/chrome_event_processing_window_unittest.mm
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <Carbon/Carbon.h>
+
#include "base/debug/debugger.h"
#include "base/scoped_nsobject.h"
#include "chrome/app/chrome_command_ids.h"
diff --git a/chrome/browser/ui/cocoa/clear_browsing_data_controller.mm b/chrome/browser/ui/cocoa/clear_browsing_data_controller.mm
index c0c927e..0ced443 100644
--- a/chrome/browser/ui/cocoa/clear_browsing_data_controller.mm
+++ b/chrome/browser/ui/cocoa/clear_browsing_data_controller.mm
@@ -6,7 +6,7 @@
#include "app/l10n_util.h"
#include "base/lazy_instance.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/scoped_nsobject.h"
#include "chrome/browser/browsing_data_remover.h"
#include "chrome/browser/prefs/pref_service.h"
@@ -98,7 +98,7 @@ static base::LazyInstance<ProfileControllerMap> g_profile_controller_map(
DCHECK(profile);
// Use initWithWindowNibPath:: instead of initWithWindowNibName: so we
// can override it in a unit test.
- NSString *nibpath = [mac_util::MainAppBundle()
+ NSString *nibpath = [base::mac::MainAppBundle()
pathForResource:@"ClearBrowsingData"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
diff --git a/chrome/browser/ui/cocoa/cocoa_test_helper.h b/chrome/browser/ui/cocoa/cocoa_test_helper.h
index f6c9bb8..d7eb150 100644
--- a/chrome/browser/ui/cocoa/cocoa_test_helper.h
+++ b/chrome/browser/ui/cocoa/cocoa_test_helper.h
@@ -8,7 +8,6 @@
#import <Cocoa/Cocoa.h>
-#include "base/mac_util.h"
#include "base/path_service.h"
#import "base/mac/scoped_nsautorelease_pool.h"
#import "base/scoped_nsobject.h"
diff --git a/chrome/browser/ui/cocoa/cocoa_test_helper.mm b/chrome/browser/ui/cocoa/cocoa_test_helper.mm
index 2cd2cc0..b4c68d9 100644
--- a/chrome/browser/ui/cocoa/cocoa_test_helper.mm
+++ b/chrome/browser/ui/cocoa/cocoa_test_helper.mm
@@ -6,6 +6,7 @@
#include "base/debug/debugger.h"
#include "base/logging.h"
+#include "base/mac/mac_util.h"
#include "base/test/test_timeouts.h"
#import "chrome/browser/chrome_browser_application_mac.h"
@@ -79,7 +80,7 @@ void CocoaTest::BootstrapCocoa() {
FilePath path;
PathService::Get(base::DIR_EXE, &path);
path = path.Append(chrome::kFrameworkName);
- mac_util::SetOverrideAppBundlePath(path);
+ base::mac::SetOverrideAppBundlePath(path);
// Bootstrap Cocoa. It's very unhappy without this.
[CrApplication sharedApplication];
@@ -131,7 +132,8 @@ void CocoaTest::TearDown() {
(spins < kCloseSpins || one_more_time)) {
// Check the timeout before pumping events, so that we'll spin
// the loop once after the timeout.
- one_more_time = ([start_date timeIntervalSinceNow] > -kCloseTimeoutSeconds);
+ one_more_time =
+ ([start_date timeIntervalSinceNow] > -kCloseTimeoutSeconds);
// Autorelease anything thrown up by the event loop.
{
diff --git a/chrome/browser/ui/cocoa/collected_cookies_mac.mm b/chrome/browser/ui/cocoa/collected_cookies_mac.mm
index 23ff4a5..ef19437 100644
--- a/chrome/browser/ui/cocoa/collected_cookies_mac.mm
+++ b/chrome/browser/ui/cocoa/collected_cookies_mac.mm
@@ -8,7 +8,7 @@
#include "app/l10n_util_mac.h"
#include "app/resource_bundle.h"
-#import "base/mac_util.h"
+#import "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/tab_contents/tab_contents.h"
@@ -137,7 +137,7 @@ void CollectedCookiesMac::OnSheetDidEnd(NSWindow* sheet) {
tabContents_ = tabContents;
NSString* nibpath =
- [mac_util::MainAppBundle() pathForResource:@"CollectedCookies"
+ [base::mac::MainAppBundle() pathForResource:@"CollectedCookies"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
[self loadTreeModelFromTabContents];
diff --git a/chrome/browser/ui/cocoa/confirm_quit_panel_controller.mm b/chrome/browser/ui/cocoa/confirm_quit_panel_controller.mm
index 548b83a..6ad363b 100644
--- a/chrome/browser/ui/cocoa/confirm_quit_panel_controller.mm
+++ b/chrome/browser/ui/cocoa/confirm_quit_panel_controller.mm
@@ -6,7 +6,7 @@
#import <QuartzCore/QuartzCore.h>
#include "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/scoped_nsobject.h"
#import "chrome/browser/ui/cocoa/confirm_quit_panel_controller.h"
@@ -29,7 +29,7 @@ ConfirmQuitPanelController* g_confirmQuitPanelController = nil;
- (id)initInternal {
NSString* nibPath =
- [mac_util::MainAppBundle() pathForResource:@"ConfirmQuitPanel"
+ [base::mac::MainAppBundle() pathForResource:@"ConfirmQuitPanel"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibPath owner:self])) {
}
diff --git a/chrome/browser/ui/cocoa/content_exceptions_window_controller.mm b/chrome/browser/ui/cocoa/content_exceptions_window_controller.mm
index e9a426f6..eaced8e 100644
--- a/chrome/browser/ui/cocoa/content_exceptions_window_controller.mm
+++ b/chrome/browser/ui/cocoa/content_exceptions_window_controller.mm
@@ -8,7 +8,7 @@
#include "app/l10n_util_mac.h"
#include "app/table_model_observer.h"
#include "base/command_line.h"
-#import "base/mac_util.h"
+#import "base/mac/mac_util.h"
#import "base/scoped_nsobject.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/content_exceptions_table_model.h"
@@ -151,7 +151,7 @@ static ContentExceptionsWindowController*
settingsMap:(HostContentSettingsMap*)settingsMap
otrSettingsMap:(HostContentSettingsMap*)otrSettingsMap {
NSString* nibpath =
- [mac_util::MainAppBundle() pathForResource:@"ContentExceptionsWindow"
+ [base::mac::MainAppBundle() pathForResource:@"ContentExceptionsWindow"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
settingsType_ = settingsType;
diff --git a/chrome/browser/ui/cocoa/content_settings_dialog_controller.mm b/chrome/browser/ui/cocoa/content_settings_dialog_controller.mm
index f61c77a..1fb432e 100644
--- a/chrome/browser/ui/cocoa/content_settings_dialog_controller.mm
+++ b/chrome/browser/ui/cocoa/content_settings_dialog_controller.mm
@@ -8,7 +8,7 @@
#include "app/l10n_util.h"
#include "base/command_line.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#import "chrome/browser/content_settings/content_settings_details.h"
#import "chrome/browser/content_settings/host_content_settings_map.h"
#import "chrome/browser/geolocation/geolocation_content_settings_map.h"
@@ -145,7 +145,7 @@ class PrefObserverDisabler {
- (id)initWithProfile:(Profile*)profile {
DCHECK(profile);
NSString* nibpath =
- [mac_util::MainAppBundle() pathForResource:@"ContentSettings"
+ [base::mac::MainAppBundle() pathForResource:@"ContentSettings"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
profile_ = profile;
diff --git a/chrome/browser/ui/cocoa/cookie_details_view_controller.mm b/chrome/browser/ui/cocoa/cookie_details_view_controller.mm
index 9f47a54..d3e1ea5 100644
--- a/chrome/browser/ui/cocoa/cookie_details_view_controller.mm
+++ b/chrome/browser/ui/cocoa/cookie_details_view_controller.mm
@@ -6,7 +6,7 @@
#include "app/l10n_util_mac.h"
#include "app/resource_bundle.h"
-#import "base/mac_util.h"
+#import "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
#import "chrome/browser/ui/cocoa/cookie_tree_node.h"
#import "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h"
@@ -22,7 +22,7 @@ static const int kExtraMarginBelowWhenExpirationEditable = 5;
- (id)init {
return [super initWithNibName:@"CookieDetailsView"
- bundle:mac_util::MainAppBundle()];
+ bundle:base::mac::MainAppBundle()];
}
- (void)awakeFromNib {
diff --git a/chrome/browser/ui/cocoa/cookies_window_controller.mm b/chrome/browser/ui/cocoa/cookies_window_controller.mm
index bf1bf68..5e5f74f 100644
--- a/chrome/browser/ui/cocoa/cookies_window_controller.mm
+++ b/chrome/browser/ui/cocoa/cookies_window_controller.mm
@@ -9,7 +9,7 @@
#include "app/l10n_util_mac.h"
#include "app/resource_bundle.h"
-#import "base/mac_util.h"
+#import "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/browsing_data_remover.h"
#include "chrome/browser/profiles/profile.h"
@@ -168,7 +168,7 @@ bool CookiesTreeModelObserverBridge::HasCocoaModel() {
appcacheHelper:(BrowsingDataAppCacheHelper*)appcacheHelper
indexedDBHelper:(BrowsingDataIndexedDBHelper*)indexedDBHelper {
DCHECK(profile);
- NSString* nibpath = [mac_util::MainAppBundle() pathForResource:@"Cookies"
+ NSString* nibpath = [base::mac::MainAppBundle() pathForResource:@"Cookies"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
profile_ = profile;
diff --git a/chrome/browser/ui/cocoa/download/download_item_cell.mm b/chrome/browser/ui/cocoa/download/download_item_cell.mm
index d2a8335..db5d5fa 100644
--- a/chrome/browser/ui/cocoa/download/download_item_cell.mm
+++ b/chrome/browser/ui/cocoa/download/download_item_cell.mm
@@ -6,7 +6,6 @@
#include "app/l10n_util.h"
#include "app/text_elider.h"
-#include "base/mac_util.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/download/download_item.h"
#include "chrome/browser/download/download_item_model.h"
diff --git a/chrome/browser/ui/cocoa/download/download_item_controller.mm b/chrome/browser/ui/cocoa/download/download_item_controller.mm
index be0be80..23603f8 100644
--- a/chrome/browser/ui/cocoa/download/download_item_controller.mm
+++ b/chrome/browser/ui/cocoa/download/download_item_controller.mm
@@ -7,7 +7,7 @@
#include "app/l10n_util_mac.h"
#include "app/resource_bundle.h"
#include "app/text_elider.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/metrics/histogram.h"
#include "base/string16.h"
#include "base/string_util.h"
@@ -98,7 +98,7 @@ class DownloadShelfContextMenuMac : public DownloadShelfContextMenu {
- (id)initWithModel:(BaseDownloadItemModel*)downloadModel
shelf:(DownloadShelfController*)shelf {
if ((self = [super initWithNibName:@"DownloadItem"
- bundle:mac_util::MainAppBundle()])) {
+ bundle:base::mac::MainAppBundle()])) {
// Must be called before [self view], so that bridge_ is set in awakeFromNib
bridge_.reset(new DownloadItemMac(downloadModel, self));
menuBridge_.reset(new DownloadShelfContextMenuMac(downloadModel));
diff --git a/chrome/browser/ui/cocoa/download/download_shelf_controller.mm b/chrome/browser/ui/cocoa/download/download_shelf_controller.mm
index 4238b98..f88071f 100644
--- a/chrome/browser/ui/cocoa/download/download_shelf_controller.mm
+++ b/chrome/browser/ui/cocoa/download/download_shelf_controller.mm
@@ -6,7 +6,7 @@
#include "app/l10n_util.h"
#include "app/resource_bundle.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/download/download_item.h"
#include "chrome/browser/download/download_manager.h"
@@ -83,7 +83,7 @@ const NSTimeInterval kAutoCloseDelaySeconds = 5;
- (id)initWithBrowser:(Browser*)browser
resizeDelegate:(id<ViewResizer>)resizeDelegate {
if ((self = [super initWithNibName:@"DownloadShelf"
- bundle:mac_util::MainAppBundle()])) {
+ bundle:base::mac::MainAppBundle()])) {
resizeDelegate_ = resizeDelegate;
maxShelfHeight_ = NSHeight([[self view] bounds]);
currentShelfHeight_ = maxShelfHeight_;
diff --git a/chrome/browser/ui/cocoa/edit_search_engine_cocoa_controller.mm b/chrome/browser/ui/cocoa/edit_search_engine_cocoa_controller.mm
index 06fc94b..7d83c74 100644
--- a/chrome/browser/ui/cocoa/edit_search_engine_cocoa_controller.mm
+++ b/chrome/browser/ui/cocoa/edit_search_engine_cocoa_controller.mm
@@ -7,7 +7,7 @@
#include "app/l10n_util_mac.h"
#include "app/resource_bundle.h"
#include "base/logging.h"
-#import "base/mac_util.h"
+#import "base/mac/mac_util.h"
#include "base/string16.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/search_engines/template_url.h"
@@ -32,7 +32,7 @@ void ShiftOriginY(NSView* view, CGFloat amount) {
delegate:(EditSearchEngineControllerDelegate*)delegate
templateURL:(const TemplateURL*)url {
DCHECK(profile);
- NSString* nibpath = [mac_util::MainAppBundle()
+ NSString* nibpath = [base::mac::MainAppBundle()
pathForResource:@"EditSearchEngine"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
diff --git a/chrome/browser/ui/cocoa/extension_installed_bubble_controller.mm b/chrome/browser/ui/cocoa/extension_installed_bubble_controller.mm
index f417ff7..ad30096 100644
--- a/chrome/browser/ui/cocoa/extension_installed_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/extension_installed_bubble_controller.mm
@@ -6,7 +6,7 @@
#include "app/l10n_util.h"
#include "base/i18n/rtl.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/ui/cocoa/browser_window_cocoa.h"
@@ -80,7 +80,7 @@ class ExtensionLoadedNotificationObserver : public NotificationObserver {
browser:(Browser*)browser
icon:(SkBitmap)icon {
NSString* nibPath =
- [mac_util::MainAppBundle() pathForResource:@"ExtensionInstalledBubble"
+ [base::mac::MainAppBundle() pathForResource:@"ExtensionInstalledBubble"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibPath owner:self])) {
DCHECK(parentWindow);
diff --git a/chrome/browser/ui/cocoa/extensions/extension_install_prompt_controller.mm b/chrome/browser/ui/cocoa/extensions/extension_install_prompt_controller.mm
index e40fcd4..09dc927 100644
--- a/chrome/browser/ui/cocoa/extensions/extension_install_prompt_controller.mm
+++ b/chrome/browser/ui/cocoa/extensions/extension_install_prompt_controller.mm
@@ -6,7 +6,7 @@
#include "app/l10n_util.h"
#include "app/l10n_util_mac.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
@@ -67,11 +67,11 @@ void OffsetControlVertically(NSControl* control, CGFloat amount) {
// We use a different XIB in the case of no warnings, that is a little bit
// more nicely laid out.
if (warnings.empty()) {
- nibpath = [mac_util::MainAppBundle()
+ nibpath = [base::mac::MainAppBundle()
pathForResource:@"ExtensionInstallPromptNoWarnings"
ofType:@"nib"];
} else {
- nibpath = [mac_util::MainAppBundle()
+ nibpath = [base::mac::MainAppBundle()
pathForResource:@"ExtensionInstallPrompt"
ofType:@"nib"];
}
diff --git a/chrome/browser/ui/cocoa/file_metadata.mm b/chrome/browser/ui/cocoa/file_metadata.mm
index d19e3ac..ca199a5 100644
--- a/chrome/browser/ui/cocoa/file_metadata.mm
+++ b/chrome/browser/ui/cocoa/file_metadata.mm
@@ -9,7 +9,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 "googleurl/src/gurl.h"
@@ -98,7 +98,7 @@ void AddOriginMetadataToFile(const FilePath& file, const GURL& source,
void AddQuarantineMetadataToFile(const FilePath& file, const GURL& source,
const GURL& referrer) {
FSRef file_ref;
- if (!mac_util::FSRefFromPath(file.value(), &file_ref))
+ if (!base::mac::FSRefFromPath(file.value(), &file_ref))
return;
NSMutableDictionary* quarantine_properties = nil;
diff --git a/chrome/browser/ui/cocoa/find_bar_cocoa_controller.mm b/chrome/browser/ui/cocoa/find_bar_cocoa_controller.mm
index 05e5397..f8a40442 100644
--- a/chrome/browser/ui/cocoa/find_bar_cocoa_controller.mm
+++ b/chrome/browser/ui/cocoa/find_bar_cocoa_controller.mm
@@ -4,7 +4,7 @@
#import <Cocoa/Cocoa.h>
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/tab_contents/tab_contents.h"
@@ -42,7 +42,7 @@ const float kFindBarCloseDuration = 0.15;
- (id)init {
if ((self = [super initWithNibName:@"FindBar"
- bundle:mac_util::MainAppBundle()])) {
+ bundle:base::mac::MainAppBundle()])) {
[[NSNotificationCenter defaultCenter]
addObserver:self
selector:@selector(findPboardUpdated:)
diff --git a/chrome/browser/ui/cocoa/first_run_dialog.mm b/chrome/browser/ui/cocoa/first_run_dialog.mm
index 9590b9b..ed5d5b0 100644
--- a/chrome/browser/ui/cocoa/first_run_dialog.mm
+++ b/chrome/browser/ui/cocoa/first_run_dialog.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/ui/cocoa/first_run_dialog.h"
#include "app/l10n_util_mac.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/message_loop.h"
#include "base/ref_counted.h"
#include "grit/locale_settings.h"
@@ -58,7 +58,7 @@ void FirstRunShowBridge::ShowDialog() {
- (id)init {
NSString* nibpath =
- [mac_util::MainAppBundle() pathForResource:@"FirstRunDialog"
+ [base::mac::MainAppBundle() pathForResource:@"FirstRunDialog"
ofType:@"nib"];
self = [super initWithWindowNibPath:nibpath owner:self];
if (self != nil) {
diff --git a/chrome/browser/ui/cocoa/floating_bar_backing_view.mm b/chrome/browser/ui/cocoa/floating_bar_backing_view.mm
index 70f785c..695946f 100644
--- a/chrome/browser/ui/cocoa/floating_bar_backing_view.mm
+++ b/chrome/browser/ui/cocoa/floating_bar_backing_view.mm
@@ -4,7 +4,7 @@
#include "chrome/browser/ui/cocoa/floating_bar_backing_view.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#import "chrome/browser/ui/cocoa/browser_frame_view.h"
@implementation FloatingBarBackingView
@@ -44,7 +44,7 @@
// a double-click in the blank area should try to minimize, to be consistent
// with double-clicks on the contiguous tab strip area. (It'll fail and beep.)
if ([event clickCount] == 2 &&
- mac_util::ShouldWindowsMiniaturizeOnDoubleClick())
+ base::mac::ShouldWindowsMiniaturizeOnDoubleClick())
[[self window] performMiniaturize:self];
}
diff --git a/chrome/browser/ui/cocoa/font_language_settings_controller.mm b/chrome/browser/ui/cocoa/font_language_settings_controller.mm
index 4beff2a..9bb9c6b 100644
--- a/chrome/browser/ui/cocoa/font_language_settings_controller.mm
+++ b/chrome/browser/ui/cocoa/font_language_settings_controller.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/ui/cocoa/font_language_settings_controller.h"
#import <Cocoa/Cocoa.h>
-#import "base/mac_util.h"
+#import "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/character_encoding.h"
#include "chrome/browser/fonts_languages_window.h"
@@ -33,7 +33,7 @@ void ShowFontsLanguagesWindow(gfx::NativeWindow window,
- (id)initWithProfile:(Profile*)profile {
DCHECK(profile);
- NSString* nibpath = [mac_util::MainAppBundle()
+ NSString* nibpath = [base::mac::MainAppBundle()
pathForResource:@"FontLanguageSettings"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
diff --git a/chrome/browser/ui/cocoa/fullscreen_controller.h b/chrome/browser/ui/cocoa/fullscreen_controller.h
index 474d699..14aebfc 100644
--- a/chrome/browser/ui/cocoa/fullscreen_controller.h
+++ b/chrome/browser/ui/cocoa/fullscreen_controller.h
@@ -9,7 +9,7 @@
#import <Cocoa/Cocoa.h>
#import "base/mac/cocoa_protocols.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.h"
@class BrowserWindowController;
@@ -69,7 +69,7 @@
// (which can happen when a fullscreen window is closed). Used to track the
// current state and make sure we properly restore the menu bar when this
// controller is destroyed.
- mac_util::FullScreenMode currentFullscreenMode_;
+ base::mac::FullScreenMode currentFullscreenMode_;
}
@property(readonly, nonatomic) BOOL isFullscreen;
diff --git a/chrome/browser/ui/cocoa/fullscreen_controller.mm b/chrome/browser/ui/cocoa/fullscreen_controller.mm
index 0f06e22..186ea78 100644
--- a/chrome/browser/ui/cocoa/fullscreen_controller.mm
+++ b/chrome/browser/ui/cocoa/fullscreen_controller.mm
@@ -6,6 +6,7 @@
#include <algorithm>
+#import "base/mac/mac_util.h"
#import "chrome/browser/ui/cocoa/browser_window_controller.h"
#import "third_party/GTM/AppKit/GTMNSAnimation+Duration.h"
@@ -102,7 +103,7 @@ const CGFloat kFloatingBarVerticalOffset = 22;
// Returns |kFullScreenModeHideAll| when the overlay is hidden and
// |kFullScreenModeHideDock| when the overlay is shown.
-- (mac_util::FullScreenMode)desiredFullscreenMode;
+- (base::mac::FullScreenMode)desiredFullscreenMode;
// Change the overlay to the given fraction, with or without animation. Only
// guaranteed to work properly with |fraction == 0| or |fraction == 1|. This
@@ -166,7 +167,7 @@ const CGFloat kFloatingBarVerticalOffset = 22;
- (id)initWithBrowserController:(BrowserWindowController*)controller {
if ((self == [super init])) {
browserController_ = controller;
- currentFullscreenMode_ = mac_util::kFullScreenModeNormal;
+ currentFullscreenMode_ = base::mac::kFullScreenModeNormal;
}
// Let the world know what we're up to.
@@ -315,12 +316,12 @@ const CGFloat kFloatingBarVerticalOffset = 22;
- (void)changeFloatingBarShownFraction:(CGFloat)fraction {
[browserController_ setFloatingBarShownFraction:fraction];
- mac_util::FullScreenMode desiredMode = [self desiredFullscreenMode];
+ base::mac::FullScreenMode desiredMode = [self desiredFullscreenMode];
if (desiredMode != currentFullscreenMode_ && [self shouldToggleMenuBar]) {
- if (currentFullscreenMode_ == mac_util::kFullScreenModeNormal)
- mac_util::RequestFullScreen(desiredMode);
+ if (currentFullscreenMode_ == base::mac::kFullScreenModeNormal)
+ base::mac::RequestFullScreen(desiredMode);
else
- mac_util::SwitchFullScreenModes(currentFullscreenMode_, desiredMode);
+ base::mac::SwitchFullScreenModes(currentFullscreenMode_, desiredMode);
currentFullscreenMode_ = desiredMode;
}
}
@@ -405,10 +406,10 @@ const CGFloat kFloatingBarVerticalOffset = 22;
[[browserController_ window] isMainWindow];
}
-- (mac_util::FullScreenMode)desiredFullscreenMode {
+- (base::mac::FullScreenMode)desiredFullscreenMode {
if ([browserController_ floatingBarShownFraction] >= 1.0)
- return mac_util::kFullScreenModeHideDock;
- return mac_util::kFullScreenModeHideAll;
+ return base::mac::kFullScreenModeHideDock;
+ return base::mac::kFullScreenModeHideAll;
}
- (void)changeOverlayToFraction:(CGFloat)fraction
@@ -608,13 +609,13 @@ const CGFloat kFloatingBarVerticalOffset = 22;
}
- (void)showActiveWindowUI {
- DCHECK_EQ(currentFullscreenMode_, mac_util::kFullScreenModeNormal);
- if (currentFullscreenMode_ != mac_util::kFullScreenModeNormal)
+ DCHECK_EQ(currentFullscreenMode_, base::mac::kFullScreenModeNormal);
+ if (currentFullscreenMode_ != base::mac::kFullScreenModeNormal)
return;
if ([self shouldToggleMenuBar]) {
- mac_util::FullScreenMode desiredMode = [self desiredFullscreenMode];
- mac_util::RequestFullScreen(desiredMode);
+ base::mac::FullScreenMode desiredMode = [self desiredFullscreenMode];
+ base::mac::RequestFullScreen(desiredMode);
currentFullscreenMode_ = desiredMode;
}
@@ -622,9 +623,9 @@ const CGFloat kFloatingBarVerticalOffset = 22;
}
- (void)hideActiveWindowUI {
- if (currentFullscreenMode_ != mac_util::kFullScreenModeNormal) {
- mac_util::ReleaseFullScreen(currentFullscreenMode_);
- currentFullscreenMode_ = mac_util::kFullScreenModeNormal;
+ if (currentFullscreenMode_ != base::mac::kFullScreenModeNormal) {
+ base::mac::ReleaseFullScreen(currentFullscreenMode_);
+ currentFullscreenMode_ = base::mac::kFullScreenModeNormal;
}
// TODO(rohitrao): Remove the Exit Fullscreen button. http://crbug.com/35956
diff --git a/chrome/browser/ui/cocoa/fullscreen_window.mm b/chrome/browser/ui/cocoa/fullscreen_window.mm
index ecbb34c..ee4b881 100644
--- a/chrome/browser/ui/cocoa/fullscreen_window.mm
+++ b/chrome/browser/ui/cocoa/fullscreen_window.mm
@@ -4,7 +4,6 @@
#import "chrome/browser/ui/cocoa/fullscreen_window.h"
-#include "base/mac_util.h"
#include "chrome/browser/themes/browser_theme_provider.h"
#import "chrome/browser/ui/cocoa/themed_window.h"
diff --git a/chrome/browser/ui/cocoa/hung_renderer_controller.mm b/chrome/browser/ui/cocoa/hung_renderer_controller.mm
index 130a3f7..2c9d337 100644
--- a/chrome/browser/ui/cocoa/hung_renderer_controller.mm
+++ b/chrome/browser/ui/cocoa/hung_renderer_controller.mm
@@ -8,7 +8,7 @@
#include "app/resource_bundle.h"
#include "app/l10n_util_mac.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/process_util.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/browser_list.h"
@@ -35,7 +35,7 @@ HungRendererController* g_instance = NULL;
@implementation HungRendererController
- (id)initWithWindowNibName:(NSString*)nibName {
- NSString* nibpath = [mac_util::MainAppBundle() pathForResource:nibName
+ NSString* nibpath = [base::mac::MainAppBundle() pathForResource:nibName
ofType:@"nib"];
self = [super initWithWindowNibPath:nibpath owner:self];
if (self) {
diff --git a/chrome/browser/ui/cocoa/import_progress_dialog.mm b/chrome/browser/ui/cocoa/import_progress_dialog.mm
index 6ec0ed5..fe82f1f 100644
--- a/chrome/browser/ui/cocoa/import_progress_dialog.mm
+++ b/chrome/browser/ui/cocoa/import_progress_dialog.mm
@@ -7,7 +7,7 @@
#include "app/l10n_util.h"
#include "app/l10n_util_mac.h"
#include "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/message_loop.h"
#import "base/scoped_nsobject.h"
#import "base/sys_string_conversions.h"
@@ -57,7 +57,7 @@ NSString* keyForImportItem(importer::ImportItem item) {
observer:(ImportObserver*)observer
itemsEnabled:(int16)items {
NSString* nib_path =
- [mac_util::MainAppBundle() pathForResource:@"ImportProgressDialog"
+ [base::mac::MainAppBundle() pathForResource:@"ImportProgressDialog"
ofType:@"nib"];
self = [super initWithWindowNibPath:nib_path owner:self];
if (self != nil) {
diff --git a/chrome/browser/ui/cocoa/import_settings_dialog.mm b/chrome/browser/ui/cocoa/import_settings_dialog.mm
index 5e6da7a..d395999 100644
--- a/chrome/browser/ui/cocoa/import_settings_dialog.mm
+++ b/chrome/browser/ui/cocoa/import_settings_dialog.mm
@@ -4,7 +4,7 @@
#import "chrome/browser/ui/cocoa/import_settings_dialog.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/importer/importer_data_types.h"
#include "chrome/browser/importer/importer_list.h"
@@ -140,7 +140,7 @@ bool importSettingsDialogVisible = false;
- (id)initWithProfiles:(NSArray*)profiles {
NSString* nibpath =
- [mac_util::MainAppBundle() pathForResource:@"ImportSettingsDialog"
+ [base::mac::MainAppBundle() pathForResource:@"ImportSettingsDialog"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
sourceBrowsersList_.reset([profiles retain]);
diff --git a/chrome/browser/ui/cocoa/importer_lock_dialog.mm b/chrome/browser/ui/cocoa/importer_lock_dialog.mm
index cc94ce5..2a140ae 100644
--- a/chrome/browser/ui/cocoa/importer_lock_dialog.mm
+++ b/chrome/browser/ui/cocoa/importer_lock_dialog.mm
@@ -7,7 +7,6 @@
#import "importer_lock_dialog.h"
#include "app/l10n_util_mac.h"
-#include "base/mac_util.h"
#include "base/message_loop.h"
#include "base/scoped_nsobject.h"
#include "chrome/browser/importer/importer.h"
diff --git a/chrome/browser/ui/cocoa/infobar_container_controller.mm b/chrome/browser/ui/cocoa/infobar_container_controller.mm
index adca3e7..3eb29dc 100644
--- a/chrome/browser/ui/cocoa/infobar_container_controller.mm
+++ b/chrome/browser/ui/cocoa/infobar_container_controller.mm
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "chrome/browser/tab_contents/infobar_delegate.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#import "chrome/browser/ui/cocoa/animatable_view.h"
@@ -71,7 +71,7 @@ class InfoBarNotificationObserver : public NotificationObserver {
- (id)initWithResizeDelegate:(id<ViewResizer>)resizeDelegate {
DCHECK(resizeDelegate);
if ((self = [super initWithNibName:@"InfoBarContainer"
- bundle:mac_util::MainAppBundle()])) {
+ bundle:base::mac::MainAppBundle()])) {
resizeDelegate_ = resizeDelegate;
infoBarObserver_.reset(new InfoBarNotificationObserver(self));
diff --git a/chrome/browser/ui/cocoa/infobar_controller.mm b/chrome/browser/ui/cocoa/infobar_controller.mm
index ae1414c..432c00b 100644
--- a/chrome/browser/ui/cocoa/infobar_controller.mm
+++ b/chrome/browser/ui/cocoa/infobar_controller.mm
@@ -5,7 +5,7 @@
#import <Cocoa/Cocoa.h>
#include "base/logging.h" // for NOTREACHED()
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/tab_contents/infobar_delegate.h"
#import "chrome/browser/ui/cocoa/animatable_view.h"
@@ -101,7 +101,7 @@ const float kAnimateCloseDuration = 0.12;
- (id)initWithDelegate:(InfoBarDelegate*)delegate {
DCHECK(delegate);
if ((self = [super initWithNibName:@"InfoBar"
- bundle:mac_util::MainAppBundle()])) {
+ bundle:base::mac::MainAppBundle()])) {
delegate_ = delegate;
}
return self;
diff --git a/chrome/browser/ui/cocoa/install_from_dmg.mm b/chrome/browser/ui/cocoa/install_from_dmg.mm
index d18e257..aa892cf 100644
--- a/chrome/browser/ui/cocoa/install_from_dmg.mm
+++ b/chrome/browser/ui/cocoa/install_from_dmg.mm
@@ -18,7 +18,7 @@
#include "base/basictypes.h"
#include "base/command_line.h"
#include "base/logging.h"
-#import "base/mac_util.h"
+#import "base/mac/mac_util.h"
#include "base/mac/scoped_nsautorelease_pool.h"
#include "chrome/browser/ui/cocoa/authorization_util.h"
#include "chrome/browser/ui/cocoa/scoped_authorizationref.h"
@@ -409,7 +409,7 @@ bool MaybeInstallFromDiskImage() {
}
NSString* installer_path =
- [mac_util::MainAppBundle() pathForResource:@"install" ofType:@"sh"];
+ [base::mac::MainAppBundle() pathForResource:@"install" ofType:@"sh"];
if (!installer_path) {
VLOG(1) << "Could not locate install.sh";
return false;
diff --git a/chrome/browser/ui/cocoa/instant_confirm_window_controller.mm b/chrome/browser/ui/cocoa/instant_confirm_window_controller.mm
index 299fd35..07405d6 100644
--- a/chrome/browser/ui/cocoa/instant_confirm_window_controller.mm
+++ b/chrome/browser/ui/cocoa/instant_confirm_window_controller.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/ui/cocoa/instant_confirm_window_controller.h"
#include "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "chrome/browser/instant/instant_confirm_dialog.h"
#include "chrome/browser/instant/instant_controller.h"
#include "chrome/browser/profiles/profile.h"
@@ -31,7 +31,7 @@ void ShowInstantConfirmDialog(gfx::NativeWindow parent, Profile* profile) {
@implementation InstantConfirmWindowController
- (id)initWithProfile:(Profile*)profile {
- NSString* nibPath = [mac_util::MainAppBundle()
+ NSString* nibPath = [base::mac::MainAppBundle()
pathForResource:@"InstantConfirm"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibPath owner:self])) {
diff --git a/chrome/browser/ui/cocoa/keystone_glue.mm b/chrome/browser/ui/cocoa/keystone_glue.mm
index 79e95fc..8ac3daf 100644
--- a/chrome/browser/ui/cocoa/keystone_glue.mm
+++ b/chrome/browser/ui/cocoa/keystone_glue.mm
@@ -12,7 +12,7 @@
#include "app/l10n_util.h"
#import "app/l10n_util_mac.h"
#include "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/mac/scoped_nsautorelease_pool.h"
#include "base/sys_string_conversions.h"
#include "base/ref_counted.h"
@@ -438,9 +438,9 @@ NSString* const kBrandKey = @"KSBrandID";
return NO;
// Load the KeystoneRegistration framework bundle if present. It lives
- // inside the framework, so use mac_util::MainAppBundle();
+ // inside the framework, so use base::mac::MainAppBundle();
NSString* ksrPath =
- [[mac_util::MainAppBundle() privateFrameworksPath]
+ [[base::mac::MainAppBundle() privateFrameworksPath]
stringByAppendingPathComponent:@"KeystoneRegistration.framework"];
NSBundle* ksrBundle = [NSBundle bundleWithPath:ksrPath];
[ksrBundle load];
@@ -722,7 +722,7 @@ NSString* const kBrandKey = @"KSBrandID";
// to files and directories.
NSFileManager* fileManager = [NSFileManager defaultManager];
NSString* executablePath = [[NSBundle mainBundle] executablePath];
- NSString* frameworkPath = [mac_util::MainAppBundle() bundlePath];
+ NSString* frameworkPath = [base::mac::MainAppBundle() bundlePath];
return ![fileManager isWritableFileAtPath:appPath_] ||
![fileManager isWritableFileAtPath:executablePath] ||
![fileManager isWritableFileAtPath:frameworkPath];
@@ -809,7 +809,7 @@ NSString* const kBrandKey = @"KSBrandID";
// However, preflight operation (and promotion) should only be asynchronous
// if the synchronous parameter is NO.
NSString* preflightPath =
- [mac_util::MainAppBundle() pathForResource:@"keystone_promote_preflight"
+ [base::mac::MainAppBundle() pathForResource:@"keystone_promote_preflight"
ofType:@"sh"];
const char* preflightPathC = [preflightPath fileSystemRepresentation];
const char* userBrandFile = NULL;
@@ -895,7 +895,7 @@ NSString* const kBrandKey = @"KSBrandID";
SEL selector = @selector(changePermissionsForPromotionWithTool:);
NSString* toolPath =
- [mac_util::MainAppBundle() pathForResource:@"keystone_promote_postflight"
+ [base::mac::MainAppBundle() pathForResource:@"keystone_promote_postflight"
ofType:@"sh"];
PerformBridge::PostPerform(self, selector, toolPath);
diff --git a/chrome/browser/ui/cocoa/keyword_editor_cocoa_controller.mm b/chrome/browser/ui/cocoa/keyword_editor_cocoa_controller.mm
index f8b3aa6..2ae0fa6 100644
--- a/chrome/browser/ui/cocoa/keyword_editor_cocoa_controller.mm
+++ b/chrome/browser/ui/cocoa/keyword_editor_cocoa_controller.mm
@@ -6,7 +6,7 @@
#import "chrome/browser/ui/cocoa/keyword_editor_cocoa_controller.h"
-#import "base/mac_util.h"
+#import "base/mac/mac_util.h"
#include "base/lazy_instance.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/browser_process.h"
@@ -146,7 +146,7 @@ static base::LazyInstance<ProfileControllerMap> g_profile_controller_map(
- (id)initWithProfile:(Profile*)profile {
DCHECK(profile);
- NSString* nibpath = [mac_util::MainAppBundle()
+ NSString* nibpath = [base::mac::MainAppBundle()
pathForResource:@"KeywordEditor"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
diff --git a/chrome/browser/ui/cocoa/location_bar/instant_opt_in_controller.mm b/chrome/browser/ui/cocoa/location_bar/instant_opt_in_controller.mm
index 17b0d15..9750caf 100644
--- a/chrome/browser/ui/cocoa/location_bar/instant_opt_in_controller.mm
+++ b/chrome/browser/ui/cocoa/location_bar/instant_opt_in_controller.mm
@@ -4,13 +4,13 @@
#import "chrome/browser/ui/cocoa/location_bar/instant_opt_in_controller.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
@implementation InstantOptInController
- (id)initWithDelegate:(InstantOptInControllerDelegate*)delegate {
if ((self = [super initWithNibName:@"InstantOptIn"
- bundle:mac_util::MainAppBundle()])) {
+ bundle:base::mac::MainAppBundle()])) {
delegate_ = delegate;
}
return self;
diff --git a/chrome/browser/ui/cocoa/notifications/balloon_controller.mm b/chrome/browser/ui/cocoa/notifications/balloon_controller.mm
index f0d914e..b7daca6f 100644
--- a/chrome/browser/ui/cocoa/notifications/balloon_controller.mm
+++ b/chrome/browser/ui/cocoa/notifications/balloon_controller.mm
@@ -8,7 +8,7 @@
#include "app/mac/nsimage_cache.h"
#include "app/resource_bundle.h"
#import "base/mac/cocoa_protocols.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#import "base/scoped_nsobject.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/notifications/balloon.h"
@@ -43,7 +43,7 @@ const int kRightMargin = 2;
- (id)initWithBalloon:(Balloon*)balloon {
NSString* nibpath =
- [mac_util::MainAppBundle() pathForResource:@"Notification"
+ [base::mac::MainAppBundle() pathForResource:@"Notification"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
balloon_ = balloon;
diff --git a/chrome/browser/ui/cocoa/nsimage_cache_unittest.mm b/chrome/browser/ui/cocoa/nsimage_cache_unittest.mm
index b00fb5b..5425125 100644
--- a/chrome/browser/ui/cocoa/nsimage_cache_unittest.mm
+++ b/chrome/browser/ui/cocoa/nsimage_cache_unittest.mm
@@ -6,7 +6,7 @@
#include "app/mac/nsimage_cache.h"
#include "base/file_path.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/path_service.h"
#include "chrome/common/chrome_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -24,10 +24,10 @@ class NSImageCacheTest : public PlatformTest {
FilePath path;
PathService::Get(base::DIR_EXE, &path);
path = path.Append(chrome::kFrameworkName);
- mac_util::SetOverrideAppBundlePath(path);
+ base::mac::SetOverrideAppBundlePath(path);
}
virtual ~NSImageCacheTest() {
- mac_util::SetOverrideAppBundle(nil);
+ base::mac::SetOverrideAppBundle(nil);
}
};
diff --git a/chrome/browser/ui/cocoa/preferences_window_controller.mm b/chrome/browser/ui/cocoa/preferences_window_controller.mm
index d582680..950ec7b 100644
--- a/chrome/browser/ui/cocoa/preferences_window_controller.mm
+++ b/chrome/browser/ui/cocoa/preferences_window_controller.mm
@@ -10,7 +10,7 @@
#include "app/l10n_util_mac.h"
#include "app/resource_bundle.h"
#include "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/mac/scoped_aedesc.h"
#include "base/string16.h"
#include "base/string_util.h"
@@ -489,7 +489,7 @@ class ManagedPrefsBannerState : public policy::ManagedPrefsBannerBase {
DCHECK(profile);
// Use initWithWindowNibPath:: instead of initWithWindowNibName: so we
// can override it in a unit test.
- NSString* nibPath = [mac_util::MainAppBundle()
+ NSString* nibPath = [base::mac::MainAppBundle()
pathForResource:@"Preferences"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibPath owner:self])) {
@@ -675,9 +675,10 @@ class ManagedPrefsBannerState : public policy::ManagedPrefsBannerBase {
verticalShift += AutoSizeGroup(basicsGroupDefaultBrowser_,
kAutoSizeGroupBehaviorVerticalFirstToFit,
verticalShift);
- verticalShift += AutoSizeGroup(basicsGroupSearchEngine_,
- kAutoSizeGroupBehaviorFirstTwoAsRowVerticalToFit,
- verticalShift);
+ verticalShift += AutoSizeGroup(
+ basicsGroupSearchEngine_,
+ kAutoSizeGroupBehaviorFirstTwoAsRowVerticalToFit,
+ verticalShift);
verticalShift += AutoSizeGroup(basicsGroupToolbar_,
kAutoSizeGroupBehaviorVerticalToFit,
verticalShift);
diff --git a/chrome/browser/ui/cocoa/previewable_contents_controller.mm b/chrome/browser/ui/cocoa/previewable_contents_controller.mm
index 2dfa146..74e29b0 100644
--- a/chrome/browser/ui/cocoa/previewable_contents_controller.mm
+++ b/chrome/browser/ui/cocoa/previewable_contents_controller.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/ui/cocoa/previewable_contents_controller.h"
#include "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "chrome/browser/tab_contents/tab_contents.h"
@implementation PreviewableContentsController
@@ -14,7 +14,7 @@
- (id)init {
if ((self = [super initWithNibName:@"PreviewableContents"
- bundle:mac_util::MainAppBundle()])) {
+ bundle:base::mac::MainAppBundle()])) {
}
return self;
}
diff --git a/chrome/browser/ui/cocoa/sad_tab_controller.mm b/chrome/browser/ui/cocoa/sad_tab_controller.mm
index ba0b102..e340a9c 100644
--- a/chrome/browser/ui/cocoa/sad_tab_controller.mm
+++ b/chrome/browser/ui/cocoa/sad_tab_controller.mm
@@ -4,7 +4,7 @@
#include "chrome/browser/ui/cocoa/sad_tab_controller.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#import "chrome/browser/ui/cocoa/sad_tab_view.h"
@implementation SadTabController
@@ -12,7 +12,7 @@
- (id)initWithTabContents:(TabContents*)someTabContents
superview:(NSView*)superview {
if ((self = [super initWithNibName:@"SadTab"
- bundle:mac_util::MainAppBundle()])) {
+ bundle:base::mac::MainAppBundle()])) {
tabContents_ = someTabContents;
NSView* view = [self view];
diff --git a/chrome/browser/ui/cocoa/search_engine_dialog_controller.mm b/chrome/browser/ui/cocoa/search_engine_dialog_controller.mm
index 2a79e09..fa53295 100644
--- a/chrome/browser/ui/cocoa/search_engine_dialog_controller.mm
+++ b/chrome/browser/ui/cocoa/search_engine_dialog_controller.mm
@@ -8,7 +8,7 @@
#include "app/l10n_util_mac.h"
#include "app/resource_bundle.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
#include "base/time.h"
#include "chrome/browser/profiles/profile.h"
@@ -68,7 +68,7 @@ void SearchEngineDialogControllerBridge::OnTemplateURLModelChanged() {
- (id)init {
NSString* nibpath =
- [mac_util::MainAppBundle() pathForResource:@"SearchEngineDialog"
+ [base::mac::MainAppBundle() pathForResource:@"SearchEngineDialog"
ofType:@"nib"];
self = [super initWithWindowNibPath:nibpath owner:self];
if (self != nil) {
diff --git a/chrome/browser/ui/cocoa/shell_dialogs_mac.mm b/chrome/browser/ui/cocoa/shell_dialogs_mac.mm
index 2148539..24b1bc9 100644
--- a/chrome/browser/ui/cocoa/shell_dialogs_mac.mm
+++ b/chrome/browser/ui/cocoa/shell_dialogs_mac.mm
@@ -15,7 +15,7 @@
#include "base/file_util.h"
#include "base/logging.h"
#import "base/mac/cocoa_protocols.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
#import "base/scoped_nsobject.h"
#include "base/sys_string_conversions.h"
@@ -289,7 +289,7 @@ NSView* SelectFileDialogImpl::GetAccessoryView(const FileTypeInfo* file_types,
DCHECK(file_types);
scoped_nsobject<NSNib> nib (
[[NSNib alloc] initWithNibNamed:@"SaveAccessoryView"
- bundle:mac_util::MainAppBundle()]);
+ bundle:base::mac::MainAppBundle()]);
if (!nib)
return nil;
diff --git a/chrome/browser/ui/cocoa/simple_content_exceptions_window_controller.mm b/chrome/browser/ui/cocoa/simple_content_exceptions_window_controller.mm
index 7beac9c..7b4c1f8 100644
--- a/chrome/browser/ui/cocoa/simple_content_exceptions_window_controller.mm
+++ b/chrome/browser/ui/cocoa/simple_content_exceptions_window_controller.mm
@@ -7,7 +7,7 @@
#include "app/l10n_util_mac.h"
#include "app/table_model_observer.h"
#include "base/logging.h"
-#import "base/mac_util.h"
+#import "base/mac/mac_util.h"
#import "base/scoped_nsobject.h"
#include "base/sys_string_conversions.h"
#include "grit/generated_resources.h"
@@ -36,7 +36,7 @@ SimpleContentExceptionsWindowController* g_exceptionWindow = nil;
}
- (id)initWithTableModel:(RemoveRowsTableModel*)model {
- NSString* nibpath = [mac_util::MainAppBundle()
+ NSString* nibpath = [base::mac::MainAppBundle()
pathForResource:@"SimpleContentExceptionsWindow"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
diff --git a/chrome/browser/ui/cocoa/speech_input_window_controller.mm b/chrome/browser/ui/cocoa/speech_input_window_controller.mm
index c490bc1..abb9128 100644
--- a/chrome/browser/ui/cocoa/speech_input_window_controller.mm
+++ b/chrome/browser/ui/cocoa/speech_input_window_controller.mm
@@ -7,9 +7,7 @@
#include "app/l10n_util_mac.h"
#include "app/resource_bundle.h"
#include "base/logging.h"
-#include "base/mac_util.h"
#include "base/sys_string_conversions.h"
-
#include "chrome/browser/ui/cocoa/info_bubble_view.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
diff --git a/chrome/browser/ui/cocoa/tab_contents_controller.mm b/chrome/browser/ui/cocoa/tab_contents_controller.mm
index c7b5cf8..f710755 100644
--- a/chrome/browser/ui/cocoa/tab_contents_controller.mm
+++ b/chrome/browser/ui/cocoa/tab_contents_controller.mm
@@ -4,7 +4,6 @@
#import "chrome/browser/ui/cocoa/tab_contents_controller.h"
-#include "base/mac_util.h"
#include "base/scoped_nsobject.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/renderer_host/render_widget_host_view.h"
diff --git a/chrome/browser/ui/cocoa/tab_controller.mm b/chrome/browser/ui/cocoa/tab_controller.mm
index 2ae2454..f05bb21 100644
--- a/chrome/browser/ui/cocoa/tab_controller.mm
+++ b/chrome/browser/ui/cocoa/tab_controller.mm
@@ -3,7 +3,7 @@
// found in the LICENSE file.
#include "app/l10n_util_mac.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#import "chrome/browser/themes/browser_theme_provider.h"
#import "chrome/browser/ui/cocoa/menu_controller.h"
#import "chrome/browser/ui/cocoa/tab_controller.h"
@@ -73,7 +73,7 @@ class MenuDelegate : public menus::SimpleMenuModel::Delegate {
}
- (id)init {
- self = [super initWithNibName:@"TabView" bundle:mac_util::MainAppBundle()];
+ self = [super initWithNibName:@"TabView" bundle:base::mac::MainAppBundle()];
if (self != nil) {
isIconShowing_ = YES;
NSNotificationCenter* defaultCenter = [NSNotificationCenter defaultCenter];
diff --git a/chrome/browser/ui/cocoa/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tab_strip_controller.mm
index 826910c..fa9f037 100644
--- a/chrome/browser/ui/cocoa/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tab_strip_controller.mm
@@ -12,7 +12,6 @@
#include "app/l10n_util.h"
#include "app/mac/nsimage_cache.h"
#include "app/resource_bundle.h"
-#include "base/mac_util.h"
#include "base/sys_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/autocomplete/autocomplete.h"
diff --git a/chrome/browser/ui/cocoa/tab_strip_view.mm b/chrome/browser/ui/cocoa/tab_strip_view.mm
index 2456362..857da65 100644
--- a/chrome/browser/ui/cocoa/tab_strip_view.mm
+++ b/chrome/browser/ui/cocoa/tab_strip_view.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/ui/cocoa/tab_strip_view.h"
#include "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "chrome/browser/themes/browser_theme_provider.h"
#import "chrome/browser/ui/cocoa/browser_window_controller.h"
#import "chrome/browser/ui/cocoa/tab_strip_controller.h"
@@ -156,7 +156,7 @@
// "short" as 0.8 seconds. (Measuring up-to-up isn't enough to properly
// detect double-clicks, but we're actually using Cocoa for that.)
if (clickCount == 2 && (timestamp - lastMouseUp_) < 0.8) {
- if (mac_util::ShouldWindowsMiniaturizeOnDoubleClick())
+ if (base::mac::ShouldWindowsMiniaturizeOnDoubleClick())
[[self window] performMiniaturize:self];
} else {
[super mouseUp:event];
diff --git a/chrome/browser/ui/cocoa/tab_view.mm b/chrome/browser/ui/cocoa/tab_view.mm
index 128b83f..0a655ad 100644
--- a/chrome/browser/ui/cocoa/tab_view.mm
+++ b/chrome/browser/ui/cocoa/tab_view.mm
@@ -5,7 +5,7 @@
#import "chrome/browser/ui/cocoa/tab_view.h"
#include "base/logging.h"
-#import "base/mac_util.h"
+#import "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
#include "chrome/browser/accessibility/browser_accessibility_state.h"
#include "chrome/browser/themes/browser_theme_provider.h"
@@ -988,14 +988,14 @@ const CGFloat kRapidCloseDist = 2.5;
DCHECK(CFGetTypeID(dict) == CFDictionaryGetTypeID());
// Sanity check the ID.
- CFNumberRef otherIDRef = (CFNumberRef)mac_util::GetValueFromDictionary(
+ CFNumberRef otherIDRef = (CFNumberRef)base::mac::GetValueFromDictionary(
dict, kCGWindowNumber, CFNumberGetTypeID());
CGWindowID otherID;
if (otherIDRef &&
CFNumberGetValue(otherIDRef, kCGWindowIDCFNumberType, &otherID) &&
otherID == windowID) {
// And then get the workspace.
- CFNumberRef workspaceRef = (CFNumberRef)mac_util::GetValueFromDictionary(
+ CFNumberRef workspaceRef = (CFNumberRef)base::mac::GetValueFromDictionary(
dict, kCGWindowWorkspace, CFNumberGetTypeID());
if (!workspaceRef ||
!CFNumberGetValue(workspaceRef, kCFNumberIntType, &workspace)) {
diff --git a/chrome/browser/ui/cocoa/tabpose_window.mm b/chrome/browser/ui/cocoa/tabpose_window.mm
index 7f96f59..b9e4a3d 100644
--- a/chrome/browser/ui/cocoa/tabpose_window.mm
+++ b/chrome/browser/ui/cocoa/tabpose_window.mm
@@ -7,7 +7,7 @@
#import <QuartzCore/QuartzCore.h>
#include "app/resource_bundle.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/scoped_callback_factory.h"
#include "base/sys_string_conversions.h"
@@ -1020,7 +1020,7 @@ void AnimateCALayerOpacityFromTo(
nsFavicon = defaultFavIcon;
}
base::mac::ScopedCFTypeRef<CGImageRef> favicon(
- mac_util::CopyNSImageToCGImage(nsFavicon));
+ base::mac::CopyNSImageToCGImage(nsFavicon));
CALayer* faviconLayer = [CALayer layer];
if (showZoom) {
diff --git a/chrome/browser/ui/cocoa/task_manager_mac.mm b/chrome/browser/ui/cocoa/task_manager_mac.mm
index c11564c..28cbba0 100644
--- a/chrome/browser/ui/cocoa/task_manager_mac.mm
+++ b/chrome/browser/ui/cocoa/task_manager_mac.mm
@@ -8,7 +8,7 @@
#include <vector>
#include "app/l10n_util_mac.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
#include "chrome/browser/browser_process.h"
#import "chrome/browser/ui/cocoa/window_size_autosaver.h"
@@ -103,7 +103,7 @@ class SortHelper {
@implementation TaskManagerWindowController
- (id)initWithTaskManagerObserver:(TaskManagerMac*)taskManagerObserver {
- NSString* nibpath = [mac_util::MainAppBundle()
+ NSString* nibpath = [base::mac::MainAppBundle()
pathForResource:@"TaskManager"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibpath owner:self])) {
diff --git a/chrome/browser/ui/cocoa/toolbar_controller.mm b/chrome/browser/ui/cocoa/toolbar_controller.mm
index 1b953fd..22d3dde 100644
--- a/chrome/browser/ui/cocoa/toolbar_controller.mm
+++ b/chrome/browser/ui/cocoa/toolbar_controller.mm
@@ -12,7 +12,7 @@
#include "app/menus/accelerator_cocoa.h"
#include "app/menus/menu_model.h"
#include "app/resource_bundle.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/singleton.h"
#include "base/sys_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
@@ -170,7 +170,7 @@ class NotificationBridge : public NotificationObserver {
nibFileNamed:(NSString*)nibName {
DCHECK(model && commands && profile && [nibName length]);
if ((self = [super initWithNibName:nibName
- bundle:mac_util::MainAppBundle()])) {
+ bundle:base::mac::MainAppBundle()])) {
toolbarModel_ = model;
commands_ = commands;
profile_ = profile;
diff --git a/chrome/browser/ui/cocoa/translate/translate_infobar_base.mm b/chrome/browser/ui/cocoa/translate/translate_infobar_base.mm
index 4a08895..a91cd11 100644
--- a/chrome/browser/ui/cocoa/translate/translate_infobar_base.mm
+++ b/chrome/browser/ui/cocoa/translate/translate_infobar_base.mm
@@ -7,7 +7,6 @@
#include "app/l10n_util.h"
#include "base/logging.h"
-#include "base/mac_util.h"
#include "base/metrics/histogram.h"
#include "base/sys_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
diff --git a/chrome/browser/ui/login/login_prompt_mac.mm b/chrome/browser/ui/login/login_prompt_mac.mm
index 2ee0252..0547e39 100644
--- a/chrome/browser/ui/login/login_prompt_mac.mm
+++ b/chrome/browser/ui/login/login_prompt_mac.mm
@@ -6,7 +6,7 @@
#import "chrome/browser/ui/login/login_prompt_mac.h"
#include "app/l10n_util.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
@@ -127,7 +127,7 @@ LoginHandler* LoginHandler::Create(net::AuthChallengeInfo* auth_info,
- (id)initWithLoginHandler:(LoginHandlerMac*)handler {
NSString* nibPath =
- [mac_util::MainAppBundle() pathForResource:@"HttpAuthLoginSheet"
+ [base::mac::MainAppBundle() pathForResource:@"HttpAuthLoginSheet"
ofType:@"nib"];
if ((self = [super initWithWindowNibPath:nibPath
owner:self])) {
diff --git a/chrome/common/chrome_paths.cc b/chrome/common/chrome_paths.cc
index 1b8e612..344db91 100644
--- a/chrome/common/chrome_paths.cc
+++ b/chrome/common/chrome_paths.cc
@@ -15,7 +15,7 @@
#include "chrome/common/chrome_switches.h"
#if defined(OS_MACOSX)
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#endif
namespace {
@@ -39,7 +39,7 @@ bool GetInternalPluginsDirectory(FilePath* result) {
#if defined(OS_MACOSX)
// If called from Chrome, get internal plugins from a subdirectory of the
// framework.
- if (mac_util::AmIBundled()) {
+ if (base::mac::AmIBundled()) {
*result = chrome::GetFrameworkBundlePath();
DCHECK(!result->empty());
*result = result->Append("Internet Plug-Ins");
@@ -79,7 +79,7 @@ bool PathProvider(int key, FilePath* result) {
#if defined(OS_MACOSX)
if (!PathService::Get(base::DIR_EXE, result))
return false;
- if (mac_util::AmIBundled()) {
+ if (base::mac::AmIBundled()) {
// If we're called from chrome, dump it beside the app (outside the
// app bundle), if we're called from a unittest, we'll already
// outside the bundle so use the exe dir.
@@ -145,7 +145,7 @@ bool PathProvider(int key, FilePath* result) {
break;
case chrome::DIR_RESOURCES:
#if defined(OS_MACOSX)
- cur = mac_util::MainAppBundlePath();
+ cur = base::mac::MainAppBundlePath();
cur = cur.Append(FILE_PATH_LITERAL("Resources"));
#else
if (!PathService::Get(chrome::DIR_APP, &cur))
@@ -253,8 +253,8 @@ bool PathProvider(int key, FilePath* result) {
break;
case chrome::FILE_RESOURCES_PACK:
#if defined(OS_MACOSX)
- if (mac_util::AmIBundled()) {
- cur = mac_util::MainAppBundlePath();
+ if (base::mac::AmIBundled()) {
+ cur = base::mac::MainAppBundlePath();
cur = cur.Append(FILE_PATH_LITERAL("Resources"))
.Append(FILE_PATH_LITERAL("resources.pak"));
break;
diff --git a/chrome/common/chrome_paths_mac.mm b/chrome/common/chrome_paths_mac.mm
index 57ed3bd..fc76b53 100644
--- a/chrome/common/chrome_paths_mac.mm
+++ b/chrome/common/chrome_paths_mac.mm
@@ -8,7 +8,7 @@
#include "base/base_paths.h"
#include "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/path_service.h"
#include "chrome/common/chrome_constants.h"
@@ -45,7 +45,7 @@ bool GetChromeFrameUserDataDirectory(FilePath* result) {
}
bool GetUserDocumentsDirectory(FilePath* result) {
- return mac_util::GetUserDirectory(NSDocumentDirectory, result);
+ return base::mac::GetUserDirectory(NSDocumentDirectory, result);
}
void GetUserCacheDirectory(const FilePath& profile_dir, FilePath* result) {
@@ -71,11 +71,11 @@ void GetUserCacheDirectory(const FilePath& profile_dir, FilePath* result) {
}
bool GetUserDownloadsDirectory(FilePath* result) {
- return mac_util::GetUserDirectory(NSDownloadsDirectory, result);
+ return base::mac::GetUserDirectory(NSDownloadsDirectory, result);
}
bool GetUserDesktop(FilePath* result) {
- return mac_util::GetUserDirectory(NSDesktopDirectory, result);
+ return base::mac::GetUserDirectory(NSDesktopDirectory, result);
}
FilePath GetVersionedDirectory() {
@@ -90,7 +90,7 @@ FilePath GetVersionedDirectory() {
path = path.DirName().DirName();
DCHECK_EQ(path.BaseName().value(), "Contents");
- if (mac_util::IsBackgroundOnlyProcess()) {
+ if (base::mac::IsBackgroundOnlyProcess()) {
// path identifies the helper .app's Contents directory in the browser
// .app's versioned directory. Go up two steps to get to the browser
// .app's versioned directory.
@@ -128,7 +128,7 @@ FilePath GetFrameworkBundlePath() {
}
bool GetLocalLibraryDirectory(FilePath* result) {
- return mac_util::GetLocalDirectory(NSLibraryDirectory, result);
+ return base::mac::GetLocalDirectory(NSLibraryDirectory, result);
}
} // namespace chrome
diff --git a/chrome/common/font_loader_mac.mm b/chrome/common/font_loader_mac.mm
index 3ab57c4..b910eb0 100644
--- a/chrome/common/font_loader_mac.mm
+++ b/chrome/common/font_loader_mac.mm
@@ -10,7 +10,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
// static
@@ -50,7 +50,7 @@ bool FontLoader::LoadFontIntoBuffer(NSFont* font_to_encode,
LOG(ERROR) << "Failed to find font file for " << font_name;
return false;
}
- FilePath font_path = FilePath(mac_util::PathFromFSRef(font_fsref));
+ FilePath font_path = FilePath(base::mac::PathFromFSRef(font_fsref));
// Load file into shared memory buffer.
int64 font_file_size_64 = -1;
diff --git a/chrome/common/sandbox_mac.mm b/chrome/common/sandbox_mac.mm
index d0b160a..78941e8 100644
--- a/chrome/common/sandbox_mac.mm
+++ b/chrome/common/sandbox_mac.mm
@@ -17,7 +17,7 @@ extern "C" {
#include "base/basictypes.h"
#include "base/command_line.h"
#include "base/file_util.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/rand_util_c.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/mac/scoped_nsautorelease_pool.h"
@@ -196,8 +196,8 @@ void Sandbox::SandboxWarmup(SandboxProcessType sandbox_type) {
kCGBitmapByteOrder32Host));
// Load in the color profiles we'll need (as a side effect).
- (void) mac_util::GetSRGBColorSpace();
- (void) mac_util::GetSystemColorSpace();
+ (void) base::mac::GetSRGBColorSpace();
+ (void) base::mac::GetSystemColorSpace();
// CGColorSpaceCreateSystemDefaultCMYK - 10.6
base::mac::ScopedCFTypeRef<CGColorSpaceRef> cmyk_colorspace(
@@ -360,7 +360,7 @@ NSString* LoadSandboxTemplate(Sandbox::SandboxProcessType sandbox_type) {
// Read in the sandbox profile and the common prefix file.
NSString* common_sandbox_prefix_path =
- [mac_util::MainAppBundle() pathForResource:@"common"
+ [base::mac::MainAppBundle() pathForResource:@"common"
ofType:@"sb"];
NSString* common_sandbox_prefix_data =
[NSString stringWithContentsOfFile:common_sandbox_prefix_path
@@ -374,7 +374,7 @@ NSString* LoadSandboxTemplate(Sandbox::SandboxProcessType sandbox_type) {
}
NSString* sandbox_profile_path =
- [mac_util::MainAppBundle() pathForResource:sandbox_config_filename
+ [base::mac::MainAppBundle() pathForResource:sandbox_config_filename
ofType:@"sb"];
NSString* sandbox_data =
[NSString stringWithContentsOfFile:sandbox_profile_path
diff --git a/chrome/plugin/plugin_thread.cc b/chrome/plugin/plugin_thread.cc
index 399da12..1400e4a 100644
--- a/chrome/plugin/plugin_thread.cc
+++ b/chrome/plugin/plugin_thread.cc
@@ -41,7 +41,7 @@
#include "app/x11_util.h"
#elif defined(OS_MACOSX)
#include "app/l10n_util.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/sys_string_conversions.h"
#include "grit/chromium_strings.h"
@@ -100,7 +100,7 @@ PluginThread::PluginThread()
base::mac::ScopedCFTypeRef<CFStringRef> process_name(
CFStringCreateWithFormat(kCFAllocatorDefault, NULL, CFSTR("%@ (%@)"),
plugin_name.get(), app_name.get()));
- mac_util::SetProcessName(process_name);
+ base::mac::SetProcessName(process_name);
#endif
}
diff --git a/chrome/plugin/webplugin_proxy.cc b/chrome/plugin/webplugin_proxy.cc
index 1d7a077..8aeed6c 100644
--- a/chrome/plugin/webplugin_proxy.cc
+++ b/chrome/plugin/webplugin_proxy.cc
@@ -24,7 +24,7 @@
#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
#if defined(OS_MACOSX)
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
#include "chrome/plugin/webplugin_accelerated_surface_proxy_mac.h"
#endif
@@ -573,7 +573,7 @@ void WebPluginProxy::SetWindowlessBuffer(
window_rect.width(),
window_rect.height(),
8, 4 * window_rect.width(),
- mac_util::GetSystemColorSpace(),
+ base::mac::GetSystemColorSpace(),
kCGImageAlphaPremultipliedFirst |
kCGBitmapByteOrder32Host));
CGContextTranslateCTM(windowless_context_, 0, window_rect.height());
@@ -584,7 +584,7 @@ void WebPluginProxy::SetWindowlessBuffer(
window_rect.width(),
window_rect.height(),
8, 4 * window_rect.width(),
- mac_util::GetSystemColorSpace(),
+ base::mac::GetSystemColorSpace(),
kCGImageAlphaPremultipliedFirst |
kCGBitmapByteOrder32Host));
CGContextTranslateCTM(background_context_, 0, window_rect.height());
diff --git a/chrome/renderer/render_process_impl.cc b/chrome/renderer/render_process_impl.cc
index 495a234..9573734 100644
--- a/chrome/renderer/render_process_impl.cc
+++ b/chrome/renderer/render_process_impl.cc
@@ -40,7 +40,7 @@
#include "webkit/glue/webkit_glue.h"
#if defined(OS_MACOSX)
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#elif defined(OS_WIN)
#include "app/win/iat_patch_function.h"
#endif
@@ -182,7 +182,7 @@ RenderProcessImpl::RenderProcessImpl()
#endif
#if defined(OS_MACOSX)
- FilePath bundle_path = mac_util::MainAppBundlePath();
+ FilePath bundle_path = base::mac::MainAppBundlePath();
initialized_media_library_ =
media::InitializeMediaLibrary(bundle_path.Append("Libraries"));
diff --git a/chrome/renderer/webplugin_delegate_pepper.cc b/chrome/renderer/webplugin_delegate_pepper.cc
index 68a14ad..b5d6d1f 100644
--- a/chrome/renderer/webplugin_delegate_pepper.cc
+++ b/chrome/renderer/webplugin_delegate_pepper.cc
@@ -16,7 +16,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
#if defined(OS_MACOSX)
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#endif
#include "base/md5.h"
#include "base/message_loop.h"
@@ -1749,7 +1749,7 @@ void WebPluginDelegatePepper::DrawSkBitmapToCanvas(
CGImageCreate(
bitmap.width(), bitmap.height(),
8, 32, bitmap.rowBytes(),
- mac_util::GetSystemColorSpace(),
+ base::mac::GetSystemColorSpace(),
kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host,
data_provider, NULL, false, kCGRenderingIntentDefault));
diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc
index a90b265..4c611be 100644
--- a/chrome/test/in_process_browser_test.cc
+++ b/chrome/test/in_process_browser_test.cc
@@ -42,7 +42,7 @@
#include "sandbox/src/dep.h"
#if defined(OS_MACOSX)
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#endif
#if defined(OS_WIN)
@@ -78,7 +78,7 @@ InProcessBrowserTest::InProcessBrowserTest()
tab_closeable_state_watcher_enabled_(false),
original_single_process_(false) {
#if defined(OS_MACOSX)
- mac_util::SetOverrideAmIBundled(true);
+ base::mac::SetOverrideAmIBundled(true);
#endif
// Before we run the browser, we have to hack the path to the exe to match
diff --git a/chrome/test/unit/chrome_test_suite.cc b/chrome/test/unit/chrome_test_suite.cc
index 16d7239..07e0932 100644
--- a/chrome/test/unit/chrome_test_suite.cc
+++ b/chrome/test/unit/chrome_test_suite.cc
@@ -20,7 +20,7 @@
#include "net/base/net_errors.h"
#if defined(OS_MACOSX)
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#endif
#if defined(OS_POSIX)
@@ -107,7 +107,7 @@ void ChromeTestSuite::Initialize() {
FilePath path;
PathService::Get(base::DIR_EXE, &path);
path = path.Append(chrome::kFrameworkName);
- mac_util::SetOverrideAppBundlePath(path);
+ base::mac::SetOverrideAppBundlePath(path);
#endif
// Force unittests to run using en-US so if we test against string
@@ -128,7 +128,7 @@ void ChromeTestSuite::Shutdown() {
ResourceBundle::CleanupSharedInstance();
#if defined(OS_MACOSX)
- mac_util::SetOverrideAppBundle(NULL);
+ base::mac::SetOverrideAppBundle(NULL);
#endif
delete g_browser_process;
diff --git a/gfx/blit.cc b/gfx/blit.cc
index 88d4057..8853339 100644
--- a/gfx/blit.cc
+++ b/gfx/blit.cc
@@ -16,7 +16,6 @@
#endif
#if defined(OS_MACOSX)
-#include "base/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
#endif
diff --git a/gfx/scoped_image.h b/gfx/scoped_image.h
index c539a94..56e99b7 100644
--- a/gfx/scoped_image.h
+++ b/gfx/scoped_image.h
@@ -14,7 +14,7 @@
#if defined(OS_LINUX)
#include <glib-object.h>
#elif defined(OS_MACOSX)
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#endif
namespace gfx {
@@ -106,7 +106,7 @@ class ScopedImage<NSImage> : public gfx::internal::ScopedImage<NSImage> {
}
virtual void Free() {
- mac_util::NSObjectRelease(image_);
+ base::mac::NSObjectRelease(image_);
image_ = NULL;
}
diff --git a/gfx/scoped_image_unittest.cc b/gfx/scoped_image_unittest.cc
index c43dd43..8e8b312 100644
--- a/gfx/scoped_image_unittest.cc
+++ b/gfx/scoped_image_unittest.cc
@@ -10,7 +10,7 @@
#if defined(OS_LINUX)
#include "gfx/gtk_util.h"
#elif defined(OS_MACOSX)
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "skia/ext/skia_utils_mac.h"
#endif
@@ -30,7 +30,7 @@ class ScopedImageTest : public testing::Test {
scoped_ptr<SkBitmap> bitmap(CreateBitmap());
#if defined(OS_MACOSX)
NSImage* image = gfx::SkBitmapToNSImage(*(bitmap.get()));
- mac_util::NSObjectRetain(image);
+ base::mac::NSObjectRetain(image);
return image;
#elif defined(OS_LINUX) && !defined(TOOLKIT_VIEWS)
return gfx::GdkPixbufFromSkBitmap(bitmap.get());
diff --git a/gfx/test_suite.h b/gfx/test_suite.h
index 8803c7c..8e09e35 100644
--- a/gfx/test_suite.h
+++ b/gfx/test_suite.h
@@ -6,18 +6,18 @@
#define GFX_TEST_SUITE_H_
#pragma once
-#include "build/build_config.h"
-
#include <string>
#include "gfx/gfx_paths.h"
#include "base/file_path.h"
#include "base/path_service.h"
-#if defined(OS_MACOSX)
-#include "base/mac_util.h"
-#endif
#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/mac_util.h"
+#endif
class GfxTestSuite : public base::TestSuite {
public:
@@ -47,13 +47,13 @@ class GfxTestSuite : public base::TestSuite {
#else
#error Unknown branding
#endif
- mac_util::SetOverrideAppBundlePath(path);
+ base::mac::SetOverrideAppBundlePath(path);
#endif // OS_MACOSX
}
virtual void Shutdown() {
#if defined(OS_MACOSX)
- mac_util::SetOverrideAppBundle(NULL);
+ base::mac::SetOverrideAppBundle(NULL);
#endif
TestSuite::Shutdown();
}
diff --git a/net/proxy/proxy_config_service_mac.cc b/net/proxy/proxy_config_service_mac.cc
index c6faa27..3dacf77 100644
--- a/net/proxy/proxy_config_service_mac.cc
+++ b/net/proxy/proxy_config_service_mac.cc
@@ -8,7 +8,7 @@
#include <SystemConfiguration/SystemConfiguration.h>
#include "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/sys_string_conversions.h"
#include "net/base/net_errors.h"
@@ -27,7 +27,7 @@ const int kPollIntervalSec = 5;
bool GetBoolFromDictionary(CFDictionaryRef dict,
CFStringRef key,
bool default_value) {
- CFNumberRef number = (CFNumberRef)mac_util::GetValueFromDictionary(
+ CFNumberRef number = (CFNumberRef)base::mac::GetValueFromDictionary(
dict, key, CFNumberGetTypeID());
if (!number)
return default_value;
@@ -59,7 +59,7 @@ void GetCurrentProxyConfig(ProxyConfig* config) {
if (GetBoolFromDictionary(config_dict.get(),
kSCPropNetProxiesProxyAutoConfigEnable,
false)) {
- CFStringRef pac_url_ref = (CFStringRef)mac_util::GetValueFromDictionary(
+ CFStringRef pac_url_ref = (CFStringRef)base::mac::GetValueFromDictionary(
config_dict.get(),
kSCPropNetProxiesProxyAutoConfigURLString,
CFStringGetTypeID());
@@ -129,7 +129,7 @@ void GetCurrentProxyConfig(ProxyConfig* config) {
// proxy bypass list
CFArrayRef bypass_array_ref =
- (CFArrayRef)mac_util::GetValueFromDictionary(
+ (CFArrayRef)base::mac::GetValueFromDictionary(
config_dict.get(),
kSCPropNetProxiesExceptionsList,
CFArrayGetTypeID());
diff --git a/net/proxy/proxy_resolver_mac.cc b/net/proxy/proxy_resolver_mac.cc
index 128450f..31d9b61 100644
--- a/net/proxy/proxy_resolver_mac.cc
+++ b/net/proxy/proxy_resolver_mac.cc
@@ -7,7 +7,7 @@
#include <CoreFoundation/CoreFoundation.h>
#include "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
@@ -154,7 +154,7 @@ int ProxyResolverMac::GetProxyForURL(const GURL& query_url,
// PAC file, I'm going home.
CFStringRef proxy_type =
- (CFStringRef)mac_util::GetValueFromDictionary(proxy_dictionary,
+ (CFStringRef)base::mac::GetValueFromDictionary(proxy_dictionary,
kCFProxyTypeKey,
CFStringGetTypeID());
ProxyServer proxy_server = ProxyServer::FromDictionary(
diff --git a/net/proxy/proxy_server_mac.cc b/net/proxy/proxy_server_mac.cc
index 61e320f..566d25e 100644
--- a/net/proxy/proxy_server_mac.cc
+++ b/net/proxy/proxy_server_mac.cc
@@ -9,7 +9,7 @@
#include <string>
#include "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/sys_string_conversions.h"
namespace net {
@@ -25,7 +25,7 @@ ProxyServer ProxyServer::FromDictionary(Scheme scheme,
}
CFStringRef host_ref =
- (CFStringRef)mac_util::GetValueFromDictionary(dict, host_key,
+ (CFStringRef)base::mac::GetValueFromDictionary(dict, host_key,
CFStringGetTypeID());
if (!host_ref) {
LOG(WARNING) << "Could not find expected key "
@@ -36,7 +36,7 @@ ProxyServer ProxyServer::FromDictionary(Scheme scheme,
std::string host = base::SysCFStringRefToUTF8(host_ref);
CFNumberRef port_ref =
- (CFNumberRef)mac_util::GetValueFromDictionary(dict, port_key,
+ (CFNumberRef)base::mac::GetValueFromDictionary(dict, port_key,
CFNumberGetTypeID());
int port;
if (port_ref) {
diff --git a/skia/ext/bitmap_platform_device_mac.cc b/skia/ext/bitmap_platform_device_mac.cc
index 081986d2d..bb7edc6 100644
--- a/skia/ext/bitmap_platform_device_mac.cc
+++ b/skia/ext/bitmap_platform_device_mac.cc
@@ -6,7 +6,7 @@
#include <time.h>
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/ref_counted.h"
#include "skia/ext/bitmap_platform_device_data.h"
#include "skia/ext/skia_utils_mac.h"
@@ -28,7 +28,7 @@ static CGContextRef CGContextForData(void* data, int width, int height) {
// recommends these flags for improved CG performance.
CGContextRef context =
CGBitmapContextCreate(data, width, height, 8, width * 4,
- mac_util::GetSystemColorSpace(),
+ base::mac::GetSystemColorSpace(),
kCGImageAlphaPremultipliedFirst |
kCGBitmapByteOrder32Host);
#else
diff --git a/webkit/plugins/npapi/plugin_list_mac.mm b/webkit/plugins/npapi/plugin_list_mac.mm
index 049fe4d..62e682b 100644
--- a/webkit/plugins/npapi/plugin_list_mac.mm
+++ b/webkit/plugins/npapi/plugin_list_mac.mm
@@ -7,7 +7,7 @@
#import <Foundation/Foundation.h>
#include "base/file_util.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/string_number_conversions.h"
#include "base/string_split.h"
#include "base/string_util.h"
@@ -32,7 +32,7 @@ void GetPluginCommonDirectory(std::vector<FilePath>* plugin_dirs,
if (err)
return;
- plugin_dirs->push_back(FilePath(mac_util::PathFromFSRef(ref)));
+ plugin_dirs->push_back(FilePath(base::mac::PathFromFSRef(ref)));
}
// Returns true if the plugin should be prevented from loading.
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index 2682ac7..33e05fa 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -54,7 +54,7 @@
#include "webkit/plugins/ppapi/var.h"
#if defined(OS_MACOSX)
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
#endif
@@ -1139,7 +1139,7 @@ void PluginInstance::DrawSkBitmapToCanvas(
CGImageCreate(
bitmap.width(), bitmap.height(),
8, 32, bitmap.rowBytes(),
- mac_util::GetSystemColorSpace(),
+ base::mac::GetSystemColorSpace(),
kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host,
data_provider, NULL, false, kCGRenderingIntentDefault));
diff --git a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
index 89435ff..a783be4 100644
--- a/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
+++ b/webkit/plugins/ppapi/ppb_graphics_2d_impl.cc
@@ -25,7 +25,7 @@
#include "webkit/plugins/ppapi/ppb_image_data_impl.h"
#if defined(OS_MACOSX)
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h"
#endif
@@ -249,7 +249,8 @@ PPB_Graphics2D_Impl* PPB_Graphics2D_Impl::AsPPB_Graphics2D_Impl() {
return this;
}
-PP_Bool PPB_Graphics2D_Impl::Describe(PP_Size* size, PP_Bool* is_always_opaque) {
+PP_Bool PPB_Graphics2D_Impl::Describe(PP_Size* size,
+ PP_Bool* is_always_opaque) {
size->width = image_data_->width();
size->height = image_data_->height();
*is_always_opaque = PP_FALSE; // TODO(brettw) implement this.
@@ -497,7 +498,7 @@ void PPB_Graphics2D_Impl::Paint(WebKit::WebCanvas* canvas,
CGImageCreate(
backing_bitmap.width(), backing_bitmap.height(),
8, 32, backing_bitmap.rowBytes(),
- mac_util::GetSystemColorSpace(),
+ base::mac::GetSystemColorSpace(),
kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrder32Host,
data_provider, NULL, false, kCGRenderingIntentDefault));
diff --git a/webkit/support/platform_support_mac.mm b/webkit/support/platform_support_mac.mm
index 0e9000f..55abee1 100644
--- a/webkit/support/platform_support_mac.mm
+++ b/webkit/support/platform_support_mac.mm
@@ -12,7 +12,7 @@
#include "base/base_paths.h"
#include "base/file_util.h"
#include "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/path_service.h"
#include "base/string16.h"
#include "grit/webkit_resources.h"
@@ -104,7 +104,7 @@ void AfterInitialize(bool unit_test_mode) {
// Load a data pack.
g_resource_data_pack = new app::DataPack;
NSString* resource_path =
- [mac_util::MainAppBundle() pathForResource:@"DumpRenderTree"
+ [base::mac::MainAppBundle() pathForResource:@"DumpRenderTree"
ofType:@"pak"];
FilePath resources_pak_path([resource_path fileSystemRepresentation]);
if (!g_resource_data_pack->Load(resources_pak_path)) {
@@ -177,7 +177,7 @@ string16 GetLocalizedString(int message_id) {
static FilePath GetResourcesFilePath() {
FilePath path;
// We assume the application is bundled.
- if (!mac_util::AmIBundled()) {
+ if (!base::mac::AmIBundled()) {
LOG(FATAL) << "Failed to locate resources. The applicaiton is not bundled.";
}
PathService::Get(base::DIR_EXE, &path);
diff --git a/webkit/support/test_webkit_client.cc b/webkit/support/test_webkit_client.cc
index 0360d29..1a78768 100644
--- a/webkit/support/test_webkit_client.cc
+++ b/webkit/support/test_webkit_client.cc
@@ -57,7 +57,7 @@
#elif defined(OS_LINUX)
#include "third_party/WebKit/WebKit/chromium/public/linux/WebThemeEngine.h"
#elif defined(OS_MACOSX)
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#endif
using WebKit::WebScriptController;
@@ -88,7 +88,7 @@ TestWebKitClient::TestWebKitClient(bool unit_test_mode)
FilePath module_path;
if (PathService::Get(base::DIR_MODULE, &module_path)) {
#if defined(OS_MACOSX)
- if (mac_util::AmIBundled())
+ if (base::mac::AmIBundled())
module_path = module_path.DirName().DirName().DirName();
#endif
if (media::InitializeMediaLibrary(module_path))
diff --git a/webkit/tools/test_shell/run_all_tests.cc b/webkit/tools/test_shell/run_all_tests.cc
index 11649ebe..59357df 100644
--- a/webkit/tools/test_shell/run_all_tests.cc
+++ b/webkit/tools/test_shell/run_all_tests.cc
@@ -27,7 +27,7 @@
#include "testing/gtest/include/gtest/gtest.h"
#if defined(OS_MACOSX)
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/path_service.h"
#endif
@@ -54,7 +54,7 @@ class TestShellTestSuite : public base::TestSuite {
FilePath path;
PathService::Get(base::DIR_EXE, &path);
path = path.AppendASCII("TestShell.app");
- mac_util::SetOverrideAppBundlePath(path);
+ base::mac::SetOverrideAppBundlePath(path);
#endif
base::TestSuite::Initialize();
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index 1243ee7..fea90a3 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -62,10 +62,6 @@
#include "third_party/WebKit/WebKit/chromium/public/WebGeolocationClientMock.h"
#endif
-#if defined(OS_MACOSX)
-#include "base/mac_util.h"
-#endif
-
using WebKit::WebCanvas;
using WebKit::WebFrame;
using WebKit::WebNavigationPolicy;
diff --git a/webkit/tools/test_shell/test_shell_mac.mm b/webkit/tools/test_shell/test_shell_mac.mm
index f05089c..6cd810d 100644
--- a/webkit/tools/test_shell/test_shell_mac.mm
+++ b/webkit/tools/test_shell/test_shell_mac.mm
@@ -17,7 +17,7 @@
#include "base/file_path.h"
#include "base/file_util.h"
#include "base/logging.h"
-#include "base/mac_util.h"
+#include "base/mac/mac_util.h"
#include "base/memory_debug.h"
#include "base/message_loop.h"
#include "base/path_service.h"
@@ -80,7 +80,7 @@ base::LazyInstance <std::map<gfx::NativeWindow, TestShell *> >
FilePath GetResourcesFilePath() {
FilePath path;
// We need to know if we're bundled or not to know which path to use.
- if (mac_util::AmIBundled()) {
+ if (base::mac::AmIBundled()) {
PathService::Get(base::DIR_EXE, &path);
path = path.Append(FilePath::kParentDirectory);
return path.AppendASCII("Resources");
@@ -212,7 +212,7 @@ void TestShell::InitializeTestShell(bool layout_test_mode,
// tests. This is a harmless failure for test_shell_tests.
g_resource_data_pack = new app::DataPack;
NSString *resource_path =
- [mac_util::MainAppBundle() pathForResource:@"test_shell"
+ [base::mac::MainAppBundle() pathForResource:@"test_shell"
ofType:@"pak"];
FilePath resources_pak_path([resource_path fileSystemRepresentation]);
if (!g_resource_data_pack->Load(resources_pak_path)) {
@@ -223,11 +223,11 @@ void TestShell::InitializeTestShell(bool layout_test_mode,
// Load the Ahem font, which is used by layout tests.
const char* ahem_path_c;
- NSString* ahem_path = [[mac_util::MainAppBundle() resourcePath]
+ NSString* ahem_path = [[base::mac::MainAppBundle() resourcePath]
stringByAppendingPathComponent:@"AHEM____.TTF"];
ahem_path_c = [ahem_path fileSystemRepresentation];
FSRef ahem_fsref;
- if (!mac_util::FSRefFromPath(ahem_path_c, &ahem_fsref)) {
+ if (!base::mac::FSRefFromPath(ahem_path_c, &ahem_fsref)) {
DLOG(FATAL) << "FSRefFromPath " << ahem_path_c;
} else {
// The last argument is an ATSFontContainerRef that can be passed to
@@ -247,7 +247,7 @@ void TestShell::InitializeTestShell(bool layout_test_mode,
// test plugins.
FilePath plugins_dir;
PathService::Get(base::DIR_EXE, &plugins_dir);
- if (mac_util::AmIBundled()) {
+ if (base::mac::AmIBundled()) {
plugins_dir = plugins_dir.AppendASCII("../../../plugins");
} else {
plugins_dir = plugins_dir.AppendASCII("plugins");