summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/api
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/extensions/api
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/extensions/api')
-rw-r--r--chrome/browser/extensions/api/bookmarks/bookmarks_api.cc21
-rw-r--r--chrome/browser/extensions/api/content_settings/content_settings_apitest.cc10
-rw-r--r--chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc4
-rw-r--r--chrome/browser/extensions/api/developer_private/developer_private_api.cc10
-rw-r--r--chrome/browser/extensions/api/developer_private/developer_private_api.h14
-rw-r--r--chrome/browser/extensions/api/developer_private/developer_private_apitest.cc8
-rw-r--r--chrome/browser/extensions/api/developer_private/entry_picker.cc8
-rw-r--r--chrome/browser/extensions/api/developer_private/entry_picker.h8
-rw-r--r--chrome/browser/extensions/api/downloads/downloads_api.cc4
-rw-r--r--chrome/browser/extensions/api/downloads/downloads_api.h2
-rw-r--r--chrome/browser/extensions/api/downloads/downloads_api_unittest.cc33
-rw-r--r--chrome/browser/extensions/api/file_system/file_system_api.cc79
-rw-r--r--chrome/browser/extensions/api/file_system/file_system_api.h16
-rw-r--r--chrome/browser/extensions/api/file_system/file_system_api_unittest.cc22
-rw-r--r--chrome/browser/extensions/api/file_system/file_system_apitest.cc47
-rw-r--r--chrome/browser/extensions/api/managed_mode/managed_mode_apitest.cc2
-rw-r--r--chrome/browser/extensions/api/management/management_api.cc2
-rw-r--r--chrome/browser/extensions/api/management/management_api_browsertest.cc10
-rw-r--r--chrome/browser/extensions/api/management/management_apitest.cc8
-rw-r--r--chrome/browser/extensions/api/management/management_browsertest.cc14
-rw-r--r--chrome/browser/extensions/api/media_galleries_private/media_galleries_private_apitest.cc2
-rw-r--r--chrome/browser/extensions/api/media_galleries_private/media_galleries_watch_apitest.cc4
-rw-r--r--chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc20
-rw-r--r--chrome/browser/extensions/api/messaging/native_messaging_apitest_posix.cc2
-rw-r--r--chrome/browser/extensions/api/messaging/native_process_launcher.cc4
-rw-r--r--chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc2
-rw-r--r--chrome/browser/extensions/api/messaging/native_process_launcher_win.cc2
-rw-r--r--chrome/browser/extensions/api/page_capture/page_capture_api.cc5
-rw-r--r--chrome/browser/extensions/api/page_capture/page_capture_apitest.cc5
-rw-r--r--chrome/browser/extensions/api/preference/preference_apitest.cc2
-rw-r--r--chrome/browser/extensions/api/record/record_api.cc12
-rw-r--r--chrome/browser/extensions/api/record/record_api.h9
-rw-r--r--chrome/browser/extensions/api/record/record_api_test.cc39
-rw-r--r--chrome/browser/extensions/api/serial/serial_connection.cc3
-rw-r--r--chrome/browser/extensions/api/serial/serial_port_enumerator_posix.cc4
-rw-r--r--chrome/browser/extensions/api/socket/socket_apitest.cc4
-rw-r--r--chrome/browser/extensions/api/storage/leveldb_settings_storage_factory.cc2
-rw-r--r--chrome/browser/extensions/api/storage/leveldb_settings_storage_factory.h2
-rw-r--r--chrome/browser/extensions/api/storage/managed_value_store_cache.cc2
-rw-r--r--chrome/browser/extensions/api/storage/managed_value_store_cache.h4
-rw-r--r--chrome/browser/extensions/api/storage/policy_value_store_unittest.cc4
-rw-r--r--chrome/browser/extensions/api/storage/settings_backend.cc5
-rw-r--r--chrome/browser/extensions/api/storage/settings_backend.h4
-rw-r--r--chrome/browser/extensions/api/storage/settings_frontend.cc2
-rw-r--r--chrome/browser/extensions/api/storage/settings_storage_factory.h2
-rw-r--r--chrome/browser/extensions/api/storage/settings_sync_unittest.cc2
-rw-r--r--chrome/browser/extensions/api/storage/settings_test_util.cc6
-rw-r--r--chrome/browser/extensions/api/storage/settings_test_util.h4
-rw-r--r--chrome/browser/extensions/api/storage/sync_or_local_value_store_cache.cc8
-rw-r--r--chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.cc2
-rw-r--r--chrome/browser/extensions/api/sync_file_system/sync_file_system_apitest.cc2
-rw-r--r--chrome/browser/extensions/api/system_indicator/system_indicator_apitest.cc2
-rw-r--r--chrome/browser/extensions/api/system_info_cpu/cpu_info_provider_linux.cc2
-rw-r--r--chrome/browser/extensions/api/system_info_storage/storage_info_provider_linux.cc7
-rw-r--r--chrome/browser/extensions/api/system_info_storage/storage_info_provider_linux.h4
-rw-r--r--chrome/browser/extensions/api/system_info_storage/storage_info_provider_linux_unittest.cc6
-rw-r--r--chrome/browser/extensions/api/tabs/tabs_api.cc2
-rw-r--r--chrome/browser/extensions/api/tabs/tabs_api.h2
-rw-r--r--chrome/browser/extensions/api/web_request/web_request_api_unittest.cc2
-rw-r--r--chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc28
60 files changed, 282 insertions, 265 deletions
diff --git a/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc b/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc
index 6faf572..1ee7036 100644
--- a/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc
+++ b/chrome/browser/extensions/api/bookmarks/bookmarks_api.cc
@@ -64,23 +64,23 @@ namespace {
// Generates a default path (including a default filename) that will be
// used for pre-populating the "Export Bookmarks" file chooser dialog box.
-FilePath GetDefaultFilepathForBookmarkExport() {
+base::FilePath GetDefaultFilepathForBookmarkExport() {
base::Time time = base::Time::Now();
// Concatenate a date stamp to the filename.
#if defined(OS_POSIX)
- FilePath::StringType filename =
+ base::FilePath::StringType filename =
l10n_util::GetStringFUTF8(IDS_EXPORT_BOOKMARKS_DEFAULT_FILENAME,
base::TimeFormatShortDateNumeric(time));
#elif defined(OS_WIN)
- FilePath::StringType filename =
+ base::FilePath::StringType filename =
l10n_util::GetStringFUTF16(IDS_EXPORT_BOOKMARKS_DEFAULT_FILENAME,
base::TimeFormatShortDateNumeric(time));
#endif
file_util::ReplaceIllegalCharactersInPath(&filename, '_');
- FilePath default_path;
+ base::FilePath default_path;
PathService::Get(chrome::DIR_USER_DOCUMENTS, &default_path);
return default_path.Append(filename);
}
@@ -900,7 +900,7 @@ void BookmarksIOFunction::SelectFile(ui::SelectFileDialog::Type type) {
// Pre-populating the filename field in case this is a SELECT_SAVEAS_FILE
// dialog. If not, there is no filename field in the dialog box.
- FilePath default_path;
+ base::FilePath default_path;
if (type == ui::SelectFileDialog::SELECT_SAVEAS_FILE)
default_path = GetDefaultFilepathForBookmarkExport();
else
@@ -912,8 +912,9 @@ void BookmarksIOFunction::SelectFile(ui::SelectFileDialog::Type type) {
type, default_path));
}
-void BookmarksIOFunction::ShowSelectFileDialog(ui::SelectFileDialog::Type type,
- const FilePath& default_path) {
+void BookmarksIOFunction::ShowSelectFileDialog(
+ ui::SelectFileDialog::Type type,
+ const base::FilePath& default_path) {
// Balanced in one of the three callbacks of SelectFileDialog:
// either FileSelectionCanceled, MultiFilesSelected, or FileSelected
AddRef();
@@ -948,7 +949,7 @@ void BookmarksIOFunction::FileSelectionCanceled(void* params) {
}
void BookmarksIOFunction::MultiFilesSelected(
- const std::vector<FilePath>& files, void* params) {
+ const std::vector<base::FilePath>& files, void* params) {
Release(); // Balanced in BookmarsIOFunction::SelectFile()
NOTREACHED() << "Should not be able to select multiple files";
}
@@ -960,7 +961,7 @@ bool BookmarksImportFunction::RunImpl() {
return true;
}
-void BookmarksImportFunction::FileSelected(const FilePath& path,
+void BookmarksImportFunction::FileSelected(const base::FilePath& path,
int index,
void* params) {
#if !defined(OS_ANDROID)
@@ -985,7 +986,7 @@ bool BookmarksExportFunction::RunImpl() {
return true;
}
-void BookmarksExportFunction::FileSelected(const FilePath& path,
+void BookmarksExportFunction::FileSelected(const base::FilePath& path,
int index,
void* params) {
#if !defined(OS_ANDROID)
diff --git a/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc b/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc
index 381346e..a37f37a 100644
--- a/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc
+++ b/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc
@@ -100,20 +100,22 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest,
CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kEnableExperimentalExtensionApis);
- FilePath::CharType kFooPath[] = FILE_PATH_LITERAL("/plugins/foo.plugin");
- FilePath::CharType kBarPath[] = FILE_PATH_LITERAL("/plugins/bar.plugin");
+ base::FilePath::CharType kFooPath[] =
+ FILE_PATH_LITERAL("/plugins/foo.plugin");
+ base::FilePath::CharType kBarPath[] =
+ FILE_PATH_LITERAL("/plugins/bar.plugin");
const char* kFooName = "Foo Plugin";
const char* kBarName = "Bar Plugin";
webkit::npapi::MockPluginList plugin_list;
plugin_list.AddPluginToLoad(
webkit::WebPluginInfo(ASCIIToUTF16(kFooName),
- FilePath(kFooPath),
+ base::FilePath(kFooPath),
ASCIIToUTF16("1.2.3"),
ASCIIToUTF16("foo")));
plugin_list.AddPluginToLoad(
webkit::WebPluginInfo(ASCIIToUTF16(kBarName),
- FilePath(kBarPath),
+ base::FilePath(kBarPath),
ASCIIToUTF16("2.3.4"),
ASCIIToUTF16("bar")));
diff --git a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc
index e5f2784..1586b3b 100644
--- a/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc
+++ b/chrome/browser/extensions/api/declarative_webrequest/webrequest_condition_attribute_unittest.cc
@@ -110,7 +110,7 @@ TEST(WebRequestConditionAttributeTest, ContentType) {
net::TestServer test_server(
net::TestServer::TYPE_HTTP,
net::TestServer::kLocalhost,
- FilePath(FILE_PATH_LITERAL(
+ base::FilePath(FILE_PATH_LITERAL(
"chrome/test/data/extensions/api_test/webrequest/declarative")));
ASSERT_TRUE(test_server.Start());
@@ -480,7 +480,7 @@ TEST(WebRequestConditionAttributeTest, ResponseHeaders) {
net::TestServer test_server(
net::TestServer::TYPE_HTTP,
net::TestServer::kLocalhost,
- FilePath(FILE_PATH_LITERAL(
+ base::FilePath(FILE_PATH_LITERAL(
"chrome/test/data/extensions/api_test/webrequest/declarative")));
ASSERT_TRUE(test_server.Start());
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.cc b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
index 31f956c..7ee4eb8 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_api.cc
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api.cc
@@ -81,7 +81,7 @@ void DeveloperPrivateAPI::Observe(
}
}
-void DeveloperPrivateAPI::SetLastUnpackedDirectory(const FilePath& path) {
+void DeveloperPrivateAPI::SetLastUnpackedDirectory(const base::FilePath& path) {
last_unpacked_directory_ = path;
}
@@ -517,7 +517,7 @@ bool DeveloperPrivateLoadUnpackedFunction::RunImpl() {
const ui::SelectFileDialog::Type kSelectType =
ui::SelectFileDialog::SELECT_FOLDER;
- const FilePath& last_unpacked_directory =
+ const base::FilePath& last_unpacked_directory =
DeveloperPrivateAPI::Get(profile())->getLastUnpackedDirectory();
SetResult(Value::CreateBooleanValue(true));
// Balanced in FileSelected / FileSelectionCanceled.
@@ -528,7 +528,7 @@ bool DeveloperPrivateLoadUnpackedFunction::RunImpl() {
bool DeveloperPrivateChooseEntryFunction::ShowPicker(
ui::SelectFileDialog::Type picker_type,
- const FilePath& last_directory,
+ const base::FilePath& last_directory,
const string16& select_title) {
ShellWindowRegistry* registry = ShellWindowRegistry::Get(profile());
DCHECK(registry);
@@ -551,8 +551,8 @@ bool DeveloperPrivateChooseEntryFunction::RunImpl() { return false; }
DeveloperPrivateChooseEntryFunction::~DeveloperPrivateChooseEntryFunction() {}
-void DeveloperPrivateLoadUnpackedFunction::FileSelected(const FilePath& path) {
-
+void DeveloperPrivateLoadUnpackedFunction::FileSelected(
+ const base::FilePath& path) {
ExtensionService* service = profile()->GetExtensionService();
extensions::UnpackedInstaller::Create(service)->Load(path);
DeveloperPrivateAPI::Get(profile())->SetLastUnpackedDirectory(path);
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.h b/chrome/browser/extensions/api/developer_private/developer_private_api.h
index 15f9a5c..599ee4d 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_api.h
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api.h
@@ -58,9 +58,11 @@ class DeveloperPrivateAPI : public ProfileKeyedService,
explicit DeveloperPrivateAPI(Profile* profile);
virtual ~DeveloperPrivateAPI();
- void SetLastUnpackedDirectory(const FilePath& path);
+ void SetLastUnpackedDirectory(const base::FilePath& path);
- FilePath& getLastUnpackedDirectory() { return last_unpacked_directory_; }
+ base::FilePath& getLastUnpackedDirectory() {
+ return last_unpacked_directory_;
+ }
// ProfileKeyedService implementation
virtual void Shutdown() OVERRIDE;
@@ -75,7 +77,7 @@ class DeveloperPrivateAPI : public ProfileKeyedService,
// Used to start the load |load_extension_dialog_| in the last directory that
// was loaded.
- FilePath last_unpacked_directory_;
+ base::FilePath last_unpacked_directory_;
content::NotificationRegistrar registrar_;
@@ -201,11 +203,11 @@ class DeveloperPrivateChooseEntryFunction : public SyncExtensionFunction,
virtual ~DeveloperPrivateChooseEntryFunction();
virtual bool RunImpl() OVERRIDE;
bool ShowPicker(ui::SelectFileDialog::Type picker_type,
- const FilePath& last_directory,
+ const base::FilePath& last_directory,
const string16& select_title);
// EntryPickerCLient functions.
- virtual void FileSelected(const FilePath& path) = 0;
+ virtual void FileSelected(const base::FilePath& path) = 0;
virtual void FileSelectionCanceled() = 0;
};
@@ -221,7 +223,7 @@ class DeveloperPrivateLoadUnpackedFunction
virtual bool RunImpl() OVERRIDE;
// EntryPickerCLient implementation.
- virtual void FileSelected(const FilePath& path) OVERRIDE;
+ virtual void FileSelected(const base::FilePath& path) OVERRIDE;
virtual void FileSelectionCanceled() OVERRIDE;
};
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_apitest.cc b/chrome/browser/extensions/api/developer_private/developer_private_apitest.cc
index 687342a..94db34b 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_apitest.cc
+++ b/chrome/browser/extensions/api/developer_private/developer_private_apitest.cc
@@ -18,19 +18,19 @@ class DeveloperPrivateApiTest : public ExtensionApiTest {
}
virtual void LoadExtensions() {
- FilePath base_dir = test_data_dir_.AppendASCII("developer");
+ base::FilePath base_dir = test_data_dir_.AppendASCII("developer");
LoadNamedExtension(base_dir, "hosted_app");
}
protected:
- void LoadNamedExtension(const FilePath& path,
+ void LoadNamedExtension(const base::FilePath& path,
const std::string& name) {
const Extension* extension = LoadExtension(path.AppendASCII(name));
ASSERT_TRUE(extension);
extension_name_to_ids_[name] = extension->id();
}
- void InstallNamedExtension(const FilePath& path,
+ void InstallNamedExtension(const base::FilePath& path,
const std::string& name,
Manifest::Location install_source) {
const Extension* extension = InstallExtension(path.AppendASCII(name), 1,
@@ -45,7 +45,7 @@ class DeveloperPrivateApiTest : public ExtensionApiTest {
IN_PROC_BROWSER_TEST_F(DeveloperPrivateApiTest, Basics) {
LoadExtensions();
- FilePath basedir = test_data_dir_.AppendASCII("developer");
+ base::FilePath basedir = test_data_dir_.AppendASCII("developer");
InstallNamedExtension(basedir, "packaged_app", Manifest::INTERNAL);
InstallNamedExtension(basedir, "simple_extension", Manifest::INTERNAL);
diff --git a/chrome/browser/extensions/api/developer_private/entry_picker.cc b/chrome/browser/extensions/api/developer_private/entry_picker.cc
index beec2405..2528314 100644
--- a/chrome/browser/extensions/api/developer_private/entry_picker.cc
+++ b/chrome/browser/extensions/api/developer_private/entry_picker.cc
@@ -19,7 +19,7 @@
namespace {
bool g_skip_picker_for_test = false;
-FilePath* g_path_to_be_picked_for_test = NULL;
+base::FilePath* g_path_to_be_picked_for_test = NULL;
} // namespace
@@ -30,7 +30,7 @@ namespace api {
EntryPicker::EntryPicker(EntryPickerClient* client,
content::WebContents* web_contents,
ui::SelectFileDialog::Type picker_type,
- const FilePath& last_directory,
+ const base::FilePath& last_directory,
const string16& select_title)
: client_(client) {
select_file_dialog_ = ui::SelectFileDialog::Create(
@@ -65,7 +65,7 @@ EntryPicker::EntryPicker(EntryPickerClient* client,
EntryPicker::~EntryPicker() {}
-void EntryPicker::FileSelected(const FilePath& path,
+void EntryPicker::FileSelected(const base::FilePath& path,
int index,
void* params) {
client_->FileSelected(path);
@@ -79,7 +79,7 @@ void EntryPicker::FileSelectionCanceled(void* params) {
// static
void EntryPicker::SkipPickerAndAlwaysSelectPathForTest(
- FilePath* path) {
+ base::FilePath* path) {
g_skip_picker_for_test = true;
g_path_to_be_picked_for_test = path;
}
diff --git a/chrome/browser/extensions/api/developer_private/entry_picker.h b/chrome/browser/extensions/api/developer_private/entry_picker.h
index b2025f7..91aa3a9 100644
--- a/chrome/browser/extensions/api/developer_private/entry_picker.h
+++ b/chrome/browser/extensions/api/developer_private/entry_picker.h
@@ -18,7 +18,7 @@ namespace api {
class EntryPickerClient {
public:
- virtual void FileSelected(const FilePath& path) = 0;
+ virtual void FileSelected(const base::FilePath& path) = 0;
virtual void FileSelectionCanceled() = 0;
};
@@ -28,11 +28,11 @@ class EntryPicker : public ui::SelectFileDialog::Listener {
EntryPicker(EntryPickerClient* client,
content::WebContents* web_contents,
ui::SelectFileDialog::Type picker_type,
- const FilePath& last_directory,
+ const base::FilePath& last_directory,
const string16& select_title);
// Allow picker UI to be skipped in testing.
- static void SkipPickerAndAlwaysSelectPathForTest(FilePath* path);
+ static void SkipPickerAndAlwaysSelectPathForTest(base::FilePath* path);
static void SkipPickerAndAlwaysCancelForTest();
static void StopSkippingPickerForTest();
@@ -42,7 +42,7 @@ class EntryPicker : public ui::SelectFileDialog::Listener {
private:
// ui::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/extensions/api/downloads/downloads_api.cc b/chrome/browser/extensions/api/downloads/downloads_api.cc
index 823c894..df50565 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api.cc
@@ -245,7 +245,7 @@ class DownloadFileIconExtractorImpl : public DownloadFileIconExtractor {
virtual ~DownloadFileIconExtractorImpl() {}
- virtual bool ExtractIconURLForPath(const FilePath& path,
+ virtual bool ExtractIconURLForPath(const base::FilePath& path,
IconLoader::IconSize icon_size,
IconURLCallback callback) OVERRIDE;
private:
@@ -256,7 +256,7 @@ class DownloadFileIconExtractorImpl : public DownloadFileIconExtractor {
};
bool DownloadFileIconExtractorImpl::ExtractIconURLForPath(
- const FilePath& path,
+ const base::FilePath& path,
IconLoader::IconSize icon_size,
IconURLCallback callback) {
callback_ = callback;
diff --git a/chrome/browser/extensions/api/downloads/downloads_api.h b/chrome/browser/extensions/api/downloads/downloads_api.h
index 725d114..6efb8df 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api.h
+++ b/chrome/browser/extensions/api/downloads/downloads_api.h
@@ -205,7 +205,7 @@ class DownloadsGetFileIconFunction : public AsyncExtensionFunction {
private:
void OnIconURLExtracted(const std::string& url);
- FilePath path_;
+ base::FilePath path_;
scoped_ptr<DownloadFileIconExtractor> icon_extractor_;
DISALLOW_COPY_AND_ASSIGN(DownloadsGetFileIconFunction);
};
diff --git a/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc b/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
index 32c192c..23f758a 100644
--- a/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
+++ b/chrome/browser/extensions/api/downloads/downloads_api_unittest.cc
@@ -239,7 +239,7 @@ class DownloadExtensionTest : public ExtensionApiTest {
struct HistoryDownloadInfo {
// Filename to use. CreateHistoryDownloads will append this filename to the
// temporary downloads directory specified by downloads_directory().
- const FilePath::CharType* filename;
+ const base::FilePath::CharType* filename;
// State for the download. Note that IN_PROGRESS downloads will be created
// as CANCELLED.
@@ -502,7 +502,7 @@ class DownloadExtensionTest : public ExtensionApiTest {
return base::StringPrintf("[%d]", download_item->GetId());
}
- const FilePath& downloads_directory() {
+ const base::FilePath& downloads_directory() {
return downloads_directory_.path();
}
@@ -539,15 +539,16 @@ class DownloadExtensionTest : public ExtensionApiTest {
class MockIconExtractorImpl : public DownloadFileIconExtractor {
public:
- MockIconExtractorImpl(const FilePath& path, IconLoader::IconSize icon_size,
+ MockIconExtractorImpl(const base::FilePath& path,
+ IconLoader::IconSize icon_size,
const std::string& response)
- : expected_path_(path),
- expected_icon_size_(icon_size),
- response_(response) {
+ : expected_path_(path),
+ expected_icon_size_(icon_size),
+ response_(response) {
}
virtual ~MockIconExtractorImpl() {}
- virtual bool ExtractIconURLForPath(const FilePath& path,
+ virtual bool ExtractIconURLForPath(const base::FilePath& path,
IconLoader::IconSize icon_size,
IconURLCallback callback) OVERRIDE {
EXPECT_STREQ(expected_path_.value().c_str(), path.value().c_str());
@@ -570,7 +571,7 @@ class MockIconExtractorImpl : public DownloadFileIconExtractor {
callback_.Run(response_);
}
- FilePath expected_path_;
+ base::FilePath expected_path_;
IconLoader::IconSize expected_icon_size_;
std::string response_;
IconURLCallback callback_;
@@ -939,7 +940,7 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
}
scoped_refptr<UIThreadExtensionFunction> MockedGetFileIconFunction(
- const FilePath& expected_path,
+ const base::FilePath& expected_path,
IconLoader::IconSize icon_size,
const std::string& response) {
scoped_refptr<DownloadsGetFileIconFunction> function(
@@ -1044,8 +1045,8 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
ASSERT_TRUE(CreateHistoryDownloads(kHistoryInfo, arraysize(kHistoryInfo),
&all_downloads));
- FilePath real_path = all_downloads[0]->GetFullPath();
- FilePath fake_path = all_downloads[1]->GetFullPath();
+ base::FilePath real_path = all_downloads[0]->GetFullPath();
+ base::FilePath fake_path = all_downloads[1]->GetFullPath();
EXPECT_EQ(0, file_util::WriteFile(real_path, "", 0));
ASSERT_TRUE(file_util::PathExists(real_path));
@@ -1310,7 +1311,7 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
ASSERT_EQ(1UL, result_list->GetSize());
base::DictionaryValue* item_value = NULL;
ASSERT_TRUE(result_list->GetDictionary(0, &item_value));
- FilePath::StringType item_name;
+ base::FilePath::StringType item_name;
ASSERT_TRUE(item_value->GetString("filename", &item_name));
ASSERT_EQ(items[2]->GetFullPath().value(), item_name);
}
@@ -1324,7 +1325,7 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
scoped_ptr<base::Value> result_value;
base::ListValue* result_list = NULL;
base::DictionaryValue* result_dict = NULL;
- FilePath::StringType filename;
+ base::FilePath::StringType filename;
bool is_incognito = false;
std::string error;
std::string on_item_arg;
@@ -1357,12 +1358,12 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
ASSERT_TRUE(result_list->GetDictionary(0, &result_dict));
ASSERT_TRUE(result_dict->GetString("filename", &filename));
ASSERT_TRUE(result_dict->GetBoolean("incognito", &is_incognito));
- EXPECT_TRUE(on_item->GetFullPath() == FilePath(filename));
+ EXPECT_TRUE(on_item->GetFullPath() == base::FilePath(filename));
EXPECT_FALSE(is_incognito);
ASSERT_TRUE(result_list->GetDictionary(1, &result_dict));
ASSERT_TRUE(result_dict->GetString("filename", &filename));
ASSERT_TRUE(result_dict->GetBoolean("incognito", &is_incognito));
- EXPECT_TRUE(off_item->GetFullPath() == FilePath(filename));
+ EXPECT_TRUE(off_item->GetFullPath() == base::FilePath(filename));
EXPECT_TRUE(is_incognito);
// Extensions running in the on-record window should have access only to the
@@ -1375,7 +1376,7 @@ IN_PROC_BROWSER_TEST_F(DownloadExtensionTest,
ASSERT_EQ(1UL, result_list->GetSize());
ASSERT_TRUE(result_list->GetDictionary(0, &result_dict));
ASSERT_TRUE(result_dict->GetString("filename", &filename));
- EXPECT_TRUE(on_item->GetFullPath() == FilePath(filename));
+ EXPECT_TRUE(on_item->GetFullPath() == base::FilePath(filename));
ASSERT_TRUE(result_dict->GetBoolean("incognito", &is_incognito));
EXPECT_FALSE(is_incognito);
diff --git a/chrome/browser/extensions/api/file_system/file_system_api.cc b/chrome/browser/extensions/api/file_system/file_system_api.cc
index 6fa41df..f60283e 100644
--- a/chrome/browser/extensions/api/file_system/file_system_api.cc
+++ b/chrome/browser/extensions/api/file_system/file_system_api.cc
@@ -58,7 +58,7 @@ namespace {
#if defined(OS_MACOSX)
// Retrieves the localized display name for the base name of the given path.
// If the path is not localized, this will just return the base name.
-std::string GetDisplayBaseName(const FilePath& path) {
+std::string GetDisplayBaseName(const base::FilePath& path) {
base::mac::ScopedCFTypeRef<CFURLRef> url(
CFURLCreateFromFileSystemRepresentation(
NULL,
@@ -80,8 +80,8 @@ std::string GetDisplayBaseName(const FilePath& path) {
// Prettifies |source_path| for OS X, by localizing every component of the
// path. Additionally, if the path is inside the user's home directory, then
// replace the home directory component with "~".
-FilePath PrettifyPath(const FilePath& source_path) {
- FilePath home_path;
+base::FilePath PrettifyPath(const base::FilePath& source_path) {
+ base::FilePath home_path;
PathService::Get(base::DIR_HOME, &home_path);
DCHECK(source_path.IsAbsolute());
@@ -90,16 +90,16 @@ FilePath PrettifyPath(const FilePath& source_path) {
// and localized subfolders of the user's home directory.
// Don't grab the display name of the first component, i.e., "/", as it'll
// show up as the HDD name.
- std::vector<FilePath::StringType> components;
+ std::vector<base::FilePath::StringType> components;
source_path.GetComponents(&components);
- FilePath display_path = FilePath(components[0]);
- FilePath actual_path = display_path;
- for (std::vector<FilePath::StringType>::iterator i = components.begin() + 1;
- i != components.end(); ++i) {
+ base::FilePath display_path = base::FilePath(components[0]);
+ base::FilePath actual_path = display_path;
+ for (std::vector<base::FilePath::StringType>::iterator i =
+ components.begin() + 1; i != components.end(); ++i) {
actual_path = actual_path.Append(*i);
if (actual_path == home_path) {
- display_path = FilePath("~");
- home_path = FilePath();
+ display_path = base::FilePath("~");
+ home_path = base::FilePath();
continue;
}
std::string display = GetDisplayBaseName(actual_path);
@@ -111,15 +111,15 @@ FilePath PrettifyPath(const FilePath& source_path) {
#else // defined(OS_MACOSX)
// Prettifies |source_path|, by replacing the user's home directory with "~"
// (if applicable).
-FilePath PrettifyPath(const FilePath& source_path) {
+base::FilePath PrettifyPath(const base::FilePath& source_path) {
#if defined(OS_WIN) || defined(OS_POSIX)
#if defined(OS_WIN)
int home_key = base::DIR_PROFILE;
#elif defined(OS_POSIX)
int home_key = base::DIR_HOME;
#endif
- FilePath home_path;
- FilePath display_path = FilePath::FromUTF8Unsafe("~");
+ base::FilePath home_path;
+ base::FilePath display_path = base::FilePath::FromUTF8Unsafe("~");
if (PathService::Get(home_key, &home_path)
&& home_path.AppendRelativePath(source_path, &display_path))
return display_path;
@@ -129,12 +129,12 @@ FilePath PrettifyPath(const FilePath& source_path) {
#endif // defined(OS_MACOSX)
bool g_skip_picker_for_test = false;
-FilePath* g_path_to_be_picked_for_test;
+base::FilePath* g_path_to_be_picked_for_test;
bool GetFilePathOfFileEntry(const std::string& filesystem_name,
const std::string& filesystem_path,
const content::RenderViewHost* render_view_host,
- FilePath* file_path,
+ base::FilePath* file_path,
std::string* error) {
std::string filesystem_id;
if (!fileapi::CrackIsolatedFileSystemName(filesystem_name, &filesystem_id)) {
@@ -153,8 +153,9 @@ bool GetFilePathOfFileEntry(const std::string& filesystem_name,
}
IsolatedContext* context = IsolatedContext::GetInstance();
- FilePath relative_path = FilePath::FromUTF8Unsafe(filesystem_path);
- FilePath virtual_path = context->CreateVirtualRootPath(filesystem_id)
+ base::FilePath relative_path =
+ base::FilePath::FromUTF8Unsafe(filesystem_path);
+ base::FilePath virtual_path = context->CreateVirtualRootPath(filesystem_id)
.Append(relative_path);
if (!context->CrackVirtualPath(virtual_path,
&filesystem_id,
@@ -167,7 +168,7 @@ bool GetFilePathOfFileEntry(const std::string& filesystem_name,
return true;
}
-bool DoCheckWritableFile(const FilePath& path) {
+bool DoCheckWritableFile(const base::FilePath& path) {
// Don't allow links.
if (file_util::PathExists(path) && file_util::IsLink(path))
return false;
@@ -191,9 +192,9 @@ bool DoCheckWritableFile(const FilePath& path) {
// were found.
bool GetFileTypesFromAcceptOption(
const file_system::AcceptOption& accept_option,
- std::vector<FilePath::StringType>* extensions,
+ std::vector<base::FilePath::StringType>* extensions,
string16* description) {
- std::set<FilePath::StringType> extension_set;
+ std::set<base::FilePath::StringType> extension_set;
int description_id = 0;
if (accept_option.mime_types.get()) {
@@ -201,7 +202,7 @@ bool GetFileTypesFromAcceptOption(
bool valid_type = false;
for (std::vector<std::string>::const_iterator iter = list->begin();
iter != list->end(); ++iter) {
- std::vector<FilePath::StringType> inner;
+ std::vector<base::FilePath::StringType> inner;
std::string accept_type = *iter;
StringToLowerASCII(&accept_type);
net::GetExtensionsForMimeType(accept_type, &inner);
@@ -259,7 +260,7 @@ bool FileSystemGetDisplayPathFunction::RunImpl() {
EXTENSION_FUNCTION_VALIDATE(args_->GetString(0, &filesystem_name));
EXTENSION_FUNCTION_VALIDATE(args_->GetString(1, &filesystem_path));
- FilePath file_path;
+ base::FilePath file_path;
if (!GetFilePathOfFileEntry(filesystem_name, filesystem_path,
render_view_host_, &file_path, &error_))
return false;
@@ -277,7 +278,7 @@ bool FileSystemEntryFunction::HasFileSystemWritePermission() {
return extension->HasAPIPermission(APIPermission::kFileSystemWrite);
}
-void FileSystemEntryFunction::CheckWritableFile(const FilePath& path) {
+void FileSystemEntryFunction::CheckWritableFile(const base::FilePath& path) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::FILE));
if (DoCheckWritableFile(path)) {
content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
@@ -291,7 +292,7 @@ void FileSystemEntryFunction::CheckWritableFile(const FilePath& path) {
}
void FileSystemEntryFunction::RegisterFileSystemAndSendResponse(
- const FilePath& path, EntryType entry_type) {
+ const base::FilePath& path, EntryType entry_type) {
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
fileapi::IsolatedContext* isolated_context =
@@ -339,7 +340,7 @@ bool FileSystemGetWritableEntryFunction::RunImpl() {
return false;
}
- FilePath path;
+ base::FilePath path;
if (!GetFilePathOfFileEntry(filesystem_name, filesystem_path,
render_view_host_, &path, &error_))
return false;
@@ -379,7 +380,7 @@ class FileSystemChooseEntryFunction::FilePicker
public:
FilePicker(FileSystemChooseEntryFunction* function,
content::WebContents* web_contents,
- const FilePath& suggested_name,
+ const base::FilePath& suggested_name,
const ui::SelectFileDialog::FileTypeInfo& file_type_info,
ui::SelectFileDialog::Type picker_type,
EntryType entry_type)
@@ -419,7 +420,7 @@ class FileSystemChooseEntryFunction::FilePicker
private:
// ui::SelectFileDialog::Listener implementation.
- virtual void FileSelected(const FilePath& path,
+ virtual void FileSelected(const base::FilePath& path,
int index,
void* params) OVERRIDE {
function_->FileSelected(path, entry_type_);
@@ -431,7 +432,7 @@ class FileSystemChooseEntryFunction::FilePicker
delete this;
}
- FilePath suggested_name_;
+ base::FilePath suggested_name_;
EntryType entry_type_;
@@ -442,7 +443,7 @@ class FileSystemChooseEntryFunction::FilePicker
};
bool FileSystemChooseEntryFunction::ShowPicker(
- const FilePath& suggested_name,
+ const base::FilePath& suggested_name,
const ui::SelectFileDialog::FileTypeInfo& file_type_info,
ui::SelectFileDialog::Type picker_type,
EntryType entry_type) {
@@ -466,7 +467,7 @@ bool FileSystemChooseEntryFunction::ShowPicker(
// static
void FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
- FilePath* path) {
+ base::FilePath* path) {
g_skip_picker_for_test = true;
g_path_to_be_picked_for_test = path;
}
@@ -482,7 +483,7 @@ void FileSystemChooseEntryFunction::StopSkippingPickerForTest() {
g_skip_picker_for_test = false;
}
-void FileSystemChooseEntryFunction::FileSelected(const FilePath& path,
+void FileSystemChooseEntryFunction::FileSelected(const base::FilePath& path,
EntryType entry_type) {
if (entry_type == WRITABLE) {
content::BrowserThread::PostTask(content::BrowserThread::FILE, FROM_HERE,
@@ -502,7 +503,7 @@ void FileSystemChooseEntryFunction::FileSelectionCanceled() {
void FileSystemChooseEntryFunction::BuildFileTypeInfo(
ui::SelectFileDialog::FileTypeInfo* file_type_info,
- const FilePath::StringType& suggested_extension,
+ const base::FilePath::StringType& suggested_extension,
const AcceptOptions* accepts,
const bool* acceptsAllTypes) {
file_type_info->include_all_files = true;
@@ -517,7 +518,7 @@ void FileSystemChooseEntryFunction::BuildFileTypeInfo(
for (std::vector<linked_ptr<AcceptOption> >::const_iterator iter =
accepts->begin(); iter != accepts->end(); ++iter) {
string16 description;
- std::vector<FilePath::StringType> extensions;
+ std::vector<base::FilePath::StringType> extensions;
if (!GetFileTypesFromAcceptOption(**iter, &extensions, &description))
continue; // No extensions were found.
@@ -542,17 +543,17 @@ void FileSystemChooseEntryFunction::BuildFileTypeInfo(
void FileSystemChooseEntryFunction::BuildSuggestion(
const std::string *opt_name,
- FilePath* suggested_name,
- FilePath::StringType* suggested_extension) {
+ base::FilePath* suggested_name,
+ base::FilePath::StringType* suggested_extension) {
if (opt_name) {
- *suggested_name = FilePath::FromUTF8Unsafe(*opt_name);
+ *suggested_name = base::FilePath::FromUTF8Unsafe(*opt_name);
// Don't allow any path components; shorten to the base name. This should
// result in a relative path, but in some cases may not. Clear the
// suggestion for safety if this is the case.
*suggested_name = suggested_name->BaseName();
if (suggested_name->IsAbsolute())
- *suggested_name = FilePath();
+ *suggested_name = base::FilePath();
*suggested_extension = suggested_name->Extension();
if (!suggested_extension->empty())
@@ -564,7 +565,7 @@ bool FileSystemChooseEntryFunction::RunImpl() {
scoped_ptr<ChooseEntry::Params> params(ChooseEntry::Params::Create(*args_));
EXTENSION_FUNCTION_VALIDATE(params.get());
- FilePath suggested_name;
+ base::FilePath suggested_name;
ui::SelectFileDialog::FileTypeInfo file_type_info;
EntryType entry_type = READ_ONLY;
ui::SelectFileDialog::Type picker_type =
@@ -584,7 +585,7 @@ bool FileSystemChooseEntryFunction::RunImpl() {
}
}
- FilePath::StringType suggested_extension;
+ base::FilePath::StringType suggested_extension;
BuildSuggestion(options->suggested_name.get(), &suggested_name,
&suggested_extension);
diff --git a/chrome/browser/extensions/api/file_system/file_system_api.h b/chrome/browser/extensions/api/file_system/file_system_api.h
index 6e5e58a..6e72a0f 100644
--- a/chrome/browser/extensions/api/file_system/file_system_api.h
+++ b/chrome/browser/extensions/api/file_system/file_system_api.h
@@ -35,12 +35,12 @@ class FileSystemEntryFunction : public AsyncExtensionFunction {
// Called on the FILE thread. This is called when a writable file entry is
// being returned. The function will ensure the file exists, creating it if
// necessary, and also check that the file is not a link.
- void CheckWritableFile(const FilePath& path);
+ void CheckWritableFile(const base::FilePath& path);
// This will finish the choose file process. This is either called directly
// from FileSelected, or from CreateFileIfNecessary. It is called on the UI
// thread.
- void RegisterFileSystemAndSendResponse(const FilePath& path,
+ void RegisterFileSystemAndSendResponse(const base::FilePath& path,
EntryType entry_type);
// called on the UI thread if there is a problem checking a writable file.
@@ -70,7 +70,7 @@ class FileSystemIsWritableEntryFunction : public SyncExtensionFunction {
class FileSystemChooseEntryFunction : public FileSystemEntryFunction {
public:
// Allow picker UI to be skipped in testing.
- static void SkipPickerAndAlwaysSelectPathForTest(FilePath* path);
+ static void SkipPickerAndAlwaysSelectPathForTest(base::FilePath* path);
static void SkipPickerAndAlwaysCancelForTest();
static void StopSkippingPickerForTest();
@@ -81,26 +81,26 @@ class FileSystemChooseEntryFunction : public FileSystemEntryFunction {
static void BuildFileTypeInfo(
ui::SelectFileDialog::FileTypeInfo* file_type_info,
- const FilePath::StringType& suggested_extension,
+ const base::FilePath::StringType& suggested_extension,
const AcceptOptions* accepts,
const bool* acceptsAllTypes);
static void BuildSuggestion(const std::string* opt_name,
- FilePath* suggested_name,
- FilePath::StringType* suggested_extension);
+ base::FilePath* suggested_name,
+ base::FilePath::StringType* suggested_extension);
protected:
class FilePicker;
virtual ~FileSystemChooseEntryFunction() {}
virtual bool RunImpl() OVERRIDE;
- bool ShowPicker(const FilePath& suggested_path,
+ bool ShowPicker(const base::FilePath& suggested_path,
const ui::SelectFileDialog::FileTypeInfo& file_type_info,
ui::SelectFileDialog::Type picker_type,
EntryType entry_type);
private:
// FileSelected and FileSelectionCanceled are called by the file picker.
- void FileSelected(const FilePath& path, EntryType entry_type);
+ void FileSelected(const base::FilePath& path, EntryType entry_type);
void FileSelectionCanceled();
};
diff --git a/chrome/browser/extensions/api/file_system/file_system_api_unittest.cc b/chrome/browser/extensions/api/file_system/file_system_api_unittest.cc
index f411160..b008b9f 100644
--- a/chrome/browser/extensions/api/file_system/file_system_api_unittest.cc
+++ b/chrome/browser/extensions/api/file_system/file_system_api_unittest.cc
@@ -15,8 +15,8 @@ using extensions::api::file_system::AcceptOption;
namespace {
-void CheckExtensions(std::vector<FilePath::StringType>& expected,
- std::vector<FilePath::StringType>& actual) {
+void CheckExtensions(std::vector<base::FilePath::StringType>& expected,
+ std::vector<base::FilePath::StringType>& actual) {
EXPECT_EQ(expected.size(), actual.size());
if (expected.size() != actual.size())
return;
@@ -63,7 +63,7 @@ TEST_F(FileSystemApiUnitTest, FileSystemChooseEntryFunctionFileTypeInfoTest) {
ui::SelectFileDialog::FileTypeInfo file_type_info;
bool acceptsAllTypes = false;
FileSystemChooseEntryFunction::BuildFileTypeInfo(&file_type_info,
- FilePath::StringType(), NULL, &acceptsAllTypes);
+ base::FilePath::StringType(), NULL, &acceptsAllTypes);
EXPECT_TRUE(file_type_info.include_all_files);
EXPECT_TRUE(file_type_info.extensions.empty());
@@ -74,14 +74,14 @@ TEST_F(FileSystemApiUnitTest, FileSystemChooseEntryFunctionFileTypeInfoTest) {
BuildAcceptOption("", "application/x-chrome-extension", "jso")));
acceptsAllTypes = false;
FileSystemChooseEntryFunction::BuildFileTypeInfo(&file_type_info,
- FilePath::StringType(), &options, &acceptsAllTypes);
+ base::FilePath::StringType(), &options, &acceptsAllTypes);
EXPECT_FALSE(file_type_info.include_all_files);
ASSERT_EQ(file_type_info.extensions.size(), (size_t) 1);
EXPECT_TRUE(file_type_info.extension_description_overrides[0].empty()) <<
"No override must be specified for boring accept types";
// Note here (and below) that the expectedTypes are sorted, because we use a
// set internally to generate the output: thus, the output is sorted.
- std::vector<FilePath::StringType> expectedTypes;
+ std::vector<base::FilePath::StringType> expectedTypes;
expectedTypes.push_back(ToStringType("crx"));
expectedTypes.push_back(ToStringType("jso"));
CheckExtensions(expectedTypes, file_type_info.extensions[0]);
@@ -105,7 +105,7 @@ TEST_F(FileSystemApiUnitTest, FileSystemChooseEntryFunctionFileTypeInfoTest) {
BuildAcceptOption("", "", "cpp,cc")));
acceptsAllTypes = false;
FileSystemChooseEntryFunction::BuildFileTypeInfo(&file_type_info,
- FilePath::StringType(), &options, &acceptsAllTypes);
+ base::FilePath::StringType(), &options, &acceptsAllTypes);
ASSERT_EQ(file_type_info.extensions.size(), options.size());
expectedTypes.clear();
@@ -125,7 +125,7 @@ TEST_F(FileSystemApiUnitTest, FileSystemChooseEntryFunctionFileTypeInfoTest) {
BuildAcceptOption("", "image/*", "html")));
acceptsAllTypes = false;
FileSystemChooseEntryFunction::BuildFileTypeInfo(&file_type_info,
- FilePath::StringType(), &options, &acceptsAllTypes);
+ base::FilePath::StringType(), &options, &acceptsAllTypes);
ASSERT_EQ(file_type_info.extension_description_overrides.size(), (size_t) 1);
EXPECT_FALSE(file_type_info.extension_description_overrides[0].empty()) <<
"Accept type \"image/*\" must generate description override";
@@ -138,7 +138,7 @@ TEST_F(FileSystemApiUnitTest, FileSystemChooseEntryFunctionFileTypeInfoTest) {
BuildAcceptOption("", "image/*,audio/*,video/*", "")));
acceptsAllTypes = false;
FileSystemChooseEntryFunction::BuildFileTypeInfo(&file_type_info,
- FilePath::StringType(), &options, &acceptsAllTypes);
+ base::FilePath::StringType(), &options, &acceptsAllTypes);
ASSERT_EQ(file_type_info.extension_description_overrides.size(), (size_t) 1);
EXPECT_TRUE(file_type_info.extension_description_overrides[0].empty());
@@ -149,15 +149,15 @@ TEST_F(FileSystemApiUnitTest, FileSystemChooseEntryFunctionFileTypeInfoTest) {
BuildAcceptOption("File Types 101", "image/jpeg", "")));
acceptsAllTypes = false;
FileSystemChooseEntryFunction::BuildFileTypeInfo(&file_type_info,
- FilePath::StringType(), &options, &acceptsAllTypes);
+ base::FilePath::StringType(), &options, &acceptsAllTypes);
EXPECT_EQ(file_type_info.extension_description_overrides[0],
UTF8ToUTF16("File Types 101"));
}
TEST_F(FileSystemApiUnitTest, FileSystemChooseEntryFunctionSuggestionTest) {
std::string opt_name;
- FilePath suggested_name;
- FilePath::StringType suggested_extension;
+ base::FilePath suggested_name;
+ base::FilePath::StringType suggested_extension;
opt_name = std::string("normal_path.txt");
FileSystemChooseEntryFunction::BuildSuggestion(&opt_name, &suggested_name,
diff --git a/chrome/browser/extensions/api/file_system/file_system_apitest.cc b/chrome/browser/extensions/api/file_system/file_system_apitest.cc
index 8ce4cec..fd2a4db 100644
--- a/chrome/browser/extensions/api/file_system/file_system_apitest.cc
+++ b/chrome/browser/extensions/api/file_system/file_system_apitest.cc
@@ -23,25 +23,26 @@ class FileSystemApiTest : public extensions::PlatformAppBrowserTest {
};
protected:
- FilePath TempFilePath(const std::string& destination_name, bool copy_gold) {
+ base::FilePath TempFilePath(const std::string& destination_name,
+ bool copy_gold) {
if (!temp_dir_.CreateUniqueTempDir()) {
ADD_FAILURE() << "CreateUniqueTempDir failed";
- return FilePath();
+ return base::FilePath();
}
- FilePath destination = temp_dir_.path().AppendASCII(destination_name);
+ base::FilePath destination = temp_dir_.path().AppendASCII(destination_name);
if (copy_gold) {
- FilePath source = test_root_folder_.AppendASCII("gold.txt");
+ base::FilePath source = test_root_folder_.AppendASCII("gold.txt");
EXPECT_TRUE(file_util::CopyFile(source, destination));
}
return destination;
}
- FilePath test_root_folder_;
+ base::FilePath test_root_folder_;
base::ScopedTempDir temp_dir_;
};
IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiGetDisplayPath) {
- FilePath test_file = test_root_folder_.AppendASCII("gold.txt");
+ base::FilePath test_file = test_root_folder_.AppendASCII("gold.txt");
FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
&test_file);
ASSERT_TRUE(RunPlatformAppTest("api_test/file_system/get_display_path"))
@@ -58,7 +59,7 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiGetDisplayPathPrettify) {
ASSERT_TRUE(PathService::OverrideAndCreateIfNeeded(override,
test_root_folder_, false));
- FilePath test_file = test_root_folder_.AppendASCII("gold.txt");
+ base::FilePath test_file = test_root_folder_.AppendASCII("gold.txt");
FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
&test_file);
ASSERT_TRUE(RunPlatformAppTest(
@@ -70,11 +71,11 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiGetDisplayPathPrettify) {
IN_PROC_BROWSER_TEST_F(FileSystemApiTest,
FileSystemApiGetDisplayPathPrettifyMac) {
// On Mac, "test.localized" will be localized into just "test".
- FilePath test_path = TempFilePath("test.localized", false);
+ base::FilePath test_path = TempFilePath("test.localized", false);
ASSERT_TRUE(file_util::CreateDirectory(test_path));
- FilePath test_file = test_path.AppendASCII("gold.txt");
- FilePath source = test_root_folder_.AppendASCII("gold.txt");
+ base::FilePath test_file = test_path.AppendASCII("gold.txt");
+ base::FilePath source = test_root_folder_.AppendASCII("gold.txt");
EXPECT_TRUE(file_util::CopyFile(source, test_file));
FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
@@ -85,7 +86,7 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest,
#endif
IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiOpenExistingFileTest) {
- FilePath test_file = TempFilePath("open_existing.txt", true);
+ base::FilePath test_file = TempFilePath("open_existing.txt", true);
ASSERT_FALSE(test_file.empty());
FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
&test_file);
@@ -95,7 +96,7 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiOpenExistingFileTest) {
IN_PROC_BROWSER_TEST_F(FileSystemApiTest,
FileSystemApiInvalidChooseEntryTypeTest) {
- FilePath test_file = TempFilePath("open_existing.txt", true);
+ base::FilePath test_file = TempFilePath("open_existing.txt", true);
ASSERT_FALSE(test_file.empty());
FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
&test_file);
@@ -105,7 +106,7 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest,
IN_PROC_BROWSER_TEST_F(FileSystemApiTest,
FileSystemApiOpenExistingFileWithWriteTest) {
- FilePath test_file = TempFilePath("open_existing.txt", true);
+ base::FilePath test_file = TempFilePath("open_existing.txt", true);
ASSERT_FALSE(test_file.empty());
FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
&test_file);
@@ -115,7 +116,7 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest,
IN_PROC_BROWSER_TEST_F(FileSystemApiTest,
FileSystemApiOpenWritableExistingFileTest) {
- FilePath test_file = TempFilePath("open_existing.txt", true);
+ base::FilePath test_file = TempFilePath("open_existing.txt", true);
ASSERT_FALSE(test_file.empty());
FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
&test_file);
@@ -125,7 +126,7 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest,
IN_PROC_BROWSER_TEST_F(FileSystemApiTest,
FileSystemApiOpenWritableExistingFileWithWriteTest) {
- FilePath test_file = TempFilePath("open_existing.txt", true);
+ base::FilePath test_file = TempFilePath("open_existing.txt", true);
ASSERT_FALSE(test_file.empty());
FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
&test_file);
@@ -145,7 +146,7 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiOpenBackgroundTest) {
}
IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiSaveNewFileTest) {
- FilePath test_file = TempFilePath("save_new.txt", false);
+ base::FilePath test_file = TempFilePath("save_new.txt", false);
ASSERT_FALSE(test_file.empty());
FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
&test_file);
@@ -154,7 +155,7 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiSaveNewFileTest) {
}
IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiSaveExistingFileTest) {
- FilePath test_file = TempFilePath("save_existing.txt", true);
+ base::FilePath test_file = TempFilePath("save_existing.txt", true);
ASSERT_FALSE(test_file.empty());
FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
&test_file);
@@ -164,7 +165,7 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiSaveExistingFileTest) {
IN_PROC_BROWSER_TEST_F(FileSystemApiTest,
FileSystemApiSaveNewFileWithWriteTest) {
- FilePath test_file = TempFilePath("save_new.txt", false);
+ base::FilePath test_file = TempFilePath("save_new.txt", false);
ASSERT_FALSE(test_file.empty());
FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
&test_file);
@@ -174,7 +175,7 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest,
IN_PROC_BROWSER_TEST_F(FileSystemApiTest,
FileSystemApiSaveExistingFileWithWriteTest) {
- FilePath test_file = TempFilePath("save_existing.txt", true);
+ base::FilePath test_file = TempFilePath("save_existing.txt", true);
ASSERT_FALSE(test_file.empty());
FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
&test_file);
@@ -194,7 +195,7 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiSaveBackgroundTest) {
}
IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiGetWritableTest) {
- FilePath test_file = TempFilePath("writable.txt", true);
+ base::FilePath test_file = TempFilePath("writable.txt", true);
ASSERT_FALSE(test_file.empty());
FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
&test_file);
@@ -204,7 +205,7 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiGetWritableTest) {
IN_PROC_BROWSER_TEST_F(FileSystemApiTest,
FileSystemApiGetWritableWithWriteTest) {
- FilePath test_file = TempFilePath("writable.txt", true);
+ base::FilePath test_file = TempFilePath("writable.txt", true);
ASSERT_FALSE(test_file.empty());
FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
&test_file);
@@ -213,7 +214,7 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest,
}
IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiIsWritableTest) {
- FilePath test_file = TempFilePath("writable.txt", true);
+ base::FilePath test_file = TempFilePath("writable.txt", true);
ASSERT_FALSE(test_file.empty());
FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
&test_file);
@@ -222,7 +223,7 @@ IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiIsWritableTest) {
}
IN_PROC_BROWSER_TEST_F(FileSystemApiTest, FileSystemApiGetEntryId) {
- FilePath test_file = TempFilePath("writable.txt", true);
+ base::FilePath test_file = TempFilePath("writable.txt", true);
ASSERT_FALSE(test_file.empty());
FileSystemChooseEntryFunction::SkipPickerAndAlwaysSelectPathForTest(
&test_file);
diff --git a/chrome/browser/extensions/api/managed_mode/managed_mode_apitest.cc b/chrome/browser/extensions/api/managed_mode/managed_mode_apitest.cc
index 638a88a..f7c6e0a 100644
--- a/chrome/browser/extensions/api/managed_mode/managed_mode_apitest.cc
+++ b/chrome/browser/extensions/api/managed_mode/managed_mode_apitest.cc
@@ -24,7 +24,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ManagedModeOnChange) {
// We can't just call RunComponentExtension() like above, because we need to
// fire the event while the page is waiting.
- FilePath extension_path =
+ base::FilePath extension_path =
test_data_dir_.AppendASCII("managed_mode/on_change");
const extensions::Extension* extension =
LoadExtensionAsComponent(extension_path);
diff --git a/chrome/browser/extensions/api/management/management_api.cc b/chrome/browser/extensions/api/management/management_api.cc
index 5308e7a..18aa8cd 100644
--- a/chrome/browser/extensions/api/management/management_api.cc
+++ b/chrome/browser/extensions/api/management/management_api.cc
@@ -382,7 +382,7 @@ void ManagementGetPermissionWarningsByManifestFunction::OnParseSuccess(
CHECK(parsed_manifest);
scoped_refptr<Extension> extension = Extension::Create(
- FilePath(), Manifest::INVALID_LOCATION, *parsed_manifest,
+ base::FilePath(), Manifest::INVALID_LOCATION, *parsed_manifest,
Extension::NO_FLAGS, &error_);
if (!extension.get()) {
OnParseFailure(keys::kExtensionCreateError);
diff --git a/chrome/browser/extensions/api/management/management_api_browsertest.cc b/chrome/browser/extensions/api/management/management_api_browsertest.cc
index 3250a3b..aa4da64 100644
--- a/chrome/browser/extensions/api/management/management_api_browsertest.cc
+++ b/chrome/browser/extensions/api/management/management_api_browsertest.cc
@@ -171,18 +171,18 @@ class ExtensionManagementApiEscalationTest :
virtual void SetUpOnMainThread() OVERRIDE {
EXPECT_TRUE(scoped_temp_dir_.CreateUniqueTempDir());
- FilePath pem_path = test_data_dir_.
+ base::FilePath pem_path = test_data_dir_.
AppendASCII("permissions_increase").AppendASCII("permissions.pem");
- FilePath path_v1 = PackExtensionWithOptions(
+ base::FilePath path_v1 = PackExtensionWithOptions(
test_data_dir_.AppendASCII("permissions_increase").AppendASCII("v1"),
scoped_temp_dir_.path().AppendASCII("permissions1.crx"),
pem_path,
- FilePath());
- FilePath path_v2 = PackExtensionWithOptions(
+ base::FilePath());
+ base::FilePath path_v2 = PackExtensionWithOptions(
test_data_dir_.AppendASCII("permissions_increase").AppendASCII("v2"),
scoped_temp_dir_.path().AppendASCII("permissions2.crx"),
pem_path,
- FilePath());
+ base::FilePath());
ExtensionService* service = ExtensionSystem::Get(browser()->profile())->
extension_service();
diff --git a/chrome/browser/extensions/api/management/management_apitest.cc b/chrome/browser/extensions/api/management/management_apitest.cc
index 6243f9a..707ef65 100644
--- a/chrome/browser/extensions/api/management/management_apitest.cc
+++ b/chrome/browser/extensions/api/management/management_apitest.cc
@@ -48,7 +48,7 @@ class ExtensionManagementApiTest : public ExtensionApiTest {
}
virtual void LoadExtensions() {
- FilePath basedir = test_data_dir_.AppendASCII("management");
+ base::FilePath basedir = test_data_dir_.AppendASCII("management");
// Load 4 enabled items.
LoadNamedExtension(basedir, "enabled_extension");
@@ -77,14 +77,14 @@ class ExtensionManagementApiTest : public ExtensionApiTest {
}
protected:
- void LoadNamedExtension(const FilePath& path,
+ void LoadNamedExtension(const base::FilePath& path,
const std::string& name) {
const Extension* extension = LoadExtension(path.AppendASCII(name));
ASSERT_TRUE(extension);
extension_ids_[name] = extension->id();
}
- void InstallNamedExtension(const FilePath& path,
+ void InstallNamedExtension(const base::FilePath& path,
const std::string& name,
Manifest::Location install_source) {
const Extension* extension = InstallExtension(path.AppendASCII(name), 1,
@@ -100,7 +100,7 @@ class ExtensionManagementApiTest : public ExtensionApiTest {
IN_PROC_BROWSER_TEST_F(ExtensionManagementApiTest, Basics) {
LoadExtensions();
- FilePath basedir = test_data_dir_.AppendASCII("management");
+ base::FilePath basedir = test_data_dir_.AppendASCII("management");
InstallNamedExtension(basedir, "internal_extension", Manifest::INTERNAL);
InstallNamedExtension(basedir, "external_extension",
Manifest::EXTERNAL_PREF);
diff --git a/chrome/browser/extensions/api/management/management_browsertest.cc b/chrome/browser/extensions/api/management/management_browsertest.cc
index 2fa3a91..55cc2c3 100644
--- a/chrome/browser/extensions/api/management/management_browsertest.cc
+++ b/chrome/browser/extensions/api/management/management_browsertest.cc
@@ -81,14 +81,14 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, MAYBE_InstallSameVersion) {
const Extension* extension = InstallExtension(
test_data_dir_.AppendASCII("install/install.crx"), 1);
ASSERT_TRUE(extension);
- FilePath old_path = extension->path();
+ base::FilePath old_path = extension->path();
// Install an extension with the same version. The previous install should be
// overwritten.
extension = InstallExtension(
test_data_dir_.AppendASCII("install/install_same_version.crx"), 0);
ASSERT_TRUE(extension);
- FilePath new_path = extension->path();
+ base::FilePath new_path = extension->path();
EXPECT_FALSE(IsExtensionAtVersion(extension, "1.0"));
EXPECT_NE(old_path.value(), new_path.value());
@@ -248,7 +248,7 @@ class NotificationListener : public content::NotificationObserver {
// Tests extension autoupdate.
IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, MAYBE_AutoUpdate) {
NotificationListener notification_listener;
- FilePath basedir = test_data_dir_.AppendASCII("autoupdate");
+ base::FilePath basedir = test_data_dir_.AppendASCII("autoupdate");
// Note: This interceptor gets requests on the IO thread.
content::URLRequestPrepackagedInterceptor interceptor;
net::URLFetcher::SetEnableInterceptionForTests(true);
@@ -334,7 +334,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, MAYBE_AutoUpdate) {
IN_PROC_BROWSER_TEST_F(ExtensionManagementTest,
MAYBE_AutoUpdateDisabledExtensions) {
NotificationListener notification_listener;
- FilePath basedir = test_data_dir_.AppendASCII("autoupdate");
+ base::FilePath basedir = test_data_dir_.AppendASCII("autoupdate");
// Note: This interceptor gets requests on the IO thread.
content::URLRequestPrepackagedInterceptor interceptor;
net::URLFetcher::SetEnableInterceptionForTests(true);
@@ -409,7 +409,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, MAYBE_ExternalUrlUpdate) {
extensions::ExtensionUpdater::CheckParams params;
params.check_blacklist = false;
- FilePath basedir = test_data_dir_.AppendASCII("autoupdate");
+ base::FilePath basedir = test_data_dir_.AppendASCII("autoupdate");
// Note: This interceptor gets requests on the IO thread.
content::URLRequestPrepackagedInterceptor interceptor;
@@ -495,7 +495,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest, ExternalPolicyRefresh) {
extensions::ExtensionUpdater::CheckParams params;
params.check_blacklist = false;
- FilePath basedir = test_data_dir_.AppendASCII("autoupdate");
+ base::FilePath basedir = test_data_dir_.AppendASCII("autoupdate");
// Note: This interceptor gets requests on the IO thread.
content::URLRequestPrepackagedInterceptor interceptor;
@@ -569,7 +569,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionManagementTest,
params.check_blacklist = false;
service->updater()->set_default_check_params(params);
const size_t size_before = service->extensions()->size();
- FilePath basedir = test_data_dir_.AppendASCII("autoupdate");
+ base::FilePath basedir = test_data_dir_.AppendASCII("autoupdate");
ASSERT_TRUE(service->disabled_extensions()->is_empty());
// Note: This interceptor gets requests on the IO thread.
diff --git a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_apitest.cc b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_apitest.cc
index 24c2a95..7587f2c 100644
--- a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_apitest.cc
+++ b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_apitest.cc
@@ -48,7 +48,7 @@ const char kDetachTestOk[] = "detach_test_ok";
// Dummy device properties.
const char kDeviceId[] = "testDeviceId";
const char kDeviceName[] = "foobar";
-FilePath::CharType kDevicePath[] = FILE_PATH_LITERAL("/qux");
+base::FilePath::CharType kDevicePath[] = FILE_PATH_LITERAL("/qux");
} // namespace
diff --git a/chrome/browser/extensions/api/media_galleries_private/media_galleries_watch_apitest.cc b/chrome/browser/extensions/api/media_galleries_private/media_galleries_watch_apitest.cc
index c205b89..d116461 100644
--- a/chrome/browser/extensions/api/media_galleries_private/media_galleries_watch_apitest.cc
+++ b/chrome/browser/extensions/api/media_galleries_private/media_galleries_watch_apitest.cc
@@ -91,10 +91,10 @@ class MediaGalleriesPrivateGalleryWatchApiTest : public ExtensionApiTest {
(gallery_directory_key != chrome::DIR_USER_VIDEOS))
return false;
- FilePath gallery_dir;
+ base::FilePath gallery_dir;
if (!PathService::Get(gallery_directory_key, &gallery_dir))
return false;
- FilePath gallery_file =
+ base::FilePath gallery_file =
gallery_dir.Append(FILE_PATH_LITERAL("test1.txt"));
std::string content("new content");
int write_size = file_util::WriteFile(gallery_file, content.c_str(),
diff --git a/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc b/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc
index 088715b..aa0ae5b 100644
--- a/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc
+++ b/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc
@@ -35,8 +35,8 @@ namespace {
const char kTestMessage[] = "{\"text\": \"Hello.\"}";
-FilePath GetTestDir() {
- FilePath test_dir;
+base::FilePath GetTestDir() {
+ base::FilePath test_dir;
PathService::Get(chrome::DIR_TEST_DATA, &test_dir);
test_dir = test_dir.AppendASCII("native_messaging");
return test_dir;
@@ -48,7 +48,7 @@ namespace extensions {
class FakeLauncher : public NativeProcessLauncher {
public:
- FakeLauncher(FilePath read_file, FilePath write_file) {
+ FakeLauncher(base::FilePath read_file, base::FilePath write_file) {
read_file_ = base::CreatePlatformFile(
read_file,
base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ |
@@ -122,8 +122,8 @@ class NativeMessagingTest : public ::testing::Test,
pickle.payload_size());
}
- FilePath CreateTempFileWithMessage(const std::string& message) {
- FilePath filename = temp_dir_.path().AppendASCII("input");
+ base::FilePath CreateTempFileWithMessage(const std::string& message) {
+ base::FilePath filename = temp_dir_.path().AppendASCII("input");
file_util::CreateTemporaryFile(&filename);
std::string message_with_header = FormatMessage(message);
EXPECT_TRUE(file_util::WriteFile(
@@ -135,7 +135,7 @@ class NativeMessagingTest : public ::testing::Test,
base::ScopedTempDir temp_dir_;
Feature::ScopedCurrentChannel current_channel_;
scoped_ptr<NativeMessageProcessHost> native_message_process_host_;
- FilePath user_data_dir_;
+ base::FilePath user_data_dir_;
MessageLoopForIO message_loop_;
base::RunLoop read_message_run_loop_;
scoped_ptr<content::TestBrowserThread> ui_thread_;
@@ -145,8 +145,8 @@ class NativeMessagingTest : public ::testing::Test,
// Read a single message from a local file.
TEST_F(NativeMessagingTest, SingleSendMessageRead) {
- FilePath temp_output_file = temp_dir_.path().AppendASCII("output");
- FilePath temp_input_file = CreateTempFileWithMessage(kTestMessage);
+ base::FilePath temp_output_file = temp_dir_.path().AppendASCII("output");
+ base::FilePath temp_input_file = CreateTempFileWithMessage(kTestMessage);
scoped_ptr<NativeProcessLauncher> launcher(
new FakeLauncher(temp_input_file, temp_output_file));
@@ -163,8 +163,8 @@ TEST_F(NativeMessagingTest, SingleSendMessageRead) {
// Tests sending a single message. The message should get written to
// |temp_file| and should match the contents of single_message_request.msg.
TEST_F(NativeMessagingTest, SingleSendMessageWrite) {
- FilePath temp_output_file = temp_dir_.path().AppendASCII("output");
- FilePath temp_input_file = CreateTempFileWithMessage(std::string());
+ base::FilePath temp_output_file = temp_dir_.path().AppendASCII("output");
+ base::FilePath temp_input_file = CreateTempFileWithMessage(std::string());
scoped_ptr<NativeProcessLauncher> launcher(
new FakeLauncher(temp_input_file, temp_output_file));
diff --git a/chrome/browser/extensions/api/messaging/native_messaging_apitest_posix.cc b/chrome/browser/extensions/api/messaging/native_messaging_apitest_posix.cc
index dd17239..6450b78 100644
--- a/chrome/browser/extensions/api/messaging/native_messaging_apitest_posix.cc
+++ b/chrome/browser/extensions/api/messaging/native_messaging_apitest_posix.cc
@@ -17,7 +17,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, NativeMessageBasic) {
// Override the user data dir to point to our native app.
extensions::Feature::ScopedCurrentChannel
current_channel(chrome::VersionInfo::CHANNEL_DEV);
- FilePath test_user_data_dir;
+ base::FilePath test_user_data_dir;
ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_user_data_dir));
test_user_data_dir = test_user_data_dir.AppendASCII("native_messaging");
ASSERT_TRUE(PathService::Override(chrome::DIR_USER_DATA, test_user_data_dir));
diff --git a/chrome/browser/extensions/api/messaging/native_process_launcher.cc b/chrome/browser/extensions/api/messaging/native_process_launcher.cc
index 0f1b5be..ce223ae 100644
--- a/chrome/browser/extensions/api/messaging/native_process_launcher.cc
+++ b/chrome/browser/extensions/api/messaging/native_process_launcher.cc
@@ -81,8 +81,8 @@ void NativeProcessLauncherImpl::Core::DoLaunchOnThreadPool(
LaunchedCallback callback) {
DCHECK(content::BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread());
- FilePath native_host_program;
- FilePath native_host_registry;
+ base::FilePath native_host_program;
+ base::FilePath native_host_registry;
CHECK(PathService::Get(chrome::DIR_USER_DATA, &native_host_registry));
native_host_registry =
native_host_registry.AppendASCII(kNativeHostsDirectoryName);
diff --git a/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc b/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc
index 60a5afe..6297271 100644
--- a/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc
+++ b/chrome/browser/extensions/api/messaging/native_process_launcher_posix.cc
@@ -14,7 +14,7 @@ namespace extensions {
// static
bool NativeProcessLauncher::LaunchNativeProcess(
- const FilePath& path,
+ const base::FilePath& path,
base::ProcessHandle* native_process_handle,
base::PlatformFile* read_file,
base::PlatformFile* write_file) {
diff --git a/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc b/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc
index c373d42..5a0d9c9 100644
--- a/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc
+++ b/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc
@@ -15,7 +15,7 @@ namespace extensions {
// static
bool NativeProcessLauncher::LaunchNativeProcess(
- const FilePath& path,
+ const base::FilePath& path,
base::ProcessHandle* native_process_handle,
base::PlatformFile* read_file,
base::PlatformFile* write_file) {
diff --git a/chrome/browser/extensions/api/page_capture/page_capture_api.cc b/chrome/browser/extensions/api/page_capture/page_capture_api.cc
index 172e931..c72206b 100644
--- a/chrome/browser/extensions/api/page_capture/page_capture_api.cc
+++ b/chrome/browser/extensions/api/page_capture/page_capture_api.cc
@@ -134,8 +134,9 @@ void PageCaptureSaveAsMHTMLFunction::TemporaryFileCreated(bool success) {
base::Bind(&PageCaptureSaveAsMHTMLFunction::MHTMLGenerated, this));
}
-void PageCaptureSaveAsMHTMLFunction::MHTMLGenerated(const FilePath& file_path,
- int64 mhtml_file_size) {
+void PageCaptureSaveAsMHTMLFunction::MHTMLGenerated(
+ const base::FilePath& file_path,
+ int64 mhtml_file_size) {
DCHECK(mhtml_path_ == file_path);
if (mhtml_file_size <= 0) {
ReturnFailure(kMHTMLGenerationFailedError);
diff --git a/chrome/browser/extensions/api/page_capture/page_capture_apitest.cc b/chrome/browser/extensions/api/page_capture/page_capture_apitest.cc
index 78bff7e..e0a7ad8 100644
--- a/chrome/browser/extensions/api/page_capture/page_capture_apitest.cc
+++ b/chrome/browser/extensions/api/page_capture/page_capture_apitest.cc
@@ -46,11 +46,12 @@ class PageCaptureSaveAsMHTMLDelegate
PageCaptureSaveAsMHTMLFunction::SetTestDelegate(NULL);
}
- virtual void OnTemporaryFileCreated(const FilePath& temp_file) OVERRIDE {
+ virtual void OnTemporaryFileCreated(
+ const base::FilePath& temp_file) OVERRIDE {
temp_file_ = temp_file;
}
- FilePath temp_file_;
+ base::FilePath temp_file_;
};
IN_PROC_BROWSER_TEST_F(ExtensionPageCaptureApiTest, MAYBE_SaveAsMHTML) {
diff --git a/chrome/browser/extensions/api/preference/preference_apitest.cc b/chrome/browser/extensions/api/preference/preference_apitest.cc
index 8b63e9c..d9cd21a 100644
--- a/chrome/browser/extensions/api/preference/preference_apitest.cc
+++ b/chrome/browser/extensions/api/preference/preference_apitest.cc
@@ -178,7 +178,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, PreferenceOnChangeSplit) {
ExtensionTestMessageListener listener_incognito10(
"clearDefault incognito ready", true);
- FilePath extension_data_dir =
+ base::FilePath extension_data_dir =
test_data_dir_.AppendASCII("preference").AppendASCII("onchange_split");
ASSERT_TRUE(LoadExtensionIncognito(extension_data_dir));
diff --git a/chrome/browser/extensions/api/record/record_api.cc b/chrome/browser/extensions/api/record/record_api.cc
index 7b12f69..ac2a992 100644
--- a/chrome/browser/extensions/api/record/record_api.cc
+++ b/chrome/browser/extensions/api/record/record_api.cc
@@ -108,7 +108,7 @@ void RunPageCyclerFunction::RunTestBrowser() {
// Create and fill a temp file to communicate the URL list to the test
// browser.
- FilePath url_path;
+ base::FilePath url_path;
file_util::CreateTemporaryFile(&url_path);
file_util::WriteFile(url_path, url_contents_.c_str(), url_contents_.size());
line.AppendSwitchPath(switches::kVisitURLs, url_path);
@@ -116,9 +116,9 @@ void RunPageCyclerFunction::RunTestBrowser() {
// Set up Capture- or Replay-specific commandline switches.
AddSwitches(&line);
- FilePath error_file_path = url_path.DirName().
+ base::FilePath error_file_path = url_path.DirName().
Append(url_path.BaseName().value() +
- FilePath::StringType(kURLErrorsSuffix));
+ base::FilePath::StringType(kURLErrorsSuffix));
LOG(ERROR) << "Test browser commandline: " << line.GetCommandLineString() <<
" will be repeated " << repeat_count_ << " times....";
@@ -169,7 +169,7 @@ bool RecordCaptureURLsFunction::ParseJSParameters() {
url_contents_ = JoinString(params->urls, '\n');
// TODO(cstaley): Can't just use captureName -- gotta stick it in a temp dir.
// TODO(cstaley): Ensure that capture name is suitable as directory name.
- user_data_dir_ = FilePath::FromUTF8Unsafe(params->capture_name);
+ user_data_dir_ = base::FilePath::FromUTF8Unsafe(params->capture_name);
return true;
}
@@ -208,7 +208,7 @@ bool RecordReplayURLsFunction::ParseJSParameters() {
// TODO(cstaley): Must build full temp dir from capture_name
- user_data_dir_ = FilePath::FromUTF8Unsafe(params->capture_name);
+ user_data_dir_ = base::FilePath::FromUTF8Unsafe(params->capture_name);
// TODO(cstaley): Get this from user data dir ultimately
url_contents_ = "http://www.google.com\nhttp://www.amazon.com";
@@ -218,7 +218,7 @@ bool RecordReplayURLsFunction::ParseJSParameters() {
if (params->details.get()) {
if (params->details->extension_path.get())
extension_path_ =
- FilePath::FromUTF8Unsafe(*params->details->extension_path);
+ base::FilePath::FromUTF8Unsafe(*params->details->extension_path);
}
return true;
diff --git a/chrome/browser/extensions/api/record/record_api.h b/chrome/browser/extensions/api/record/record_api.h
index 3911b12..6c8b62f 100644
--- a/chrome/browser/extensions/api/record/record_api.h
+++ b/chrome/browser/extensions/api/record/record_api.h
@@ -12,7 +12,8 @@
namespace {
-const FilePath::CharType kURLErrorsSuffix[] = FILE_PATH_LITERAL(".errors");
+const base::FilePath::CharType kURLErrorsSuffix[] =
+ FILE_PATH_LITERAL(".errors");
const char kErrorsKey[] = "errors";
const char kStatsKey[] = "stats";
@@ -93,7 +94,7 @@ class RunPageCyclerFunction : public AsyncExtensionFunction {
// logic is in subclasses.
virtual void Finish() {}
- FilePath user_data_dir_;
+ base::FilePath user_data_dir_;
std::string url_contents_;
int repeat_count_;
std::vector<std::string> errors_;
@@ -151,8 +152,8 @@ class RecordReplayURLsFunction : public RunPageCyclerFunction {
// These data are additional information added to the sub-browser
// commandline or used to repeatedly run the sub-browser.
- FilePath extension_path_;
- FilePath stats_file_path_;
+ base::FilePath extension_path_;
+ base::FilePath stats_file_path_;
// This time datum marks the start and end of the sub-browser run.
base::Time timer_;
diff --git a/chrome/browser/extensions/api/record/record_api_test.cc b/chrome/browser/extensions/api/record/record_api_test.cc
index 5af4b93..03b905a 100644
--- a/chrome/browser/extensions/api/record/record_api_test.cc
+++ b/chrome/browser/extensions/api/record/record_api_test.cc
@@ -55,18 +55,19 @@ const char kCaptureArgs1[] =
const char kPlaybackArgs1[] =
"[\"%s\", 2, {\"extensionPath\": \"MockExtension\"}]";
-// Use this as the value of FilePath switches (e.g. user-data-dir) that
+// Use this as the value of base::FilePath switches (e.g. user-data-dir) that
// should be replaced by the record methods.
-const FilePath::CharType kDummyDirName[] = FILE_PATH_LITERAL("ReplaceMe");
+const base::FilePath::CharType kDummyDirName[] = FILE_PATH_LITERAL("ReplaceMe");
// Use this as the filename for a mock "cache" file in the user-data-dir.
-const FilePath::CharType kMockCacheFile[] = FILE_PATH_LITERAL("MockCache");
+const base::FilePath::CharType kMockCacheFile[] =
+ FILE_PATH_LITERAL("MockCache");
}
class TestProcessStrategy : public ProcessStrategy {
public:
- explicit TestProcessStrategy(std::vector<FilePath>* temp_files)
+ explicit TestProcessStrategy(std::vector<base::FilePath>* temp_files)
: command_line_(CommandLine::NO_PROGRAM), temp_files_(temp_files) {}
virtual ~TestProcessStrategy() {}
@@ -92,15 +93,15 @@ class TestProcessStrategy : public ProcessStrategy {
visited_urls_.clear();
if (command_line.HasSwitch(switches::kVisitURLs)) {
- FilePath url_path =
+ base::FilePath url_path =
command_line.GetSwitchValuePath(switches::kVisitURLs);
temp_files_->push_back(url_path);
if (command_line.HasSwitch(switches::kRecordMode) ||
command_line.HasSwitch(switches::kPlaybackMode)) {
- FilePath url_path_copy = command_line.GetSwitchValuePath(
+ base::FilePath url_path_copy = command_line.GetSwitchValuePath(
switches::kUserDataDir).Append(
- FilePath(FilePath::StringType(kMockCacheFile)));
+ base::FilePath(base::FilePath::StringType(kMockCacheFile)));
if (command_line.HasSwitch(switches::kRecordMode)) {
file_util::CopyFile(url_path, url_path_copy);
@@ -129,9 +130,9 @@ class TestProcessStrategy : public ProcessStrategy {
}
if (!bad_urls.empty()) {
- FilePath url_errors_path = url_path.DirName()
+ base::FilePath url_errors_path = url_path.DirName()
.Append(url_path.BaseName().value() +
- FilePath::StringType(kURLErrorsSuffix));
+ base::FilePath::StringType(kURLErrorsSuffix));
std::string error_content = JoinString(bad_urls, '\n');
temp_files_->push_back(url_errors_path);
file_util::WriteFile(url_errors_path, error_content.c_str(),
@@ -140,7 +141,7 @@ class TestProcessStrategy : public ProcessStrategy {
}
if (command_line.HasSwitch(switches::kRecordStats)) {
- FilePath record_stats_path(command_line.GetSwitchValuePath(
+ base::FilePath record_stats_path(command_line.GetSwitchValuePath(
switches::kRecordStats));
temp_files_->push_back(record_stats_path);
file_util::WriteFile(record_stats_path, kTestStatistics.c_str(),
@@ -159,7 +160,7 @@ class TestProcessStrategy : public ProcessStrategy {
private:
CommandLine command_line_;
std::vector<std::string> visited_urls_;
- std::vector<FilePath>* temp_files_;
+ std::vector<base::FilePath>* temp_files_;
};
class RecordApiTest : public InProcessBrowserTest {
@@ -171,7 +172,7 @@ class RecordApiTest : public InProcessBrowserTest {
// browser test.
virtual void SetUp() OVERRIDE {
InProcessBrowserTest::SetUp();
- if (!scoped_temp_user_data_dir_.Set(FilePath(kDummyDirName)))
+ if (!scoped_temp_user_data_dir_.Set(base::FilePath(kDummyDirName)))
NOTREACHED();
}
@@ -185,7 +186,7 @@ class RecordApiTest : public InProcessBrowserTest {
// Override to delete temporary files created during execution.
virtual void CleanUpOnMainThread() OVERRIDE {
InProcessBrowserTest::CleanUpOnMainThread();
- for (std::vector<FilePath>::const_iterator it = temp_files_.begin();
+ for (std::vector<base::FilePath>::const_iterator it = temp_files_.begin();
it != temp_files_.end(); ++it) {
if (!file_util::Delete(*it, false))
NOTREACHED();
@@ -207,7 +208,7 @@ class RecordApiTest : public InProcessBrowserTest {
remove_switches);
command_line->AppendSwitchPath(switches::kUserDataDir,
- FilePath(kDummyDirName));
+ base::FilePath(kDummyDirName));
// Adding a dummy load-extension switch is rather complex since the
// preent design of InProcessBrowserTest requires a *real* extension
// for the flag, even if we're just testing its replacement. Opted
@@ -220,7 +221,7 @@ class RecordApiTest : public InProcessBrowserTest {
// RecordCaptureURLsFunction that was used, so that its state may be
// queried.
scoped_refptr<RecordCaptureURLsFunction> RunCapture(
- const FilePath& user_data_dir,
+ const base::FilePath& user_data_dir,
scoped_ptr<base::ListValue>* out_list) {
scoped_refptr<RecordCaptureURLsFunction> capture_function(
@@ -264,7 +265,7 @@ class RecordApiTest : public InProcessBrowserTest {
}
protected:
- std::vector<FilePath> temp_files_;
+ std::vector<base::FilePath> temp_files_;
private:
base::ScopedTempDir scoped_temp_user_data_dir_;
@@ -289,7 +290,7 @@ IN_PROC_BROWSER_TEST_F(RecordApiTest, DISABLED_CheckCapture) {
EXPECT_TRUE(command_line.HasSwitch(switches::kUserDataDir));
EXPECT_TRUE(command_line.GetSwitchValuePath(switches::kUserDataDir) !=
- FilePath(kDummyDirName));
+ base::FilePath(kDummyDirName));
EXPECT_TRUE(VerifyURLHandling(result.get(), strategy));
}
@@ -333,12 +334,12 @@ IN_PROC_BROWSER_TEST_F(RecordApiTest, MAYBE_CheckPlayback) {
EXPECT_TRUE(command_line.HasSwitch(switches::kUserDataDir));
EXPECT_TRUE(command_line.GetSwitchValuePath(switches::kUserDataDir) !=
- FilePath(kDummyDirName));
+ base::FilePath(kDummyDirName));
// Check that command line load-extension was overridden.
EXPECT_TRUE(command_line.HasSwitch(switches::kLoadExtension) &&
command_line.GetSwitchValuePath(switches::kLoadExtension)
- != FilePath(kDummyDirName));
+ != base::FilePath(kDummyDirName));
// Check for return value with proper stats.
EXPECT_EQ(kTestStatistics, utils::GetString(result.get(), kStatsKey));
diff --git a/chrome/browser/extensions/api/serial/serial_connection.cc b/chrome/browser/extensions/api/serial/serial_connection.cc
index 372dc9b..b976762 100644
--- a/chrome/browser/extensions/api/serial/serial_connection.cc
+++ b/chrome/browser/extensions/api/serial/serial_connection.cc
@@ -31,7 +31,8 @@ bool SerialConnection::Open() {
// validate the supplied path against the set of valid port names, and
// it is a reasonable assumption that serial port names are ASCII.
CHECK(IsStringASCII(port_));
- FilePath file_path(FilePath::FromUTF8Unsafe(MaybeFixUpPortName(port_)));
+ base::FilePath file_path(
+ base::FilePath::FromUTF8Unsafe(MaybeFixUpPortName(port_)));
file_ = base::CreatePlatformFile(file_path,
base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ |
diff --git a/chrome/browser/extensions/api/serial/serial_port_enumerator_posix.cc b/chrome/browser/extensions/api/serial/serial_port_enumerator_posix.cc
index 6afad8f..ed27ebc 100644
--- a/chrome/browser/extensions/api/serial/serial_port_enumerator_posix.cc
+++ b/chrome/browser/extensions/api/serial/serial_port_enumerator_posix.cc
@@ -65,7 +65,7 @@ SerialPortEnumerator::StringSet SerialPortEnumerator::GenerateValidPatterns() {
SerialPortEnumerator::StringSet
SerialPortEnumerator::GenerateValidSerialPortNames() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- const FilePath kDevRoot("/dev");
+ const base::FilePath kDevRoot("/dev");
const int kFilesAndSymLinks =
file_util::FileEnumerator::FILES |
file_util::FileEnumerator::SHOW_SYM_LINKS;
@@ -75,7 +75,7 @@ SerialPortEnumerator::GenerateValidSerialPortNames() {
file_util::FileEnumerator enumerator(
kDevRoot, false, kFilesAndSymLinks);
do {
- const FilePath next_device_path(enumerator.Next());
+ const base::FilePath next_device_path(enumerator.Next());
const std::string next_device = next_device_path.value();
if (next_device.empty())
break;
diff --git a/chrome/browser/extensions/api/socket/socket_apitest.cc b/chrome/browser/extensions/api/socket/socket_apitest.cc
index 2bb65cb..73e62fa 100644
--- a/chrome/browser/extensions/api/socket/socket_apitest.cc
+++ b/chrome/browser/extensions/api/socket/socket_apitest.cc
@@ -124,7 +124,7 @@ IN_PROC_BROWSER_TEST_F(SocketApiTest, SocketUDPExtension) {
scoped_ptr<net::TestServer> test_server(
new net::TestServer(net::TestServer::TYPE_UDP_ECHO,
net::TestServer::kLocalhost,
- FilePath(FILE_PATH_LITERAL("net/data"))));
+ base::FilePath(FILE_PATH_LITERAL("net/data"))));
EXPECT_TRUE(test_server->Start());
net::HostPortPair host_port_pair = test_server->host_port_pair();
@@ -151,7 +151,7 @@ IN_PROC_BROWSER_TEST_F(SocketApiTest, SocketTCPExtension) {
scoped_ptr<net::TestServer> test_server(
new net::TestServer(net::TestServer::TYPE_TCP_ECHO,
net::TestServer::kLocalhost,
- FilePath(FILE_PATH_LITERAL("net/data"))));
+ base::FilePath(FILE_PATH_LITERAL("net/data"))));
EXPECT_TRUE(test_server->Start());
net::HostPortPair host_port_pair = test_server->host_port_pair();
diff --git a/chrome/browser/extensions/api/storage/leveldb_settings_storage_factory.cc b/chrome/browser/extensions/api/storage/leveldb_settings_storage_factory.cc
index 6fbffbf..f58ff7c 100644
--- a/chrome/browser/extensions/api/storage/leveldb_settings_storage_factory.cc
+++ b/chrome/browser/extensions/api/storage/leveldb_settings_storage_factory.cc
@@ -10,7 +10,7 @@
namespace extensions {
ValueStore* LeveldbSettingsStorageFactory::Create(
- const FilePath& base_path,
+ const base::FilePath& base_path,
const std::string& extension_id) {
return new LeveldbValueStore(base_path.AppendASCII(extension_id));
}
diff --git a/chrome/browser/extensions/api/storage/leveldb_settings_storage_factory.h b/chrome/browser/extensions/api/storage/leveldb_settings_storage_factory.h
index 395fcfc..e5a211d 100644
--- a/chrome/browser/extensions/api/storage/leveldb_settings_storage_factory.h
+++ b/chrome/browser/extensions/api/storage/leveldb_settings_storage_factory.h
@@ -12,7 +12,7 @@ namespace extensions {
// Factory for creating LeveldbValueStore instances.
class LeveldbSettingsStorageFactory : public SettingsStorageFactory {
public:
- virtual ValueStore* Create(const FilePath& base_path,
+ virtual ValueStore* Create(const base::FilePath& base_path,
const std::string& extension_id) OVERRIDE;
private:
diff --git a/chrome/browser/extensions/api/storage/managed_value_store_cache.cc b/chrome/browser/extensions/api/storage/managed_value_store_cache.cc
index b7dcba1..febe5f6 100644
--- a/chrome/browser/extensions/api/storage/managed_value_store_cache.cc
+++ b/chrome/browser/extensions/api/storage/managed_value_store_cache.cc
@@ -29,7 +29,7 @@ ManagedValueStoreCache::ManagedValueStoreCache(
EventRouter* event_router,
const scoped_refptr<SettingsStorageFactory>& factory,
const scoped_refptr<SettingsObserverList>& observers,
- const FilePath& profile_path)
+ const base::FilePath& profile_path)
: ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)),
weak_this_on_ui_(weak_factory_.GetWeakPtr()),
policy_service_(policy_service),
diff --git a/chrome/browser/extensions/api/storage/managed_value_store_cache.h b/chrome/browser/extensions/api/storage/managed_value_store_cache.h
index c31da15..b21fd89 100644
--- a/chrome/browser/extensions/api/storage/managed_value_store_cache.h
+++ b/chrome/browser/extensions/api/storage/managed_value_store_cache.h
@@ -50,7 +50,7 @@ class ManagedValueStoreCache : public ValueStoreCache,
EventRouter* event_router,
const scoped_refptr<SettingsStorageFactory>& factory,
const scoped_refptr<SettingsObserverList>& observers,
- const FilePath& profile_path);
+ const base::FilePath& profile_path);
virtual ~ManagedValueStoreCache();
private:
@@ -139,7 +139,7 @@ class ManagedValueStoreCache : public ValueStoreCache,
// These live on the FILE thread.
scoped_refptr<SettingsStorageFactory> storage_factory_;
scoped_refptr<SettingsObserverList> observers_;
- FilePath base_path_;
+ base::FilePath base_path_;
// All the PolicyValueStores live on the FILE thread, and |store_map_| can be
// accessed only on the FILE thread as well.
diff --git a/chrome/browser/extensions/api/storage/policy_value_store_unittest.cc b/chrome/browser/extensions/api/storage/policy_value_store_unittest.cc
index 06f1ad9..0e00f45 100644
--- a/chrome/browser/extensions/api/storage/policy_value_store_unittest.cc
+++ b/chrome/browser/extensions/api/storage/policy_value_store_unittest.cc
@@ -39,7 +39,7 @@ class MockSettingsObserver : public SettingsObserver {
// tests.
class MutablePolicyValueStore : public PolicyValueStore {
public:
- explicit MutablePolicyValueStore(const FilePath& path)
+ explicit MutablePolicyValueStore(const base::FilePath& path)
: PolicyValueStore(kTestExtensionId,
make_scoped_refptr(new SettingsObserverList()),
scoped_ptr<ValueStore>(new LeveldbValueStore(path))) {}
@@ -73,7 +73,7 @@ class MutablePolicyValueStore : public PolicyValueStore {
DISALLOW_COPY_AND_ASSIGN(MutablePolicyValueStore);
};
-ValueStore* Param(const FilePath& file_path) {
+ValueStore* Param(const base::FilePath& file_path) {
return new MutablePolicyValueStore(file_path);
}
diff --git a/chrome/browser/extensions/api/storage/settings_backend.cc b/chrome/browser/extensions/api/storage/settings_backend.cc
index 1d8a5d5..bf02fbd 100644
--- a/chrome/browser/extensions/api/storage/settings_backend.cc
+++ b/chrome/browser/extensions/api/storage/settings_backend.cc
@@ -18,7 +18,7 @@ namespace extensions {
SettingsBackend::SettingsBackend(
const scoped_refptr<SettingsStorageFactory>& storage_factory,
- const FilePath& base_path,
+ const base::FilePath& base_path,
const SettingsStorageQuotaEnforcer::Limits& quota,
const scoped_refptr<SettingsObserverList>& observers)
: storage_factory_(storage_factory),
@@ -110,7 +110,8 @@ std::set<std::string> SettingsBackend::GetKnownExtensionIDs() const {
base_path_, false, file_util::FileEnumerator::DIRECTORIES);
while (!extension_dirs.Next().empty()) {
extension_dirs.GetFindInfo(&find_info);
- FilePath extension_dir(file_util::FileEnumerator::GetFilename(find_info));
+ base::FilePath extension_dir(
+ file_util::FileEnumerator::GetFilename(find_info));
DCHECK(!extension_dir.IsAbsolute());
// Extension IDs are created as std::strings so they *should* be ASCII.
std::string maybe_as_ascii(extension_dir.MaybeAsASCII());
diff --git a/chrome/browser/extensions/api/storage/settings_backend.h b/chrome/browser/extensions/api/storage/settings_backend.h
index 60073b2..1a3965e 100644
--- a/chrome/browser/extensions/api/storage/settings_backend.h
+++ b/chrome/browser/extensions/api/storage/settings_backend.h
@@ -39,7 +39,7 @@ class SettingsBackend : public syncer::SyncableService {
// |observers| is the list of observers to settings changes.
SettingsBackend(
const scoped_refptr<SettingsStorageFactory>& storage_factory,
- const FilePath& base_path,
+ const base::FilePath& base_path,
const SettingsStorageQuotaEnforcer::Limits& quota,
const scoped_refptr<SettingsObserverList>& observers);
@@ -84,7 +84,7 @@ class SettingsBackend : public syncer::SyncableService {
const scoped_refptr<SettingsStorageFactory> storage_factory_;
// The base file path to create any leveldb databases at.
- const FilePath base_path_;
+ const base::FilePath base_path_;
// Quota limits (see SettingsStorageQuotaEnforcer).
const SettingsStorageQuotaEnforcer::Limits quota_;
diff --git a/chrome/browser/extensions/api/storage/settings_frontend.cc b/chrome/browser/extensions/api/storage/settings_frontend.cc
index 240bc66..cd12a46 100644
--- a/chrome/browser/extensions/api/storage/settings_frontend.cc
+++ b/chrome/browser/extensions/api/storage/settings_frontend.cc
@@ -102,7 +102,7 @@ SettingsFrontend::SettingsFrontend(
observers_->AddObserver(profile_observer_.get());
- const FilePath& profile_path = profile->GetPath();
+ const base::FilePath& profile_path = profile->GetPath();
caches_[settings_namespace::LOCAL] =
new SyncOrLocalValueStoreCache(
settings_namespace::LOCAL,
diff --git a/chrome/browser/extensions/api/storage/settings_storage_factory.h b/chrome/browser/extensions/api/storage/settings_storage_factory.h
index 4fce4f6..e0d955b 100644
--- a/chrome/browser/extensions/api/storage/settings_storage_factory.h
+++ b/chrome/browser/extensions/api/storage/settings_storage_factory.h
@@ -23,7 +23,7 @@ class SettingsStorageFactory
public:
// Creates a new ValueStore area for an extension under |base_path|.
// Return NULL to indicate failure. Must be called on the FILE thread.
- virtual ValueStore* Create(const FilePath& base_path,
+ virtual ValueStore* Create(const base::FilePath& base_path,
const std::string& extension_id) = 0;
protected:
diff --git a/chrome/browser/extensions/api/storage/settings_sync_unittest.cc b/chrome/browser/extensions/api/storage/settings_sync_unittest.cc
index 2306afb..ec530e8 100644
--- a/chrome/browser/extensions/api/storage/settings_sync_unittest.cc
+++ b/chrome/browser/extensions/api/storage/settings_sync_unittest.cc
@@ -178,7 +178,7 @@ class TestingValueStoreFactory : public SettingsStorageFactory {
}
// SettingsStorageFactory implementation.
- virtual ValueStore* Create(const FilePath& base_path,
+ virtual ValueStore* Create(const base::FilePath& base_path,
const std::string& extension_id) OVERRIDE {
TestingValueStore* new_storage = new TestingValueStore();
DCHECK(!created_.count(extension_id));
diff --git a/chrome/browser/extensions/api/storage/settings_test_util.cc b/chrome/browser/extensions/api/storage/settings_test_util.cc
index 6c156f1..3c2d5c7 100644
--- a/chrome/browser/extensions/api/storage/settings_test_util.cc
+++ b/chrome/browser/extensions/api/storage/settings_test_util.cc
@@ -90,7 +90,7 @@ void MockExtensionService::AddExtensionWithIdAndPermissions(
std::string error;
scoped_refptr<Extension> extension(Extension::Create(
- FilePath(),
+ base::FilePath(),
Manifest::INTERNAL,
manifest,
Extension::NO_FLAGS,
@@ -130,7 +130,7 @@ ProfileKeyedService* BuildMockExtensionSystem(Profile* profile) {
// MockProfile
-MockProfile::MockProfile(const FilePath& file_path)
+MockProfile::MockProfile(const base::FilePath& file_path)
: TestingProfile(file_path) {
ExtensionSystemFactory::GetInstance()->SetTestingFactoryAndUse(this,
&BuildMockExtensionSystem);
@@ -154,7 +154,7 @@ void ScopedSettingsStorageFactory::Reset(
}
ValueStore* ScopedSettingsStorageFactory::Create(
- const FilePath& base_path,
+ const base::FilePath& base_path,
const std::string& extension_id) {
DCHECK(delegate_.get());
return delegate_->Create(base_path, extension_id);
diff --git a/chrome/browser/extensions/api/storage/settings_test_util.h b/chrome/browser/extensions/api/storage/settings_test_util.h
index 43922b3..73b660a 100644
--- a/chrome/browser/extensions/api/storage/settings_test_util.h
+++ b/chrome/browser/extensions/api/storage/settings_test_util.h
@@ -84,7 +84,7 @@ class MockExtensionSystem : public TestExtensionSystem {
// the tests.
class MockProfile : public TestingProfile {
public:
- explicit MockProfile(const FilePath& file_path);
+ explicit MockProfile(const base::FilePath& file_path);
virtual ~MockProfile();
};
@@ -100,7 +100,7 @@ class ScopedSettingsStorageFactory : public SettingsStorageFactory {
void Reset(const scoped_refptr<SettingsStorageFactory>& delegate);
// SettingsStorageFactory implementation.
- virtual ValueStore* Create(const FilePath& base_path,
+ virtual ValueStore* Create(const base::FilePath& base_path,
const std::string& extension_id) OVERRIDE;
private:
diff --git a/chrome/browser/extensions/api/storage/sync_or_local_value_store_cache.cc b/chrome/browser/extensions/api/storage/sync_or_local_value_store_cache.cc
index 7855b46..cd41bf4 100644
--- a/chrome/browser/extensions/api/storage/sync_or_local_value_store_cache.cc
+++ b/chrome/browser/extensions/api/storage/sync_or_local_value_store_cache.cc
@@ -26,7 +26,7 @@ SyncOrLocalValueStoreCache::SyncOrLocalValueStoreCache(
const scoped_refptr<SettingsStorageFactory>& factory,
const SettingsStorageQuotaEnforcer::Limits& quota,
const scoped_refptr<SettingsObserverList>& observers,
- const FilePath& profile_path)
+ const base::FilePath& profile_path)
: settings_namespace_(settings_namespace) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(settings_namespace_ == settings_namespace::LOCAL ||
@@ -96,15 +96,15 @@ void SyncOrLocalValueStoreCache::InitOnFileThread(
const scoped_refptr<SettingsStorageFactory>& factory,
const SettingsStorageQuotaEnforcer::Limits& quota,
const scoped_refptr<SettingsObserverList>& observers,
- const FilePath& profile_path) {
+ const base::FilePath& profile_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
DCHECK(!app_backend_.get());
DCHECK(!extension_backend_.get());
const bool local = settings_namespace_ == settings_namespace::LOCAL;
- const FilePath app_path = profile_path.AppendASCII(
+ const base::FilePath app_path = profile_path.AppendASCII(
local ? ExtensionService::kLocalAppSettingsDirectoryName
: ExtensionService::kSyncAppSettingsDirectoryName);
- const FilePath extension_path = profile_path.AppendASCII(
+ const base::FilePath extension_path = profile_path.AppendASCII(
local ? ExtensionService::kLocalExtensionSettingsDirectoryName
: ExtensionService::kSyncExtensionSettingsDirectoryName);
app_backend_.reset(new SettingsBackend(factory, app_path, quota, observers));
diff --git a/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.cc b/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.cc
index 6a79d08..5bd576f 100644
--- a/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.cc
+++ b/chrome/browser/extensions/api/sync_file_system/extension_sync_event_observer.cc
@@ -145,7 +145,7 @@ void ExtensionSyncEventObserver::OnFileSynced(
url.type());
GURL root_url = fileapi::GetSyncableFileSystemRootURI(url.origin(),
url.filesystem_id());
- FilePath file_path = url.path();
+ base::FilePath file_path = url.path();
// Arguments must all be basic types.
scoped_ptr<base::ListValue> params(new ListValue());
diff --git a/chrome/browser/extensions/api/sync_file_system/sync_file_system_apitest.cc b/chrome/browser/extensions/api/sync_file_system/sync_file_system_apitest.cc
index a3de5a4..c2cad35 100644
--- a/chrome/browser/extensions/api/sync_file_system/sync_file_system_apitest.cc
+++ b/chrome/browser/extensions/api/sync_file_system/sync_file_system_apitest.cc
@@ -86,7 +86,7 @@ ACTION_P5(ReturnWithFakeFileAddedStatus,
fileapi::FileSystemURL mock_url = fileapi::CreateSyncableFileSystemURL(
*origin,
"drive",
- FilePath(FILE_PATH_LITERAL("foo.txt")));
+ base::FilePath(FILE_PATH_LITERAL("foo.txt")));
mock_remote_service->NotifyRemoteChangeQueueUpdated(0);
base::MessageLoopProxy::current()->PostTask(
FROM_HERE, base::Bind(arg1,
diff --git a/chrome/browser/extensions/api/system_indicator/system_indicator_apitest.cc b/chrome/browser/extensions/api/system_indicator/system_indicator_apitest.cc
index 59a0354..c8c2961 100644
--- a/chrome/browser/extensions/api/system_indicator/system_indicator_apitest.cc
+++ b/chrome/browser/extensions/api/system_indicator/system_indicator_apitest.cc
@@ -27,7 +27,7 @@ class SystemIndicatorApiTest : public ExtensionApiTest {
const extensions::Extension* LoadExtensionAndWait(
const std::string& test_name) {
LazyBackgroundObserver page_complete;
- FilePath extdir = test_data_dir_.AppendASCII(test_name);
+ base::FilePath extdir = test_data_dir_.AppendASCII(test_name);
const extensions::Extension* extension = LoadExtension(extdir);
if (extension)
page_complete.Wait();
diff --git a/chrome/browser/extensions/api/system_info_cpu/cpu_info_provider_linux.cc b/chrome/browser/extensions/api/system_info_cpu/cpu_info_provider_linux.cc
index 7f38b3f..f76bd29 100644
--- a/chrome/browser/extensions/api/system_info_cpu/cpu_info_provider_linux.cc
+++ b/chrome/browser/extensions/api/system_info_cpu/cpu_info_provider_linux.cc
@@ -22,7 +22,7 @@ bool CpuInfoProvider::QueryCpuTimePerProcessor(std::vector<CpuTime>* times) {
DCHECK(times);
std::string contents;
- if (!file_util::ReadFileToString(FilePath(kProcStat), &contents))
+ if (!file_util::ReadFileToString(base::FilePath(kProcStat), &contents))
return false;
std::istringstream iss(contents);
diff --git a/chrome/browser/extensions/api/system_info_storage/storage_info_provider_linux.cc b/chrome/browser/extensions/api/system_info_storage/storage_info_provider_linux.cc
index 507fbb0..6a75c91 100644
--- a/chrome/browser/extensions/api/system_info_storage/storage_info_provider_linux.cc
+++ b/chrome/browser/extensions/api/system_info_storage/storage_info_provider_linux.cc
@@ -27,9 +27,10 @@ StorageInfoProviderLinux::StorageInfoProviderLinux()
StorageInfoProviderLinux::~StorageInfoProviderLinux() {}
-StorageInfoProviderLinux::StorageInfoProviderLinux(const FilePath& mtab_path)
- : udev_context_(udev_new()),
- mtab_file_path_(mtab_path) {
+StorageInfoProviderLinux::StorageInfoProviderLinux(
+ const base::FilePath& mtab_path)
+ : udev_context_(udev_new()),
+ mtab_file_path_(mtab_path) {
}
bool StorageInfoProviderLinux::QueryInfo(StorageInfo* info) {
diff --git a/chrome/browser/extensions/api/system_info_storage/storage_info_provider_linux.h b/chrome/browser/extensions/api/system_info_storage/storage_info_provider_linux.h
index da9cecb..24115bb 100644
--- a/chrome/browser/extensions/api/system_info_storage/storage_info_provider_linux.h
+++ b/chrome/browser/extensions/api/system_info_storage/storage_info_provider_linux.h
@@ -19,7 +19,7 @@ class StorageInfoProviderLinux : public StorageInfoProvider {
virtual ~StorageInfoProviderLinux();
// For unit test.
- explicit StorageInfoProviderLinux(const FilePath& mtab_path);
+ explicit StorageInfoProviderLinux(const base::FilePath& mtab_path);
virtual bool QueryInfo(StorageInfo* info) OVERRIDE;
@@ -35,7 +35,7 @@ class StorageInfoProviderLinux : public StorageInfoProvider {
chrome::ScopedUdevObject udev_context_;
// The mtab file path on the system.
- const FilePath mtab_file_path_;
+ const base::FilePath mtab_file_path_;
};
} // namespace extensions
diff --git a/chrome/browser/extensions/api/system_info_storage/storage_info_provider_linux_unittest.cc b/chrome/browser/extensions/api/system_info_storage/storage_info_provider_linux_unittest.cc
index 666645a..4c508ea 100644
--- a/chrome/browser/extensions/api/system_info_storage/storage_info_provider_linux_unittest.cc
+++ b/chrome/browser/extensions/api/system_info_storage/storage_info_provider_linux_unittest.cc
@@ -48,7 +48,7 @@ typedef std::map<std::string, struct TestMountEntry> TestMountEntryMap;
class StorageInfoProviderLinuxWrapper : public StorageInfoProviderLinux {
public:
- explicit StorageInfoProviderLinuxWrapper(const FilePath& mtab_path)
+ explicit StorageInfoProviderLinuxWrapper(const base::FilePath& mtab_path)
: StorageInfoProviderLinux(mtab_path) {
for (size_t i = 0; i < arraysize(mount_entries); i++) {
std::string mnt_path = mount_entries[i].mnt_path;
@@ -110,7 +110,7 @@ class StorageInfoProviderLinuxTest : public testing::Test {
}
scoped_refptr<StorageInfoProviderLinuxWrapper> storage_info_provider_;
- FilePath mtab_file_;
+ base::FilePath mtab_file_;
};
TEST_F(StorageInfoProviderLinuxTest, QueryInfo) {
@@ -132,7 +132,7 @@ TEST_F(StorageInfoProviderLinuxTest, QueryInfo) {
TEST_F(StorageInfoProviderLinuxTest, QueryInfoFailed) {
storage_info_provider_ =
- new StorageInfoProviderLinuxWrapper(FilePath("/invalid/file/path"));
+ new StorageInfoProviderLinuxWrapper(base::FilePath("/invalid/file/path"));
StorageInfo info;
ASSERT_FALSE(QueryInfo(&info));
EXPECT_EQ(0u, info.size());
diff --git a/chrome/browser/extensions/api/tabs/tabs_api.cc b/chrome/browser/extensions/api/tabs/tabs_api.cc
index a967d70..cfc2d29 100644
--- a/chrome/browser/extensions/api/tabs/tabs_api.cc
+++ b/chrome/browser/extensions/api/tabs/tabs_api.cc
@@ -2040,7 +2040,7 @@ void ExecuteCodeInTabFunction::DidLoadFile(bool success,
void ExecuteCodeInTabFunction::LocalizeCSS(
const std::string& data,
const std::string& extension_id,
- const FilePath& extension_path,
+ const base::FilePath& extension_path,
const std::string& extension_default_locale) {
scoped_ptr<SubstitutionMap> localization_messages(
extension_file_util::LoadMessageBundleSubstitutionMap(
diff --git a/chrome/browser/extensions/api/tabs/tabs_api.h b/chrome/browser/extensions/api/tabs/tabs_api.h
index 851aa77..2e41121 100644
--- a/chrome/browser/extensions/api/tabs/tabs_api.h
+++ b/chrome/browser/extensions/api/tabs/tabs_api.h
@@ -243,7 +243,7 @@ class ExecuteCodeInTabFunction : public AsyncExtensionFunction {
void LocalizeCSS(
const std::string& data,
const std::string& extension_id,
- const FilePath& extension_path,
+ const base::FilePath& extension_path,
const std::string& extension_default_locale);
// Called when contents from the loaded file have been localized.
diff --git a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
index eead84e..2b5c2bc 100644
--- a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
+++ b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
@@ -501,7 +501,7 @@ void ExtensionWebRequestTest::FireURLRequestWithData(
element_readers.push_back(new net::UploadBytesElementReader(
&(bytes_1[0]), bytes_1.size()));
element_readers.push_back(new net::UploadFileElementReader(
- base::MessageLoopProxy::current(), ::FilePath(), 0, 0, base::Time()));
+ base::MessageLoopProxy::current(), base::FilePath(), 0, 0, base::Time()));
element_readers.push_back(new net::UploadBytesElementReader(
&(bytes_2[0]), bytes_2.size()));
request.set_upload(make_scoped_ptr(
diff --git a/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc b/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc
index 5b1ba4a..3d24fab 100644
--- a/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc
+++ b/chrome/browser/extensions/api/webstore_private/webstore_private_apitest.cc
@@ -180,9 +180,10 @@ class ExtensionWebstorePrivateBundleTest
ASSERT_TRUE(tmp.CreateUniqueTempDir());
ASSERT_TRUE(file_util::CreateDirectory(tmp.path()));
- FilePath tmp_manifest = tmp.path().AppendASCII("manifest.json");
- FilePath data_path = test_data_dir_.AppendASCII("webstore_private/bundle");
- FilePath manifest_path = data_path.AppendASCII(manifest);
+ base::FilePath tmp_manifest = tmp.path().AppendASCII("manifest.json");
+ base::FilePath data_path =
+ test_data_dir_.AppendASCII("webstore_private/bundle");
+ base::FilePath manifest_path = data_path.AppendASCII(manifest);
ASSERT_TRUE(file_util::PathExists(manifest_path));
ASSERT_TRUE(file_util::CopyFile(manifest_path, tmp_manifest));
@@ -191,12 +192,13 @@ class ExtensionWebstorePrivateBundleTest
}
// Packs the extension at |ext_path| using |id|'s PEM key.
- void PackCRX(const std::string& id, const FilePath& ext_path) {
- FilePath data_path = tmp_.path().AppendASCII("webstore_private/bundle");
- FilePath pem_path = data_path.AppendASCII(id + ".pem");
- FilePath crx_path = data_path.AppendASCII(id + ".crx");
- FilePath destination = PackExtensionWithOptions(
- ext_path, crx_path, pem_path, FilePath());
+ void PackCRX(const std::string& id, const base::FilePath& ext_path) {
+ base::FilePath data_path =
+ tmp_.path().AppendASCII("webstore_private/bundle");
+ base::FilePath pem_path = data_path.AppendASCII(id + ".pem");
+ base::FilePath crx_path = data_path.AppendASCII(id + ".crx");
+ base::FilePath destination = PackExtensionWithOptions(
+ ext_path, crx_path, pem_path, base::FilePath());
ASSERT_FALSE(destination.empty());
ASSERT_EQ(destination, crx_path);
@@ -206,10 +208,10 @@ class ExtensionWebstorePrivateBundleTest
// Creates an invalid CRX.
void PackInvalidCRX(const std::string& id) {
- FilePath contents = test_data_dir_
+ base::FilePath contents = test_data_dir_
.AppendASCII("webstore_private")
.AppendASCII("install_bundle_invalid.html");
- FilePath crx_path = test_data_dir_
+ base::FilePath crx_path = test_data_dir_
.AppendASCII("webstore_private/bundle")
.AppendASCII(id + ".crx");
@@ -219,7 +221,7 @@ class ExtensionWebstorePrivateBundleTest
}
private:
- std::vector<FilePath> test_crx_;
+ std::vector<base::FilePath> test_crx_;
};
class ExtensionWebstoreGetWebGLStatusTest : public InProcessBrowserTest {
@@ -293,7 +295,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionWebstorePrivateApiTest, MissingDownloadDir) {
// Set a non-existent directory as the download path.
base::ScopedTempDir temp_dir;
EXPECT_TRUE(temp_dir.CreateUniqueTempDir());
- FilePath missing_directory = temp_dir.Take();
+ base::FilePath missing_directory = temp_dir.Take();
EXPECT_TRUE(file_util::Delete(missing_directory, true));
WebstoreInstaller::SetDownloadDirectoryForTests(&missing_directory);