diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-07 19:21:48 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-07 19:21:48 +0000 |
commit | a732916421eb01c3a06187bf3e077e8ce0dd5912 (patch) | |
tree | 4981b7c3ceb04be445f093c1a7689107725f736e /chrome/common/mac | |
parent | 2dec8ec385e65c80571c5723dc572264a934b7c9 (diff) | |
download | chromium_src-a732916421eb01c3a06187bf3e077e8ce0dd5912.zip chromium_src-a732916421eb01c3a06187bf3e077e8ce0dd5912.tar.gz chromium_src-a732916421eb01c3a06187bf3e077e8ce0dd5912.tar.bz2 |
Use base namespace for FilePath in chrome/common and content/common.
Review URL: https://codereview.chromium.org/12210058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181350 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/mac')
-rw-r--r-- | chrome/common/mac/app_mode_chrome_locator.mm | 8 | ||||
-rw-r--r-- | chrome/common/mac/app_mode_chrome_locator_unittest.mm | 20 | ||||
-rw-r--r-- | chrome/common/mac/app_mode_common.h | 10 | ||||
-rw-r--r-- | chrome/common/mac/mock_launchd.cc | 16 | ||||
-rw-r--r-- | chrome/common/mac/mock_launchd.h | 10 |
5 files changed, 32 insertions, 32 deletions
diff --git a/chrome/common/mac/app_mode_chrome_locator.mm b/chrome/common/mac/app_mode_chrome_locator.mm index 6ca56a7..292099d 100644 --- a/chrome/common/mac/app_mode_chrome_locator.mm +++ b/chrome/common/mac/app_mode_chrome_locator.mm @@ -14,7 +14,7 @@ namespace app_mode { -bool FindBundleById(NSString* bundle_id, FilePath* out_bundle) { +bool FindBundleById(NSString* bundle_id, base::FilePath* out_bundle) { NSWorkspace* ws = [NSWorkspace sharedWorkspace]; NSString *bundlePath = [ws absolutePathForAppBundleWithIdentifier:bundle_id]; if (!bundlePath) @@ -24,10 +24,10 @@ bool FindBundleById(NSString* bundle_id, FilePath* out_bundle) { return true; } -bool GetChromeBundleInfo(const FilePath& chrome_bundle, +bool GetChromeBundleInfo(const base::FilePath& chrome_bundle, string16* raw_version_str, - FilePath* version_path, - FilePath* framework_shlib_path) { + base::FilePath* version_path, + base::FilePath* framework_shlib_path) { using base::mac::ObjCCast; NSString* cr_bundle_path = base::mac::FilePathToNSString(chrome_bundle); diff --git a/chrome/common/mac/app_mode_chrome_locator_unittest.mm b/chrome/common/mac/app_mode_chrome_locator_unittest.mm index 2713ddc..69ea8a8 100644 --- a/chrome/common/mac/app_mode_chrome_locator_unittest.mm +++ b/chrome/common/mac/app_mode_chrome_locator_unittest.mm @@ -17,25 +17,25 @@ namespace { // Return the path to the Chrome/Chromium app bundle compiled along with the // test executable. -void GetChromeBundlePath(FilePath* chrome_bundle) { - FilePath path; +void GetChromeBundlePath(base::FilePath* chrome_bundle) { + base::FilePath path; PathService::Get(base::DIR_EXE, &path); path = path.Append(chrome::kBrowserProcessExecutableNameChromium); - path = path.ReplaceExtension(FilePath::StringType("app")); + path = path.ReplaceExtension(base::FilePath::StringType("app")); *chrome_bundle = path; } } // namespace TEST(ChromeLocatorTest, FindBundle) { - FilePath finder_bundle_path; + base::FilePath finder_bundle_path; EXPECT_TRUE( app_mode::FindBundleById(@"com.apple.finder", &finder_bundle_path)); EXPECT_TRUE(file_util::DirectoryExists(finder_bundle_path)); } TEST(ChromeLocatorTest, FindNonExistentBundle) { - FilePath dummy; + base::FilePath dummy; EXPECT_FALSE(app_mode::FindBundleById(@"this.doesnt.exist", &dummy)); } @@ -44,8 +44,8 @@ TEST(ChromeLocatorTest, GetNonExistentBundleInfo) { ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); string16 raw_version; - FilePath version_path; - FilePath framework_path; + base::FilePath version_path; + base::FilePath framework_path; EXPECT_FALSE(app_mode::GetChromeBundleInfo(temp_dir.path(), &raw_version, &version_path, &framework_path)); } @@ -53,13 +53,13 @@ TEST(ChromeLocatorTest, GetNonExistentBundleInfo) { TEST(ChromeLocatorTest, GetChromeBundleInfo) { using app_mode::GetChromeBundleInfo; - FilePath chrome_bundle_path; + base::FilePath chrome_bundle_path; GetChromeBundlePath(&chrome_bundle_path); ASSERT_TRUE(file_util::DirectoryExists(chrome_bundle_path)); string16 raw_version; - FilePath version_path; - FilePath framework_path; + base::FilePath version_path; + base::FilePath framework_path; EXPECT_TRUE(GetChromeBundleInfo(chrome_bundle_path, &raw_version, &version_path, &framework_path)); EXPECT_GT(raw_version.size(), 0U); diff --git a/chrome/common/mac/app_mode_common.h b/chrome/common/mac/app_mode_common.h index 4b604ff..2aef955 100644 --- a/chrome/common/mac/app_mode_common.h +++ b/chrome/common/mac/app_mode_common.h @@ -76,15 +76,15 @@ struct ChromeAppModeInfo { char** argv; // Required: v1.0 // Versioned path to the browser which is being loaded. - FilePath chrome_versioned_path; // Required: v1.0 + base::FilePath chrome_versioned_path; // Required: v1.0 // Path to Chrome app bundle. - FilePath chrome_outer_bundle_path; // Required: v1.0 + base::FilePath chrome_outer_bundle_path; // Required: v1.0 // Information about the App Mode shortcut: // Path to the App Mode Loader application bundle that launched the process. - FilePath app_mode_bundle_path; // Optional: v1.0 + base::FilePath app_mode_bundle_path; // Optional: v1.0 // Short ID string, preferably derived from |app_mode_short_name|. Should be // safe for the file system. @@ -97,10 +97,10 @@ struct ChromeAppModeInfo { std::string app_mode_url; // Required: v1.0 // Path to the app's user data directory. - FilePath user_data_dir; + base::FilePath user_data_dir; // Directory of the profile associated with the app. - FilePath profile_dir; + base::FilePath profile_dir; }; } // namespace app_mode diff --git a/chrome/common/mac/mock_launchd.cc b/chrome/common/mac/mock_launchd.cc index b6689d7..c6c196d 100644 --- a/chrome/common/mac/mock_launchd.cc +++ b/chrome/common/mac/mock_launchd.cc @@ -28,15 +28,15 @@ static const size_t kMaxPipeNameLength = sizeof(throwaway_sockaddr_un->sun_path); // static -bool MockLaunchd::MakeABundle(const FilePath& dst, +bool MockLaunchd::MakeABundle(const base::FilePath& dst, const std::string& name, - FilePath* bundle_root, - FilePath* executable) { + base::FilePath* bundle_root, + base::FilePath* executable) { *bundle_root = dst.Append(name + std::string(".app")); - FilePath contents = bundle_root->AppendASCII("Contents"); - FilePath mac_os = contents.AppendASCII("MacOS"); + base::FilePath contents = bundle_root->AppendASCII("Contents"); + base::FilePath mac_os = contents.AppendASCII("MacOS"); *executable = mac_os.Append(name); - FilePath info_plist = contents.Append("Info.plist"); + base::FilePath info_plist = contents.Append("Info.plist"); if (!file_util::CreateDirectory(mac_os)) { return false; @@ -93,7 +93,7 @@ bool MockLaunchd::MakeABundle(const FilePath& dst, return bundle.get(); } -MockLaunchd::MockLaunchd(const FilePath& file, MessageLoop* loop, +MockLaunchd::MockLaunchd(const base::FilePath& file, MessageLoop* loop, bool create_socket, bool as_service) : file_(file), message_loop_(loop), @@ -105,7 +105,7 @@ MockLaunchd::MockLaunchd(const FilePath& file, MessageLoop* loop, write_called_(false), delete_called_(false) { std::string pipe_suffix("_SOCKET"); - FilePath socket_path = file_; + base::FilePath socket_path = file_; while (socket_path.value().length() + pipe_suffix.length() > kMaxPipeNameLength - 2) { socket_path = socket_path.DirName(); diff --git a/chrome/common/mac/mock_launchd.h b/chrome/common/mac/mock_launchd.h index 147925c..0b52622 100644 --- a/chrome/common/mac/mock_launchd.h +++ b/chrome/common/mac/mock_launchd.h @@ -21,12 +21,12 @@ class MessageLoop; // http://crbug.com/76923 class MockLaunchd : public Launchd { public: - static bool MakeABundle(const FilePath& dst, + static bool MakeABundle(const base::FilePath& dst, const std::string& name, - FilePath* bundle_root, - FilePath* executable); + base::FilePath* bundle_root, + base::FilePath* executable); - MockLaunchd(const FilePath& file, MessageLoop* loop, + MockLaunchd(const base::FilePath& file, MessageLoop* loop, bool create_socket, bool as_service); virtual ~MockLaunchd(); @@ -60,7 +60,7 @@ class MockLaunchd : public Launchd { bool delete_called() const { return delete_called_; } private: - FilePath file_; + base::FilePath file_; std::string pipe_name_; MessageLoop* message_loop_; scoped_ptr<MultiProcessLock> running_lock_; |