diff options
Diffstat (limited to 'chrome/browser')
18 files changed, 42 insertions, 42 deletions
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; |