diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-18 06:14:59 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-18 06:14:59 +0000 |
commit | 631a54712d79c39bb7fbd322e3e4dc6b2429686d (patch) | |
tree | ecefa4d7d12d7dd79e489065c2555781bab9b5f5 /chrome | |
parent | e541ac7357c2178ee785764ab0415f94f5ec9bd7 (diff) | |
download | chromium_src-631a54712d79c39bb7fbd322e3e4dc6b2429686d.zip chromium_src-631a54712d79c39bb7fbd322e3e4dc6b2429686d.tar.gz chromium_src-631a54712d79c39bb7fbd322e3e4dc6b2429686d.tar.bz2 |
Fix more remaining FilePath -> base::FilePath.
This removes the "using" in file_path.h for Mac since Mac now passes trybots with no using. It still leaves the using for Windows.
Review URL: https://codereview.chromium.org/12294008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183066 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/app/breakpad_win.cc | 3 | ||||
-rw-r--r-- | chrome/app/chrome_main_mac.mm | 4 | ||||
-rw-r--r-- | chrome/browser/chromeos/extensions/file_browser_event_router.cc | 2 | ||||
-rw-r--r-- | chrome/browser/ui/views/select_file_dialog_extension_unittest.cc | 2 | ||||
-rw-r--r-- | chrome/browser/web_applications/web_app_mac.mm | 8 | ||||
-rw-r--r-- | chrome/installer/launcher_support/chrome_launcher_support.cc | 20 | ||||
-rw-r--r-- | chrome/installer/util/delete_after_reboot_helper.cc | 10 |
7 files changed, 25 insertions, 24 deletions
diff --git a/chrome/app/breakpad_win.cc b/chrome/app/breakpad_win.cc index ef32042..08d1891 100644 --- a/chrome/app/breakpad_win.cc +++ b/chrome/app/breakpad_win.cc @@ -313,7 +313,8 @@ google_breakpad::CustomClientInfo* GetCustomInfo(const std::wstring& exe_path, const std::wstring& type, const std::wstring& channel) { scoped_ptr<FileVersionInfo> - version_info(FileVersionInfo::CreateFileVersionInfo(FilePath(exe_path))); + version_info(FileVersionInfo::CreateFileVersionInfo( + base::FilePath(exe_path))); std::wstring version, product; std::wstring special_build; diff --git a/chrome/app/chrome_main_mac.mm b/chrome/app/chrome_main_mac.mm index 7923836..65a70bf 100644 --- a/chrome/app/chrome_main_mac.mm +++ b/chrome/app/chrome_main_mac.mm @@ -19,7 +19,7 @@ #include "chrome/common/chrome_paths_internal.h" #include "policy/policy_constants.h" -void CheckUserDataDirPolicy(FilePath* user_data_dir) { +void CheckUserDataDirPolicy(base::FilePath* user_data_dir) { base::mac::ScopedNSAutoreleasePool pool; // Since the configuration management infrastructure is not initialized when @@ -32,7 +32,7 @@ void CheckUserDataDirPolicy(FilePath* user_data_dir) { // Now replace any vars the user might have used. string_value = policy::path_parser::ExpandPathVariables(string_value); - *user_data_dir = FilePath(string_value); + *user_data_dir = base::FilePath(string_value); } } diff --git a/chrome/browser/chromeos/extensions/file_browser_event_router.cc b/chrome/browser/chromeos/extensions/file_browser_event_router.cc index 66c9769..38f6316 100644 --- a/chrome/browser/chromeos/extensions/file_browser_event_router.cc +++ b/chrome/browser/chromeos/extensions/file_browser_event_router.cc @@ -673,7 +673,7 @@ void FileBrowserEventRouter::ShowRemovableDeviceInFileManager( chromeos::ScreenLocker::default_screen_locker()) return; - file_manager_util::OpenActionChoiceDialog(FilePath(mount_path)); + file_manager_util::OpenActionChoiceDialog(base::FilePath(mount_path)); } void FileBrowserEventRouter::OnDiskAdded( diff --git a/chrome/browser/ui/views/select_file_dialog_extension_unittest.cc b/chrome/browser/ui/views/select_file_dialog_extension_unittest.cc index 67ece85b..635031f 100644 --- a/chrome/browser/ui/views/select_file_dialog_extension_unittest.cc +++ b/chrome/browser/ui/views/select_file_dialog_extension_unittest.cc @@ -45,7 +45,7 @@ class TestListener : public ui::SelectFileDialog::Listener { int file_index() const { return file_index_; } // ui::SelectFileDialog::Listener implementation - virtual void FileSelected(const FilePath& path, + virtual void FileSelected(const base::FilePath& path, int index, void* params) OVERRIDE { selected_ = true; diff --git a/chrome/browser/web_applications/web_app_mac.mm b/chrome/browser/web_applications/web_app_mac.mm index ce6f208..5224191 100644 --- a/chrome/browser/web_applications/web_app_mac.mm +++ b/chrome/browser/web_applications/web_app_mac.mm @@ -258,7 +258,7 @@ namespace web_app { namespace internals { -FilePath GetAppBundleByExtensionId(std::string extension_id) { +base::FilePath GetAppBundleByExtensionId(std::string extension_id) { DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); // This matches APP_MODE_APP_BUNDLE_ID in chrome/chrome.gyp. std::string bundle_id = @@ -271,10 +271,10 @@ FilePath GetAppBundleByExtensionId(std::string extension_id) { base::mac::ScopedCFTypeRef<CFURLRef> url(url_ref); if (status != noErr) - return FilePath(); + return base::FilePath(); NSString* path_string = [base::mac::CFToNSCast(url.get()) path]; - return FilePath([path_string fileSystemRepresentation]); + return base::FilePath([path_string fileSystemRepresentation]); } bool CreatePlatformShortcuts( @@ -292,7 +292,7 @@ void DeletePlatformShortcuts( const ShellIntegration::ShortcutInfo& info) { DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE)); - FilePath bundle_path = GetAppBundleByExtensionId(info.extension_id); + base::FilePath bundle_path = GetAppBundleByExtensionId(info.extension_id); file_util::Delete(bundle_path, true); } diff --git a/chrome/installer/launcher_support/chrome_launcher_support.cc b/chrome/installer/launcher_support/chrome_launcher_support.cc index 9e84f12..8731d71 100644 --- a/chrome/installer/launcher_support/chrome_launcher_support.cc +++ b/chrome/installer/launcher_support/chrome_launcher_support.cc @@ -45,7 +45,7 @@ const wchar_t kUninstallArgumentsField[] = L"UninstallArguments"; const wchar_t kUninstallStringField[] = L"UninstallString"; #ifndef OFFICIAL_BUILD -FilePath GetDevelopmentExe(const wchar_t* exe_file) { +base::FilePath GetDevelopmentExe(const wchar_t* exe_file) { base::FilePath current_directory; if (PathService::Get(base::DIR_EXE, ¤t_directory)) { base::FilePath chrome_exe_path(current_directory.Append(exe_file)); @@ -107,8 +107,8 @@ bool IsAppLauncherEnabledAtLevel(InstallationLevel level) { // Reads the path to setup.exe from the value "UninstallString" within the // specified product's "ClientState" registry key. Returns an empty FilePath if // an error occurs or the product is not installed at the specified level. -FilePath GetSetupExeFromRegistry(InstallationLevel level, - const wchar_t* app_guid) { +base::FilePath GetSetupExeFromRegistry(InstallationLevel level, + const wchar_t* app_guid) { string16 uninstall; if (GetClientStateValue(level, app_guid, kUninstallStringField, &uninstall)) { base::FilePath setup_exe_path(uninstall); @@ -121,8 +121,8 @@ FilePath GetSetupExeFromRegistry(InstallationLevel level, // Returns the path to an installed |exe_file| (e.g. chrome.exe, app_host.exe) // at the specified level, given |setup_exe_path| from Omaha client state. // Returns empty base::FilePath if none found, or if |setup_exe_path| is empty. -FilePath FindExeRelativeToSetupExe(const base::FilePath setup_exe_path, - const wchar_t* exe_file) { +base::FilePath FindExeRelativeToSetupExe(const base::FilePath setup_exe_path, + const wchar_t* exe_file) { if (!setup_exe_path.empty()) { // The uninstall path contains the path to setup.exe, which is two levels // down from |exe_file|. Move up two levels (plus one to drop the file @@ -142,7 +142,7 @@ FilePath FindExeRelativeToSetupExe(const base::FilePath setup_exe_path, } // namespace -FilePath GetSetupExeForInstallationLevel(InstallationLevel level) { +base::FilePath GetSetupExeForInstallationLevel(InstallationLevel level) { // Look in the registry for Chrome Binaries first. base::FilePath setup_exe_path( GetSetupExeFromRegistry(level, kBinariesAppGuid)); @@ -153,17 +153,17 @@ FilePath GetSetupExeForInstallationLevel(InstallationLevel level) { return setup_exe_path; } -FilePath GetChromePathForInstallationLevel(InstallationLevel level) { +base::FilePath GetChromePathForInstallationLevel(InstallationLevel level) { return FindExeRelativeToSetupExe( GetSetupExeForInstallationLevel(level), kChromeExe); } -FilePath GetAppHostPathForInstallationLevel(InstallationLevel level) { +base::FilePath GetAppHostPathForInstallationLevel(InstallationLevel level) { return FindExeRelativeToSetupExe( GetSetupExeFromRegistry(level, kAppHostAppId), kChromeAppHostExe); } -FilePath GetAnyChromePath() { +base::FilePath GetAnyChromePath() { base::FilePath chrome_path; #ifndef OFFICIAL_BUILD // For development mode, chrome.exe should be in same dir as the stub. @@ -176,7 +176,7 @@ FilePath GetAnyChromePath() { return chrome_path; } -FilePath GetAnyAppHostPath() { +base::FilePath GetAnyAppHostPath() { base::FilePath app_host_path; #ifndef OFFICIAL_BUILD // For development mode, app_host.exe should be in same dir as chrome.exe. diff --git a/chrome/installer/util/delete_after_reboot_helper.cc b/chrome/installer/util/delete_after_reboot_helper.cc index e21d6e5..cc76b0e 100644 --- a/chrome/installer/util/delete_after_reboot_helper.cc +++ b/chrome/installer/util/delete_after_reboot_helper.cc @@ -62,7 +62,7 @@ bool ScheduleFileSystemEntityForDeletion(const wchar_t* path) { } DWORD flags = MOVEFILE_DELAY_UNTIL_REBOOT; - if (!file_util::DirectoryExists(FilePath::FromWStringHack(path))) { + if (!file_util::DirectoryExists(base::FilePath::FromWStringHack(path))) { // This flag valid only for files flags |= MOVEFILE_REPLACE_EXISTING; } @@ -116,9 +116,9 @@ bool ScheduleDirectoryForDeletion(const wchar_t* dir_name) { // First schedule all the normal files for deletion. { bool success = true; - file_util::FileEnumerator file_enum(FilePath(dir_name), false, + file_util::FileEnumerator file_enum(base::FilePath(dir_name), false, file_util::FileEnumerator::FILES); - for (FilePath file = file_enum.Next(); !file.empty(); + for (base::FilePath file = file_enum.Next(); !file.empty(); file = file_enum.Next()) { success = ScheduleFileSystemEntityForDeletion(file.value().c_str()); if (!success) { @@ -131,9 +131,9 @@ bool ScheduleDirectoryForDeletion(const wchar_t* dir_name) { // Then recurse to all the subdirectories. { bool success = true; - file_util::FileEnumerator dir_enum(FilePath(dir_name), false, + file_util::FileEnumerator dir_enum(base::FilePath(dir_name), false, file_util::FileEnumerator::DIRECTORIES); - for (FilePath sub_dir = dir_enum.Next(); !sub_dir.empty(); + for (base::FilePath sub_dir = dir_enum.Next(); !sub_dir.empty(); sub_dir = dir_enum.Next()) { success = ScheduleDirectoryForDeletion(sub_dir.value().c_str()); if (!success) { |