diff options
author | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-24 22:51:46 +0000 |
---|---|---|
committer | thakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-24 22:51:46 +0000 |
commit | a852203c1ae878c97ef5f64eec9b89e57642a78b (patch) | |
tree | 8d2e4837f0bd6f9300a0fe2d17c0956181e39bbf /base/mac | |
parent | dd9cd303480e5c1fd2465986903856651bded8d5 (diff) | |
download | chromium_src-a852203c1ae878c97ef5f64eec9b89e57642a78b.zip chromium_src-a852203c1ae878c97ef5f64eec9b89e57642a78b.tar.gz chromium_src-a852203c1ae878c97ef5f64eec9b89e57642a78b.tar.bz2 |
mac: Update clients of scoped_nsobject.h.
1.) The header is now in base/mac instead of base/memory
2.) The class is now in namespace base.
This CL was created programmatically by running:
1.)
git grep -l memory/scoped_nsobject.h | xargs sed -i -e 's/memory\/scoped_nsobject.h/mac\/scoped_nsobject.h/g'
for f in $(git diff --name-only origin); do tools/sort-headers.py $f -f; done
git commit -a -m headers
# manually undo changes to gypi file
git cl upload # patch set 1
2.)
git grep -l 'scoped_nsobject<' | xargs sed -i -e 's/scoped_nsobject</base::scoped_nsobject</g'
# manually undo comment changes in scoped_nsobject.h, tracking_area.h
git commit -a -m format
git cl upload # patch set 2
# Manually audit all files, file bugs and clean up bad clang-format decisions
git cl upload # patch set 3
BUG=251957
TBR=mark@chromium.org
Review URL: https://codereview.chromium.org/17593006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208283 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/mac')
-rw-r--r-- | base/mac/mac_util.mm | 16 | ||||
-rw-r--r-- | base/mac/mac_util_unittest.mm | 7 | ||||
-rw-r--r-- | base/mac/scoped_sending_event.h | 2 |
3 files changed, 13 insertions, 12 deletions
diff --git a/base/mac/mac_util.mm b/base/mac/mac_util.mm index e924f90..04311ec 100644 --- a/base/mac/mac_util.mm +++ b/base/mac/mac_util.mm @@ -19,7 +19,7 @@ #include "base/mac/mac_logging.h" #include "base/mac/scoped_cftyperef.h" #include "base/mac/scoped_ioobject.h" -#include "base/memory/scoped_nsobject.h" +#include "base/mac/scoped_nsobject.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_piece.h" #include "base/strings/sys_string_conversions.h" @@ -99,7 +99,7 @@ LSSharedFileListItemRef GetLoginItemForApp() { return NULL; } - scoped_nsobject<NSArray> login_items_array( + base::scoped_nsobject<NSArray> login_items_array( CFToNSCast(LSSharedFileListCopySnapshot(login_items, NULL))); NSURL* url = [NSURL fileURLWithPath:[base::mac::MainBundle() bundlePath]]; @@ -489,17 +489,17 @@ void RemoveFromLoginItems() { bool WasLaunchedAsLoginOrResumeItem() { ProcessSerialNumber psn = { 0, kCurrentProcess }; - scoped_nsobject<NSDictionary> process_info( - CFToNSCast(ProcessInformationCopyDictionary(&psn, - kProcessDictionaryIncludeAllInformationMask))); + base::scoped_nsobject<NSDictionary> process_info( + 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( - CFToNSCast(ProcessInformationCopyDictionary(&parent_psn, - kProcessDictionaryIncludeAllInformationMask))); + base::scoped_nsobject<NSDictionary> parent_info( + CFToNSCast(ProcessInformationCopyDictionary( + &parent_psn, kProcessDictionaryIncludeAllInformationMask))); // Check that creator process code is that of loginwindow. BOOL result = diff --git a/base/mac/mac_util_unittest.mm b/base/mac/mac_util_unittest.mm index 44cc5ec..0e52cbc 100644 --- a/base/mac/mac_util_unittest.mm +++ b/base/mac/mac_util_unittest.mm @@ -11,7 +11,7 @@ #include "base/files/scoped_temp_dir.h" #include "base/mac/foundation_util.h" #include "base/mac/scoped_cftyperef.h" -#include "base/memory/scoped_nsobject.h" +#include "base/mac/scoped_nsobject.h" #include "base/sys_info.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" @@ -125,7 +125,7 @@ TEST_F(MacUtilTest, TestExcludeFileFromBackups) { } TEST_F(MacUtilTest, CopyNSImageToCGImage) { - scoped_nsobject<NSImage> nsImage( + base::scoped_nsobject<NSImage> nsImage( [[NSImage alloc] initWithSize:NSMakeSize(20, 20)]); [nsImage lockFocus]; [[NSColor redColor] set]; @@ -139,7 +139,8 @@ TEST_F(MacUtilTest, CopyNSImageToCGImage) { } TEST_F(MacUtilTest, NSObjectRetainRelease) { - scoped_nsobject<NSArray> array([[NSArray alloc] initWithObjects:@"foo", nil]); + base::scoped_nsobject<NSArray> array( + [[NSArray alloc] initWithObjects:@"foo", nil]); EXPECT_EQ(1U, [array retainCount]); NSObjectRetain(array); diff --git a/base/mac/scoped_sending_event.h b/base/mac/scoped_sending_event.h index 62bb31f..75cfec8 100644 --- a/base/mac/scoped_sending_event.h +++ b/base/mac/scoped_sending_event.h @@ -7,7 +7,7 @@ #include "base/base_export.h" #include "base/basictypes.h" -#include "base/memory/scoped_nsobject.h" +#include "base/mac/scoped_nsobject.h" #include "base/message_loop/message_pump_mac.h" // Nested event loops can pump IPC messages, including |