summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/webui
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-10 03:41:45 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-10 03:41:45 +0000
commit650b2d5cdcab7d2c473c00d15b9f343f3a3405bb (patch)
tree1343ea25d7d6086ac1279e1e0e32562b3b9b3477 /chrome/browser/ui/webui
parent6f3638708ff440a2e80662ce49acc41cdad51ecd (diff)
downloadchromium_src-650b2d5cdcab7d2c473c00d15b9f343f3a3405bb.zip
chromium_src-650b2d5cdcab7d2c473c00d15b9f343f3a3405bb.tar.gz
chromium_src-650b2d5cdcab7d2c473c00d15b9f343f3a3405bb.tar.bz2
Merge branch 'master' into file_path_browser
version control markers Merge branch 'master' into file_path_browser remove version control Fix typo Merge branch 'master' into file_path_browser Conflicts: chrome/browser/intents/native_services_browsertest.cc chrome/browser/ui/intents/native_file_picker_service.cc Merge branch 'master' into file_path_browser Conflicts: chrome/browser/chromeos/drive/drive_file_system.cc chrome/browser/chromeos/drive/drive_file_system.h chrome/browser/chromeos/drive/drive_file_system_interface.h chrome/browser/chromeos/drive/drive_file_system_unittest.cc chrome/browser/chromeos/drive/file_system/drive_operations.cc chrome/browser/chromeos/login/wallpaper_manager.cc chrome/browser/chromeos/login/wallpaper_manager.h chrome/browser/chromeos/login/wallpaper_manager_browsertest.cc chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.cc chrome/browser/google_apis/gdata_wapi_operations.cc chrome/browser/google_apis/gdata_wapi_operations.h chrome/browser/google_apis/gdata_wapi_operations_unittest.cc chrome/browser/profiles/off_the_record_profile_impl.cc chrome/browser/profiles/off_the_record_profile_impl.h chrome/browser/profiles/profile_impl.cc chrome/browser/profiles/profile_impl.h chrome/browser/profiles/profile_impl_io_data.cc chrome/browser/profiles/profile_impl_io_data.h chrome/browser/sync_file_system/drive_file_sync_client_unittest.cc chrome/browser/ui/webui/options/manage_profile_handler.cc Long lines long lines some long lines. long lines long lines Beginning of lines. Rename FilePath -> base::FilePath in chrome/browser git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181638 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/webui')
-rw-r--r--chrome/browser/ui/webui/about_ui.cc9
-rw-r--r--chrome/browser/ui/webui/bidi_checker_web_ui_test.cc15
-rw-r--r--chrome/browser/ui/webui/bookmarks_ui_browsertest.cc4
-rw-r--r--chrome/browser/ui/webui/chromeos/drive_internals_ui.cc30
-rw-r--r--chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc8
-rw-r--r--chrome/browser/ui/webui/downloads_dom_handler.cc2
-rw-r--r--chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc4
-rw-r--r--chrome/browser/ui/webui/extensions/extension_settings_handler.cc7
-rw-r--r--chrome/browser/ui/webui/extensions/install_extension_handler.cc2
-rw-r--r--chrome/browser/ui/webui/extensions/install_extension_handler.h2
-rw-r--r--chrome/browser/ui/webui/extensions/pack_extension_handler.cc19
-rw-r--r--chrome/browser/ui/webui/extensions/pack_extension_handler.h8
-rw-r--r--chrome/browser/ui/webui/feedback_ui.cc13
-rw-r--r--chrome/browser/ui/webui/feedback_ui_unittest.cc7
-rw-r--r--chrome/browser/ui/webui/fileicon_source.cc10
-rw-r--r--chrome/browser/ui/webui/fileicon_source.h2
-rw-r--r--chrome/browser/ui/webui/fileicon_source_unittest.cc11
-rw-r--r--chrome/browser/ui/webui/nacl_ui.cc2
-rw-r--r--chrome/browser/ui/webui/net_export_ui.cc12
-rw-r--r--chrome/browser/ui/webui/net_internals/net_internals_ui.cc24
-rw-r--r--chrome/browser/ui/webui/ntp/most_visited_browsertest.cc2
-rw-r--r--chrome/browser/ui/webui/options/advanced_options_utils_win.cc6
-rw-r--r--chrome/browser/ui/webui/options/advanced_options_utils_x11.cc2
-rw-r--r--chrome/browser/ui/webui/options/browser_options_handler.cc19
-rw-r--r--chrome/browser/ui/webui/options/browser_options_handler.h4
-rw-r--r--chrome/browser/ui/webui/options/certificate_manager_handler.cc37
-rw-r--r--chrome/browser/ui/webui/options/certificate_manager_handler.h12
-rw-r--r--chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc4
-rw-r--r--chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.h2
-rw-r--r--chrome/browser/ui/webui/options/manage_profile_handler.cc19
-rw-r--r--chrome/browser/ui/webui/options/media_galleries_handler.cc6
-rw-r--r--chrome/browser/ui/webui/options/media_galleries_handler.h2
-rw-r--r--chrome/browser/ui/webui/plugins_ui.cc4
-rw-r--r--chrome/browser/ui/webui/print_preview/print_preview_handler.cc19
-rw-r--r--chrome/browser/ui/webui/print_preview/sticky_settings.cc10
-rw-r--r--chrome/browser/ui/webui/profiler_ui.cc4
-rw-r--r--chrome/browser/ui/webui/screenshot_source.cc8
-rw-r--r--chrome/browser/ui/webui/sync_setup_handler.cc2
-rw-r--r--chrome/browser/ui/webui/version_handler.cc7
39 files changed, 188 insertions, 172 deletions
diff --git a/chrome/browser/ui/webui/about_ui.cc b/chrome/browser/ui/webui/about_ui.cc
index 46806d6..0d133b8 100644
--- a/chrome/browser/ui/webui/about_ui.cc
+++ b/chrome/browser/ui/webui/about_ui.cc
@@ -173,7 +173,7 @@ class ChromeOSTermsHandler
const chromeos::StartupCustomizationDocument* customization =
chromeos::StartupCustomizationDocument::GetInstance();
if (customization->IsReady()) {
- FilePath oem_eula_file_path;
+ base::FilePath oem_eula_file_path;
if (net::FileURLToFilePath(GURL(customization->GetEULAPage(locale_)),
&oem_eula_file_path)) {
if (!file_util::ReadFileToString(oem_eula_file_path, &contents_)) {
@@ -184,10 +184,11 @@ class ChromeOSTermsHandler
} else {
std::string file_path =
StringPrintf(chrome::kEULAPathFormat, locale_.c_str());
- if (!file_util::ReadFileToString(FilePath(file_path), &contents_)) {
+ if (!file_util::ReadFileToString(base::FilePath(file_path), &contents_)) {
// No EULA for given language - try en-US as default.
file_path = StringPrintf(chrome::kEULAPathFormat, "en-US");
- if (!file_util::ReadFileToString(FilePath(file_path), &contents_)) {
+ if (!file_util::ReadFileToString(base::FilePath(file_path),
+ &contents_)) {
// File with EULA not found, ResponseOnUIThread will load EULA from
// resources if contents_ is empty.
contents_.clear();
@@ -746,7 +747,7 @@ std::string AboutLinuxProxyConfig() {
l10n_util::GetStringUTF8(IDS_ABOUT_LINUX_PROXY_CONFIG_TITLE));
data.append("<style>body { max-width: 70ex; padding: 2ex 5ex; }</style>");
AppendBody(&data);
- FilePath binary = CommandLine::ForCurrentProcess()->GetProgram();
+ base::FilePath binary = CommandLine::ForCurrentProcess()->GetProgram();
data.append(l10n_util::GetStringFUTF8(
IDS_ABOUT_LINUX_PROXY_CONFIG_BODY,
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME),
diff --git a/chrome/browser/ui/webui/bidi_checker_web_ui_test.cc b/chrome/browser/ui/webui/bidi_checker_web_ui_test.cc
index 237ac26..86995cf 100644
--- a/chrome/browser/ui/webui/bidi_checker_web_ui_test.cc
+++ b/chrome/browser/ui/webui/bidi_checker_web_ui_test.cc
@@ -33,12 +33,12 @@
#include <gtk/gtk.h>
#endif
-static const FilePath::CharType* kWebUIBidiCheckerLibraryJS =
+static const base::FilePath::CharType* kWebUIBidiCheckerLibraryJS =
FILE_PATH_LITERAL("third_party/bidichecker/bidichecker_packaged.js");
namespace {
-FilePath WebUIBidiCheckerLibraryJSPath() {
- FilePath src_root;
+base::FilePath WebUIBidiCheckerLibraryJSPath() {
+ base::FilePath src_root;
if (!PathService::Get(base::DIR_SOURCE_ROOT, &src_root))
LOG(ERROR) << "Couldn't find source root";
return src_root.Append(kWebUIBidiCheckerLibraryJS);
@@ -77,7 +77,7 @@ void ReloadLocaleResources(const std::string& new_locale) {
} // namespace
-static const FilePath::CharType* kBidiCheckerTestsJS =
+static const base::FilePath::CharType* kBidiCheckerTestsJS =
FILE_PATH_LITERAL("bidichecker_tests.js");
void WebUIBidiCheckerBrowserTest::SetUp() {
@@ -104,7 +104,7 @@ WebUIBidiCheckerBrowserTest::WebUIBidiCheckerBrowserTest() {}
void WebUIBidiCheckerBrowserTest::SetUpInProcessBrowserTestFixture() {
WebUIBrowserTest::SetUpInProcessBrowserTestFixture();
WebUIBrowserTest::AddLibrary(WebUIBidiCheckerLibraryJSPath());
- WebUIBrowserTest::AddLibrary(FilePath(kBidiCheckerTestsJS));
+ WebUIBrowserTest::AddLibrary(base::FilePath(kBidiCheckerTestsJS));
}
void WebUIBidiCheckerBrowserTest::RunBidiCheckerOnPage(
@@ -127,7 +127,7 @@ void WebUIBidiCheckerBrowserTestRTL::RunBidiCheckerOnPage(
void WebUIBidiCheckerBrowserTestRTL::SetUpOnMainThread() {
WebUIBidiCheckerBrowserTest::SetUpOnMainThread();
- FilePath pak_path;
+ base::FilePath pak_path;
app_locale_ = base::i18n::GetConfiguredLocale();
ASSERT_TRUE(PathService::Get(base::FILE_MODULE, &pak_path));
pak_path = pak_path.DirName();
@@ -149,7 +149,8 @@ void WebUIBidiCheckerBrowserTestRTL::CleanUpOnMainThread() {
#endif
base::i18n::SetICUDefaultLocale(app_locale_);
- ResourceBundle::GetSharedInstance().OverrideLocalePakForTest(FilePath());
+ ResourceBundle::GetSharedInstance().OverrideLocalePakForTest(
+ base::FilePath());
ReloadLocaleResources(app_locale_);
}
diff --git a/chrome/browser/ui/webui/bookmarks_ui_browsertest.cc b/chrome/browser/ui/webui/bookmarks_ui_browsertest.cc
index 69c8f7a..3ac942d 100644
--- a/chrome/browser/ui/webui/bookmarks_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/bookmarks_ui_browsertest.cc
@@ -63,8 +63,8 @@ IN_PROC_BROWSER_TEST_F(BookmarksTest, CommandOpensBookmarksTab) {
IN_PROC_BROWSER_TEST_F(BookmarksTest, CommandAgainGoesBackToBookmarksTab) {
ui_test_utils::NavigateToURL(
browser(),
- ui_test_utils::GetTestUrl(FilePath(),
- FilePath().AppendASCII("simple.html")));
+ ui_test_utils::GetTestUrl(base::FilePath(),
+ base::FilePath().AppendASCII("simple.html")));
ASSERT_EQ(1, browser()->tab_strip_model()->count());
// Bring up the bookmarks manager tab.
diff --git a/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc b/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc
index a92f26a..1c5fe67 100644
--- a/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/drive_internals_ui.cc
@@ -54,12 +54,12 @@ namespace {
// },...]
//
// The list is sorted by the path.
-void GetGCacheContents(const FilePath& root_path,
+void GetGCacheContents(const base::FilePath& root_path,
base::ListValue* gcache_contents,
base::DictionaryValue* gcache_summary) {
using file_util::FileEnumerator;
// Use this map to sort the result list by the path.
- std::map<FilePath, DictionaryValue*> files;
+ std::map<base::FilePath, DictionaryValue*> files;
const int options = (file_util::FileEnumerator::FILES |
file_util::FileEnumerator::DIRECTORIES |
@@ -67,7 +67,7 @@ void GetGCacheContents(const FilePath& root_path,
FileEnumerator enumerator(root_path, true /* recursive */, options);
int64 total_size = 0;
- for (FilePath current = enumerator.Next(); !current.empty();
+ for (base::FilePath current = enumerator.Next(); !current.empty();
current = enumerator.Next()) {
FileEnumerator::FindInfo find_info;
enumerator.GetFindInfo(&find_info);
@@ -93,7 +93,7 @@ void GetGCacheContents(const FilePath& root_path,
}
// Convert |files| into |gcache_contents|.
- for (std::map<FilePath, DictionaryValue*>::const_iterator
+ for (std::map<base::FilePath, DictionaryValue*>::const_iterator
iter = files.begin(); iter != files.end(); ++iter) {
gcache_contents->Append(iter->second);
}
@@ -102,7 +102,7 @@ void GetGCacheContents(const FilePath& root_path,
}
// Gets the available disk space for the path |home_path|.
-void GetFreeDiskSpace(const FilePath& home_path,
+void GetFreeDiskSpace(const base::FilePath& home_path,
base::DictionaryValue* local_storage_summary) {
DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(local_storage_summary);
@@ -112,7 +112,7 @@ void GetFreeDiskSpace(const FilePath& home_path,
}
// Formats |entry| into text.
-std::string FormatEntry(const FilePath& path,
+std::string FormatEntry(const base::FilePath& path,
const drive::DriveEntryProto& entry) {
using base::StringAppendF;
using google_apis::util::FormatTimeAsString;
@@ -213,12 +213,12 @@ class DriveInternalsWebUIHandler : public content::WebUIMessageHandler {
base::DictionaryValue* cache_summary);
// Called when GetEntryInfoByPath() is complete.
- void OnGetEntryInfoByPath(const FilePath& path,
+ void OnGetEntryInfoByPath(const base::FilePath& path,
drive::DriveFileError error,
scoped_ptr<drive::DriveEntryProto> entry);
// Called when ReadDirectoryByPath() is complete.
- void OnReadDirectoryByPath(const FilePath& parent_path,
+ void OnReadDirectoryByPath(const base::FilePath& parent_path,
drive::DriveFileError error,
bool hide_hosted_documents,
scoped_ptr<drive::DriveEntryProtoVector> entries);
@@ -514,7 +514,7 @@ void DriveInternalsWebUIHandler::UpdateInFlightOperationsSection(
void DriveInternalsWebUIHandler::UpdateGCacheContentsSection() {
// Start updating the GCache contents section.
Profile* profile = Profile::FromWebUI(web_ui());
- const FilePath root_path =
+ const base::FilePath root_path =
drive::DriveCache::GetCacheRootPath(profile);
base::ListValue* gcache_contents = new ListValue;
base::DictionaryValue* gcache_summary = new DictionaryValue;
@@ -541,7 +541,7 @@ void DriveInternalsWebUIHandler::UpdateFileSystemContentsSection(
return;
// Start rendering the file system tree as text.
- const FilePath root_path = FilePath(drive::kDriveRootDirectory);
+ const base::FilePath root_path = base::FilePath(drive::kDriveRootDirectory);
++num_pending_reads_;
system_service->file_system()->GetEntryInfoByPath(
root_path,
@@ -559,7 +559,7 @@ void DriveInternalsWebUIHandler::UpdateFileSystemContentsSection(
void DriveInternalsWebUIHandler::UpdateLocalStorageUsageSection() {
// Propagate the amount of local free space in bytes.
- FilePath home_path;
+ base::FilePath home_path;
if (PathService::Get(base::DIR_HOME, &home_path)) {
base::DictionaryValue* local_storage_summary = new DictionaryValue;
BrowserThread::PostBlockingPoolTaskAndReply(
@@ -613,7 +613,7 @@ void DriveInternalsWebUIHandler::OnGetGCacheContents(
}
void DriveInternalsWebUIHandler::OnGetEntryInfoByPath(
- const FilePath& path,
+ const base::FilePath& path,
drive::DriveFileError error,
scoped_ptr<drive::DriveEntryProto> entry) {
--num_pending_reads_;
@@ -625,7 +625,7 @@ void DriveInternalsWebUIHandler::OnGetEntryInfoByPath(
}
void DriveInternalsWebUIHandler::OnReadDirectoryByPath(
- const FilePath& parent_path,
+ const base::FilePath& parent_path,
drive::DriveFileError error,
bool hide_hosted_documents,
scoped_ptr<drive::DriveEntryProtoVector> entries) {
@@ -636,8 +636,8 @@ void DriveInternalsWebUIHandler::OnReadDirectoryByPath(
std::string file_system_as_text;
for (size_t i = 0; i < entries->size(); ++i) {
const drive::DriveEntryProto& entry = (*entries)[i];
- const FilePath current_path = parent_path.Append(
- FilePath::FromUTF8Unsafe(entry.base_name()));
+ const base::FilePath current_path = parent_path.Append(
+ base::FilePath::FromUTF8Unsafe(entry.base_name()));
file_system_as_text.append(FormatEntry(current_path, entry) + "\n");
diff --git a/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc b/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc
index 62e9d84..9bbd3b4 100644
--- a/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/imageburner/imageburner_ui.cc
@@ -223,10 +223,10 @@ class WebUIHandler
// It may be called with NULL if there is a handler that has started burning,
// and thus set the target paths.
void HandleBurnImage(const ListValue* args) {
- FilePath target_device_path;
+ base::FilePath target_device_path;
ExtractTargetedDevicePath(*args, 0, &target_device_path);
- FilePath target_file_path;
+ base::FilePath target_file_path;
ExtractTargetedDevicePath(*args, 1, &target_file_path);
burn_controller_->StartBurnImage(target_device_path, target_file_path);
@@ -291,13 +291,13 @@ class WebUIHandler
// device_path has to be previously created.
void ExtractTargetedDevicePath(const ListValue& list_value,
int index,
- FilePath* device_path) {
+ base::FilePath* device_path) {
const Value* list_member;
std::string image_dest;
if (list_value.Get(index, &list_member) &&
list_member->GetType() == Value::TYPE_STRING &&
list_member->GetAsString(&image_dest)) {
- *device_path = FilePath(image_dest);
+ *device_path = base::FilePath(image_dest);
} else {
LOG(ERROR) << "Unable to get path string";
device_path->clear();
diff --git a/chrome/browser/ui/webui/downloads_dom_handler.cc b/chrome/browser/ui/webui/downloads_dom_handler.cc
index a9e3ee5..209a9ab 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler.cc
+++ b/chrome/browser/ui/webui/downloads_dom_handler.cc
@@ -125,7 +125,7 @@ DictionaryValue* CreateDownloadItemValue(
"date_string", base::TimeFormatShortDate(download_item->GetStartTime()));
file_value->SetInteger("id", download_item->GetId());
- FilePath download_path(download_item->GetTargetFilePath());
+ base::FilePath download_path(download_item->GetTargetFilePath());
file_value->Set("file_path", base::CreateFilePathValue(download_path));
file_value->SetString("file_url",
net::FilePathToFileURL(download_path).spec());
diff --git a/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc b/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc
index b0edd52..e6c981e 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc
+++ b/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc
@@ -144,8 +144,8 @@ IN_PROC_BROWSER_TEST_F(DownloadsDOMHandlerTest,
url_chain.push_back(url);
base::Time current(base::Time::Now());
download_manager()->CreateDownloadItem(
- FilePath(FILE_PATH_LITERAL("/path/to/file")),
- FilePath(FILE_PATH_LITERAL("/path/to/file")),
+ base::FilePath(FILE_PATH_LITERAL("/path/to/file")),
+ base::FilePath(FILE_PATH_LITERAL("/path/to/file")),
url_chain,
GURL(""),
current,
diff --git a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
index f688818..b15ec70 100644
--- a/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
+++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.cc
@@ -411,14 +411,15 @@ void ExtensionSettingsHandler::RegisterMessages() {
base::Unretained(this)));
}
-void ExtensionSettingsHandler::FileSelected(const FilePath& path, int index,
+void ExtensionSettingsHandler::FileSelected(const base::FilePath& path,
+ int index,
void* params) {
- last_unpacked_directory_ = FilePath(path);
+ last_unpacked_directory_ = base::FilePath(path);
extensions::UnpackedInstaller::Create(extension_service_)->Load(path);
}
void ExtensionSettingsHandler::MultiFilesSelected(
- const std::vector<FilePath>& files, void* params) {
+ const std::vector<base::FilePath>& files, void* params) {
NOTREACHED();
}
diff --git a/chrome/browser/ui/webui/extensions/install_extension_handler.cc b/chrome/browser/ui/webui/extensions/install_extension_handler.cc
index 14c5c8c..c01b800 100644
--- a/chrome/browser/ui/webui/extensions/install_extension_handler.cc
+++ b/chrome/browser/ui/webui/extensions/install_extension_handler.cc
@@ -65,7 +65,7 @@ void InstallExtensionHandler::HandleStartDragMessage(const ListValue* args) {
return;
}
- file_to_install_ = FilePath::FromWStringHack(
+ file_to_install_ = base::FilePath::FromWStringHack(
UTF16ToWide(drop_data->filenames.front().path));
}
diff --git a/chrome/browser/ui/webui/extensions/install_extension_handler.h b/chrome/browser/ui/webui/extensions/install_extension_handler.h
index 5c32e7a..c029d9a 100644
--- a/chrome/browser/ui/webui/extensions/install_extension_handler.h
+++ b/chrome/browser/ui/webui/extensions/install_extension_handler.h
@@ -43,7 +43,7 @@ class InstallExtensionHandler : public content::WebUIMessageHandler {
void HandleInstallMessage(const ListValue* args);
// The extension that will be installed when HandleInstallMessage() is called.
- FilePath file_to_install_;
+ base::FilePath file_to_install_;
DISALLOW_COPY_AND_ASSIGN(InstallExtensionHandler);
};
diff --git a/chrome/browser/ui/webui/extensions/pack_extension_handler.cc b/chrome/browser/ui/webui/extensions/pack_extension_handler.cc
index 13d81c7..a69cd4d 100644
--- a/chrome/browser/ui/webui/extensions/pack_extension_handler.cc
+++ b/chrome/browser/ui/webui/extensions/pack_extension_handler.cc
@@ -64,8 +64,8 @@ void PackExtensionHandler::RegisterMessages() {
base::Unretained(this)));
}
-void PackExtensionHandler::OnPackSuccess(const FilePath& crx_file,
- const FilePath& pem_file) {
+void PackExtensionHandler::OnPackSuccess(const base::FilePath& crx_file,
+ const base::FilePath& pem_file) {
ListValue arguments;
arguments.Append(Value::CreateStringValue(
UTF16ToUTF8(extensions::PackExtensionJob::StandardSuccessMessage(
@@ -92,7 +92,7 @@ void PackExtensionHandler::OnPackFailure(
}
}
-void PackExtensionHandler::FileSelected(const FilePath& path, int index,
+void PackExtensionHandler::FileSelected(const base::FilePath& path, int index,
void* params) {
ListValue results;
results.Append(Value::CreateStringValue(path.value()));
@@ -100,7 +100,7 @@ void PackExtensionHandler::FileSelected(const FilePath& path, int index,
}
void PackExtensionHandler::MultiFilesSelected(
- const std::vector<FilePath>& files, void* params) {
+ const std::vector<base::FilePath>& files, void* params) {
NOTREACHED();
}
@@ -118,9 +118,10 @@ void PackExtensionHandler::HandlePackMessage(const ListValue* args) {
int run_flags = static_cast<int>(flags_double);
- FilePath root_directory =
- FilePath::FromWStringHack(UTF8ToWide(extension_path_));
- FilePath key_file = FilePath::FromWStringHack(UTF8ToWide(private_key_path_));
+ base::FilePath root_directory =
+ base::FilePath::FromWStringHack(UTF8ToWide(extension_path_));
+ base::FilePath key_file =
+ base::FilePath::FromWStringHack(UTF8ToWide(private_key_path_));
if (root_directory.empty()) {
if (extension_path_.empty()) {
@@ -169,7 +170,7 @@ void PackExtensionHandler::HandleSelectFilePathMessage(
} else if (operation == "pem") {
select_title = l10n_util::GetStringUTF16(
IDS_EXTENSION_PACK_DIALOG_SELECT_KEY);
- info.extensions.push_back(std::vector<FilePath::StringType>());
+ info.extensions.push_back(std::vector<base::FilePath::StringType>());
info.extensions.front().push_back(FILE_PATH_LITERAL("pem"));
info.extension_description_overrides.push_back(
l10n_util::GetStringUTF16(
@@ -183,7 +184,7 @@ void PackExtensionHandler::HandleSelectFilePathMessage(
load_extension_dialog_ = ui::SelectFileDialog::Create(
this, new ChromeSelectFilePolicy(web_ui()->GetWebContents()));
load_extension_dialog_->SelectFile(
- type, select_title, FilePath(), &info, file_type_index,
+ type, select_title, base::FilePath(), &info, file_type_index,
FILE_PATH_LITERAL(""),
web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(),
NULL);
diff --git a/chrome/browser/ui/webui/extensions/pack_extension_handler.h b/chrome/browser/ui/webui/extensions/pack_extension_handler.h
index 986ec21..183a766 100644
--- a/chrome/browser/ui/webui/extensions/pack_extension_handler.h
+++ b/chrome/browser/ui/webui/extensions/pack_extension_handler.h
@@ -31,18 +31,18 @@ class PackExtensionHandler : public content::WebUIMessageHandler,
virtual void RegisterMessages() OVERRIDE;
// ExtensionPackJob::Client implementation.
- virtual void OnPackSuccess(const FilePath& crx_file,
- const FilePath& key_file) OVERRIDE;
+ virtual void OnPackSuccess(const base::FilePath& crx_file,
+ const base::FilePath& key_file) OVERRIDE;
virtual void OnPackFailure(const std::string& error,
extensions::ExtensionCreator::ErrorType) OVERRIDE;
private:
// SelectFileDialog::Listener implementation.
- virtual void FileSelected(const FilePath& path,
+ virtual void FileSelected(const base::FilePath& path,
int index, void* params) OVERRIDE;
virtual void MultiFilesSelected(
- const std::vector<FilePath>& files, void* params) OVERRIDE;
+ const std::vector<base::FilePath>& files, void* params) OVERRIDE;
virtual void FileSelectionCanceled(void* params) OVERRIDE {}
// JavaScript callback to start packing an extension.
diff --git a/chrome/browser/ui/webui/feedback_ui.cc b/chrome/browser/ui/webui/feedback_ui.cc
index e3c7c77..9199d8e 100644
--- a/chrome/browser/ui/webui/feedback_ui.cc
+++ b/chrome/browser/ui/webui/feedback_ui.cc
@@ -263,7 +263,8 @@ class FeedbackHandler : public WebUIMessageHandler,
void RefreshSavedScreenshotsCallback(
std::vector<std::string>* saved_screenshots);
void GetMostRecentScreenshotsDrive(
- const FilePath& filepath, std::vector<std::string>* saved_screenshots,
+ const base::FilePath& filepath,
+ std::vector<std::string>* saved_screenshots,
size_t max_saved, base::Closure callback);
#endif
void HandleSendReport(const ListValue* args);
@@ -556,7 +557,7 @@ void FeedbackHandler::HandleRefreshCurrentScreenshot(const ListValue*) {
#if defined(OS_CHROMEOS)
void FeedbackHandler::HandleRefreshSavedScreenshots(const ListValue*) {
std::vector<std::string>* saved_screenshots = new std::vector<std::string>;
- FilePath filepath = DownloadPrefs::FromBrowserContext(
+ base::FilePath filepath = DownloadPrefs::FromBrowserContext(
tab_->GetBrowserContext())->DownloadPath();
base::Closure refresh_callback = base::Bind(
&FeedbackHandler::RefreshSavedScreenshotsCallback,
@@ -582,7 +583,7 @@ void FeedbackHandler::RefreshSavedScreenshotsCallback(
}
void FeedbackHandler::GetMostRecentScreenshotsDrive(
- const FilePath& filepath, std::vector<std::string>* saved_screenshots,
+ const base::FilePath& filepath, std::vector<std::string>* saved_screenshots,
size_t max_saved, base::Closure callback) {
drive::DriveFileSystemInterface* file_system =
drive::DriveSystemServiceFactory::GetForProfile(
@@ -633,7 +634,7 @@ void FeedbackHandler::HandleSendReport(const ListValue* list_value) {
// If we have an attached file, we'll still have more data in the list.
if (i != list_value->end()) {
(*i++)->GetAsString(&attached_filename);
- if (FilePath::IsSeparator(attached_filename[0])) {
+ if (base::FilePath::IsSeparator(attached_filename[0])) {
// We have an attached filepath, not filename, hence we need read this
// this file in chrome. We won't have any file data, skip over it.
i++;
@@ -738,7 +739,7 @@ FeedbackUI::FeedbackUI(content::WebUI* web_ui)
#if defined(OS_CHROMEOS)
// static
void FeedbackUI::GetMostRecentScreenshots(
- const FilePath& filepath,
+ const base::FilePath& filepath,
std::vector<std::string>* saved_screenshots,
size_t max_saved) {
std::string pattern =
@@ -747,7 +748,7 @@ void FeedbackUI::GetMostRecentScreenshots(
file_util::FileEnumerator screenshots(filepath, false,
file_util::FileEnumerator::FILES,
pattern);
- FilePath screenshot = screenshots.Next();
+ base::FilePath screenshot = screenshots.Next();
std::vector<std::string> screenshot_filepaths;
while (!screenshot.empty()) {
diff --git a/chrome/browser/ui/webui/feedback_ui_unittest.cc b/chrome/browser/ui/webui/feedback_ui_unittest.cc
index ee185a8..6bcf7d3 100644
--- a/chrome/browser/ui/webui/feedback_ui_unittest.cc
+++ b/chrome/browser/ui/webui/feedback_ui_unittest.cc
@@ -16,7 +16,7 @@
namespace {
// Simple function to create a file with |filename|.
-void CreateFile(const FilePath& filename) {
+void CreateFile(const base::FilePath& filename) {
FILE* fp = file_util::OpenFile(filename, "w");
ASSERT_TRUE(fp != NULL);
file_util::CloseFile(fp);
@@ -40,7 +40,7 @@ class FeedbackUITest : public testing::Test {
}
protected:
void CreateScreenshotFile(const std::string& timestamp) {
- FilePath filepath = temp_dir_.path().Append(
+ base::FilePath filepath = temp_dir_.path().Append(
FILE_PATH_LITERAL(GetScreenshotFilename(timestamp)));
ASSERT_NO_FATAL_FAILURE(CreateFile(filepath));
}
@@ -54,7 +54,8 @@ class FeedbackUITest : public testing::Test {
TEST_F(FeedbackUITest, GetMostRecentScreenshotsNoScreenShot) {
// Create a random file.
- FilePath filepath = temp_dir_.path().Append(FILE_PATH_LITERAL("garbage.png"));
+ base::FilePath filepath =
+ temp_dir_.path().Append(FILE_PATH_LITERAL("garbage.png"));
ASSERT_NO_FATAL_FAILURE(CreateFile(filepath));
// Expect getting no screenshot.
FeedbackUI::GetMostRecentScreenshots(
diff --git a/chrome/browser/ui/webui/fileicon_source.cc b/chrome/browser/ui/webui/fileicon_source.cc
index 07a68a4..af8135a 100644
--- a/chrome/browser/ui/webui/fileicon_source.cc
+++ b/chrome/browser/ui/webui/fileicon_source.cc
@@ -40,7 +40,7 @@ const char kScaleFactor[] = "scale";
// a FilePath and return the resulting |file_path| and |query|. The path
// portion may have been encoded using encodeURIComponent().
void GetFilePathAndQuery(const std::string& url,
- FilePath* file_path,
+ base::FilePath* file_path,
std::string* query) {
// We receive the url with chrome://fileicon/ stripped but GURL expects it.
const GURL gurl("chrome://fileicon/" + url);
@@ -52,10 +52,10 @@ void GetFilePathAndQuery(const std::string& url,
// The path we receive has the wrong slashes and escaping for what we need;
// this only appears to matter for getting icons from .exe files.
std::replace(path.begin(), path.end(), '/', '\\');
- *file_path = FilePath(UTF8ToWide(path));
+ *file_path = base::FilePath(UTF8ToWide(path));
#elif defined(OS_POSIX)
// The correct encoding on Linux may not actually be UTF8.
- *file_path = FilePath(path);
+ *file_path = base::FilePath(path);
#endif
query->assign(gurl.query());
}
@@ -101,7 +101,7 @@ FileIconSource::FileIconSource() {}
FileIconSource::~FileIconSource() {}
void FileIconSource::FetchFileIcon(
- const FilePath& path,
+ const base::FilePath& path,
ui::ScaleFactor scale_factor,
IconLoader::IconSize icon_size,
const content::URLDataSource::GotDataCallback& callback) {
@@ -139,7 +139,7 @@ void FileIconSource::StartDataRequest(
bool is_incognito,
const content::URLDataSource::GotDataCallback& callback) {
std::string query;
- FilePath file_path;
+ base::FilePath file_path;
ui::ScaleFactor scale_factor;
IconLoader::IconSize icon_size;
GetFilePathAndQuery(url_path, &file_path, &query);
diff --git a/chrome/browser/ui/webui/fileicon_source.h b/chrome/browser/ui/webui/fileicon_source.h
index 679b3f3..ce8e54c 100644
--- a/chrome/browser/ui/webui/fileicon_source.h
+++ b/chrome/browser/ui/webui/fileicon_source.h
@@ -38,7 +38,7 @@ class FileIconSource : public content::URLDataSource {
// function is called to perform the actual fetch. Declared as virtual for
// testing.
virtual void FetchFileIcon(
- const FilePath& path,
+ const base::FilePath& path,
ui::ScaleFactor scale_factor,
IconLoader::IconSize icon_size,
const content::URLDataSource::GotDataCallback& callback);
diff --git a/chrome/browser/ui/webui/fileicon_source_unittest.cc b/chrome/browser/ui/webui/fileicon_source_unittest.cc
index 6c0e644..de99aed 100644
--- a/chrome/browser/ui/webui/fileicon_source_unittest.cc
+++ b/chrome/browser/ui/webui/fileicon_source_unittest.cc
@@ -21,7 +21,7 @@ class TestFileIconSource : public FileIconSource {
explicit TestFileIconSource() {}
MOCK_METHOD4(FetchFileIcon,
- void(const FilePath& path,
+ void(const base::FilePath& path,
ui::ScaleFactor scale_factor,
IconLoader::IconSize icon_size,
const content::URLDataSource::GotDataCallback& callback));
@@ -48,7 +48,7 @@ class FileIconSourceTest : public testing::Test {
const struct FetchFileIconExpectation {
const char* request_path;
- const FilePath::CharType* unescaped_path;
+ const base::FilePath::CharType* unescaped_path;
ui::ScaleFactor scale_factor;
IconLoader::IconSize size;
} kBasicExpectations[] = {
@@ -128,9 +128,10 @@ TEST_F(FileIconSourceTest, FileIconSource_Parse) {
scoped_ptr<TestFileIconSource> source(CreateFileIconSource());
content::URLDataSource::GotDataCallback callback;
EXPECT_CALL(*source.get(),
- FetchFileIcon(FilePath(kBasicExpectations[i].unescaped_path),
- kBasicExpectations[i].scale_factor,
- kBasicExpectations[i].size, CallbackIsNull()));
+ FetchFileIcon(
+ base::FilePath(kBasicExpectations[i].unescaped_path),
+ kBasicExpectations[i].scale_factor,
+ kBasicExpectations[i].size, CallbackIsNull()));
source->StartDataRequest(kBasicExpectations[i].request_path, false,
callback);
}
diff --git a/chrome/browser/ui/webui/nacl_ui.cc b/chrome/browser/ui/webui/nacl_ui.cc
index f59c029..6afc235 100644
--- a/chrome/browser/ui/webui/nacl_ui.cc
+++ b/chrome/browser/ui/webui/nacl_ui.cc
@@ -231,7 +231,7 @@ void NaClDOMHandler::PopulatePageInformation(DictionaryValue* naclInfo) {
AddLineBreak(list.get());
// Obtain the version of the PNaCl translator.
- FilePath pnacl_path;
+ base::FilePath pnacl_path;
bool got_path = PathService::Get(chrome::DIR_PNACL_COMPONENT, &pnacl_path);
// The PathService may return an empty string if PNaCl is not yet installed.
// However, do not trust that the path returned by the PathService exists.
diff --git a/chrome/browser/ui/webui/net_export_ui.cc b/chrome/browser/ui/webui/net_export_ui.cc
index 9dfc785..01e9a22 100644
--- a/chrome/browser/ui/webui/net_export_ui.cc
+++ b/chrome/browser/ui/webui/net_export_ui.cc
@@ -72,7 +72,7 @@ class NetExportMessageHandler
NetLogTempFile::Command command);
// Returns the path to the file which has NetLog data.
- static FilePath GetNetLogFileName(NetLogTempFile* net_log_temp_file);
+ static base::FilePath GetNetLogFileName(NetLogTempFile* net_log_temp_file);
// Send state/file information from NetLogTempFile.
static void SendExportNetLogInfo(
@@ -80,7 +80,7 @@ class NetExportMessageHandler
NetLogTempFile* net_log_temp_file);
// Send NetLog data via email. This runs on UI thread.
- static void SendEmail(const FilePath& file_to_send);
+ static void SendEmail(const base::FilePath& file_to_send);
// Call NetExportView.onExportNetLogInfoChanged JavsScript function in the
// renderer, passing in |arg|. Takes ownership of |arg|.
@@ -182,10 +182,10 @@ void NetExportMessageHandler::ProcessNetLogCommand(
}
// static
-FilePath NetExportMessageHandler::GetNetLogFileName(
+base::FilePath NetExportMessageHandler::GetNetLogFileName(
NetLogTempFile* net_log_temp_file) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE_USER_BLOCKING));
- FilePath net_export_file_path;
+ base::FilePath net_export_file_path;
net_log_temp_file->GetFilePath(&net_export_file_path);
return net_export_file_path;
}
@@ -207,7 +207,7 @@ void NetExportMessageHandler::SendExportNetLogInfo(
}
// static
-void NetExportMessageHandler::SendEmail(const FilePath& file_to_send) {
+void NetExportMessageHandler::SendEmail(const base::FilePath& file_to_send) {
if (file_to_send.empty())
return;
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
@@ -218,7 +218,7 @@ void NetExportMessageHandler::SendEmail(const FilePath& file_to_send) {
std::string title = "Issue number: ";
std::string body =
"Please add some informative text about the network issues.";
- FilePath::StringType file_to_attach(file_to_send.value());
+ base::FilePath::StringType file_to_attach(file_to_send.value());
chrome::android::SendEmail(
UTF8ToUTF16(email), UTF8ToUTF16(subject),
UTF8ToUTF16(body), UTF8ToUTF16(title), UTF8ToUTF16(file_to_attach));
diff --git a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
index a002b7c..16bc518 100644
--- a/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
+++ b/chrome/browser/ui/webui/net_internals/net_internals_ui.cc
@@ -243,7 +243,8 @@ class DebugLogFileHelper {
typedef base::Callback<void(PassPlatformFile pass_platform_file,
bool created,
PlatformFileError error,
- const FilePath& file_path)> DebugLogFileCallback;
+ const base::FilePath& file_path)>
+ DebugLogFileCallback;
DebugLogFileHelper()
: file_handle_(base::kInvalidPlatformFileValue),
@@ -254,8 +255,8 @@ class DebugLogFileHelper {
~DebugLogFileHelper() {
}
- void DoWork(const FilePath& fileshelf) {
- const FilePath::CharType kLogFileName[] =
+ void DoWork(const base::FilePath& fileshelf) {
+ const base::FilePath::CharType kLogFileName[] =
FILE_PATH_LITERAL("debug-log.tgz");
file_path_ = fileshelf.Append(kLogFileName);
@@ -278,7 +279,7 @@ class DebugLogFileHelper {
PlatformFile file_handle_;
bool created_;
PlatformFileError error_;
- FilePath file_path_;
+ base::FilePath file_path_;
DISALLOW_COPY_AND_ASSIGN(DebugLogFileHelper);
};
@@ -289,7 +290,7 @@ class DebugLogFileHelper {
// Called once StoreDebugLogs is complete. Takes two parameters:
// - log_path: where the log file was saved in the case of success;
// - succeeded: was the log file saved successfully.
-typedef base::Callback<void(const FilePath& log_path,
+typedef base::Callback<void(const base::FilePath& log_path,
bool succeded)> StoreDebugLogsCallback;
// Closes file handle, so, should be called on the WorkerPool thread.
@@ -300,7 +301,7 @@ void CloseDebugLogFile(PassPlatformFile pass_platform_file) {
// Closes file handle and deletes debug log file, so, should be called
// on the WorkerPool thread.
void CloseAndDeleteDebugLogFile(PassPlatformFile pass_platform_file,
- const FilePath& file_path) {
+ const base::FilePath& file_path) {
CloseDebugLogFile(pass_platform_file);
file_util::Delete(file_path, false);
}
@@ -310,7 +311,7 @@ void CloseAndDeleteDebugLogFile(PassPlatformFile pass_platform_file,
// |callback|.
void WriteDebugLogToFileCompleted(const StoreDebugLogsCallback& callback,
PassPlatformFile pass_platform_file,
- const FilePath& file_path,
+ const base::FilePath& file_path,
bool succeeded) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!succeeded) {
@@ -332,7 +333,7 @@ void WriteDebugLogToFile(const StoreDebugLogsCallback& callback,
PassPlatformFile pass_platform_file,
bool created,
PlatformFileError error,
- const FilePath& file_path) {
+ const base::FilePath& file_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!created) {
LOG(ERROR) <<
@@ -358,7 +359,7 @@ void WriteDebugLogToFile(const StoreDebugLogsCallback& callback,
void StoreDebugLogs(const StoreDebugLogsCallback& callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
- const FilePath fileshelf = download_util::GetDefaultDownloadDirectory();
+ const base::FilePath fileshelf = download_util::GetDefaultDownloadDirectory();
DebugLogFileHelper* helper = new DebugLogFileHelper();
bool posted = base::WorkerPool::PostTaskAndReply(FROM_HERE,
base::Bind(&DebugLogFileHelper::DoWork,
@@ -403,7 +404,8 @@ class NetInternalsMessageHandler
void OnGetSystemLog(const ListValue* list);
void OnImportONCFile(const ListValue* list);
void OnStoreDebugLogs(const ListValue* list);
- void OnStoreDebugLogsCompleted(const FilePath& log_path, bool succeeded);
+ void OnStoreDebugLogsCompleted(const base::FilePath& log_path,
+ bool succeeded);
void OnSetNetworkDebugMode(const ListValue* list);
void OnSetNetworkDebugModeCompleted(const std::string& subsystem,
bool succeeded);
@@ -1536,7 +1538,7 @@ void NetInternalsMessageHandler::OnStoreDebugLogs(const ListValue* list) {
}
void NetInternalsMessageHandler::OnStoreDebugLogsCompleted(
- const FilePath& log_path, bool succeeded) {
+ const base::FilePath& log_path, bool succeeded) {
std::string status;
if (succeeded)
status = "Created log file: " + log_path.BaseName().AsUTF8Unsafe();
diff --git a/chrome/browser/ui/webui/ntp/most_visited_browsertest.cc b/chrome/browser/ui/webui/ntp/most_visited_browsertest.cc
index 846d82c..522acaf 100644
--- a/chrome/browser/ui/webui/ntp/most_visited_browsertest.cc
+++ b/chrome/browser/ui/webui/ntp/most_visited_browsertest.cc
@@ -14,7 +14,7 @@ class MostVisitedWebUITest : public WebUIBrowserTest {
virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
WebUIBrowserTest::SetUpInProcessBrowserTestFixture();
- AddLibrary(FilePath(FILE_PATH_LITERAL("most_visited_page_test.js")));
+ AddLibrary(base::FilePath(FILE_PATH_LITERAL("most_visited_page_test.js")));
}
virtual void SetUpOnMainThread() OVERRIDE {
diff --git a/chrome/browser/ui/webui/options/advanced_options_utils_win.cc b/chrome/browser/ui/webui/options/advanced_options_utils_win.cc
index 032469f..607dc32 100644
--- a/chrome/browser/ui/webui/options/advanced_options_utils_win.cc
+++ b/chrome/browser/ui/webui/options/advanced_options_utils_win.cc
@@ -29,15 +29,15 @@ void OpenConnectionDialogCallback() {
// Using rundll32 seems better than LaunchConnectionDialog which causes a
// new dialog to be made for each call. rundll32 uses the same global
// dialog and it seems to share with the shortcut in control panel.
- FilePath rundll32;
+ base::FilePath rundll32;
PathService::Get(base::DIR_SYSTEM, &rundll32);
rundll32 = rundll32.AppendASCII("rundll32.exe");
- FilePath shell32dll;
+ base::FilePath shell32dll;
PathService::Get(base::DIR_SYSTEM, &shell32dll);
shell32dll = shell32dll.AppendASCII("shell32.dll");
- FilePath inetcpl;
+ base::FilePath inetcpl;
PathService::Get(base::DIR_SYSTEM, &inetcpl);
inetcpl = inetcpl.AppendASCII("inetcpl.cpl,,4");
diff --git a/chrome/browser/ui/webui/options/advanced_options_utils_x11.cc b/chrome/browser/ui/webui/options/advanced_options_utils_x11.cc
index dc9a632..48dd6c9 100644
--- a/chrome/browser/ui/webui/options/advanced_options_utils_x11.cc
+++ b/chrome/browser/ui/webui/options/advanced_options_utils_x11.cc
@@ -81,7 +81,7 @@ bool StartProxyConfigUtil(const char* command[]) {
Tokenize(path, ":", &paths);
bool found = false;
for (size_t i = 0; i < paths.size(); ++i) {
- FilePath file(paths[i]);
+ base::FilePath file(paths[i]);
if (file_util::PathExists(file.Append(command[0]))) {
found = true;
break;
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.cc b/chrome/browser/ui/webui/options/browser_options_handler.cc
index 538a92d..ed4503e 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.cc
+++ b/chrome/browser/ui/webui/options/browser_options_handler.cc
@@ -695,7 +695,7 @@ void BrowserOptionsHandler::InitializePage() {
// static
void BrowserOptionsHandler::CheckAutoLaunch(
base::WeakPtr<BrowserOptionsHandler> weak_this,
- const FilePath& profile_path) {
+ const base::FilePath& profile_path) {
#if defined(OS_WIN)
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
@@ -712,7 +712,7 @@ void BrowserOptionsHandler::CheckAutoLaunch(
auto_launch_util::AutoStartRequested(
profile_path.BaseName().value(),
true, // Window requested.
- FilePath())));
+ base::FilePath())));
#endif
}
@@ -946,10 +946,11 @@ void BrowserOptionsHandler::ToggleAutoLaunch(const ListValue* args) {
Profile* profile = Profile::FromWebUI(web_ui());
content::BrowserThread::PostTask(
content::BrowserThread::FILE, FROM_HERE,
- enable ? base::Bind(&auto_launch_util::EnableForegroundStartAtLogin,
- profile->GetPath().BaseName().value(), FilePath()) :
- base::Bind(&auto_launch_util::DisableForegroundStartAtLogin,
- profile->GetPath().BaseName().value()));
+ enable ?
+ base::Bind(&auto_launch_util::EnableForegroundStartAtLogin,
+ profile->GetPath().BaseName().value(), base::FilePath()) :
+ base::Bind(&auto_launch_util::DisableForegroundStartAtLogin,
+ profile->GetPath().BaseName().value()));
#endif // OS_WIN
}
@@ -957,13 +958,13 @@ scoped_ptr<ListValue> BrowserOptionsHandler::GetProfilesInfoList() {
ProfileInfoCache& cache =
g_browser_process->profile_manager()->GetProfileInfoCache();
scoped_ptr<ListValue> profile_info_list(new ListValue);
- FilePath current_profile_path =
+ base::FilePath current_profile_path =
web_ui()->GetWebContents()->GetBrowserContext()->GetPath();
for (size_t i = 0, e = cache.GetNumberOfProfiles(); i < e; ++i) {
DictionaryValue* profile_value = new DictionaryValue();
profile_value->SetString("name", cache.GetNameOfProfileAtIndex(i));
- FilePath profile_path = cache.GetPathOfProfileAtIndex(i);
+ base::FilePath profile_path = cache.GetPathOfProfileAtIndex(i);
profile_value->Set("filePath", base::CreateFilePathValue(profile_path));
profile_value->SetBoolean("isCurrentProfile",
profile_path == current_profile_path);
@@ -1138,7 +1139,7 @@ void BrowserOptionsHandler::HandleSelectDownloadLocation(
web_ui()->GetWebContents()->GetView()->GetTopLevelNativeWindow(), NULL);
}
-void BrowserOptionsHandler::FileSelected(const FilePath& path, int index,
+void BrowserOptionsHandler::FileSelected(const base::FilePath& path, int index,
void* params) {
content::RecordAction(UserMetricsAction("Options_SetDownloadDirectory"));
PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
diff --git a/chrome/browser/ui/webui/options/browser_options_handler.h b/chrome/browser/ui/webui/options/browser_options_handler.h
index 3824c99..b7a285f 100644
--- a/chrome/browser/ui/webui/options/browser_options_handler.h
+++ b/chrome/browser/ui/webui/options/browser_options_handler.h
@@ -77,7 +77,7 @@ class BrowserOptionsHandler
void OnCloudPrintPrefsChanged();
// SelectFileDialog::Listener implementation
- virtual void FileSelected(const FilePath& path,
+ virtual void FileSelected(const base::FilePath& path,
int index,
void* params) OVERRIDE;
@@ -105,7 +105,7 @@ class BrowserOptionsHandler
// as a parameter to avoid the need to lock between this function and the
// destructor. |profile_path| is the full path to the current profile.
static void CheckAutoLaunch(base::WeakPtr<BrowserOptionsHandler> weak_this,
- const FilePath& profile_path);
+ const base::FilePath& profile_path);
// Sets up (on the UI thread) the necessary bindings for toggling auto-launch
// (if the user is part of the auto-launch and makes sure the HTML UI knows
diff --git a/chrome/browser/ui/webui/options/certificate_manager_handler.cc b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
index 50a578b..f7acf5a 100644
--- a/chrome/browser/ui/webui/options/certificate_manager_handler.cc
+++ b/chrome/browser/ui/webui/options/certificate_manager_handler.cc
@@ -183,10 +183,10 @@ class FileAccessProvider
// parameter is the number of bytes written on success.
typedef base::Callback<void(const int*, const int*)> WriteCallback;
- CancelableTaskTracker::TaskId StartRead(const FilePath& path,
+ CancelableTaskTracker::TaskId StartRead(const base::FilePath& path,
const ReadCallback& callback,
CancelableTaskTracker* tracker);
- CancelableTaskTracker::TaskId StartWrite(const FilePath& path,
+ CancelableTaskTracker::TaskId StartWrite(const base::FilePath& path,
const std::string& data,
const WriteCallback& callback,
CancelableTaskTracker* tracker);
@@ -197,19 +197,19 @@ class FileAccessProvider
// Reads file at |path|. |saved_errno| is 0 on success or errno on failure.
// When success, |data| has file content.
- void DoRead(const FilePath& path,
+ void DoRead(const base::FilePath& path,
int* saved_errno,
std::string* data);
// Writes data to file at |path|. |saved_errno| is 0 on success or errno on
// failure. When success, |bytes_written| has number of bytes written.
- void DoWrite(const FilePath& path,
+ void DoWrite(const base::FilePath& path,
const std::string& data,
int* saved_errno,
int* bytes_written);
};
CancelableTaskTracker::TaskId FileAccessProvider::StartRead(
- const FilePath& path,
+ const base::FilePath& path,
const ReadCallback& callback,
CancelableTaskTracker* tracker) {
// Owned by reply callback posted below.
@@ -225,7 +225,7 @@ CancelableTaskTracker::TaskId FileAccessProvider::StartRead(
}
CancelableTaskTracker::TaskId FileAccessProvider::StartWrite(
- const FilePath& path,
+ const base::FilePath& path,
const std::string& data,
const WriteCallback& callback,
CancelableTaskTracker* tracker) {
@@ -243,14 +243,14 @@ CancelableTaskTracker::TaskId FileAccessProvider::StartWrite(
base::Owned(saved_errno), base::Owned(bytes_written)));
}
-void FileAccessProvider::DoRead(const FilePath& path,
+void FileAccessProvider::DoRead(const base::FilePath& path,
int* saved_errno,
std::string* data) {
bool success = file_util::ReadFileToString(path, data);
*saved_errno = success ? 0 : errno;
}
-void FileAccessProvider::DoWrite(const FilePath& path,
+void FileAccessProvider::DoWrite(const base::FilePath& path,
const std::string& data,
int* saved_errno,
int* bytes_written) {
@@ -467,7 +467,8 @@ void CertificateManagerHandler::CertificatesRefreshed() {
VLOG(1) << "populating finished";
}
-void CertificateManagerHandler::FileSelected(const FilePath& path, int index,
+void CertificateManagerHandler::FileSelected(const base::FilePath& path,
+ int index,
void* params) {
switch (reinterpret_cast<intptr_t>(params)) {
case EXPORT_PERSONAL_FILE_SELECTED:
@@ -580,7 +581,7 @@ void CertificateManagerHandler::ExportPersonal(const ListValue* args) {
this, new ChromeSelectFilePolicy(web_ui()->GetWebContents()));
select_file_dialog_->SelectFile(
ui::SelectFileDialog::SELECT_SAVEAS_FILE, string16(),
- FilePath(), &file_type_info, 1, FILE_PATH_LITERAL("p12"),
+ base::FilePath(), &file_type_info, 1, FILE_PATH_LITERAL("p12"),
GetParentWindow(),
reinterpret_cast<void*>(EXPORT_PERSONAL_FILE_SELECTED));
}
@@ -590,7 +591,7 @@ void CertificateManagerHandler::ExportAllPersonal(const ListValue* args) {
}
void CertificateManagerHandler::ExportPersonalFileSelected(
- const FilePath& path) {
+ const base::FilePath& path) {
file_path_ = path;
web_ui()->CallJavascriptFunction(
"CertificateManager.exportPersonalAskPassword");
@@ -671,13 +672,13 @@ void CertificateManagerHandler::StartImportPersonal(const ListValue* args) {
this, new ChromeSelectFilePolicy(web_ui()->GetWebContents()));
select_file_dialog_->SelectFile(
ui::SelectFileDialog::SELECT_OPEN_FILE, string16(),
- FilePath(), &file_type_info, 1, FILE_PATH_LITERAL("p12"),
+ base::FilePath(), &file_type_info, 1, FILE_PATH_LITERAL("p12"),
GetParentWindow(),
reinterpret_cast<void*>(IMPORT_PERSONAL_FILE_SELECTED));
}
void CertificateManagerHandler::ImportPersonalFileSelected(
- const FilePath& path) {
+ const base::FilePath& path) {
file_path_ = path;
web_ui()->CallJavascriptFunction(
"CertificateManager.importPersonalAskPassword");
@@ -790,12 +791,13 @@ void CertificateManagerHandler::ImportServer(const ListValue* args) {
ShowCertSelectFileDialog(
select_file_dialog_.get(),
ui::SelectFileDialog::SELECT_OPEN_FILE,
- FilePath(),
+ base::FilePath(),
GetParentWindow(),
reinterpret_cast<void*>(IMPORT_SERVER_FILE_SELECTED));
}
-void CertificateManagerHandler::ImportServerFileSelected(const FilePath& path) {
+void CertificateManagerHandler::ImportServerFileSelected(
+ const base::FilePath& path) {
file_path_ = path;
file_access_provider_->StartRead(
file_path_,
@@ -848,12 +850,13 @@ void CertificateManagerHandler::ImportCA(const ListValue* args) {
this, new ChromeSelectFilePolicy(web_ui()->GetWebContents()));
ShowCertSelectFileDialog(select_file_dialog_.get(),
ui::SelectFileDialog::SELECT_OPEN_FILE,
- FilePath(),
+ base::FilePath(),
GetParentWindow(),
reinterpret_cast<void*>(IMPORT_CA_FILE_SELECTED));
}
-void CertificateManagerHandler::ImportCAFileSelected(const FilePath& path) {
+void CertificateManagerHandler::ImportCAFileSelected(
+ const base::FilePath& path) {
file_path_ = path;
file_access_provider_->StartRead(
file_path_,
diff --git a/chrome/browser/ui/webui/options/certificate_manager_handler.h b/chrome/browser/ui/webui/options/certificate_manager_handler.h
index 83cce70..47de402 100644
--- a/chrome/browser/ui/webui/options/certificate_manager_handler.h
+++ b/chrome/browser/ui/webui/options/certificate_manager_handler.h
@@ -43,7 +43,7 @@ class CertificateManagerHandler
virtual void CertificatesRefreshed() OVERRIDE;
// SelectFileDialog::Listener implementation.
- virtual void FileSelected(const FilePath& path,
+ virtual void FileSelected(const base::FilePath& path,
int index,
void* params) OVERRIDE;
virtual void FileSelectionCanceled(void* params) OVERRIDE;
@@ -79,7 +79,7 @@ class CertificateManagerHandler
// 5. write finishes (or fails) -> ExportPersonalFileWritten
void ExportPersonal(const base::ListValue* args);
void ExportAllPersonal(const base::ListValue* args);
- void ExportPersonalFileSelected(const FilePath& path);
+ void ExportPersonalFileSelected(const base::FilePath& path);
void ExportPersonalPasswordSelected(const base::ListValue* args);
void ExportPersonalSlotsUnlocked();
void ExportPersonalFileWritten(const int* write_errno,
@@ -99,7 +99,7 @@ class CertificateManagerHandler
// 6b. if import fails -> show error, ImportExportCleanup
// TODO(mattm): allow retrying with different password
void StartImportPersonal(const base::ListValue* args);
- void ImportPersonalFileSelected(const FilePath& path);
+ void ImportPersonalFileSelected(const base::FilePath& path);
void ImportPersonalPasswordSelected(const base::ListValue* args);
void ImportPersonalFileRead(const int* read_errno, const std::string* data);
void ImportPersonalSlotUnlocked();
@@ -111,7 +111,7 @@ class CertificateManagerHandler
// 4a. if import succeeds -> ImportExportCleanup
// 4b. if import fails -> show error, ImportExportCleanup
void ImportServer(const base::ListValue* args);
- void ImportServerFileSelected(const FilePath& path);
+ void ImportServerFileSelected(const base::FilePath& path);
void ImportServerFileRead(const int* read_errno, const std::string* data);
// Import Certificate Authorities from file. Sequence goes like:
@@ -123,7 +123,7 @@ class CertificateManagerHandler
// 5a. if import succeeds -> ImportExportCleanup
// 5b. if import fails -> show error, ImportExportCleanup
void ImportCA(const base::ListValue* args);
- void ImportCAFileSelected(const FilePath& path);
+ void ImportCAFileSelected(const base::FilePath& path);
void ImportCAFileRead(const int* read_errno, const std::string* data);
void ImportCATrustSelected(const base::ListValue* args);
@@ -165,7 +165,7 @@ class CertificateManagerHandler
// For multi-step import or export processes, we need to store the path,
// password, etc the user chose while we wait for them to enter a password,
// wait for file to be read, etc.
- FilePath file_path_;
+ base::FilePath file_path_;
string16 password_;
bool use_hardware_backed_;
std::string file_data_;
diff --git a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc
index b576282..e719b5058 100644
--- a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.cc
@@ -158,7 +158,7 @@ void ChangePictureOptionsHandler::HandleChooseFile(const ListValue* args) {
select_file_dialog_ = ui::SelectFileDialog::Create(
this, new ChromeSelectFilePolicy(web_ui()->GetWebContents()));
- FilePath downloads_path;
+ base::FilePath downloads_path;
if (!PathService::Get(chrome::DIR_DEFAULT_DOWNLOADS, &downloads_path)) {
NOTREACHED();
return;
@@ -362,7 +362,7 @@ void ChangePictureOptionsHandler::HandleSelectImage(const ListValue* args) {
image_decoder_->set_delegate(NULL);
}
-void ChangePictureOptionsHandler::FileSelected(const FilePath& path,
+void ChangePictureOptionsHandler::FileSelected(const base::FilePath& path,
int index,
void* params) {
UserManager* user_manager = UserManager::Get();
diff --git a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.h b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.h
index 2a8f54e..09f53d2 100644
--- a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.h
+++ b/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.h
@@ -83,7 +83,7 @@ class ChangePictureOptionsHandler : public ::options::OptionsPageUIHandler,
// SelectFileDialog::Delegate implementation.
virtual void FileSelected(
- const FilePath& path,
+ const base::FilePath& path,
int index, void* params) OVERRIDE;
// content::NotificationObserver implementation.
diff --git a/chrome/browser/ui/webui/options/manage_profile_handler.cc b/chrome/browser/ui/webui/options/manage_profile_handler.cc
index 8005629..623ae96 100644
--- a/chrome/browser/ui/webui/options/manage_profile_handler.cc
+++ b/chrome/browser/ui/webui/options/manage_profile_handler.cc
@@ -43,7 +43,7 @@ const char kManageProfileIconGridName[] = "manage-profile-icon-grid";
// Given |args| from the WebUI, parses value 0 as a FilePath |profile_file_path|
// and returns true on success.
bool GetProfilePathFromArgs(const ListValue* args,
- FilePath* profile_file_path) {
+ base::FilePath* profile_file_path) {
const Value* file_path_value;
if (!args->Get(0, &file_path_value))
return false;
@@ -210,7 +210,7 @@ void ManageProfileHandler::SendProfileNames() {
void ManageProfileHandler::SetProfileNameAndIcon(const ListValue* args) {
DCHECK(args);
- FilePath profile_file_path;
+ base::FilePath profile_file_path;
if (!GetProfilePathFromArgs(args, &profile_file_path))
return;
@@ -293,7 +293,7 @@ void ManageProfileHandler::DeleteProfile(const ListValue* args) {
ProfileMetrics::LogProfileDeleteUser(ProfileMetrics::PROFILE_DELETED);
- FilePath profile_file_path;
+ base::FilePath profile_file_path;
if (!GetProfilePathFromArgs(args, &profile_file_path))
return;
@@ -313,7 +313,7 @@ void ManageProfileHandler::SwitchAppListProfile(const ListValue* args) {
DCHECK(ProfileManager::IsMultipleProfilesEnabled());
const Value* file_path_value;
- FilePath profile_file_path;
+ base::FilePath profile_file_path;
if (!args->Get(0, &file_path_value) ||
!base::GetValueAsFilePath(*file_path_value, &profile_file_path))
return;
@@ -328,7 +328,7 @@ void ManageProfileHandler::ProfileIconSelectionChanged(
const base::ListValue* args) {
DCHECK(args);
- FilePath profile_file_path;
+ base::FilePath profile_file_path;
if (!GetProfilePathFromArgs(args, &profile_file_path))
return;
@@ -363,7 +363,7 @@ void ManageProfileHandler::RequestHasProfileShortcuts(const ListValue* args) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
DCHECK(ProfileShortcutManager::IsFeatureEnabled());
- FilePath profile_file_path;
+ base::FilePath profile_file_path;
if (!GetProfilePathFromArgs(args, &profile_file_path))
return;
@@ -373,7 +373,8 @@ void ManageProfileHandler::RequestHasProfileShortcuts(const ListValue* args) {
if (profile_index == std::string::npos)
return;
- const FilePath profile_path = cache.GetPathOfProfileAtIndex(profile_index);
+ const base::FilePath profile_path =
+ cache.GetPathOfProfileAtIndex(profile_index);
ProfileShortcutManager* shortcut_manager =
g_browser_process->profile_manager()->profile_shortcut_manager();
shortcut_manager->HasProfileShortcuts(
@@ -390,7 +391,7 @@ void ManageProfileHandler::OnHasProfileShortcuts(bool has_shortcuts) {
}
void ManageProfileHandler::AddProfileShortcut(const base::ListValue* args) {
- FilePath profile_file_path;
+ base::FilePath profile_file_path;
if (!GetProfilePathFromArgs(args, &profile_file_path))
return;
@@ -406,7 +407,7 @@ void ManageProfileHandler::AddProfileShortcut(const base::ListValue* args) {
}
void ManageProfileHandler::RemoveProfileShortcut(const base::ListValue* args) {
- FilePath profile_file_path;
+ base::FilePath profile_file_path;
if (!GetProfilePathFromArgs(args, &profile_file_path))
return;
diff --git a/chrome/browser/ui/webui/options/media_galleries_handler.cc b/chrome/browser/ui/webui/options/media_galleries_handler.cc
index 3628be1..2ad7c46 100644
--- a/chrome/browser/ui/webui/options/media_galleries_handler.cc
+++ b/chrome/browser/ui/webui/options/media_galleries_handler.cc
@@ -106,9 +106,9 @@ void MediaGalleriesHandler::HandleAddNewGallery(const base::ListValue* args) {
select_file_dialog_->SelectFile(
ui::SelectFileDialog::SELECT_FOLDER,
string16(), // TODO(estade): a name for the dialog?
- FilePath(),
+ base::FilePath(),
NULL, 0,
- FilePath::StringType(),
+ base::FilePath::StringType(),
web_ui()->GetWebContents()->GetView()->
GetTopLevelNativeWindow(),
NULL);
@@ -129,7 +129,7 @@ void MediaGalleriesHandler::HandleForgetGallery(const base::ListValue* args) {
prefs->ForgetGalleryById(id);
}
-void MediaGalleriesHandler::FileSelected(const FilePath& path,
+void MediaGalleriesHandler::FileSelected(const base::FilePath& path,
int index,
void* params) {
chrome::MediaGalleriesPreferences* prefs =
diff --git a/chrome/browser/ui/webui/options/media_galleries_handler.h b/chrome/browser/ui/webui/options/media_galleries_handler.h
index 16ca5eb..451adc0 100644
--- a/chrome/browser/ui/webui/options/media_galleries_handler.h
+++ b/chrome/browser/ui/webui/options/media_galleries_handler.h
@@ -26,7 +26,7 @@ class MediaGalleriesHandler : public OptionsPageUIHandler,
virtual void RegisterMessages() OVERRIDE;
// SelectFileDialog::Listener implementation.
- virtual void FileSelected(const FilePath& path,
+ virtual void FileSelected(const base::FilePath& path,
int index,
void* params) OVERRIDE;
diff --git a/chrome/browser/ui/webui/plugins_ui.cc b/chrome/browser/ui/webui/plugins_ui.cc
index dbbf747..3960c92 100644
--- a/chrome/browser/ui/webui/plugins_ui.cc
+++ b/chrome/browser/ui/webui/plugins_ui.cc
@@ -258,13 +258,13 @@ void PluginsDOMHandler::HandleEnablePluginMessage(const ListValue* args) {
plugin_prefs->EnablePluginGroup(false, adobereader);
}
} else {
- FilePath::StringType file_path;
+ base::FilePath::StringType file_path;
if (!args->GetString(0, &file_path)) {
NOTREACHED();
return;
}
- plugin_prefs->EnablePlugin(enable, FilePath(file_path),
+ plugin_prefs->EnablePlugin(enable, base::FilePath(file_path),
base::Bind(&AssertPluginEnabled));
}
}
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
index 8b3ab70..2102114 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
@@ -231,7 +231,7 @@ void ReportPrintSettingsStats(const DictionaryValue& settings) {
}
// Callback that stores a PDF file on disk.
-void PrintToPdfCallback(Metafile* metafile, const FilePath& path) {
+void PrintToPdfCallback(Metafile* metafile, const base::FilePath& path) {
metafile->SaveTo(path);
// |metafile| must be deleted on the UI thread.
BrowserThread::PostTask(
@@ -242,7 +242,7 @@ void PrintToPdfCallback(Metafile* metafile, const FilePath& path) {
#ifdef OS_CHROMEOS
void PrintToPdfCallbackWithCheck(Metafile* metafile,
drive::DriveFileError error,
- const FilePath& path) {
+ const base::FilePath& path) {
if (error != drive::DRIVE_FILE_OK) {
LOG(ERROR) << "Save to pdf failed to write: " << error;
} else {
@@ -522,13 +522,14 @@ void PrintPreviewHandler::PrintToPdf() {
string16 print_job_title_utf16 = print_preview_ui->initiator_tab_title();
#if defined(OS_WIN)
- FilePath::StringType print_job_title(print_job_title_utf16);
+ base::FilePath::StringType print_job_title(print_job_title_utf16);
#elif defined(OS_POSIX)
- FilePath::StringType print_job_title = UTF16ToUTF8(print_job_title_utf16);
+ base::FilePath::StringType print_job_title =
+ UTF16ToUTF8(print_job_title_utf16);
#endif
file_util::ReplaceIllegalCharactersInPath(&print_job_title, '_');
- FilePath default_filename(print_job_title);
+ base::FilePath default_filename(print_job_title);
default_filename =
default_filename.ReplaceExtension(FILE_PATH_LITERAL("pdf"));
@@ -857,7 +858,7 @@ void PrintPreviewHandler::OnPrintDialogShown() {
ClosePreviewDialogAndActivateInitiatorTab();
}
-void PrintPreviewHandler::SelectFile(const FilePath& default_filename) {
+void PrintPreviewHandler::SelectFile(const base::FilePath& default_filename) {
ui::SelectFileDialog::FileTypeInfo file_type_info;
file_type_info.extensions.resize(1);
file_type_info.extensions[0].push_back(FILE_PATH_LITERAL("pdf"));
@@ -870,7 +871,7 @@ void PrintPreviewHandler::SelectFile(const FilePath& default_filename) {
// the select file dialog performs IO anyway in order to display the
// folders and also it is modal.
base::ThreadRestrictions::ScopedAllowIO allow_io;
- FilePath file_path;
+ base::FilePath file_path;
PathService::Get(chrome::DIR_USER_DOCUMENTS, &file_path);
sticky_settings->StoreSavePath(file_path);
sticky_settings->SaveInPrefs(Profile::FromBrowserContext(
@@ -911,7 +912,7 @@ void PrintPreviewHandler::ShowSystemDialog() {
HandleShowSystemDialog(NULL);
}
-void PrintPreviewHandler::FileSelected(const FilePath& path,
+void PrintPreviewHandler::FileSelected(const base::FilePath& path,
int index, void* params) {
// Updating |save_path_| to the newly selected folder.
printing::StickySettings* sticky_settings = GetStickySettings();
@@ -919,7 +920,7 @@ void PrintPreviewHandler::FileSelected(const FilePath& path,
sticky_settings->SaveInPrefs(Profile::FromBrowserContext(
preview_web_contents()->GetBrowserContext())->GetPrefs());
web_ui()->CallJavascriptFunction("fileSelectionCompleted");
- print_to_pdf_path_.reset(new FilePath(path));
+ print_to_pdf_path_.reset(new base::FilePath(path));
PostPrintToPdfTask();
}
diff --git a/chrome/browser/ui/webui/print_preview/sticky_settings.cc b/chrome/browser/ui/webui/print_preview/sticky_settings.cc
index ac30dfd..ef097f2 100644
--- a/chrome/browser/ui/webui/print_preview/sticky_settings.cc
+++ b/chrome/browser/ui/webui/print_preview/sticky_settings.cc
@@ -26,8 +26,8 @@ void StickySettings::StoreAppState(const std::string& data) {
printer_app_state_.reset(new std::string(data));
}
-void StickySettings::StoreSavePath(const FilePath& path) {
- save_path_.reset(new FilePath(path));
+void StickySettings::StoreSavePath(const base::FilePath& path) {
+ save_path_.reset(new base::FilePath(path));
}
void StickySettings::SaveInPrefs(PrefService* prefs) {
@@ -49,9 +49,9 @@ void StickySettings::RestoreFromPrefs(PrefService* prefs) {
const DictionaryValue* value =
prefs->GetDictionary(prefs::kPrintPreviewStickySettings);
- FilePath::StringType save_path;
+ base::FilePath::StringType save_path;
if (value->GetString(printing::kSettingSavePath, &save_path))
- save_path_.reset(new FilePath(save_path));
+ save_path_.reset(new base::FilePath(save_path));
std::string buffer;
if (value->GetString(printing::kSettingAppState, &buffer))
printer_app_state_.reset(new std::string(buffer));
@@ -67,7 +67,7 @@ std::string* StickySettings::printer_app_state() {
return printer_app_state_.get();
}
-FilePath* StickySettings::save_path() {
+base::FilePath* StickySettings::save_path() {
return save_path_.get();
}
diff --git a/chrome/browser/ui/webui/profiler_ui.cc b/chrome/browser/ui/webui/profiler_ui.cc
index 32ec1285..17d43a5 100644
--- a/chrome/browser/ui/webui/profiler_ui.cc
+++ b/chrome/browser/ui/webui/profiler_ui.cc
@@ -68,7 +68,7 @@ class ProfilerWebUIDataSource : public content::URLDataSource {
const std::string& path,
bool is_incognito,
const content::URLDataSource::GotDataCallback& callback) OVERRIDE {
- FilePath base_path;
+ base::FilePath base_path;
PathService::Get(base::DIR_SOURCE_ROOT, &base_path);
base_path = base_path.AppendASCII("chrome");
base_path = base_path.AppendASCII("browser");
@@ -78,7 +78,7 @@ class ProfilerWebUIDataSource : public content::URLDataSource {
// If no resource was specified, default to profiler.html.
std::string filename = path.empty() ? "profiler.html" : path;
- FilePath file_path;
+ base::FilePath file_path;
file_path = base_path.AppendASCII(filename);
// Read the file synchronously and send it as the response.
diff --git a/chrome/browser/ui/webui/screenshot_source.cc b/chrome/browser/ui/webui/screenshot_source.cc
index afb73cb..d72ead5 100644
--- a/chrome/browser/ui/webui/screenshot_source.cc
+++ b/chrome/browser/ui/webui/screenshot_source.cc
@@ -114,7 +114,7 @@ bool ScreenshotSource::AreScreenshotsDisabled() {
}
// static
-bool ScreenshotSource::GetScreenshotDirectory(FilePath* directory) {
+bool ScreenshotSource::GetScreenshotDirectory(base::FilePath* directory) {
if (ScreenshotSource::AreScreenshotsDisabled())
return false;
@@ -192,7 +192,7 @@ void ScreenshotSource::SendScreenshot(
std::string decoded_filename = UTF16ToASCII(string16(
decoded.data(), decoded.length()));
- FilePath download_path;
+ base::FilePath download_path;
GetScreenshotDirectory(&download_path);
if (drive::util::IsUnderDriveMountPoint(download_path)) {
drive::DriveFileSystemInterface* file_system =
@@ -222,7 +222,7 @@ void ScreenshotSource::SendScreenshot(
void ScreenshotSource::SendSavedScreenshot(
const std::string& screenshot_path,
const content::URLDataSource::GotDataCallback& callback,
- const FilePath& file) {
+ const base::FilePath& file) {
ScreenshotDataPtr read_bytes(new ScreenshotData);
int64 file_size = 0;
@@ -243,7 +243,7 @@ void ScreenshotSource::GetSavedScreenshotCallback(
const std::string& screenshot_path,
const content::URLDataSource::GotDataCallback& callback,
drive::DriveFileError error,
- const FilePath& file,
+ const base::FilePath& file,
const std::string& unused_mime_type,
drive::DriveFileType file_type) {
if (error != drive::DRIVE_FILE_OK || file_type != drive::REGULAR_FILE) {
diff --git a/chrome/browser/ui/webui/sync_setup_handler.cc b/chrome/browser/ui/webui/sync_setup_handler.cc
index df34626..2d8b3fe 100644
--- a/chrome/browser/ui/webui/sync_setup_handler.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler.cc
@@ -524,7 +524,7 @@ void SyncSetupHandler::ConfigureSyncDone() {
DCHECK(service);
if (!service->HasSyncSetupCompleted()) {
// This is the first time configuring sync, so log it.
- FilePath profile_file_path = GetProfile()->GetPath();
+ base::FilePath profile_file_path = GetProfile()->GetPath();
ProfileMetrics::LogProfileSyncSignIn(profile_file_path);
// We're done configuring, so notify ProfileSyncService that it is OK to
diff --git a/chrome/browser/ui/webui/version_handler.cc b/chrome/browser/ui/webui/version_handler.cc
index 160e677..6dc3bdb 100644
--- a/chrome/browser/ui/webui/version_handler.cc
+++ b/chrome/browser/ui/webui/version_handler.cc
@@ -22,12 +22,13 @@
namespace {
// Retrieves the executable and profile paths on the FILE thread.
-void GetFilePaths(const FilePath& profile_path,
+void GetFilePaths(const base::FilePath& profile_path,
string16* exec_path_out,
string16* profile_path_out) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
- FilePath executable_path = CommandLine::ForCurrentProcess()->GetProgram();
+ base::FilePath executable_path =
+ CommandLine::ForCurrentProcess()->GetProgram();
if (file_util::AbsolutePath(&executable_path)) {
*exec_path_out = executable_path.LossyDisplayName();
} else {
@@ -35,7 +36,7 @@ void GetFilePaths(const FilePath& profile_path,
l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_PATH_NOTFOUND);
}
- FilePath profile_path_copy(profile_path);
+ base::FilePath profile_path_copy(profile_path);
if (!profile_path.empty() && file_util::AbsolutePath(&profile_path_copy)) {
*profile_path_out = profile_path.LossyDisplayName();
} else {