diff options
Diffstat (limited to 'chrome')
28 files changed, 66 insertions, 64 deletions
diff --git a/chrome/app/breakpad_mac.mm b/chrome/app/breakpad_mac.mm index 54d32c0..de14e92 100644 --- a/chrome/app/breakpad_mac.mm +++ b/chrome/app/breakpad_mac.mm @@ -15,8 +15,8 @@ #import "base/logging.h" #include "base/mac_util.h" #include "base/mac/scoped_cftyperef.h" +#import "base/mac/scoped_nsautorelease_pool.h" #include "base/path_service.h" -#import "base/scoped_nsautorelease_pool.h" #include "base/sys_string_conversions.h" #import "breakpad/src/client/mac/Framework/Breakpad.h" #include "chrome/common/child_process_logging.h" @@ -46,7 +46,7 @@ void DestructCrashReporter() { // Only called for a branded build of Chrome.app. void InitCrashReporter() { DCHECK(gBreakpadRef == NULL); - base::ScopedNSAutoreleasePool autorelease_pool; + base::mac::ScopedNSAutoreleasePool autorelease_pool; // Check whether crash reporting should be enabled. If enterprise // configuration management controls crash reporting, it takes precedence. diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc index dad27d8..ca73937 100644 --- a/chrome/app/chrome_dll_main.cc +++ b/chrome/app/chrome_dll_main.cc @@ -39,12 +39,12 @@ #include "base/command_line.h" #include "base/debug_util.h" #include "base/i18n/icu_util.h" +#include "base/mac/scoped_nsautorelease_pool.h" #include "base/message_loop.h" #include "base/metrics/stats_counters.h" #include "base/metrics/stats_table.h" #include "base/path_service.h" #include "base/process_util.h" -#include "base/scoped_nsautorelease_pool.h" #include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" @@ -484,7 +484,7 @@ int ChromeMain(int argc, char** argv) { // event loop, but we don't want to leave them hanging around until the // app quits. Each "main" needs to flush this pool right before it goes into // its main event loop to get rid of the cruft. - base::ScopedNSAutoreleasePool autorelease_pool; + base::mac::ScopedNSAutoreleasePool autorelease_pool; #if defined(OS_CHROMEOS) chromeos::BootTimesLoader::Get()->SaveChromeMainStats(); diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index ac9fe52..f21b2e2 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -16,9 +16,9 @@ #include "base/command_line.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/mac/scoped_nsautorelease_pool.h" #include "base/metrics/field_trial.h" #include "base/metrics/histogram.h" -#include "base/scoped_nsautorelease_pool.h" #include "base/path_service.h" #include "base/platform_thread.h" #include "base/process_util.h" @@ -919,7 +919,7 @@ int BrowserMain(const MainFunctionParams& parameters) { // TODO(viettrungluu): put the remainder into BrowserMainParts const CommandLine& parsed_command_line = parameters.command_line_; - base::ScopedNSAutoreleasePool* pool = parameters.autorelease_pool_; + base::mac::ScopedNSAutoreleasePool* pool = parameters.autorelease_pool_; FilePath user_data_dir; #if defined(OS_WIN) diff --git a/chrome/browser/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm b/chrome/browser/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm index 9bb5037..4a5b600 100644 --- a/chrome/browser/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm +++ b/chrome/browser/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm @@ -127,7 +127,7 @@ TEST_F(BookmarkBubbleControllerTest, TestClosingParentWindow) { EXPECT_TRUE(controller); NSWindow* window = [controller window]; EXPECT_TRUE(window); - base::ScopedNSAutoreleasePool pool; + base::mac::ScopedNSAutoreleasePool pool; [test_window() performClose:NSApp]; } diff --git a/chrome/browser/cocoa/bookmarks/bookmark_folder_target_unittest.mm b/chrome/browser/cocoa/bookmarks/bookmark_folder_target_unittest.mm index ae5a6a0..403002d 100644 --- a/chrome/browser/cocoa/bookmarks/bookmark_folder_target_unittest.mm +++ b/chrome/browser/cocoa/bookmarks/bookmark_folder_target_unittest.mm @@ -43,7 +43,7 @@ class BookmarkFolderTargetTest : public CocoaTest { BrowserTestHelper helper_; const BookmarkNode* bmbNode_; - base::ScopedNSAutoreleasePool pool_; + base::mac::ScopedNSAutoreleasePool pool_; }; TEST_F(BookmarkFolderTargetTest, StartWithNothing) { diff --git a/chrome/browser/cocoa/browser_frame_view.mm b/chrome/browser/cocoa/browser_frame_view.mm index 96e3542..87c27a0 100644 --- a/chrome/browser/cocoa/browser_frame_view.mm +++ b/chrome/browser/cocoa/browser_frame_view.mm @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -8,7 +8,7 @@ #import <Carbon/Carbon.h> #include "base/logging.h" -#include "base/scoped_nsautorelease_pool.h" +#include "base/mac/scoped_nsautorelease_pool.h" #import "chrome/browser/cocoa/framed_browser_window.h" #import "chrome/browser/cocoa/themed_window.h" #import "chrome/browser/themes/browser_theme_provider.h" @@ -46,7 +46,7 @@ static BOOL gCanGetCornerRadius = NO; // others. If they all fail, we will lose window frame theming and // roll overs for our close widgets, but things should still function // correctly. - base::ScopedNSAutoreleasePool pool; + base::mac::ScopedNSAutoreleasePool pool; Class grayFrameClass = NSClassFromString(@"NSGrayFrame"); DCHECK(grayFrameClass); if (!grayFrameClass) return; diff --git a/chrome/browser/cocoa/browser_window_controller.mm b/chrome/browser/cocoa/browser_window_controller.mm index 632ca8b..dc9f400 100644 --- a/chrome/browser/cocoa/browser_window_controller.mm +++ b/chrome/browser/cocoa/browser_window_controller.mm @@ -9,8 +9,8 @@ #include "app/l10n_util.h" #include "app/l10n_util_mac.h" #include "base/mac_util.h" +#include "app/mac/scoped_nsdisable_screen_updates.h" #include "base/nsimage_cache_mac.h" -#include "base/scoped_nsdisable_screen_updates.h" #import "base/scoped_nsobject.h" #include "base/sys_string_conversions.h" #include "chrome/app/chrome_dll_resource.h" // IDC_* @@ -456,7 +456,7 @@ // going away) will again call to close the window when it's finally ready. - (BOOL)windowShouldClose:(id)sender { // Disable updates while closing all tabs to avoid flickering. - base::ScopedNSDisableScreenUpdates disabler; + app::mac::ScopedNSDisableScreenUpdates disabler; // Give beforeunload handlers the chance to cancel the close before we hide // the window below. if (!browser_->ShouldCloseWindow()) @@ -1174,7 +1174,7 @@ - (TabWindowController*)detachTabToNewWindow:(TabView*)tabView { // Disable screen updates so that this appears as a single visual change. - base::ScopedNSDisableScreenUpdates disabler; + app::mac::ScopedNSDisableScreenUpdates disabler; // Fetch the tab contents for the tab being dragged. int index = [tabStripController_ modelIndexForTabView:tabView]; diff --git a/chrome/browser/cocoa/cocoa_test_helper.h b/chrome/browser/cocoa/cocoa_test_helper.h index da244e4..58b5a36 100644 --- a/chrome/browser/cocoa/cocoa_test_helper.h +++ b/chrome/browser/cocoa/cocoa_test_helper.h @@ -12,7 +12,7 @@ #include "base/debug_util.h" #include "base/mac_util.h" #include "base/path_service.h" -#import "base/scoped_nsautorelease_pool.h" +#import "base/mac/scoped_nsautorelease_pool.h" #import "base/scoped_nsobject.h" #include "chrome/common/chrome_constants.h" #include "testing/platform_test.h" @@ -90,7 +90,7 @@ class CocoaTest : public PlatformTest { std::set<NSWindow*> WindowsLeft(); bool called_tear_down_; - base::ScopedNSAutoreleasePool pool_; + base::mac::ScopedNSAutoreleasePool pool_; // Windows which existed at the beginning of the test. std::set<NSWindow*> initial_windows_; diff --git a/chrome/browser/cocoa/cocoa_test_helper.mm b/chrome/browser/cocoa/cocoa_test_helper.mm index 46029aa..136412b 100644 --- a/chrome/browser/cocoa/cocoa_test_helper.mm +++ b/chrome/browser/cocoa/cocoa_test_helper.mm @@ -124,7 +124,7 @@ void CocoaTest::TearDown() { // Autorelease anything thrown up by the event loop. { - base::ScopedNSAutoreleasePool pool; + base::mac::ScopedNSAutoreleasePool pool; ++spins; NSEvent *next_event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:nil @@ -164,7 +164,7 @@ std::set<NSWindow*> CocoaTest::ApplicationWindows() { // Must create a pool here because [NSApp windows] has created an array // with retains on all the windows in it. - base::ScopedNSAutoreleasePool pool; + base::mac::ScopedNSAutoreleasePool pool; NSArray *appWindows = [NSApp windows]; for (NSWindow *window in appWindows) { windows.insert(window); diff --git a/chrome/browser/cocoa/content_exceptions_window_controller_unittest.mm b/chrome/browser/cocoa/content_exceptions_window_controller_unittest.mm index 3ec1944..b5beb62 100644 --- a/chrome/browser/cocoa/content_exceptions_window_controller_unittest.mm +++ b/chrome/browser/cocoa/content_exceptions_window_controller_unittest.mm @@ -17,7 +17,7 @@ namespace { void ProcessEvents() { for (;;) { - base::ScopedNSAutoreleasePool pool; + base::mac::ScopedNSAutoreleasePool pool; NSEvent* next_event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:nil inMode:NSDefaultRunLoopMode diff --git a/chrome/browser/cocoa/html_dialog_window_controller_unittest.mm b/chrome/browser/cocoa/html_dialog_window_controller_unittest.mm index 2ec3f6f..b6eae68 100644 --- a/chrome/browser/cocoa/html_dialog_window_controller_unittest.mm +++ b/chrome/browser/cocoa/html_dialog_window_controller_unittest.mm @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -9,7 +9,7 @@ #import <Cocoa/Cocoa.h> -#import "base/scoped_nsautorelease_pool.h" +#import "base/mac/scoped_nsautorelease_pool.h" #include "base/sys_string_conversions.h" #include "chrome/browser/cocoa/cocoa_test_helper.h" #include "chrome/browser/dom_ui/dom_ui.h" @@ -70,7 +70,7 @@ TEST_F(HtmlDialogWindowControllerTest, showDialog) { // // TODO(dmaclach): Remove this once // http://code.google.com/p/chromium/issues/detail?id=26133 is fixed. - base::ScopedNSAutoreleasePool release_pool; + base::mac::ScopedNSAutoreleasePool release_pool; EXPECT_CALL(delegate_, GetDialogTitle()) .WillOnce(Return(title_)); diff --git a/chrome/browser/cocoa/install_from_dmg.mm b/chrome/browser/cocoa/install_from_dmg.mm index be6ad3b..e702e64 100644 --- a/chrome/browser/cocoa/install_from_dmg.mm +++ b/chrome/browser/cocoa/install_from_dmg.mm @@ -19,7 +19,7 @@ #include "base/command_line.h" #include "base/logging.h" #import "base/mac_util.h" -#include "base/scoped_nsautorelease_pool.h" +#include "base/mac/scoped_nsautorelease_pool.h" #include "chrome/browser/cocoa/authorization_util.h" #include "chrome/browser/cocoa/scoped_authorizationref.h" #import "chrome/browser/cocoa/keystone_glue.h" @@ -370,7 +370,7 @@ void ShowErrorDialog() { } // namespace bool MaybeInstallFromDiskImage() { - base::ScopedNSAutoreleasePool autorelease_pool; + base::mac::ScopedNSAutoreleasePool autorelease_pool; if (!IsAppRunningFromReadOnlyDiskImage()) { return false; diff --git a/chrome/browser/cocoa/keyword_editor_cocoa_controller_unittest.mm b/chrome/browser/cocoa/keyword_editor_cocoa_controller_unittest.mm index 7c7610d..bebe7b2 100644 --- a/chrome/browser/cocoa/keyword_editor_cocoa_controller_unittest.mm +++ b/chrome/browser/cocoa/keyword_editor_cocoa_controller_unittest.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/scoped_nsautorelease_pool.h" +#include "base/mac/scoped_nsautorelease_pool.h" #include "base/scoped_nsobject.h" #include "chrome/browser/browser.h" #include "chrome/browser/cocoa/browser_test_helper.h" @@ -71,7 +71,7 @@ class KeywordEditorCocoaControllerTest : public CocoaTest { // Helper to count the keyword editors. NSUInteger CountKeywordEditors() { - base::ScopedNSAutoreleasePool pool; + base::mac::ScopedNSAutoreleasePool pool; NSUInteger count = 0; for (NSWindow* window in [NSApp windows]) { id controller = [window windowController]; @@ -108,7 +108,7 @@ TEST_F(KeywordEditorCocoaControllerTest, ShowKeywordEditor) { // The window unwinds using -autorelease, so we need to introduce an // autorelease pool to really test whether it went away or not. { - base::ScopedNSAutoreleasePool pool; + base::mac::ScopedNSAutoreleasePool pool; // +showKeywordEditor: creates a new controller. [KeywordEditorCocoaController showKeywordEditor:profile]; diff --git a/chrome/browser/cocoa/preferences_window_controller.mm b/chrome/browser/cocoa/preferences_window_controller.mm index 61317e4..a6005ef7 100644 --- a/chrome/browser/cocoa/preferences_window_controller.mm +++ b/chrome/browser/cocoa/preferences_window_controller.mm @@ -11,7 +11,7 @@ #include "app/resource_bundle.h" #include "base/logging.h" #include "base/mac_util.h" -#include "base/scoped_aedesc.h" +#include "base/mac/scoped_aedesc.h" #include "base/string16.h" #include "base/string_util.h" #include "base/sys_string_conversions.h" @@ -1520,7 +1520,7 @@ const int kDisabledIndex = 1; @"/System/Library/PreferencePanes/Network.prefPane"]]; const char* proxyPrefCommand = "Proxies"; - scoped_aedesc<> openParams; + base::mac::ScopedAEDesc<> openParams; OSStatus status = AECreateDesc('ptru', proxyPrefCommand, strlen(proxyPrefCommand), diff --git a/chrome/browser/cocoa/tabpose_window_unittest.mm b/chrome/browser/cocoa/tabpose_window_unittest.mm index 82bc472..c1c56d2 100644 --- a/chrome/browser/cocoa/tabpose_window_unittest.mm +++ b/chrome/browser/cocoa/tabpose_window_unittest.mm @@ -43,7 +43,7 @@ TEST_F(TabposeWindowTest, TestShow) { for (int i = 0; i < 3; ++i) AppendTabToStrip(); - base::ScopedNSAutoreleasePool pool; + base::mac::ScopedNSAutoreleasePool pool; TabposeWindow* window = [TabposeWindow openTabposeFor:parent rect:NSMakeRect(10, 20, 250, 160) @@ -65,7 +65,7 @@ TEST_F(TabposeWindowTest, TestModelObserver) { for (int i = 0; i < 3; ++i) AppendTabToStrip(); - base::ScopedNSAutoreleasePool pool; + base::mac::ScopedNSAutoreleasePool pool; TabposeWindow* window = [TabposeWindow openTabposeFor:parent rect:NSMakeRect(10, 20, 250, 160) diff --git a/chrome/browser/cocoa/web_drop_target_unittest.mm b/chrome/browser/cocoa/web_drop_target_unittest.mm index 6849646..2bd7085 100644 --- a/chrome/browser/cocoa/web_drop_target_unittest.mm +++ b/chrome/browser/cocoa/web_drop_target_unittest.mm @@ -1,8 +1,8 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/scoped_nsautorelease_pool.h" +#include "base/mac/scoped_nsautorelease_pool.h" #include "base/sys_string_conversions.h" #include "base/utf_string_conversions.h" #import "chrome/browser/cocoa/cocoa_test_helper.h" @@ -42,7 +42,7 @@ class WebDropTargetTest : public RenderViewHostTestHarness { forType:kCorePasteboardFlavorType_urln]; } - base::ScopedNSAutoreleasePool pool_; + base::mac::ScopedNSAutoreleasePool pool_; scoped_nsobject<WebDropTarget> drop_target_; }; diff --git a/chrome/browser/dom_ui/options/advanced_options_utils_mac.mm b/chrome/browser/dom_ui/options/advanced_options_utils_mac.mm index 1e1fcab..e3bd4f7 100644 --- a/chrome/browser/dom_ui/options/advanced_options_utils_mac.mm +++ b/chrome/browser/dom_ui/options/advanced_options_utils_mac.mm @@ -7,7 +7,7 @@ #include "chrome/browser/dom_ui/options/advanced_options_utils.h" #include "base/logging.h" -#include "base/scoped_aedesc.h" +#include "base/mac/scoped_aedesc.h" void AdvancedOptionsUtilities::ShowNetworkProxySettings( TabContents* tab_contents) { @@ -15,7 +15,7 @@ void AdvancedOptionsUtilities::ShowNetworkProxySettings( @"/System/Library/PreferencePanes/Network.prefPane"]]; const char* proxyPrefCommand = "Proxies"; - scoped_aedesc<> openParams; + base::mac::ScopedAEDesc<> openParams; OSStatus status = AECreateDesc('ptru', proxyPrefCommand, strlen(proxyPrefCommand), diff --git a/chrome/browser/geolocation/wifi_data_provider_corewlan_mac.mm b/chrome/browser/geolocation/wifi_data_provider_corewlan_mac.mm index 6d1ddf3..abefaa9 100644 --- a/chrome/browser/geolocation/wifi_data_provider_corewlan_mac.mm +++ b/chrome/browser/geolocation/wifi_data_provider_corewlan_mac.mm @@ -9,7 +9,7 @@ #include <dlfcn.h> #import <Foundation/Foundation.h> -#include "base/scoped_nsautorelease_pool.h" +#include "base/mac/scoped_nsautorelease_pool.h" #include "base/scoped_nsobject.h" #include "base/sys_string_conversions.h" @@ -66,7 +66,7 @@ bool CoreWlanApi::Init() { // auto release pool. It's simplest to do this as an automatic variable in // each method that needs it, to ensure the scoping is correct and does not // interfere with any other code using autorelease pools on the thread. - base::ScopedNSAutoreleasePool auto_pool; + base::mac::ScopedNSAutoreleasePool auto_pool; bundle_.reset([[NSBundle alloc] initWithPath:@"/System/Library/Frameworks/CoreWLAN.framework"]); if (!bundle_) { @@ -98,7 +98,7 @@ bool CoreWlanApi::Init() { } bool CoreWlanApi::GetAccessPointData(WifiData::AccessPointDataSet* data) { - base::ScopedNSAutoreleasePool auto_pool; + base::mac::ScopedNSAutoreleasePool auto_pool; // Initialize the scan parameters with scan key merging disabled, so we get // every AP listed in the scan without any SSID de-duping logic. NSDictionary* params = diff --git a/chrome/browser/platform_util_mac.mm b/chrome/browser/platform_util_mac.mm index 3ee28b7..d7da563 100644 --- a/chrome/browser/platform_util_mac.mm +++ b/chrome/browser/platform_util_mac.mm @@ -12,7 +12,7 @@ #include "base/file_path.h" #include "base/logging.h" #include "base/mac_util.h" -#include "base/scoped_aedesc.h" +#include "base/mac/scoped_aedesc.h" #include "base/sys_string_conversions.h" #include "googleurl/src/gurl.h" #include "grit/generated_resources.h" @@ -43,7 +43,7 @@ void OpenItem(const FilePath& full_path) { OSErr status; // Create the target of this AppleEvent, the Finder. - scoped_aedesc<AEAddressDesc> address; + base::mac::ScopedAEDesc<AEAddressDesc> address; const OSType finderCreatorCode = 'MACS'; status = AECreateDesc(typeApplSignature, // type &finderCreatorCode, // data @@ -55,7 +55,7 @@ void OpenItem(const FilePath& full_path) { } // Build the AppleEvent data structure that instructs Finder to open files. - scoped_aedesc<AppleEvent> theEvent; + base::mac::ScopedAEDesc<AppleEvent> theEvent; status = AECreateAppleEvent(kCoreEventClass, // theAEEventClass kAEOpenDocuments, // theAEEventID address, // target @@ -68,7 +68,7 @@ void OpenItem(const FilePath& full_path) { } // Create the list of files (only ever one) to open. - scoped_aedesc<AEDescList> fileList; + base::mac::ScopedAEDesc<AEDescList> fileList; status = AECreateList(NULL, // factoringPtr 0, // factoredSize false, // isRecord @@ -107,7 +107,7 @@ void OpenItem(const FilePath& full_path) { } // Send the actual event. Do not care about the reply. - scoped_aedesc<AppleEvent> reply; + base::mac::ScopedAEDesc<AppleEvent> reply; status = AESend(theEvent, // theAppleEvent reply.OutPointer(), // reply kAENoReply + kAEAlwaysInteract, // sendMode diff --git a/chrome/browser/renderer_host/render_widget_host_view_mac.mm b/chrome/browser/renderer_host/render_widget_host_view_mac.mm index acf62a0..a7c6581 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_mac.mm +++ b/chrome/browser/renderer_host/render_widget_host_view_mac.mm @@ -12,8 +12,8 @@ #include "base/command_line.h" #include "base/logging.h" #include "base/mac/scoped_cftyperef.h" +#import "base/mac/scoped_nsautorelease_pool.h" #include "base/metrics/histogram.h" -#import "base/scoped_nsautorelease_pool.h" #import "base/scoped_nsobject.h" #include "base/string_util.h" #include "base/sys_info.h" @@ -205,7 +205,7 @@ void DisablePasswordInput() { - (CVReturn)getFrameForTime:(const CVTimeStamp*)outputTime { // There is no autorelease pool when this method is called because it will be // called from a background thread. - base::ScopedNSAutoreleasePool pool; + base::mac::ScopedNSAutoreleasePool pool; if (![self surfaceWasSwapped]) return kCVReturnSuccess; diff --git a/chrome/common/main_function_params.h b/chrome/common/main_function_params.h index 0f0ed37..e4a5fcc 100644 --- a/chrome/common/main_function_params.h +++ b/chrome/common/main_function_params.h @@ -14,19 +14,21 @@ #include "chrome/common/sandbox_init_wrapper.h" namespace base { +namespace mac { class ScopedNSAutoreleasePool; -}; +} +} class Task; struct MainFunctionParams { MainFunctionParams(const CommandLine& cl, const SandboxInitWrapper& sb, - base::ScopedNSAutoreleasePool* pool) + base::mac::ScopedNSAutoreleasePool* pool) : command_line_(cl), sandbox_info_(sb), autorelease_pool_(pool), ui_task(NULL) { } const CommandLine& command_line_; const SandboxInitWrapper& sandbox_info_; - base::ScopedNSAutoreleasePool* autorelease_pool_; + base::mac::ScopedNSAutoreleasePool* autorelease_pool_; // Used by InProcessBrowserTest. If non-null BrowserMain schedules this // task to run on the MessageLoop and BrowserInit is not invoked. Task* ui_task; diff --git a/chrome/common/sandbox_mac.mm b/chrome/common/sandbox_mac.mm index f4d1eec..608ba27 100644 --- a/chrome/common/sandbox_mac.mm +++ b/chrome/common/sandbox_mac.mm @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -18,7 +18,7 @@ extern "C" { #include "base/mac_util.h" #include "base/rand_util_c.h" #include "base/mac/scoped_cftyperef.h" -#include "base/scoped_nsautorelease_pool.h" +#include "base/mac/scoped_nsautorelease_pool.h" #include "base/string16.h" #include "base/string_util.h" #include "base/sys_info.h" @@ -187,7 +187,7 @@ bool QuoteStringForRegex(const std::string& str_utf8, std::string* dst) { // This function is tested on the following OS versions: // 10.5.6, 10.6.0 void SandboxWarmup() { - base::ScopedNSAutoreleasePool scoped_pool; + base::mac::ScopedNSAutoreleasePool scoped_pool; { // CGColorSpaceCreateWithName(), CGBitmapContextCreate() - 10.5.6 base::mac::ScopedCFTypeRef<CGColorSpaceRef> rgb_colorspace( diff --git a/chrome/renderer/renderer_main.cc b/chrome/renderer/renderer_main.cc index 83dcd07..4dd65a8 100644 --- a/chrome/renderer/renderer_main.cc +++ b/chrome/renderer/renderer_main.cc @@ -10,6 +10,7 @@ #include "app/hi_res_timer_manager.h" #include "app/system_monitor.h" #include "base/command_line.h" +#include "base/mac/scoped_nsautorelease_pool.h" #include "base/metrics/field_trial.h" #include "base/message_loop.h" #include "base/metrics/histogram.h" @@ -17,7 +18,6 @@ #include "base/path_service.h" #include "base/platform_thread.h" #include "base/process_util.h" -#include "base/scoped_nsautorelease_pool.h" #include "base/string_util.h" #include "base/trace_event.h" #include "chrome/common/chrome_constants.h" @@ -180,7 +180,7 @@ int RendererMain(const MainFunctionParams& parameters) { TRACE_EVENT_BEGIN("RendererMain", 0, ""); const CommandLine& parsed_command_line = parameters.command_line_; - base::ScopedNSAutoreleasePool* pool = parameters.autorelease_pool_; + base::mac::ScopedNSAutoreleasePool* pool = parameters.autorelease_pool_; #if defined(OS_MACOSX) // TODO(viettrungluu): Code taken from browser_main.cc. diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc index 8536bf4..5bfa802 100644 --- a/chrome/test/in_process_browser_test.cc +++ b/chrome/test/in_process_browser_test.cc @@ -7,8 +7,8 @@ #include "base/command_line.h" #include "base/file_path.h" #include "base/file_util.h" +#include "base/mac/scoped_nsautorelease_pool.h" #include "base/path_service.h" -#include "base/scoped_nsautorelease_pool.h" #include "base/string_number_conversions.h" #include "base/test/test_file_util.h" #include "chrome/browser/browser.h" @@ -298,7 +298,7 @@ void InProcessBrowserTest::RunTestOnMainThreadLoop() { // deallocation via an autorelease pool (such as browser window closure and // browser shutdown). To avoid this, the following pool is recycled after each // time code is directly executed. - base::ScopedNSAutoreleasePool pool; + base::mac::ScopedNSAutoreleasePool pool; // Pump startup related events. MessageLoopForUI::current()->RunAllPending(); diff --git a/chrome/test/pyautolib/pyautolib.h b/chrome/test/pyautolib/pyautolib.h index e3c4c5c..c40b97e 100644 --- a/chrome/test/pyautolib/pyautolib.h +++ b/chrome/test/pyautolib/pyautolib.h @@ -10,7 +10,7 @@ #pragma once #include "base/message_loop.h" -#include "base/scoped_nsautorelease_pool.h" +#include "base/mac/scoped_nsautorelease_pool.h" #include "chrome/test/ui/ui_test.h" #include "chrome/test/ui/ui_test_suite.h" @@ -30,7 +30,7 @@ class PyUITestSuiteBase : public UITestSuite { void Initialize(const FilePath& browser_dir); private: - base::ScopedNSAutoreleasePool pool_; + base::mac::ScopedNSAutoreleasePool pool_; }; // The primary class that interfaces with Automation Proxy. diff --git a/chrome/test/test_launcher/out_of_proc_test_runner.cc b/chrome/test/test_launcher/out_of_proc_test_runner.cc index d9464f6..49ab5e6 100644 --- a/chrome/test/test_launcher/out_of_proc_test_runner.cc +++ b/chrome/test/test_launcher/out_of_proc_test_runner.cc @@ -6,8 +6,8 @@ #include "base/command_line.h" #include "base/logging.h" +#include "base/mac/scoped_nsautorelease_pool.h" #include "base/process_util.h" -#include "base/scoped_nsautorelease_pool.h" #include "base/scoped_temp_dir.h" #include "base/string_number_conversions.h" #include "base/test/test_suite.h" @@ -63,7 +63,7 @@ class OutOfProcTestRunner : public tests::TestRunner { bool RunTest(const std::string& test_name) { // Some of the below method calls will leak objects if there is no // autorelease pool in place. - base::ScopedNSAutoreleasePool pool; + base::mac::ScopedNSAutoreleasePool pool; const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); CommandLine new_cmd_line(cmd_line->GetProgram()); diff --git a/chrome/test/unit/chrome_test_suite.cc b/chrome/test/unit/chrome_test_suite.cc index 9613341..7c52254 100644 --- a/chrome/test/unit/chrome_test_suite.cc +++ b/chrome/test/unit/chrome_test_suite.cc @@ -7,9 +7,9 @@ #include "app/app_paths.h" #include "app/resource_bundle.h" #include "base/command_line.h" +#include "base/mac/scoped_nsautorelease_pool.h" #include "base/metrics/stats_table.h" #include "base/process_util.h" -#include "base/scoped_nsautorelease_pool.h" #include "base/utf_string_conversions.h" #include "chrome/browser/browser_process.h" #include "chrome/common/chrome_constants.h" @@ -85,7 +85,7 @@ ChromeTestSuite::~ChromeTestSuite() { } void ChromeTestSuite::Initialize() { - base::ScopedNSAutoreleasePool autorelease_pool; + base::mac::ScopedNSAutoreleasePool autorelease_pool; base::TestSuite::Initialize(); diff --git a/chrome/tools/mac_helpers/infoplist_strings_util.mm b/chrome/tools/mac_helpers/infoplist_strings_util.mm index 474e587..d086444 100644 --- a/chrome/tools/mac_helpers/infoplist_strings_util.mm +++ b/chrome/tools/mac_helpers/infoplist_strings_util.mm @@ -13,7 +13,7 @@ #include "base/data_pack.h" #include "base/file_path.h" -#include "base/scoped_nsautorelease_pool.h" +#include "base/mac/scoped_nsautorelease_pool.h" #include "base/scoped_ptr.h" #include "base/string_piece.h" #include "base/string_util.h" @@ -134,7 +134,7 @@ const char* kAppType_Helper = "helper"; // Helper app } // namespace int main(int argc, char* const argv[]) { - base::ScopedNSAutoreleasePool autorelease_pool; + base::mac::ScopedNSAutoreleasePool autorelease_pool; const char* version_file_path = NULL; const char* grit_output_dir = NULL; |