summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--media/audio/audio_low_latency_input_output_unittest.cc2
-rw-r--r--media/audio/linux/audio_manager_linux.cc6
-rw-r--r--media/audio/mac/audio_device_listener_mac.cc2
-rw-r--r--media/audio/win/audio_low_latency_input_win_unittest.cc2
-rw-r--r--media/audio/win/audio_low_latency_output_win_unittest.cc2
-rw-r--r--media/audio/win/audio_manager_win.cc2
-rw-r--r--media/audio/win/audio_unified_win_unittest.cc2
-rw-r--r--media/base/media_posix.cc10
-rw-r--r--media/base/media_win.cc6
-rw-r--r--media/base/test_data_util.cc4
-rw-r--r--media/base/yuv_convert_unittest.cc8
-rw-r--r--media/ffmpeg/ffmpeg_common_unittest.cc2
-rw-r--r--media/ffmpeg/ffmpeg_unittest.cc4
-rw-r--r--media/filters/ffmpeg_demuxer_unittest.cc2
-rw-r--r--media/filters/file_data_source.cc2
-rw-r--r--media/filters/file_data_source.h2
-rw-r--r--media/filters/file_data_source_unittest.cc4
-rw-r--r--media/filters/pipeline_integration_test.cc2
-rw-r--r--media/filters/pipeline_integration_test_base.cc9
-rw-r--r--media/test/ffmpeg_tests/ffmpeg_tests.cc8
-rw-r--r--media/tools/demuxer_bench/demuxer_bench.cc2
-rw-r--r--media/tools/media_bench/media_bench.cc8
-rw-r--r--media/tools/player_x11/player_x11.cc2
-rw-r--r--media/tools/seek_tester/seek_tester.cc2
-rw-r--r--media/video/capture/linux/video_capture_device_linux.cc2
-rw-r--r--media/video/capture/screen/screen_capturer_mac.mm4
-rw-r--r--media/video/capture/screen/screen_capturer_win.cc3
-rw-r--r--media/webm/chromeos/webm_encoder.cc2
-rw-r--r--printing/backend/cups_helper.cc13
-rw-r--r--printing/backend/print_backend_cups.cc10
-rw-r--r--printing/backend/win_helper.cc2
-rw-r--r--printing/emf_win.cc6
-rw-r--r--printing/emf_win_unittest.cc4
-rw-r--r--printing/image.cc4
-rw-r--r--printing/pdf_metafile_cg_mac.cc2
-rw-r--r--printing/pdf_metafile_skia.cc2
-rw-r--r--printing/printed_document.cc7
-rw-r--r--printing/printing_context_win.cc2
-rw-r--r--rlz/chromeos/lib/rlz_value_store_chromeos.cc9
-rw-r--r--rlz/chromeos/lib/rlz_value_store_chromeos.h4
-rw-r--r--rlz/lib/recursive_cross_process_lock_posix.cc2
-rw-r--r--rlz/mac/lib/rlz_value_store_mac.mm4
-rw-r--r--rlz/test/rlz_test_helpers.cc2
-rw-r--r--sandbox/linux/services/broker_process_unittest.cc2
-rw-r--r--sandbox/win/src/handle_inheritance_test.cc3
-rw-r--r--skia/ext/image_operations_unittest.cc2
-rw-r--r--skia/ext/vector_canvas_unittest.cc24
-rw-r--r--sync/internal_api/http_bridge_unittest.cc5
-rw-r--r--sync/internal_api/internal_components_factory_impl.cc2
-rw-r--r--sync/internal_api/public/internal_components_factory.h2
-rw-r--r--sync/internal_api/public/internal_components_factory_impl.h2
-rw-r--r--sync/internal_api/public/sync_manager.h2
-rw-r--r--sync/internal_api/public/test/fake_sync_manager.h2
-rw-r--r--sync/internal_api/public/test/test_internal_components_factory.h2
-rw-r--r--sync/internal_api/sync_manager_impl.cc4
-rw-r--r--sync/internal_api/sync_manager_impl.h4
-rw-r--r--sync/internal_api/test/fake_sync_manager.cc2
-rw-r--r--sync/internal_api/test/test_internal_components_factory.cc2
-rw-r--r--sync/syncable/directory.cc2
-rw-r--r--sync/syncable/directory.h2
-rw-r--r--sync/syncable/directory_backing_store_unittest.cc6
-rw-r--r--sync/syncable/on_disk_directory_backing_store.cc2
-rw-r--r--sync/syncable/on_disk_directory_backing_store.h4
-rw-r--r--sync/syncable/syncable_unittest.cc16
-rw-r--r--sync/test/local_sync_test_server.cc19
-rw-r--r--sync/test/local_sync_test_server.h7
-rw-r--r--sync/tools/testserver/run_sync_testserver.cc5
-rw-r--r--tools/android/device_stats_monitor/device_stats_monitor.cc6
-rw-r--r--tools/android/md5sum/md5sum.cc7
-rwxr-xr-xtools/generate_library_loader/generate_library_loader.py2
-rw-r--r--tools/imagediff/image_diff.cc28
-rw-r--r--tools/memory_watcher/memory_watcher.cc3
-rw-r--r--ui/aura/remote_root_window_host_win.cc18
-rw-r--r--ui/aura/test/test_aura_initializer.cc2
-rw-r--r--ui/base/dragdrop/download_file_interface.h2
-rw-r--r--ui/base/dragdrop/drag_utils.cc7
-rw-r--r--ui/base/dragdrop/drag_utils.h2
-rw-r--r--ui/base/dragdrop/os_exchange_data.cc14
-rw-r--r--ui/base/dragdrop/os_exchange_data.h26
-rw-r--r--ui/base/dragdrop/os_exchange_data_provider_aura.cc10
-rw-r--r--ui/base/dragdrop/os_exchange_data_provider_aura.h8
-rw-r--r--ui/base/dragdrop/os_exchange_data_provider_gtk.cc8
-rw-r--r--ui/base/dragdrop/os_exchange_data_provider_gtk.h6
-rw-r--r--ui/base/dragdrop/os_exchange_data_provider_win.cc27
-rw-r--r--ui/base/dragdrop/os_exchange_data_provider_win.h10
-rw-r--r--ui/base/dragdrop/os_exchange_data_win_unittest.cc4
-rw-r--r--ui/base/l10n/l10n_util_unittest.cc4
-rw-r--r--ui/base/resource/data_pack.cc4
-rw-r--r--ui/base/resource/data_pack_unittest.cc8
-rw-r--r--ui/base/resource/resource_bundle.cc28
-rw-r--r--ui/base/resource/resource_bundle.h30
-rw-r--r--ui/base/resource/resource_bundle_android.cc2
-rw-r--r--ui/base/resource/resource_bundle_aurax11.cc4
-rw-r--r--ui/base/resource/resource_bundle_gtk.cc4
-rw-r--r--ui/base/resource/resource_bundle_ios.mm11
-rw-r--r--ui/base/resource/resource_bundle_mac.mm11
-rw-r--r--ui/base/resource/resource_bundle_unittest.cc41
-rw-r--r--ui/base/resource/resource_bundle_win.cc4
-rw-r--r--ui/base/text/text_elider.cc2
-rw-r--r--ui/base/text/text_elider_unittest.cc8
-rw-r--r--ui/base/ui_base_paths.cc4
-rw-r--r--ui/base/win/shell.cc4
-rw-r--r--ui/compositor/layer_unittest.cc14
-rw-r--r--ui/gfx/color_profile_win.cc2
-rw-r--r--ui/gfx/gfx_paths.cc4
-rw-r--r--ui/gfx/icon_util.cc2
-rw-r--r--ui/gfx/icon_util_unittest.cc22
-rw-r--r--ui/gfx/video_decode_acceleration_support_mac.mm2
-rw-r--r--ui/gl/gl_implementation_android.cc4
-rw-r--r--ui/gl/gl_implementation_linux.cc6
-rw-r--r--ui/gl/gl_implementation_mac.cc10
-rw-r--r--ui/gl/gl_implementation_win.cc15
-rw-r--r--ui/metro_viewer/metro_viewer_messages.h2
-rw-r--r--ui/shell_dialogs/gtk/select_file_dialog_impl.cc7
-rw-r--r--ui/shell_dialogs/gtk/select_file_dialog_impl.h23
-rw-r--r--ui/shell_dialogs/gtk/select_file_dialog_impl_gtk.cc55
-rw-r--r--ui/shell_dialogs/gtk/select_file_dialog_impl_kde.cc66
-rw-r--r--ui/shell_dialogs/select_file_dialog.cc19
-rw-r--r--ui/shell_dialogs/select_file_dialog.h31
-rw-r--r--ui/shell_dialogs/select_file_dialog_android.cc4
-rw-r--r--ui/shell_dialogs/select_file_dialog_android.h2
-rw-r--r--ui/shell_dialogs/select_file_dialog_mac.mm52
-rw-r--r--ui/shell_dialogs/select_file_dialog_win.cc77
-rw-r--r--ui/shell_dialogs/selected_file_info.cc4
-rw-r--r--ui/shell_dialogs/selected_file_info.h10
-rw-r--r--ui/surface/accelerated_surface_transformer_win_unittest.cc13
-rw-r--r--ui/surface/d3d9_utils_win.cc3
-rw-r--r--ui/test/test_suite.cc4
-rw-r--r--ui/views/controls/textfield/native_textfield_views_unittest.cc6
-rw-r--r--win8/metro_driver/file_picker.cc10
-rw-r--r--win8/metro_driver/file_picker_ash.cc18
-rw-r--r--win8/metro_driver/secondary_tile.cc4
-rw-r--r--win8/metro_driver/secondary_tile.h2
-rw-r--r--win8/metro_driver/toast_notification_handler.cc2
-rw-r--r--win8/metro_driver/winrt_utils.cc4
135 files changed, 604 insertions, 556 deletions
diff --git a/media/audio/audio_low_latency_input_output_unittest.cc b/media/audio/audio_low_latency_input_output_unittest.cc
index 463321a..713ccc4 100644
--- a/media/audio/audio_low_latency_input_output_unittest.cc
+++ b/media/audio/audio_low_latency_input_output_unittest.cc
@@ -154,7 +154,7 @@ class FullDuplexAudioSinkSource
virtual ~FullDuplexAudioSinkSource() {
// Get complete file path to output file in the directory containing
// media_unittests.exe. Example: src/build/Debug/audio_delay_values_ms.txt.
- FilePath file_name;
+ base::FilePath file_name;
EXPECT_TRUE(PathService::Get(base::DIR_EXE, &file_name));
file_name = file_name.AppendASCII(kDelayValuesFileName);
diff --git a/media/audio/linux/audio_manager_linux.cc b/media/audio/linux/audio_manager_linux.cc
index 53c0711..ff6cbbd 100644
--- a/media/audio/linux/audio_manager_linux.cc
+++ b/media/audio/linux/audio_manager_linux.cc
@@ -92,14 +92,14 @@ void AudioManagerLinux::ShowAudioInputSettings() {
CommandLine command_line(CommandLine::NO_PROGRAM);
switch (base::nix::GetDesktopEnvironment(env.get())) {
case base::nix::DESKTOP_ENVIRONMENT_GNOME:
- command_line.SetProgram(FilePath("gnome-volume-control"));
+ command_line.SetProgram(base::FilePath("gnome-volume-control"));
break;
case base::nix::DESKTOP_ENVIRONMENT_KDE3:
case base::nix::DESKTOP_ENVIRONMENT_KDE4:
- command_line.SetProgram(FilePath("kmix"));
+ command_line.SetProgram(base::FilePath("kmix"));
break;
case base::nix::DESKTOP_ENVIRONMENT_UNITY:
- command_line.SetProgram(FilePath("gnome-control-center"));
+ command_line.SetProgram(base::FilePath("gnome-control-center"));
command_line.AppendArg("sound");
command_line.AppendArg("input");
break;
diff --git a/media/audio/mac/audio_device_listener_mac.cc b/media/audio/mac/audio_device_listener_mac.cc
index 8910e90..6121dc6f 100644
--- a/media/audio/mac/audio_device_listener_mac.cc
+++ b/media/audio/mac/audio_device_listener_mac.cc
@@ -215,7 +215,7 @@ bool AudioDeviceListenerMac::LoadAudioObjectPropertyListenerBlockFunctions() {
// Dynamically load required block functions.
// TODO(dalecurtis): Remove once the deployment target is > 10.6.
std::string error;
- base::NativeLibrary core_audio = base::LoadNativeLibrary(FilePath(
+ base::NativeLibrary core_audio = base::LoadNativeLibrary(base::FilePath(
"/System/Library/Frameworks/CoreAudio.framework/Versions/Current/"
"CoreAudio"), &error);
if (!error.empty()) {
diff --git a/media/audio/win/audio_low_latency_input_win_unittest.cc b/media/audio/win/audio_low_latency_input_win_unittest.cc
index 6eaa352..7ab36af 100644
--- a/media/audio/win/audio_low_latency_input_win_unittest.cc
+++ b/media/audio/win/audio_low_latency_input_win_unittest.cc
@@ -56,7 +56,7 @@ class WriteToFileAudioSink : public AudioInputStream::AudioInputCallback {
explicit WriteToFileAudioSink(const char* file_name)
: buffer_(0, kMaxBufferSize),
bytes_to_write_(0) {
- FilePath file_path;
+ base::FilePath file_path;
EXPECT_TRUE(PathService::Get(base::DIR_EXE, &file_path));
file_path = file_path.AppendASCII(file_name);
binary_file_ = file_util::OpenFile(file_path, "wb");
diff --git a/media/audio/win/audio_low_latency_output_win_unittest.cc b/media/audio/win/audio_low_latency_output_win_unittest.cc
index b4efbb5..09dd75b 100644
--- a/media/audio/win/audio_low_latency_output_win_unittest.cc
+++ b/media/audio/win/audio_low_latency_output_win_unittest.cc
@@ -93,7 +93,7 @@ class ReadFromFileAudioSource : public AudioOutputStream::AudioSourceCallback {
virtual ~ReadFromFileAudioSource() {
// Get complete file path to output file in directory containing
// media_unittests.exe.
- FilePath file_name;
+ base::FilePath file_name;
EXPECT_TRUE(PathService::Get(base::DIR_EXE, &file_name));
file_name = file_name.AppendASCII(kDeltaTimeMsFileName);
diff --git a/media/audio/win/audio_manager_win.cc b/media/audio/win/audio_manager_win.cc
index f8e3ba0..dc24ece 100644
--- a/media/audio/win/audio_manager_win.cc
+++ b/media/audio/win/audio_manager_win.cc
@@ -230,7 +230,7 @@ void AudioManagerWin::ShowAudioInputSettings() {
argument = "mmsys.cpl,,1";
}
- FilePath path;
+ base::FilePath path;
PathService::Get(base::DIR_SYSTEM, &path);
path = path.Append(program);
CommandLine command_line(path);
diff --git a/media/audio/win/audio_unified_win_unittest.cc b/media/audio/win/audio_unified_win_unittest.cc
index 4d5f41b..125f0c1 100644
--- a/media/audio/win/audio_unified_win_unittest.cc
+++ b/media/audio/win/audio_unified_win_unittest.cc
@@ -69,7 +69,7 @@ class UnifiedSourceCallback : public AudioOutputStream::AudioSourceCallback {
}
virtual ~UnifiedSourceCallback() {
- FilePath file_name;
+ base::FilePath file_name;
EXPECT_TRUE(PathService::Get(base::DIR_EXE, &file_name));
file_name = file_name.AppendASCII(kDeltaTimeMsFileName);
diff --git a/media/base/media_posix.cc b/media/base/media_posix.cc
index 724e113..34a5811 100644
--- a/media/base/media_posix.cc
+++ b/media/base/media_posix.cc
@@ -37,11 +37,11 @@ namespace media {
#if defined(OS_MACOSX)
// TODO(evan): should be using .so like ffmepgsumo here.
#define DSO_NAME(MODULE, VERSION) ("lib" MODULE "." VERSION ".dylib")
-static const FilePath::CharType kSumoLib[] =
+static const base::FilePath::CharType kSumoLib[] =
FILE_PATH_LITERAL("ffmpegsumo.so");
#elif defined(OS_POSIX)
#define DSO_NAME(MODULE, VERSION) ("lib" MODULE ".so." VERSION)
-static const FilePath::CharType kSumoLib[] =
+static const base::FilePath::CharType kSumoLib[] =
FILE_PATH_LITERAL("libffmpegsumo.so");
#else
#error "Do not know how to construct DSO name for this OS."
@@ -52,7 +52,7 @@ static const FilePath::CharType kSumoLib[] =
// guarantee this is only set once in a thread safe manner.
static bool g_media_library_is_initialized = false;
-static bool InitializeMediaLibraryInternal(const FilePath& module_dir) {
+static bool InitializeMediaLibraryInternal(const base::FilePath& module_dir) {
DCHECK(!g_media_library_is_initialized);
#if defined(USE_SYSTEM_FFMPEG)
@@ -79,7 +79,7 @@ static bool InitializeMediaLibraryInternal(const FilePath& module_dir) {
return g_media_library_is_initialized;
}
-bool InitializeMediaLibrary(const FilePath& base_path) {
+bool InitializeMediaLibrary(const base::FilePath& base_path) {
static const bool kMediaLibraryInitialized =
InitializeMediaLibraryInternal(base_path);
DCHECK_EQ(kMediaLibraryInitialized, g_media_library_is_initialized);
@@ -87,7 +87,7 @@ bool InitializeMediaLibrary(const FilePath& base_path) {
}
void InitializeMediaLibraryForTesting() {
- FilePath file_path;
+ base::FilePath file_path;
CHECK(PathService::Get(base::DIR_EXE, &file_path));
CHECK(InitializeMediaLibrary(file_path));
}
diff --git a/media/base/media_win.cc b/media/base/media_win.cc
index 616d370..cc80089 100644
--- a/media/base/media_win.cc
+++ b/media/base/media_win.cc
@@ -28,7 +28,7 @@ static const char* kFFmpegDLL = "ffmpegsumo.dll";
// guarantee this is only set once in a thread safe manner.
static bool g_media_library_is_initialized = false;
-static bool InitializeMediaLibraryInternal(const FilePath& base_path) {
+static bool InitializeMediaLibraryInternal(const base::FilePath& base_path) {
DCHECK(!g_media_library_is_initialized);
// LoadLibraryEx(..., LOAD_WITH_ALTERED_SEARCH_PATH) cannot handle
@@ -47,7 +47,7 @@ static bool InitializeMediaLibraryInternal(const FilePath& base_path) {
return g_media_library_is_initialized;
}
-bool InitializeMediaLibrary(const FilePath& base_path) {
+bool InitializeMediaLibrary(const base::FilePath& base_path) {
static const bool kMediaLibraryInitialized =
InitializeMediaLibraryInternal(base_path);
DCHECK_EQ(kMediaLibraryInitialized, g_media_library_is_initialized);
@@ -55,7 +55,7 @@ bool InitializeMediaLibrary(const FilePath& base_path) {
}
void InitializeMediaLibraryForTesting() {
- FilePath file_path;
+ base::FilePath file_path;
CHECK(PathService::Get(base::DIR_EXE, &file_path));
CHECK(InitializeMediaLibrary(file_path));
}
diff --git a/media/base/test_data_util.cc b/media/base/test_data_util.cc
index 134655d..e84fdaf 100644
--- a/media/base/test_data_util.cc
+++ b/media/base/test_data_util.cc
@@ -12,7 +12,7 @@
namespace media {
FilePath GetTestDataFilePath(const std::string& name) {
- FilePath file_path;
+ base::FilePath file_path;
CHECK(PathService::Get(base::DIR_SOURCE_ROOT, &file_path));
file_path = file_path.Append(FILE_PATH_LITERAL("media"))
@@ -23,7 +23,7 @@ FilePath GetTestDataFilePath(const std::string& name) {
}
scoped_refptr<DecoderBuffer> ReadTestDataFile(const std::string& name) {
- FilePath file_path;
+ base::FilePath file_path;
CHECK(PathService::Get(base::DIR_SOURCE_ROOT, &file_path));
file_path = file_path.Append(FILE_PATH_LITERAL("media"))
diff --git a/media/base/yuv_convert_unittest.cc b/media/base/yuv_convert_unittest.cc
index c2647e7..e88ca9f 100644
--- a/media/base/yuv_convert_unittest.cc
+++ b/media/base/yuv_convert_unittest.cc
@@ -37,12 +37,12 @@ static const int kRGB24Size = kSourceYSize * 3;
static const int kRGBSizeConverted = kSourceYSize * kBpp;
// Helper for reading test data into a scoped_array<uint8>.
-static void ReadData(const FilePath::CharType* filename,
+static void ReadData(const base::FilePath::CharType* filename,
int expected_size,
scoped_array<uint8>* data) {
data->reset(new uint8[expected_size]);
- FilePath path;
+ base::FilePath path;
CHECK(PathService::Get(base::DIR_SOURCE_ROOT, &path));
path = path.Append(FILE_PATH_LITERAL("media"))
.Append(FILE_PATH_LITERAL("test"))
@@ -337,7 +337,7 @@ TEST(YUVConvertTest, RGB32ToYUV) {
scoped_array<uint8> rgb_converted_bytes(new uint8[kRGBSize]);
// Read YUV reference data from file.
- FilePath yuv_url;
+ base::FilePath yuv_url;
EXPECT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &yuv_url));
yuv_url = yuv_url.Append(FILE_PATH_LITERAL("media"))
.Append(FILE_PATH_LITERAL("test"))
@@ -415,7 +415,7 @@ TEST(YUVConvertTest, YUY2ToYUV) {
TEST(YUVConvertTest, DownScaleYUVToRGB32WithRect) {
// Read YUV reference data from file.
- FilePath yuv_url;
+ base::FilePath yuv_url;
EXPECT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &yuv_url));
yuv_url = yuv_url.Append(FILE_PATH_LITERAL("media"))
.Append(FILE_PATH_LITERAL("test"))
diff --git a/media/ffmpeg/ffmpeg_common_unittest.cc b/media/ffmpeg/ffmpeg_common_unittest.cc
index d67e1fe..9624b97 100644
--- a/media/ffmpeg/ffmpeg_common_unittest.cc
+++ b/media/ffmpeg/ffmpeg_common_unittest.cc
@@ -43,7 +43,7 @@ static bool InitFFmpeg() {
if (initialized) {
return true;
}
- FilePath path;
+ base::FilePath path;
PathService::Get(base::DIR_MODULE, &path);
return media::InitializeMediaLibrary(path);
}
diff --git a/media/ffmpeg/ffmpeg_unittest.cc b/media/ffmpeg/ffmpeg_unittest.cc
index 4de80ce..f1653c4 100644
--- a/media/ffmpeg/ffmpeg_unittest.cc
+++ b/media/ffmpeg/ffmpeg_unittest.cc
@@ -106,7 +106,7 @@ class FFmpegTest : public testing::TestWithParam<const char*> {
}
void OpenFile(const std::string& name) {
- FilePath path;
+ base::FilePath path;
PathService::Get(base::DIR_SOURCE_ROOT, &path);
path = path.AppendASCII("media")
.AppendASCII("test")
@@ -369,7 +369,7 @@ class FFmpegTest : public testing::TestWithParam<const char*> {
return;
}
- FilePath path;
+ base::FilePath path;
PathService::Get(base::DIR_MODULE, &path);
EXPECT_TRUE(InitializeMediaLibrary(path))
<< "Could not initialize media library.";
diff --git a/media/filters/ffmpeg_demuxer_unittest.cc b/media/filters/ffmpeg_demuxer_unittest.cc
index 72b64ae..dc2055b 100644
--- a/media/filters/ffmpeg_demuxer_unittest.cc
+++ b/media/filters/ffmpeg_demuxer_unittest.cc
@@ -161,7 +161,7 @@ class FFmpegDemuxerTest : public testing::Test {
void CreateDataSource(const std::string& name) {
CHECK(!data_source_);
- FilePath file_path;
+ base::FilePath file_path;
EXPECT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &file_path));
file_path = file_path.Append(FILE_PATH_LITERAL("media"))
diff --git a/media/filters/file_data_source.cc b/media/filters/file_data_source.cc
index dab5c58..2f34718 100644
--- a/media/filters/file_data_source.cc
+++ b/media/filters/file_data_source.cc
@@ -15,7 +15,7 @@ FileDataSource::FileDataSource()
force_streaming_(false) {
}
-bool FileDataSource::Initialize(const FilePath& file_path) {
+bool FileDataSource::Initialize(const base::FilePath& file_path) {
DCHECK(!file_.IsValid());
if (!file_.Initialize(file_path))
diff --git a/media/filters/file_data_source.h b/media/filters/file_data_source.h
index bc46bf7..edf9e81 100644
--- a/media/filters/file_data_source.h
+++ b/media/filters/file_data_source.h
@@ -19,7 +19,7 @@ class MEDIA_EXPORT FileDataSource : public DataSource {
public:
FileDataSource();
- bool Initialize(const FilePath& file_path);
+ bool Initialize(const base::FilePath& file_path);
// Implementation of DataSource.
virtual void set_host(DataSourceHost* host) OVERRIDE;
diff --git a/media/filters/file_data_source_unittest.cc b/media/filters/file_data_source_unittest.cc
index d7eaad0..a840995 100644
--- a/media/filters/file_data_source_unittest.cc
+++ b/media/filters/file_data_source_unittest.cc
@@ -33,9 +33,9 @@ class ReadCBHandler {
// under the media/test/data directory. Under Windows, strings for the
// FilePath class are unicode, and the pipeline wants char strings. Convert
// the string to UTF8 under Windows. For Mac and Linux, file paths are already
-// chars so just return the string from the FilePath.
+// chars so just return the string from the base::FilePath.
FilePath TestFileURL() {
- FilePath data_dir;
+ base::FilePath data_dir;
EXPECT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &data_dir));
data_dir = data_dir.Append(FILE_PATH_LITERAL("media"))
.Append(FILE_PATH_LITERAL("test"))
diff --git a/media/filters/pipeline_integration_test.cc b/media/filters/pipeline_integration_test.cc
index cc41c3a..3e2eb19 100644
--- a/media/filters/pipeline_integration_test.cc
+++ b/media/filters/pipeline_integration_test.cc
@@ -317,7 +317,7 @@ class MockMediaSource {
}
private:
- FilePath file_path_;
+ base::FilePath file_path_;
scoped_refptr<DecoderBuffer> file_data_;
int current_position_;
int initial_append_size_;
diff --git a/media/filters/pipeline_integration_test_base.cc b/media/filters/pipeline_integration_test_base.cc
index b51d022..630e297 100644
--- a/media/filters/pipeline_integration_test_base.cc
+++ b/media/filters/pipeline_integration_test_base.cc
@@ -87,7 +87,7 @@ void PipelineIntegrationTestBase::OnError(PipelineStatus status) {
message_loop_.PostTask(FROM_HERE, MessageLoop::QuitClosure());
}
-bool PipelineIntegrationTestBase::Start(const FilePath& file_path,
+bool PipelineIntegrationTestBase::Start(const base::FilePath& file_path,
PipelineStatus expected_status) {
EXPECT_CALL(*this, OnBufferingState(Pipeline::kHaveMetadata))
.Times(AtMost(1));
@@ -104,14 +104,14 @@ bool PipelineIntegrationTestBase::Start(const FilePath& file_path,
return (pipeline_status_ == PIPELINE_OK);
}
-bool PipelineIntegrationTestBase::Start(const FilePath& file_path,
+bool PipelineIntegrationTestBase::Start(const base::FilePath& file_path,
PipelineStatus expected_status,
bool hashing_enabled) {
hashing_enabled_ = hashing_enabled;
return Start(file_path, expected_status);
}
-bool PipelineIntegrationTestBase::Start(const FilePath& file_path) {
+bool PipelineIntegrationTestBase::Start(const base::FilePath& file_path) {
EXPECT_CALL(*this, OnBufferingState(Pipeline::kHaveMetadata))
.Times(AtMost(1));
EXPECT_CALL(*this, OnBufferingState(Pipeline::kPrerollCompleted))
@@ -183,7 +183,8 @@ bool PipelineIntegrationTestBase::WaitUntilCurrentTimeIsAfter(
}
scoped_ptr<FilterCollection>
-PipelineIntegrationTestBase::CreateFilterCollection(const FilePath& file_path) {
+PipelineIntegrationTestBase::CreateFilterCollection(
+ const base::FilePath& file_path) {
scoped_refptr<FileDataSource> data_source = new FileDataSource();
CHECK(data_source->Initialize(file_path));
return CreateFilterCollection(
diff --git a/media/test/ffmpeg_tests/ffmpeg_tests.cc b/media/test/ffmpeg_tests/ffmpeg_tests.cc
index 262d532e..b84b3fd 100644
--- a/media/test/ffmpeg_tests/ffmpeg_tests.cc
+++ b/media/test/ffmpeg_tests/ffmpeg_tests.cc
@@ -83,7 +83,7 @@ int main(int argc, const char** argv) {
}
// Initialize our media library (try loading DLLs, etc.) before continuing.
- FilePath media_path;
+ base::FilePath media_path;
PathService::Get(base::DIR_MODULE, &media_path);
if (!media::InitializeMediaLibrary(media_path)) {
std::cerr << "Unable to initialize the media library.";
@@ -91,10 +91,10 @@ int main(int argc, const char** argv) {
}
// Retrieve command line options.
- FilePath in_path(filenames[0]);
- FilePath out_path;
+ base::FilePath in_path(filenames[0]);
+ base::FilePath out_path;
if (filenames.size() > 1)
- out_path = FilePath(filenames[1]);
+ out_path = base::FilePath(filenames[1]);
// Default flags that match Chrome defaults.
int video_threads = 2;
diff --git a/media/tools/demuxer_bench/demuxer_bench.cc b/media/tools/demuxer_bench/demuxer_bench.cc
index 9de8d7c..c874c88 100644
--- a/media/tools/demuxer_bench/demuxer_bench.cc
+++ b/media/tools/demuxer_bench/demuxer_bench.cc
@@ -170,7 +170,7 @@ int main(int argc, char** argv) {
MessageLoop message_loop;
DemuxerHostImpl demuxer_host;
- FilePath file_path(cmd_line->GetArgs()[0]);
+ base::FilePath file_path(cmd_line->GetArgs()[0]);
// Setup.
scoped_refptr<media::FileDataSource> data_source =
diff --git a/media/tools/media_bench/media_bench.cc b/media/tools/media_bench/media_bench.cc
index 9d3e070..6910e7e 100644
--- a/media/tools/media_bench/media_bench.cc
+++ b/media/tools/media_bench/media_bench.cc
@@ -126,7 +126,7 @@ int main(int argc, const char** argv) {
}
// Initialize our media library (try loading DLLs, etc.) before continuing.
- FilePath media_path;
+ base::FilePath media_path;
PathService::Get(base::DIR_MODULE, &media_path);
if (!media::InitializeMediaLibrary(media_path)) {
std::cerr << "Unable to initialize the media library." << std::endl;
@@ -134,10 +134,10 @@ int main(int argc, const char** argv) {
}
// Retrieve command line options.
- FilePath in_path(filenames[0]);
- FilePath out_path;
+ base::FilePath in_path(filenames[0]);
+ base::FilePath out_path;
if (filenames.size() > 1)
- out_path = FilePath(filenames[1]);
+ out_path = base::FilePath(filenames[1]);
AVMediaType target_codec = AVMEDIA_TYPE_UNKNOWN;
// Determine whether to benchmark audio or video decoding.
diff --git a/media/tools/player_x11/player_x11.cc b/media/tools/player_x11/player_x11.cc
index a91e11d..5b112cf 100644
--- a/media/tools/player_x11/player_x11.cc
+++ b/media/tools/player_x11/player_x11.cc
@@ -48,7 +48,7 @@ scoped_refptr<media::FileDataSource> CreateFileDataSource(
const std::string& file_path) {
scoped_refptr<media::FileDataSource> file_data_source(
new media::FileDataSource());
- CHECK(file_data_source->Initialize(FilePath(file_path)));
+ CHECK(file_data_source->Initialize(base::FilePath(file_path)));
return file_data_source;
}
diff --git a/media/tools/seek_tester/seek_tester.cc b/media/tools/seek_tester/seek_tester.cc
index 2bed876..0249517 100644
--- a/media/tools/seek_tester/seek_tester.cc
+++ b/media/tools/seek_tester/seek_tester.cc
@@ -62,7 +62,7 @@ int main(int argc, char** argv) {
CHECK(base::StringToUint64(argv[2], &seek_target_ms));
scoped_refptr<media::FileDataSource> file_data_source(
new media::FileDataSource());
- CHECK(file_data_source->Initialize(FilePath::FromUTF8Unsafe(argv[1])));
+ CHECK(file_data_source->Initialize(base::FilePath::FromUTF8Unsafe(argv[1])));
DemuxerHostImpl host;
MessageLoop loop;
diff --git a/media/video/capture/linux/video_capture_device_linux.cc b/media/video/capture/linux/video_capture_device_linux.cc
index 8d7aaee..2049291 100644
--- a/media/video/capture/linux/video_capture_device_linux.cc
+++ b/media/video/capture/linux/video_capture_device_linux.cc
@@ -105,7 +105,7 @@ void VideoCaptureDevice::GetDeviceNames(Names* device_names) {
// Empty the name list.
device_names->clear();
- FilePath path("/dev/");
+ base::FilePath path("/dev/");
file_util::FileEnumerator enumerator(
path, false, file_util::FileEnumerator::FILES, "video*");
diff --git a/media/video/capture/screen/screen_capturer_mac.mm b/media/video/capture/screen/screen_capturer_mac.mm
index 52e36f1..27aea6c 100644
--- a/media/video/capture/screen/screen_capturer_mac.mm
+++ b/media/video/capture/screen/screen_capturer_mac.mm
@@ -700,13 +700,13 @@ void ScreenCapturerMac::ScreenConfigurationChanged() {
// Dynamically link to the deprecated pre-Lion capture APIs.
std::string app_services_library_error;
- FilePath app_services_path(kApplicationServicesLibraryName);
+ base::FilePath app_services_path(kApplicationServicesLibraryName);
app_services_library_.Reset(
base::LoadNativeLibrary(app_services_path, &app_services_library_error));
CHECK(app_services_library_.is_valid()) << app_services_library_error;
std::string opengl_library_error;
- FilePath opengl_path(kOpenGlLibraryName);
+ base::FilePath opengl_path(kOpenGlLibraryName);
opengl_library_.Reset(
base::LoadNativeLibrary(opengl_path, &opengl_library_error));
CHECK(opengl_library_.is_valid()) << opengl_library_error;
diff --git a/media/video/capture/screen/screen_capturer_win.cc b/media/video/capture/screen/screen_capturer_win.cc
index 796af5f..65fc654 100644
--- a/media/video/capture/screen/screen_capturer_win.cc
+++ b/media/video/capture/screen/screen_capturer_win.cc
@@ -267,7 +267,8 @@ void ScreenCapturerWin::Start(Delegate* delegate) {
// Load dwmapi.dll dynamically since it is not available on XP.
if (!dwmapi_library_.is_valid()) {
- FilePath path(base::GetNativeLibraryName(UTF8ToUTF16(kDwmapiLibraryName)));
+ base::FilePath path(base::GetNativeLibraryName(
+ UTF8ToUTF16(kDwmapiLibraryName)));
dwmapi_library_.Reset(base::LoadNativeLibrary(path, NULL));
}
diff --git a/media/webm/chromeos/webm_encoder.cc b/media/webm/chromeos/webm_encoder.cc
index 62ddad0..26dcdac 100644
--- a/media/webm/chromeos/webm_encoder.cc
+++ b/media/webm/chromeos/webm_encoder.cc
@@ -55,7 +55,7 @@ namespace media {
namespace chromeos {
-WebmEncoder::WebmEncoder(const FilePath& output_path,
+WebmEncoder::WebmEncoder(const base::FilePath& output_path,
int bitrate,
bool realtime)
: bitrate_(bitrate),
diff --git a/printing/backend/cups_helper.cc b/printing/backend/cups_helper.cc
index 5b500e7..14ae2d5 100644
--- a/printing/backend/cups_helper.cc
+++ b/printing/backend/cups_helper.cc
@@ -31,7 +31,8 @@ const char kDuplex[] = "Duplex";
const char kDuplexNone[] = "None";
#if !defined(OS_MACOSX)
-void ParseLpOptions(const FilePath& filepath, const std::string& printer_name,
+void ParseLpOptions(const base::FilePath& filepath,
+ const std::string& printer_name,
int* num_options, cups_option_t** options) {
std::string content;
if (!file_util::ReadFileToString(filepath, &content))
@@ -93,12 +94,12 @@ void MarkLpOptions(const std::string& printer_name, ppd_file_t** ppd) {
const char kSystemLpOptionPath[] = "/etc/cups/lpoptions";
const char kUserLpOptionPath[] = ".cups/lpoptions";
- std::vector<FilePath> file_locations;
- file_locations.push_back(FilePath(kSystemLpOptionPath));
- file_locations.push_back(FilePath(
+ std::vector<base::FilePath> file_locations;
+ file_locations.push_back(base::FilePath(kSystemLpOptionPath));
+ file_locations.push_back(base::FilePath(
file_util::GetHomeDir().Append(kUserLpOptionPath)));
- for (std::vector<FilePath>::const_iterator it = file_locations.begin();
+ for (std::vector<base::FilePath>::const_iterator it = file_locations.begin();
it != file_locations.end(); ++it) {
num_options = 0;
options = NULL;
@@ -340,7 +341,7 @@ bool parsePpdCapabilities(
const std::string& printer_name,
const std::string& printer_capabilities,
PrinterSemanticCapsAndDefaults* printer_info) {
- FilePath ppd_file_path;
+ base::FilePath ppd_file_path;
if (!file_util::CreateTemporaryFile(&ppd_file_path))
return false;
diff --git a/printing/backend/print_backend_cups.cc b/printing/backend/print_backend_cups.cc
index c2f236b..bd51130 100644
--- a/printing/backend/print_backend_cups.cc
+++ b/printing/backend/print_backend_cups.cc
@@ -128,7 +128,7 @@ class PrintBackendCUPS : public PrintBackend {
// version in another case. There is an issue specifing CUPS_HTTP_DEFAULT
// in the <functions>2(), it does not work in CUPS prior to 1.4.
int GetDests(cups_dest_t** dests);
- FilePath GetPPD(const char* name);
+ base::FilePath GetPPD(const char* name);
GURL print_server_url_;
http_encryption_t cups_encryption_;
@@ -235,7 +235,7 @@ bool PrintBackendCUPS::GetPrinterCapsAndDefaults(
VLOG(1) << "CUPS: Getting caps and defaults"
<< ", printer name: " << printer_name;
- FilePath ppd_path(GetPPD(printer_name.c_str()));
+ base::FilePath ppd_path(GetPPD(printer_name.c_str()));
// In some cases CUPS failed to get ppd file.
if (ppd_path.empty()) {
LOG(ERROR) << "CUPS: Failed to get PPD"
@@ -332,12 +332,12 @@ FilePath PrintBackendCUPS::GetPPD(const char* name) {
// Protect this code with lock.
CR_DEFINE_STATIC_LOCAL(base::Lock, ppd_lock, ());
base::AutoLock ppd_autolock(ppd_lock);
- FilePath ppd_path;
+ base::FilePath ppd_path;
const char* ppd_file_path = NULL;
if (print_server_url_.is_empty()) { // Use default (local) print server.
ppd_file_path = cupsGetPPD(name);
if (ppd_file_path)
- ppd_path = FilePath(ppd_file_path);
+ ppd_path = base::FilePath(ppd_file_path);
} else {
// cupsGetPPD2 gets stuck sometimes in an infinite time due to network
// configuration/issues. To prevent that, use non-blocking http connection
@@ -360,7 +360,7 @@ FilePath PrintBackendCUPS::GetPPD(const char* name) {
// Comparing file size against that content length might be unreliable
// since some http reponses are encoded and content_length > file size.
// Let's just check for the obvious CUPS and http errors here.
- ppd_path = FilePath(ppd_file_path);
+ ppd_path = base::FilePath(ppd_file_path);
ipp_status_t error_code = cupsLastError();
int http_error = httpError(http.http());
if (error_code > IPP_OK_EVENTS_COMPLETE || http_error != 0) {
diff --git a/printing/backend/win_helper.cc b/printing/backend/win_helper.cc
index fe4bacd..b3b6724 100644
--- a/printing/backend/win_helper.cc
+++ b/printing/backend/win_helper.cc
@@ -324,7 +324,7 @@ std::string GetDriverInfo(HANDLE printer) {
if (info_6.get()->pDriverPath) {
scoped_ptr<FileVersionInfo> version_info(
FileVersionInfo::CreateFileVersionInfo(
- FilePath(info_6.get()->pDriverPath)));
+ base::FilePath(info_6.get()->pDriverPath)));
if (version_info.get()) {
info[1] = WideToUTF8(version_info->file_version());
info[2] = WideToUTF8(version_info->product_name());
diff --git a/printing/emf_win.cc b/printing/emf_win.cc
index a6005dc..6617deb 100644
--- a/printing/emf_win.cc
+++ b/printing/emf_win.cc
@@ -173,14 +173,14 @@ Emf::~Emf() {
DeleteEnhMetaFile(emf_);
}
-bool Emf::InitToFile(const FilePath& metafile_path) {
+bool Emf::InitToFile(const base::FilePath& metafile_path) {
DCHECK(!emf_ && !hdc_);
hdc_ = CreateEnhMetaFile(NULL, metafile_path.value().c_str(), NULL, NULL);
DCHECK(hdc_);
return hdc_ != NULL;
}
-bool Emf::InitFromFile(const FilePath& metafile_path) {
+bool Emf::InitFromFile(const base::FilePath& metafile_path) {
DCHECK(!emf_ && !hdc_);
emf_ = GetEnhMetaFile(metafile_path.value().c_str());
DCHECK(emf_);
@@ -277,7 +277,7 @@ bool Emf::GetDataAsVector(std::vector<uint8>* buffer) const {
return true;
}
-bool Emf::SaveTo(const FilePath& file_path) const {
+bool Emf::SaveTo(const base::FilePath& file_path) const {
HANDLE file = CreateFile(file_path.value().c_str(), GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE, NULL,
CREATE_ALWAYS, 0, NULL);
diff --git a/printing/emf_win_unittest.cc b/printing/emf_win_unittest.cc
index 2da118c..bb3164d 100644
--- a/printing/emf_win_unittest.cc
+++ b/printing/emf_win_unittest.cc
@@ -86,7 +86,7 @@ TEST_F(EmfPrintingTest, Enumerate) {
scoped_ptr<PrintingContext> context(PrintingContext::Create(std::string()));
EXPECT_EQ(context->InitWithSettings(settings), PrintingContext::OK);
- FilePath emf_file;
+ base::FilePath emf_file;
EXPECT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &emf_file));
emf_file = emf_file.Append(FILE_PATH_LITERAL("printing"))
.Append(FILE_PATH_LITERAL("test"))
@@ -171,7 +171,7 @@ TEST(EmfTest, FileBackedEmf) {
// Simplest use case.
base::ScopedTempDir scratch_metafile_dir;
ASSERT_TRUE(scratch_metafile_dir.CreateUniqueTempDir());
- FilePath metafile_path;
+ base::FilePath metafile_path;
EXPECT_TRUE(file_util::CreateTemporaryFileInDir(scratch_metafile_dir.path(),
&metafile_path));
uint32 size;
diff --git a/printing/image.cc b/printing/image.cc
index cded369..099fcd7 100644
--- a/printing/image.cc
+++ b/printing/image.cc
@@ -17,7 +17,7 @@
namespace printing {
-Image::Image(const FilePath& path)
+Image::Image(const base::FilePath& path)
: row_length_(0),
ignore_alpha_(true) {
std::string data;
@@ -58,7 +58,7 @@ std::string Image::checksum() const {
return base::HexEncode(&digest, sizeof(digest));
}
-bool Image::SaveToPng(const FilePath& filepath) const {
+bool Image::SaveToPng(const base::FilePath& filepath) const {
DCHECK(!data_.empty());
std::vector<unsigned char> compressed;
bool success = gfx::PNGCodec::Encode(&*data_.begin(),
diff --git a/printing/pdf_metafile_cg_mac.cc b/printing/pdf_metafile_cg_mac.cc
index d484ec9..6090809 100644
--- a/printing/pdf_metafile_cg_mac.cc
+++ b/printing/pdf_metafile_cg_mac.cc
@@ -286,7 +286,7 @@ bool PdfMetafileCg::GetData(void* dst_buffer, uint32 dst_buffer_size) const {
return true;
}
-bool PdfMetafileCg::SaveTo(const FilePath& file_path) const {
+bool PdfMetafileCg::SaveTo(const base::FilePath& file_path) const {
DCHECK(pdf_data_.get());
DCHECK(!context_.get());
diff --git a/printing/pdf_metafile_skia.cc b/printing/pdf_metafile_skia.cc
index fd02ec4..e4027ed 100644
--- a/printing/pdf_metafile_skia.cc
+++ b/printing/pdf_metafile_skia.cc
@@ -124,7 +124,7 @@ bool PdfMetafileSkia::GetData(void* dst_buffer,
return true;
}
-bool PdfMetafileSkia::SaveTo(const FilePath& file_path) const {
+bool PdfMetafileSkia::SaveTo(const base::FilePath& file_path) const {
DCHECK_GT(data_->pdf_stream_.getOffset(), 0U);
SkAutoDataUnref data(data_->pdf_stream_.copyToData());
if (file_util::WriteFile(file_path,
diff --git a/printing/printed_document.cc b/printing/printed_document.cc
index 7686055..32a8809 100644
--- a/printing/printed_document.cc
+++ b/printing/printed_document.cc
@@ -34,7 +34,7 @@ struct PrintDebugDumpPath {
}
bool enabled;
- FilePath debug_dump_path;
+ base::FilePath debug_dump_path;
};
base::LazyInstance<PrintDebugDumpPath> g_debug_dump_info =
@@ -191,12 +191,13 @@ void PrintedDocument::DebugDump(const PrintedPage& page) {
#endif // OS_WIN
}
-void PrintedDocument::set_debug_dump_path(const FilePath& debug_dump_path) {
+void PrintedDocument::set_debug_dump_path(
+ const base::FilePath& debug_dump_path) {
g_debug_dump_info.Get().enabled = !debug_dump_path.empty();
g_debug_dump_info.Get().debug_dump_path = debug_dump_path;
}
-const FilePath& PrintedDocument::debug_dump_path() {
+const base::FilePath& PrintedDocument::debug_dump_path() {
return g_debug_dump_info.Get().debug_dump_path;
}
diff --git a/printing/printing_context_win.cc b/printing/printing_context_win.cc
index 96e3572..c60c7b8 100644
--- a/printing/printing_context_win.cc
+++ b/printing/printing_context_win.cc
@@ -460,7 +460,7 @@ PrintingContext::Result PrintingContextWin::NewDocument(
di.lpszDocName = document_name_wide.c_str();
// Is there a debug dump directory specified? If so, force to print to a file.
- FilePath debug_dump_path = PrintedDocument::debug_dump_path();
+ base::FilePath debug_dump_path = PrintedDocument::debug_dump_path();
if (!debug_dump_path.empty()) {
// Create a filename.
std::wstring filename;
diff --git a/rlz/chromeos/lib/rlz_value_store_chromeos.cc b/rlz/chromeos/lib/rlz_value_store_chromeos.cc
index bb9c431..31577cc 100644
--- a/rlz/chromeos/lib/rlz_value_store_chromeos.cc
+++ b/rlz/chromeos/lib/rlz_value_store_chromeos.cc
@@ -34,10 +34,11 @@ const char kStatefulEventKey[] = "stateful_events";
const char kNoSupplementaryBrand[] = "_";
// RLZ store filename.
-const FilePath::CharType kRLZDataFileName[] = FILE_PATH_LITERAL("RLZ Data");
+const base::FilePath::CharType kRLZDataFileName[] =
+ FILE_PATH_LITERAL("RLZ Data");
// RLZ store lock filename
-const FilePath::CharType kRLZLockFileName[] =
+const base::FilePath::CharType kRLZLockFileName[] =
FILE_PATH_LITERAL("RLZ Data.lock");
// RLZ store path for testing.
@@ -75,7 +76,7 @@ std::string GetKeyName(std::string key, Product product) {
} // namespace
-RlzValueStoreChromeOS::RlzValueStoreChromeOS(const FilePath& store_path)
+RlzValueStoreChromeOS::RlzValueStoreChromeOS(const base::FilePath& store_path)
: rlz_store_(new base::DictionaryValue),
store_path_(store_path),
read_only_(true) {
@@ -325,7 +326,7 @@ RlzValueStore* ScopedRlzValueStoreLock::GetStore() {
namespace testing {
-void SetRlzStoreDirectory(const FilePath& directory) {
+void SetRlzStoreDirectory(const base::FilePath& directory) {
g_testing_rlz_store_path_ = directory;
}
diff --git a/rlz/chromeos/lib/rlz_value_store_chromeos.h b/rlz/chromeos/lib/rlz_value_store_chromeos.h
index 4760418..e150c3c 100644
--- a/rlz/chromeos/lib/rlz_value_store_chromeos.h
+++ b/rlz/chromeos/lib/rlz_value_store_chromeos.h
@@ -27,7 +27,7 @@ class RlzValueStoreChromeOS : public RlzValueStore,
// static void SetFileTaskRunner(base::SequencedTaskRunner* file_task_runner);
// Creates new instance and synchronously reads data from file.
- RlzValueStoreChromeOS(const FilePath& store_path);
+ RlzValueStoreChromeOS(const base::FilePath& store_path);
virtual ~RlzValueStoreChromeOS();
// RlzValueStore overrides:
@@ -74,7 +74,7 @@ class RlzValueStoreChromeOS : public RlzValueStore,
// In-memory store with RLZ data.
scoped_ptr<base::DictionaryValue> rlz_store_;
- FilePath store_path_;
+ base::FilePath store_path_;
bool read_only_;
diff --git a/rlz/lib/recursive_cross_process_lock_posix.cc b/rlz/lib/recursive_cross_process_lock_posix.cc
index 561c3cd..887216b 100644
--- a/rlz/lib/recursive_cross_process_lock_posix.cc
+++ b/rlz/lib/recursive_cross_process_lock_posix.cc
@@ -17,7 +17,7 @@
namespace rlz_lib {
bool RecursiveCrossProcessLock::TryGetCrossProcessLock(
- const FilePath& lock_filename) {
+ const base::FilePath& lock_filename) {
bool just_got_lock = false;
// Emulate a recursive mutex with a non-recursive one.
diff --git a/rlz/mac/lib/rlz_value_store_mac.mm b/rlz/mac/lib/rlz_value_store_mac.mm
index 6b8e6f4..9601d4c 100644
--- a/rlz/mac/lib/rlz_value_store_mac.mm
+++ b/rlz/mac/lib/rlz_value_store_mac.mm
@@ -275,7 +275,7 @@ NSString* RlzLockFilename() {
ScopedRlzValueStoreLock::ScopedRlzValueStoreLock() {
bool got_distributed_lock = g_recursive_lock.TryGetCrossProcessLock(
- FilePath([RlzLockFilename() fileSystemRepresentation]));
+ base::FilePath([RlzLockFilename() fileSystemRepresentation]));
// At this point, we hold the in-process lock, no matter the value of
// |got_distributed_lock|.
@@ -349,7 +349,7 @@ RlzValueStore* ScopedRlzValueStoreLock::GetStore() {
namespace testing {
-void SetRlzStoreDirectory(const FilePath& directory) {
+void SetRlzStoreDirectory(const base::FilePath& directory) {
base::mac::ScopedNSAutoreleasePool pool;
[g_test_folder release];
diff --git a/rlz/test/rlz_test_helpers.cc b/rlz/test/rlz_test_helpers.cc
index 32719e0..398d0da 100644
--- a/rlz/test/rlz_test_helpers.cc
+++ b/rlz/test/rlz_test_helpers.cc
@@ -75,7 +75,7 @@ void RlzLibTestNoMachineState::TearDown() {
#if defined(OS_WIN)
UndoOverrideRegistryHives();
#elif defined(OS_POSIX)
- rlz_lib::testing::SetRlzStoreDirectory(FilePath());
+ rlz_lib::testing::SetRlzStoreDirectory(base::FilePath());
#endif // defined(OS_WIN)
}
diff --git a/sandbox/linux/services/broker_process_unittest.cc b/sandbox/linux/services/broker_process_unittest.cc
index 4f2a640..7fbc036 100644
--- a/sandbox/linux/services/broker_process_unittest.cc
+++ b/sandbox/linux/services/broker_process_unittest.cc
@@ -199,7 +199,7 @@ TEST(BrokerProcess, DISABLE_ON_ANDROID(OpenFileRW)) {
const char basename[] = "BrokerProcessXXXXXX";
char template_name[2048];
#if defined(OS_ANDROID)
- FilePath cache_directory;
+ base::FilePath cache_directory;
ASSERT_TRUE(base::android::GetCacheDirectory(&cache_directory));
ssize_t length = snprintf(template_name, sizeof(template_name),
"%s%s",
diff --git a/sandbox/win/src/handle_inheritance_test.cc b/sandbox/win/src/handle_inheritance_test.cc
index cd9cae7..5523a6c 100644
--- a/sandbox/win/src/handle_inheritance_test.cc
+++ b/sandbox/win/src/handle_inheritance_test.cc
@@ -40,7 +40,8 @@ TEST(HandleInheritanceTests, TestStdoutInheritance) {
EXPECT_TRUE(::CloseHandle(file_handle));
std::string data;
- EXPECT_TRUE(file_util::ReadFileToString(FilePath(temp_file_name), &data));
+ EXPECT_TRUE(file_util::ReadFileToString(base::FilePath(temp_file_name),
+ &data));
// Redirection uses a feature that was added in Windows Vista.
if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
EXPECT_EQ("Example output to stdout\r\n", data);
diff --git a/skia/ext/image_operations_unittest.cc b/skia/ext/image_operations_unittest.cc
index 23353fa..a0897ad 100644
--- a/skia/ext/image_operations_unittest.cc
+++ b/skia/ext/image_operations_unittest.cc
@@ -201,7 +201,7 @@ void SaveBitmapToPNG(const SkBitmap& bmp, const char* path) {
FAIL() << "Failed to encode image";
}
- const FilePath fpath(path);
+ const base::FilePath fpath(path);
const int num_written =
file_util::WriteFile(fpath, reinterpret_cast<const char*>(&png[0]),
png.size());
diff --git a/skia/ext/vector_canvas_unittest.cc b/skia/ext/vector_canvas_unittest.cc
index 15ca460..8d3fc46 100644
--- a/skia/ext/vector_canvas_unittest.cc
+++ b/skia/ext/vector_canvas_unittest.cc
@@ -84,7 +84,7 @@ class Bitmap {
class Image {
public:
// Creates the image from the given filename on disk.
- explicit Image(const FilePath& filename) : ignore_alpha_(true) {
+ explicit Image(const base::FilePath& filename) : ignore_alpha_(true) {
std::string compressed;
file_util::ReadFileToString(filename, &compressed);
EXPECT_TRUE(compressed.size());
@@ -125,7 +125,7 @@ class Image {
int row_length() const { return row_length_; }
// Save the image to a png file. Used to create the initial test files.
- void SaveToFile(const FilePath& filename) {
+ void SaveToFile(const base::FilePath& filename) {
std::vector<unsigned char> compressed;
ASSERT_TRUE(gfx::PNGCodec::Encode(&*data_.begin(),
gfx::PNGCodec::FORMAT_BGRA,
@@ -238,10 +238,10 @@ class ImageTest : public testing::Test {
AppendASCII(test_info.name());
// Hack for a quick lowercase. We assume all the tests names are ASCII.
- FilePath::StringType tmp(test_dir_.value());
+ base::FilePath::StringType tmp(test_dir_.value());
for (size_t i = 0; i < tmp.size(); ++i)
tmp[i] = base::ToLowerASCII(tmp[i]);
- test_dir_ = FilePath(tmp);
+ test_dir_ = base::FilePath(tmp);
if (action_ == GENERATE) {
// Make sure the directory exist.
@@ -250,7 +250,7 @@ class ImageTest : public testing::Test {
}
// Returns the fully qualified path of a data file.
- FilePath test_file(const FilePath::StringType& filename) const {
+ base::FilePath test_file(const base::FilePath::StringType& filename) const {
// Hack for a quick lowercase. We assume all the test data file names are
// ASCII.
#if defined(OS_WIN)
@@ -269,7 +269,7 @@ class ImageTest : public testing::Test {
// 100] on failure. The return value is the percentage of difference between
// the image in the file and the image in the canvas.
double ProcessCanvas(skia::PlatformCanvas& canvas,
- FilePath::StringType filename) const {
+ base::FilePath::StringType filename) const {
filename = filename + FILE_PATH_LITERAL(".png");
switch (action_) {
case GENERATE:
@@ -288,7 +288,7 @@ class ImageTest : public testing::Test {
// Compares the bitmap currently loaded in the context with the file. Returns
// the percentage of pixel difference between both images, between 0 and 100.
double CompareImage(skia::PlatformCanvas& canvas,
- const FilePath::StringType& filename) const {
+ const base::FilePath::StringType& filename) const {
Image image1(canvas);
Image image2(test_file(filename));
double diff = image1.PercentageDifferent(image2);
@@ -297,14 +297,14 @@ class ImageTest : public testing::Test {
// Saves the bitmap currently loaded in the context into the file.
void SaveImage(skia::PlatformCanvas& canvas,
- const FilePath::StringType& filename) const {
+ const base::FilePath::StringType& filename) const {
Image(canvas).SaveToFile(test_file(filename));
}
ProcessAction action_;
// Path to directory used to contain the test data.
- FilePath test_dir_;
+ base::FilePath test_dir_;
DISALLOW_COPY_AND_ASSIGN(ImageTest);
};
@@ -331,10 +331,10 @@ void Premultiply(SkBitmap bitmap) {
}
}
-void LoadPngFileToSkBitmap(const FilePath& filename,
+void LoadPngFileToSkBitmap(const base::FilePath& filename,
SkBitmap* bitmap,
bool is_opaque) {
- FilePath absolute_path(filename);
+ base::FilePath absolute_path(filename);
file_util::AbsolutePath(&absolute_path);
std::string compressed;
file_util::ReadFileToString(absolute_path, &compressed);
@@ -404,7 +404,7 @@ class VectorCanvasTest : public ImageTest {
// Compares both canvas and returns the pixel difference in percentage between
// both images. 0 on success and ]0, 100] on failure.
- double ProcessImage(const FilePath::StringType& filename) {
+ double ProcessImage(const base::FilePath::StringType& filename) {
std::wstring number(base::StringPrintf(L"%02d_", number_++));
double diff1 = parent::ProcessCanvas(*vcanvas_, number + L"vc_" + filename);
double diff2 = parent::ProcessCanvas(*pcanvas_, number + L"pc_" + filename);
diff --git a/sync/internal_api/http_bridge_unittest.cc b/sync/internal_api/http_bridge_unittest.cc
index a2ff680..2692480 100644
--- a/sync/internal_api/http_bridge_unittest.cc
+++ b/sync/internal_api/http_bridge_unittest.cc
@@ -16,7 +16,8 @@ namespace syncer {
namespace {
// TODO(timsteele): Should use PathService here. See Chromium Issue 3113.
-const FilePath::CharType kDocRoot[] = FILE_PATH_LITERAL("chrome/test/data");
+const base::FilePath::CharType kDocRoot[] =
+ FILE_PATH_LITERAL("chrome/test/data");
}
class SyncHttpBridgeTest : public testing::Test {
@@ -24,7 +25,7 @@ class SyncHttpBridgeTest : public testing::Test {
SyncHttpBridgeTest()
: test_server_(net::TestServer::TYPE_HTTP,
net::TestServer::kLocalhost,
- FilePath(kDocRoot)),
+ base::FilePath(kDocRoot)),
fake_default_request_context_getter_(NULL),
bridge_for_race_test_(NULL),
io_thread_("IO thread") {
diff --git a/sync/internal_api/internal_components_factory_impl.cc b/sync/internal_api/internal_components_factory_impl.cc
index 746d25c..68d4c7b 100644
--- a/sync/internal_api/internal_components_factory_impl.cc
+++ b/sync/internal_api/internal_components_factory_impl.cc
@@ -52,7 +52,7 @@ InternalComponentsFactoryImpl::BuildContext(
scoped_ptr<syncable::DirectoryBackingStore>
InternalComponentsFactoryImpl::BuildDirectoryBackingStore(
- const std::string& dir_name, const FilePath& backing_filepath) {
+ const std::string& dir_name, const base::FilePath& backing_filepath) {
return scoped_ptr<syncable::DirectoryBackingStore>(
new syncable::OnDiskDirectoryBackingStore(dir_name, backing_filepath));
}
diff --git a/sync/internal_api/public/internal_components_factory.h b/sync/internal_api/public/internal_components_factory.h
index 4b31781..520e779 100644
--- a/sync/internal_api/public/internal_components_factory.h
+++ b/sync/internal_api/public/internal_components_factory.h
@@ -81,7 +81,7 @@ class SYNC_EXPORT InternalComponentsFactory {
virtual scoped_ptr<syncable::DirectoryBackingStore>
BuildDirectoryBackingStore(
const std::string& dir_name,
- const FilePath& backing_filepath) = 0;
+ const base::FilePath& backing_filepath) = 0;
// Returns the Switches struct that this object is using as configuration, if
// the implementation is making use of one.
diff --git a/sync/internal_api/public/internal_components_factory_impl.h b/sync/internal_api/public/internal_components_factory_impl.h
index 66b8baa..e69fa3d 100644
--- a/sync/internal_api/public/internal_components_factory_impl.h
+++ b/sync/internal_api/public/internal_components_factory_impl.h
@@ -36,7 +36,7 @@ class SYNC_EXPORT InternalComponentsFactoryImpl
virtual scoped_ptr<syncable::DirectoryBackingStore>
BuildDirectoryBackingStore(
const std::string& dir_name,
- const FilePath& backing_filepath) OVERRIDE;
+ const base::FilePath& backing_filepath) OVERRIDE;
virtual Switches GetSwitches() const OVERRIDE;
diff --git a/sync/internal_api/public/sync_manager.h b/sync/internal_api/public/sync_manager.h
index a614621..7cf57f9 100644
--- a/sync/internal_api/public/sync_manager.h
+++ b/sync/internal_api/public/sync_manager.h
@@ -301,7 +301,7 @@ class SYNC_EXPORT SyncManager {
// TODO(akalin): Replace the |post_factory| parameter with a
// URLFetcher parameter.
virtual void Init(
- const FilePath& database_location,
+ const base::FilePath& database_location,
const WeakHandle<JsEventHandler>& event_handler,
const std::string& sync_server_and_path,
int sync_server_port,
diff --git a/sync/internal_api/public/test/fake_sync_manager.h b/sync/internal_api/public/test/fake_sync_manager.h
index 74aadd7..49c443f 100644
--- a/sync/internal_api/public/test/fake_sync_manager.h
+++ b/sync/internal_api/public/test/fake_sync_manager.h
@@ -70,7 +70,7 @@ class FakeSyncManager : public SyncManager {
// Note: we treat whatever message loop this is called from as the sync
// loop for purposes of callbacks.
virtual void Init(
- const FilePath& database_location,
+ const base::FilePath& database_location,
const WeakHandle<JsEventHandler>& event_handler,
const std::string& sync_server_and_path,
int sync_server_port,
diff --git a/sync/internal_api/public/test/test_internal_components_factory.h b/sync/internal_api/public/test/test_internal_components_factory.h
index d48855b..41420ae 100644
--- a/sync/internal_api/public/test/test_internal_components_factory.h
+++ b/sync/internal_api/public/test/test_internal_components_factory.h
@@ -42,7 +42,7 @@ class TestInternalComponentsFactory : public InternalComponentsFactory {
virtual scoped_ptr<syncable::DirectoryBackingStore>
BuildDirectoryBackingStore(
const std::string& dir_name,
- const FilePath& backing_filepath) OVERRIDE;
+ const base::FilePath& backing_filepath) OVERRIDE;
virtual Switches GetSwitches() const OVERRIDE;
diff --git a/sync/internal_api/sync_manager_impl.cc b/sync/internal_api/sync_manager_impl.cc
index 41ef5b2..cf9e50d 100644
--- a/sync/internal_api/sync_manager_impl.cc
+++ b/sync/internal_api/sync_manager_impl.cc
@@ -331,7 +331,7 @@ void SyncManagerImpl::ConfigureSyncer(
}
void SyncManagerImpl::Init(
- const FilePath& database_location,
+ const base::FilePath& database_location,
const WeakHandle<JsEventHandler>& event_handler,
const std::string& sync_server_and_path,
int port,
@@ -384,7 +384,7 @@ void SyncManagerImpl::Init(
sync_encryption_handler_->AddObserver(&debug_info_event_listener_);
sync_encryption_handler_->AddObserver(&js_sync_encryption_handler_observer_);
- FilePath absolute_db_path(database_path_);
+ base::FilePath absolute_db_path(database_path_);
file_util::AbsolutePath(&absolute_db_path);
scoped_ptr<syncable::DirectoryBackingStore> backing_store =
internal_components_factory->BuildDirectoryBackingStore(
diff --git a/sync/internal_api/sync_manager_impl.h b/sync/internal_api/sync_manager_impl.h
index 75bc930..dff9c4b 100644
--- a/sync/internal_api/sync_manager_impl.h
+++ b/sync/internal_api/sync_manager_impl.h
@@ -64,7 +64,7 @@ class SYNC_EXPORT_PRIVATE SyncManagerImpl :
// SyncManager implementation.
virtual void Init(
- const FilePath& database_location,
+ const base::FilePath& database_location,
const WeakHandle<JsEventHandler>& event_handler,
const std::string& sync_server_and_path,
int sync_server_port,
@@ -290,7 +290,7 @@ class SYNC_EXPORT_PRIVATE SyncManagerImpl :
syncable::Directory* directory();
- FilePath database_path_;
+ base::FilePath database_path_;
const std::string name_;
diff --git a/sync/internal_api/test/fake_sync_manager.cc b/sync/internal_api/test/fake_sync_manager.cc
index 74e7b20..bc9c4dc 100644
--- a/sync/internal_api/test/fake_sync_manager.cc
+++ b/sync/internal_api/test/fake_sync_manager.cc
@@ -86,7 +86,7 @@ void FakeSyncManager::WaitForSyncThread() {
}
void FakeSyncManager::Init(
- const FilePath& database_location,
+ const base::FilePath& database_location,
const WeakHandle<JsEventHandler>& event_handler,
const std::string& sync_server_and_path,
int sync_server_port,
diff --git a/sync/internal_api/test/test_internal_components_factory.cc b/sync/internal_api/test/test_internal_components_factory.cc
index a195609..1fe161aa 100644
--- a/sync/internal_api/test/test_internal_components_factory.cc
+++ b/sync/internal_api/test/test_internal_components_factory.cc
@@ -50,7 +50,7 @@ TestInternalComponentsFactory::BuildContext(
scoped_ptr<syncable::DirectoryBackingStore>
TestInternalComponentsFactory::BuildDirectoryBackingStore(
- const std::string& dir_name, const FilePath& backing_filepath) {
+ const std::string& dir_name, const base::FilePath& backing_filepath) {
switch (storage_option_) {
case STORAGE_IN_MEMORY:
return scoped_ptr<syncable::DirectoryBackingStore>(
diff --git a/sync/syncable/directory.cc b/sync/syncable/directory.cc
index f27d4ca..a9e0f65 100644
--- a/sync/syncable/directory.cc
+++ b/sync/syncable/directory.cc
@@ -68,7 +68,7 @@ bool ParentIdAndHandleIndexer::ShouldInclude(const EntryKernel* a) {
}
// static
-const FilePath::CharType Directory::kSyncDatabaseFilename[] =
+const base::FilePath::CharType Directory::kSyncDatabaseFilename[] =
FILE_PATH_LITERAL("SyncData.sqlite3");
void Directory::InitKernelForTest(
diff --git a/sync/syncable/directory.h b/sync/syncable/directory.h
index b54b0cc..51ceaf8 100644
--- a/sync/syncable/directory.h
+++ b/sync/syncable/directory.h
@@ -141,7 +141,7 @@ class SYNC_EXPORT Directory {
TakeSnapshotGetsMetahandlesToPurge);
public:
- static const FilePath::CharType kSyncDatabaseFilename[];
+ static const base::FilePath::CharType kSyncDatabaseFilename[];
// Various data that the Directory::Kernel we are backing (persisting data
// for) needs saved across runs of the application.
diff --git a/sync/syncable/directory_backing_store_unittest.cc b/sync/syncable/directory_backing_store_unittest.cc
index 9691197..3fa9edd 100644
--- a/sync/syncable/directory_backing_store_unittest.cc
+++ b/sync/syncable/directory_backing_store_unittest.cc
@@ -41,7 +41,7 @@ class MigrationTest : public testing::TestWithParam<int> {
return "nick@chromium.org";
}
- FilePath GetDatabasePath() {
+ base::FilePath GetDatabasePath() {
return temp_dir_.path().Append(Directory::kSyncDatabaseFilename);
}
@@ -3188,7 +3188,7 @@ namespace {
class OnDiskDirectoryBackingStoreForTest : public OnDiskDirectoryBackingStore {
public:
OnDiskDirectoryBackingStoreForTest(const std::string& dir_name,
- const FilePath& backing_filepath);
+ const base::FilePath& backing_filepath);
virtual ~OnDiskDirectoryBackingStoreForTest();
bool DidFailFirstOpenAttempt();
@@ -3201,7 +3201,7 @@ class OnDiskDirectoryBackingStoreForTest : public OnDiskDirectoryBackingStore {
OnDiskDirectoryBackingStoreForTest::OnDiskDirectoryBackingStoreForTest(
const std::string& dir_name,
- const FilePath& backing_filepath) :
+ const base::FilePath& backing_filepath) :
OnDiskDirectoryBackingStore(dir_name, backing_filepath),
first_open_failed_(false) { }
diff --git a/sync/syncable/on_disk_directory_backing_store.cc b/sync/syncable/on_disk_directory_backing_store.cc
index 7264e0c..abe20d1 100644
--- a/sync/syncable/on_disk_directory_backing_store.cc
+++ b/sync/syncable/on_disk_directory_backing_store.cc
@@ -24,7 +24,7 @@ enum HistogramResultEnum {
} // namespace
OnDiskDirectoryBackingStore::OnDiskDirectoryBackingStore(
- const std::string& dir_name, const FilePath& backing_filepath)
+ const std::string& dir_name, const base::FilePath& backing_filepath)
: DirectoryBackingStore(dir_name),
allow_failure_for_test_(false),
backing_filepath_(backing_filepath) {
diff --git a/sync/syncable/on_disk_directory_backing_store.h b/sync/syncable/on_disk_directory_backing_store.h
index 06e14b8..bcb62c2 100644
--- a/sync/syncable/on_disk_directory_backing_store.h
+++ b/sync/syncable/on_disk_directory_backing_store.h
@@ -18,7 +18,7 @@ class SYNC_EXPORT_PRIVATE OnDiskDirectoryBackingStore
: public DirectoryBackingStore {
public:
OnDiskDirectoryBackingStore(const std::string& dir_name,
- const FilePath& backing_filepath);
+ const base::FilePath& backing_filepath);
virtual ~OnDiskDirectoryBackingStore();
virtual DirOpenResult Load(
MetahandlesIndex* entry_bucket,
@@ -40,7 +40,7 @@ class SYNC_EXPORT_PRIVATE OnDiskDirectoryBackingStore
FRIEND_TEST_ALL_PREFIXES(DirectoryBackingStoreTest, MinorCorruption);
bool allow_failure_for_test_;
- FilePath backing_filepath_;
+ base::FilePath backing_filepath_;
DISALLOW_COPY_AND_ASSIGN(OnDiskDirectoryBackingStore);
};
diff --git a/sync/syncable/syncable_unittest.cc b/sync/syncable/syncable_unittest.cc
index 8031fc0e1..b162934 100644
--- a/sync/syncable/syncable_unittest.cc
+++ b/sync/syncable/syncable_unittest.cc
@@ -103,7 +103,7 @@ class SyncableGeneralTest : public testing::Test {
NullDirectoryChangeDelegate delegate_;
FakeEncryptor encryptor_;
TestUnrecoverableErrorHandler handler_;
- FilePath db_path_;
+ base::FilePath db_path_;
};
const char SyncableGeneralTest::kIndexTestName[] = "IndexTest";
@@ -1533,7 +1533,7 @@ TEST_F(SyncableDirectoryTest, OrdinalWithNullSurvivesSaveAndReload) {
class TestBackingStore : public OnDiskDirectoryBackingStore {
public:
TestBackingStore(const std::string& dir_name,
- const FilePath& backing_filepath);
+ const base::FilePath& backing_filepath);
virtual ~TestBackingStore();
@@ -1549,7 +1549,7 @@ class TestBackingStore : public OnDiskDirectoryBackingStore {
};
TestBackingStore::TestBackingStore(const std::string& dir_name,
- const FilePath& backing_filepath)
+ const base::FilePath& backing_filepath)
: OnDiskDirectoryBackingStore(dir_name, backing_filepath),
fail_save_changes_(false) {
}
@@ -1573,7 +1573,7 @@ class TestDirectory : public Directory {
Encryptor *encryptor,
UnrecoverableErrorHandler *handler,
const std::string& dir_name,
- const FilePath& backing_filepath);
+ const base::FilePath& backing_filepath);
virtual ~TestDirectory();
@@ -1593,7 +1593,7 @@ TestDirectory* TestDirectory::Create(
Encryptor *encryptor,
UnrecoverableErrorHandler *handler,
const std::string& dir_name,
- const FilePath& backing_filepath) {
+ const base::FilePath& backing_filepath) {
TestBackingStore* backing_store =
new TestBackingStore(dir_name, backing_filepath);
return new TestDirectory(encryptor, handler, backing_store);
@@ -1613,7 +1613,7 @@ TEST(OnDiskSyncableDirectory, FailInitialWrite) {
TestUnrecoverableErrorHandler handler;
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- FilePath file_path = temp_dir.path().Append(
+ base::FilePath file_path = temp_dir.path().Append(
FILE_PATH_LITERAL("Test.sqlite3"));
std::string name = "user@x.com";
NullDirectoryChangeDelegate delegate;
@@ -1668,7 +1668,7 @@ class OnDiskSyncableDirectoryTest : public SyncableDirectoryTest {
TestDirectory *test_directory_; // mirrors scoped_ptr<Directory> dir_
base::ScopedTempDir temp_dir_;
- FilePath file_path_;
+ base::FilePath file_path_;
};
TEST_F(OnDiskSyncableDirectoryTest, TestPurgeEntriesWithTypeIn) {
@@ -2077,7 +2077,7 @@ class SyncableDirectoryManagement : public testing::Test {
};
TEST_F(SyncableDirectoryManagement, TestFileRelease) {
- FilePath path = temp_dir_.path().Append(
+ base::FilePath path = temp_dir_.path().Append(
Directory::kSyncDatabaseFilename);
syncable::Directory dir(new OnDiskDirectoryBackingStore("ScopeTest", path),
diff --git a/sync/test/local_sync_test_server.cc b/sync/test/local_sync_test_server.cc
index 21eaf6e..a11234f 100644
--- a/sync/test/local_sync_test_server.cc
+++ b/sync/test/local_sync_test_server.cc
@@ -16,13 +16,13 @@ namespace syncer {
LocalSyncTestServer::LocalSyncTestServer()
: LocalTestServer(net::TestServer::TYPE_HTTP, // Sync uses the HTTP scheme.
net::TestServer::kLocalhost,
- FilePath()),
+ base::FilePath()),
xmpp_port_(0) {}
LocalSyncTestServer::LocalSyncTestServer(uint16 port, uint16 xmpp_port)
: LocalTestServer(net::TestServer::TYPE_HTTP, // Sync uses the HTTP scheme.
net::TestServer::kLocalhost,
- FilePath()),
+ base::FilePath()),
xmpp_port_(xmpp_port) {
SetPort(port);
}
@@ -40,8 +40,9 @@ bool LocalSyncTestServer::AddCommandLineArguments(
return true;
}
-bool LocalSyncTestServer::GetTestServerPath(FilePath* testserver_path) const {
- FilePath testserver_dir;
+bool LocalSyncTestServer::GetTestServerPath(
+ base::FilePath* testserver_path) const {
+ base::FilePath testserver_dir;
if (!PathService::Get(base::DIR_SOURCE_ROOT, &testserver_dir)) {
LOG(ERROR) << "Failed to get DIR_SOURCE_ROOT";
return false;
@@ -56,9 +57,9 @@ bool LocalSyncTestServer::GetTestServerPath(FilePath* testserver_path) const {
}
bool LocalSyncTestServer::GetTestScriptPath(
- const FilePath::StringType& test_script_name,
- FilePath* test_script_path) const {
- FilePath testserver_path;
+ const base::FilePath::StringType& test_script_name,
+ base::FilePath* test_script_path) const {
+ base::FilePath testserver_path;
if (!GetTestServerPath(&testserver_path))
return false;
*test_script_path = testserver_path.DirName().Append(test_script_name);
@@ -71,7 +72,7 @@ bool LocalSyncTestServer::SetPythonPath() const {
// Add the net/tools/testserver directory to the path, so that testserver_base
// can be imported.
- FilePath net_testserver_path;
+ base::FilePath net_testserver_path;
if (!LocalTestServer::GetTestServerPath(&net_testserver_path)) {
LOG(ERROR) << "Failed to get net testserver path.";
return false;
@@ -79,7 +80,7 @@ bool LocalSyncTestServer::SetPythonPath() const {
AppendToPythonPath(net_testserver_path.DirName());
// Locate the Python code generated by the sync protocol buffers compiler.
- FilePath pyproto_dir;
+ base::FilePath pyproto_dir;
if (!GetPyProtoPath(&pyproto_dir)) {
LOG(WARNING) << "Cannot find pyproto dir for generated code. "
<< "Testserver features that rely on it will not work";
diff --git a/sync/test/local_sync_test_server.h b/sync/test/local_sync_test_server.h
index 650766a..4e829ec 100644
--- a/sync/test/local_sync_test_server.h
+++ b/sync/test/local_sync_test_server.h
@@ -29,12 +29,13 @@ class LocalSyncTestServer : public net::LocalTestServer {
virtual bool AddCommandLineArguments(
CommandLine* command_line) const OVERRIDE;
virtual bool SetPythonPath() const OVERRIDE;
- virtual bool GetTestServerPath(FilePath* testserver_path) const OVERRIDE;
+ virtual bool GetTestServerPath(
+ base::FilePath* testserver_path) const OVERRIDE;
// Returns true if the path to |test_script_name| is successfully stored in
// |*test_script_path|. Used by the run_sync_testserver executable.
- bool GetTestScriptPath(const FilePath::StringType& test_script_name,
- FilePath* test_script_path) const;
+ bool GetTestScriptPath(const base::FilePath::StringType& test_script_name,
+ base::FilePath* test_script_path) const;
private:
// Port on which the Sync XMPP server listens.
diff --git a/sync/tools/testserver/run_sync_testserver.cc b/sync/tools/testserver/run_sync_testserver.cc
index 74f186d..9295034 100644
--- a/sync/tools/testserver/run_sync_testserver.cc
+++ b/sync/tools/testserver/run_sync_testserver.cc
@@ -21,7 +21,8 @@ static void PrintUsage() {
// Launches the chromiumsync_test.py or xmppserver_test.py scripts, which test
// the sync HTTP and XMPP sever functionality respectively.
-static bool RunSyncTest(const FilePath::StringType& sync_test_script_name) {
+static bool RunSyncTest(
+ const base::FilePath::StringType& sync_test_script_name) {
scoped_ptr<syncer::LocalSyncTestServer> test_server(
new syncer::LocalSyncTestServer());
if (!test_server->SetPythonPath()) {
@@ -29,7 +30,7 @@ static bool RunSyncTest(const FilePath::StringType& sync_test_script_name) {
return false;
}
- FilePath sync_test_script_path;
+ base::FilePath sync_test_script_path;
if (!test_server->GetTestScriptPath(sync_test_script_name,
&sync_test_script_path)) {
LOG(ERROR) << "Error trying to get path for test script "
diff --git a/tools/android/device_stats_monitor/device_stats_monitor.cc b/tools/android/device_stats_monitor/device_stats_monitor.cc
index ebf1723..c24a6d9 100644
--- a/tools/android/device_stats_monitor/device_stats_monitor.cc
+++ b/tools/android/device_stats_monitor/device_stats_monitor.cc
@@ -39,8 +39,8 @@ class DeviceStatsMonitor {
// would affect the results.
void Start(int hz) {
const int sample_interval = 1000000 / hz;
- const FilePath io_stats_path(kIOStatsPath);
- const FilePath cpu_stats_path(kCPUStatsPath);
+ const base::FilePath io_stats_path(kIOStatsPath);
+ const base::FilePath cpu_stats_path(kCPUStatsPath);
std::string out;
while (record_) {
out.clear();
@@ -65,7 +65,7 @@ class DeviceStatsMonitor {
}
private:
- const FilePath out_path_;
+ const base::FilePath out_path_;
std::vector<std::string> samples_;
bool record_;
diff --git a/tools/android/md5sum/md5sum.cc b/tools/android/md5sum/md5sum.cc
index 85388e1..0730133 100644
--- a/tools/android/md5sum/md5sum.cc
+++ b/tools/android/md5sum/md5sum.cc
@@ -51,11 +51,12 @@ std::set<std::string> MakeFileSet(const char** files) {
const std::string svn_dir_component = FILE_PATH_LITERAL("/.svn/");
std::set<std::string> file_set;
for (const char** file = files; *file; ++file) {
- FilePath file_path(*file);
+ base::FilePath file_path(*file);
if (file_util::DirectoryExists(file_path)) {
file_util::FileEnumerator file_enumerator(
file_path, true /* recurse */, file_util::FileEnumerator::FILES);
- for (FilePath child, empty; (child = file_enumerator.Next()) != empty; ) {
+ for (base::FilePath child, empty;
+ (child = file_enumerator.Next()) != empty; ) {
// If the path contains /.svn/, ignore it.
if (child.value().find(svn_dir_component) == std::string::npos) {
file_util::AbsolutePath(&child);
@@ -83,7 +84,7 @@ int main(int argc, const char* argv[]) {
it != files.end(); ++it) {
if (!MD5Sum(it->c_str(), &digest))
failed = true;
- FilePath file_path(*it);
+ base::FilePath file_path(*it);
file_util::AbsolutePath(&file_path);
std::cout << digest << " " << file_path.value() << std::endl;
}
diff --git a/tools/generate_library_loader/generate_library_loader.py b/tools/generate_library_loader/generate_library_loader.py
index 5629562..a39e9ea 100755
--- a/tools/generate_library_loader/generate_library_loader.py
+++ b/tools/generate_library_loader/generate_library_loader.py
@@ -99,7 +99,7 @@ bool %(class_name)s::Load(const std::string& library_name) {
}
#if defined(%(unique_prefix)s_DLOPEN)
- library_ = base::LoadNativeLibrary(FilePath(library_name), NULL);
+ library_ = base::LoadNativeLibrary(base::FilePath(library_name), NULL);
if (!library_)
return false;
#endif
diff --git a/tools/imagediff/image_diff.cc b/tools/imagediff/image_diff.cc
index 19d5df9..99d6282 100644
--- a/tools/imagediff/image_diff.cc
+++ b/tools/imagediff/image_diff.cc
@@ -91,7 +91,7 @@ class Image {
// Creates the image from the given filename on disk, and returns true on
// success.
- bool CreateFromFilename(const FilePath& path) {
+ bool CreateFromFilename(const base::FilePath& path) {
FILE* f = file_util::OpenFile(path, "rb");
if (!f)
return false;
@@ -193,7 +193,7 @@ void PrintHelp() {
*/
}
-int CompareImages(const FilePath& file1, const FilePath& file2) {
+int CompareImages(const base::FilePath& file1, const base::FilePath& file2) {
Image actual_image;
Image baseline_image;
@@ -294,8 +294,8 @@ bool CreateImageDiff(const Image& image1, const Image& image2, Image* out) {
return same;
}
-int DiffImages(const FilePath& file1, const FilePath& file2,
- const FilePath& out_file) {
+int DiffImages(const base::FilePath& file1, const base::FilePath& file2,
+ const base::FilePath& out_file) {
Image actual_image;
Image baseline_image;
@@ -330,11 +330,11 @@ int DiffImages(const FilePath& file1, const FilePath& file2,
// It isn't strictly correct to only support ASCII paths, but this
// program reads paths on stdin and the program that spawns it outputs
// paths as non-wide strings anyway.
-FilePath FilePathFromASCII(const std::string& str) {
+base::FilePath FilePathFromASCII(const std::string& str) {
#if defined(OS_WIN)
- return FilePath(ASCIIToWide(str));
+ return base::FilePath(ASCIIToWide(str));
#else
- return FilePath(str);
+ return base::FilePath(str);
#endif
}
@@ -345,18 +345,18 @@ int main(int argc, const char* argv[]) {
if (parsed_command_line.HasSwitch(kOptionPollStdin)) {
// Watch stdin for filenames.
std::string stdin_buffer;
- FilePath filename1;
+ base::FilePath filename1;
while (std::getline(std::cin, stdin_buffer)) {
if (stdin_buffer.empty())
continue;
if (!filename1.empty()) {
// CompareImages writes results to stdout unless an error occurred.
- FilePath filename2 = FilePathFromASCII(stdin_buffer);
+ base::FilePath filename2 = FilePathFromASCII(stdin_buffer);
if (CompareImages(filename1, filename2) == kStatusError)
printf("error\n");
fflush(stdout);
- filename1 = FilePath();
+ filename1 = base::FilePath();
} else {
// Save the first filename in another buffer and wait for the second
// filename to arrive via stdin.
@@ -369,12 +369,12 @@ int main(int argc, const char* argv[]) {
const CommandLine::StringVector& args = parsed_command_line.GetArgs();
if (parsed_command_line.HasSwitch(kOptionGenerateDiff)) {
if (args.size() == 3) {
- return DiffImages(FilePath(args[0]),
- FilePath(args[1]),
- FilePath(args[2]));
+ return DiffImages(base::FilePath(args[0]),
+ base::FilePath(args[1]),
+ base::FilePath(args[2]));
}
} else if (args.size() == 2) {
- return CompareImages(FilePath(args[0]), FilePath(args[1]));
+ return CompareImages(base::FilePath(args[0]), base::FilePath(args[1]));
}
PrintHelp();
diff --git a/tools/memory_watcher/memory_watcher.cc b/tools/memory_watcher/memory_watcher.cc
index 77faa8b..7c4d801c 100644
--- a/tools/memory_watcher/memory_watcher.cc
+++ b/tools/memory_watcher/memory_watcher.cc
@@ -82,7 +82,8 @@ void MemoryWatcher::CloseLogFile() {
file_ = NULL;
std::wstring tmp_name = ASCIIToWide(file_name_);
tmp_name += L".tmp";
- file_util::Move(FilePath(tmp_name), FilePath(ASCIIToWide(file_name_)));
+ file_util::Move(base::FilePath(tmp_name),
+ base::FilePath(ASCIIToWide(file_name_)));
}
}
diff --git a/ui/aura/remote_root_window_host_win.cc b/ui/aura/remote_root_window_host_win.cc
index 9d1782d..962f19d 100644
--- a/ui/aura/remote_root_window_host_win.cc
+++ b/ui/aura/remote_root_window_host_win.cc
@@ -33,7 +33,7 @@ const int kRemoteWindowTouchId = 10;
void HandleOpenFile(
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const string16& filter,
const OpenFileCompletion& callback) {
DCHECK(aura::RemoteRootWindowHostWin::Instance());
@@ -45,7 +45,7 @@ void HandleOpenFile(
void HandleOpenMultipleFiles(
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const string16& filter,
const OpenMultipleFilesCompletion& callback) {
DCHECK(aura::RemoteRootWindowHostWin::Instance());
@@ -58,7 +58,7 @@ void HandleOpenMultipleFiles(
void HandleSaveFile(
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const string16& filter,
int filter_index,
const string16& default_extension,
@@ -131,7 +131,7 @@ bool RemoteRootWindowHostWin::OnMessageReceived(const IPC::Message& message) {
void RemoteRootWindowHostWin::HandleOpenFile(
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const string16& filter,
const OpenFileCompletion& callback) {
if (!host_)
@@ -149,7 +149,7 @@ void RemoteRootWindowHostWin::HandleOpenFile(
void RemoteRootWindowHostWin::HandleOpenMultipleFiles(
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const string16& filter,
const OpenMultipleFilesCompletion& callback) {
if (!host_)
@@ -167,7 +167,7 @@ void RemoteRootWindowHostWin::HandleOpenMultipleFiles(
void RemoteRootWindowHostWin::HandleSaveFile(
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const string16& filter,
int filter_index,
const string16& default_extension,
@@ -382,7 +382,7 @@ void RemoteRootWindowHostWin::OnFileSaveAsDone(bool success,
int filter_index) {
if (success) {
file_saveas_completion_callback_.Run(
- FilePath(filename), filter_index, NULL);
+ base::FilePath(filename), filter_index, NULL);
}
file_saveas_completion_callback_.Reset();
}
@@ -391,14 +391,14 @@ void RemoteRootWindowHostWin::OnFileSaveAsDone(bool success,
void RemoteRootWindowHostWin::OnFileOpenDone(bool success, string16 filename) {
if (success) {
file_open_completion_callback_.Run(
- FilePath(filename), 0, NULL);
+ base::FilePath(filename), 0, NULL);
}
file_open_completion_callback_.Reset();
}
void RemoteRootWindowHostWin::OnMultiFileOpenDone(
bool success,
- const std::vector<FilePath>& files) {
+ const std::vector<base::FilePath>& files) {
if (success) {
multi_file_open_completion_callback_.Run(files, NULL);
}
diff --git a/ui/aura/test/test_aura_initializer.cc b/ui/aura/test/test_aura_initializer.cc
index c2d131f..ebd8485 100644
--- a/ui/aura/test/test_aura_initializer.cc
+++ b/ui/aura/test/test_aura_initializer.cc
@@ -13,7 +13,7 @@ namespace test {
TestAuraInitializer::TestAuraInitializer() {
#if defined(OS_LINUX)
- FilePath pak_file;
+ base::FilePath pak_file;
PathService::Get(base::DIR_MODULE, &pak_file);
pak_file = pak_file.Append(FILE_PATH_LITERAL(
"aura_test_support_resources.pak"));
diff --git a/ui/base/dragdrop/download_file_interface.h b/ui/base/dragdrop/download_file_interface.h
index a3bed25..c157950 100644
--- a/ui/base/dragdrop/download_file_interface.h
+++ b/ui/base/dragdrop/download_file_interface.h
@@ -28,7 +28,7 @@ namespace ui {
class UI_EXPORT DownloadFileObserver
: public base::RefCountedThreadSafe<DownloadFileObserver> {
public:
- virtual void OnDownloadCompleted(const FilePath& file_path) = 0;
+ virtual void OnDownloadCompleted(const base::FilePath& file_path) = 0;
virtual void OnDownloadAborted() = 0;
protected:
diff --git a/ui/base/dragdrop/drag_utils.cc b/ui/base/dragdrop/drag_utils.cc
index 9c58491..6431f7d 100644
--- a/ui/base/dragdrop/drag_utils.cc
+++ b/ui/base/dragdrop/drag_utils.cc
@@ -29,7 +29,8 @@ static const SkColor kFileDragImageTextColor = SK_ColorBLACK;
class FileDragImageSource : public gfx::CanvasImageSource {
public:
- FileDragImageSource(const FilePath& file_name, const gfx::ImageSkia& icon)
+ FileDragImageSource(const base::FilePath& file_name,
+ const gfx::ImageSkia& icon)
: CanvasImageSource(CalculateSize(icon), false),
file_name_(file_name),
icon_(icon) {
@@ -75,7 +76,7 @@ class FileDragImageSource : public gfx::CanvasImageSource {
return gfx::Size(width, height);
}
- const FilePath file_name_;
+ const base::FilePath file_name_;
const gfx::ImageSkia icon_;
DISALLOW_COPY_AND_ASSIGN(FileDragImageSource);
@@ -83,7 +84,7 @@ class FileDragImageSource : public gfx::CanvasImageSource {
} // namespace
-void CreateDragImageForFile(const FilePath& file_name,
+void CreateDragImageForFile(const base::FilePath& file_name,
const gfx::ImageSkia* icon,
ui::OSExchangeData* data_object) {
DCHECK(icon);
diff --git a/ui/base/dragdrop/drag_utils.h b/ui/base/dragdrop/drag_utils.h
index 1f84d90..418dc7a 100644
--- a/ui/base/dragdrop/drag_utils.h
+++ b/ui/base/dragdrop/drag_utils.h
@@ -30,7 +30,7 @@ namespace drag_utils {
// Chrome (via the download manager, for example). The drag image is set into
// the supplied data_object. 'file_name' can be a full path, but the directory
// portion will be truncated in the drag image.
-UI_EXPORT void CreateDragImageForFile(const FilePath& file_name,
+UI_EXPORT void CreateDragImageForFile(const base::FilePath& file_name,
const gfx::ImageSkia* icon,
ui::OSExchangeData* data_object);
diff --git a/ui/base/dragdrop/os_exchange_data.cc b/ui/base/dragdrop/os_exchange_data.cc
index 12eddeb..c19a695 100644
--- a/ui/base/dragdrop/os_exchange_data.cc
+++ b/ui/base/dragdrop/os_exchange_data.cc
@@ -10,7 +10,7 @@
namespace ui {
OSExchangeData::DownloadFileInfo::DownloadFileInfo(
- const FilePath& filename,
+ const base::FilePath& filename,
DownloadFileProvider* downloader)
: filename(filename),
downloader(downloader) {
@@ -19,8 +19,8 @@ OSExchangeData::DownloadFileInfo::DownloadFileInfo(
OSExchangeData::DownloadFileInfo::~DownloadFileInfo() {}
OSExchangeData::FileInfo::FileInfo(
- const FilePath& path,
- const FilePath& display_name)
+ const base::FilePath& path,
+ const base::FilePath& display_name)
: path(path),
display_name(display_name) {
}
@@ -44,7 +44,7 @@ void OSExchangeData::SetURL(const GURL& url, const string16& title) {
provider_->SetURL(url, title);
}
-void OSExchangeData::SetFilename(const FilePath& path) {
+void OSExchangeData::SetFilename(const base::FilePath& path) {
provider_->SetFilename(path);
}
@@ -65,7 +65,7 @@ bool OSExchangeData::GetURLAndTitle(GURL* url, string16* title) const {
return provider_->GetURLAndTitle(url, title);
}
-bool OSExchangeData::GetFilename(FilePath* path) const {
+bool OSExchangeData::GetFilename(base::FilePath* path) const {
return provider_->GetFilename(path);
}
@@ -145,12 +145,12 @@ bool OSExchangeData::HasAnyFormat(
}
#if defined(OS_WIN)
-void OSExchangeData::SetFileContents(const FilePath& filename,
+void OSExchangeData::SetFileContents(const base::FilePath& filename,
const std::string& file_contents) {
provider_->SetFileContents(filename, file_contents);
}
-bool OSExchangeData::GetFileContents(FilePath* filename,
+bool OSExchangeData::GetFileContents(base::FilePath* filename,
std::string* file_contents) const {
return provider_->GetFileContents(filename, file_contents);
}
diff --git a/ui/base/dragdrop/os_exchange_data.h b/ui/base/dragdrop/os_exchange_data.h
index 5d89ebe..110d127 100644
--- a/ui/base/dragdrop/os_exchange_data.h
+++ b/ui/base/dragdrop/os_exchange_data.h
@@ -82,23 +82,23 @@ class UI_EXPORT OSExchangeData {
// Encapsulates the info about a file to be downloaded.
struct UI_EXPORT DownloadFileInfo {
- DownloadFileInfo(const FilePath& filename,
+ DownloadFileInfo(const base::FilePath& filename,
DownloadFileProvider* downloader);
~DownloadFileInfo();
- FilePath filename;
+ base::FilePath filename;
scoped_refptr<DownloadFileProvider> downloader;
};
// Encapsulates the info about a file.
struct UI_EXPORT FileInfo {
- FileInfo(const FilePath& path, const FilePath& display_name);
+ FileInfo(const base::FilePath& path, const base::FilePath& display_name);
~FileInfo();
// The path of the file.
- FilePath path;
+ base::FilePath path;
// The display name of the file. This field is optional.
- FilePath display_name;
+ base::FilePath display_name;
};
// Provider defines the platform specific part of OSExchangeData that
@@ -110,14 +110,14 @@ class UI_EXPORT OSExchangeData {
virtual void SetString(const string16& data) = 0;
virtual void SetURL(const GURL& url, const string16& title) = 0;
- virtual void SetFilename(const FilePath& path) = 0;
+ virtual void SetFilename(const base::FilePath& path) = 0;
virtual void SetFilenames(
const std::vector<FileInfo>& file_names) = 0;
virtual void SetPickledData(CustomFormat format, const Pickle& data) = 0;
virtual bool GetString(string16* data) const = 0;
virtual bool GetURLAndTitle(GURL* url, string16* title) const = 0;
- virtual bool GetFilename(FilePath* path) const = 0;
+ virtual bool GetFilename(base::FilePath* path) const = 0;
virtual bool GetFilenames(
std::vector<FileInfo>* file_names) const = 0;
virtual bool GetPickledData(CustomFormat format, Pickle* data) const = 0;
@@ -129,9 +129,9 @@ class UI_EXPORT OSExchangeData {
OSExchangeData::CustomFormat format) const = 0;
#if defined(OS_WIN)
- virtual void SetFileContents(const FilePath& filename,
+ virtual void SetFileContents(const base::FilePath& filename,
const std::string& file_contents) = 0;
- virtual bool GetFileContents(FilePath* filename,
+ virtual bool GetFileContents(base::FilePath* filename,
std::string* file_contents) const = 0;
virtual bool HasFileContents() const = 0;
virtual void SetDownloadFileInfo(const DownloadFileInfo& download) = 0;
@@ -182,7 +182,7 @@ class UI_EXPORT OSExchangeData {
// A URL can have an optional title in some exchange formats.
void SetURL(const GURL& url, const string16& title);
// A full path to a file.
- void SetFilename(const FilePath& path);
+ void SetFilename(const base::FilePath& path);
// Full path to one or more files. See also SetFilenames() in Provider.
void SetFilenames(
const std::vector<FileInfo>& file_names);
@@ -196,7 +196,7 @@ class UI_EXPORT OSExchangeData {
bool GetString(string16* data) const;
bool GetURLAndTitle(GURL* url, string16* title) const;
// Return the path of a file, if available.
- bool GetFilename(FilePath* path) const;
+ bool GetFilename(base::FilePath* path) const;
bool GetFilenames(
std::vector<FileInfo>* file_names) const;
bool GetPickledData(CustomFormat format, Pickle* data) const;
@@ -220,9 +220,9 @@ class UI_EXPORT OSExchangeData {
#if defined(OS_WIN)
// Adds the bytes of a file (CFSTR_FILECONTENTS and CFSTR_FILEDESCRIPTOR).
- void SetFileContents(const FilePath& filename,
+ void SetFileContents(const base::FilePath& filename,
const std::string& file_contents);
- bool GetFileContents(FilePath* filename,
+ bool GetFileContents(base::FilePath* filename,
std::string* file_contents) const;
// Adds a download file with full path (CF_HDROP).
diff --git a/ui/base/dragdrop/os_exchange_data_provider_aura.cc b/ui/base/dragdrop/os_exchange_data_provider_aura.cc
index 34af849..6ce7e23 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_aura.cc
+++ b/ui/base/dragdrop/os_exchange_data_provider_aura.cc
@@ -28,9 +28,9 @@ void OSExchangeDataProviderAura::SetURL(const GURL& url,
formats_ |= OSExchangeData::URL;
}
-void OSExchangeDataProviderAura::SetFilename(const FilePath& path) {
+void OSExchangeDataProviderAura::SetFilename(const base::FilePath& path) {
filenames_.clear();
- filenames_.push_back(OSExchangeData::FileInfo(path, FilePath()));
+ filenames_.push_back(OSExchangeData::FileInfo(path, base::FilePath()));
formats_ |= OSExchangeData::FILE_NAME;
}
@@ -69,7 +69,7 @@ bool OSExchangeDataProviderAura::GetURLAndTitle(GURL* url,
return true;
}
-bool OSExchangeDataProviderAura::GetFilename(FilePath* path) const {
+bool OSExchangeDataProviderAura::GetFilename(base::FilePath* path) const {
if ((formats_ & OSExchangeData::FILE_NAME) == 0)
return false;
DCHECK(!filenames_.empty());
@@ -119,13 +119,13 @@ bool OSExchangeDataProviderAura::HasCustomFormat(
#if defined(OS_WIN)
void OSExchangeDataProviderAura::SetFileContents(
- const FilePath& filename,
+ const base::FilePath& filename,
const std::string& file_contents) {
NOTIMPLEMENTED();
}
bool OSExchangeDataProviderAura::GetFileContents(
- FilePath* filename,
+ base::FilePath* filename,
std::string* file_contents) const {
NOTIMPLEMENTED();
return false;
diff --git a/ui/base/dragdrop/os_exchange_data_provider_aura.h b/ui/base/dragdrop/os_exchange_data_provider_aura.h
index 4b431d2..f577653 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_aura.h
+++ b/ui/base/dragdrop/os_exchange_data_provider_aura.h
@@ -27,14 +27,14 @@ class UI_EXPORT OSExchangeDataProviderAura : public OSExchangeData::Provider {
// Overridden from OSExchangeData::Provider:
virtual void SetString(const string16& data) OVERRIDE;
virtual void SetURL(const GURL& url, const string16& title) OVERRIDE;
- virtual void SetFilename(const FilePath& path) OVERRIDE;
+ virtual void SetFilename(const base::FilePath& path) OVERRIDE;
virtual void SetFilenames(
const std::vector<OSExchangeData::FileInfo>& filenames) OVERRIDE;
virtual void SetPickledData(OSExchangeData::CustomFormat format,
const Pickle& data) OVERRIDE;
virtual bool GetString(string16* data) const OVERRIDE;
virtual bool GetURLAndTitle(GURL* url, string16* title) const OVERRIDE;
- virtual bool GetFilename(FilePath* path) const OVERRIDE;
+ virtual bool GetFilename(base::FilePath* path) const OVERRIDE;
virtual bool GetFilenames(
std::vector<OSExchangeData::FileInfo>* filenames) const OVERRIDE;
virtual bool GetPickledData(OSExchangeData::CustomFormat format,
@@ -45,9 +45,9 @@ class UI_EXPORT OSExchangeDataProviderAura : public OSExchangeData::Provider {
virtual bool HasCustomFormat(
OSExchangeData::CustomFormat format) const OVERRIDE;
#if defined(OS_WIN)
- virtual void SetFileContents(const FilePath& filename,
+ virtual void SetFileContents(const base::FilePath& filename,
const std::string& file_contents) OVERRIDE;
- virtual bool GetFileContents(FilePath* filename,
+ virtual bool GetFileContents(base::FilePath* filename,
std::string* file_contents) const OVERRIDE;
virtual bool HasFileContents() const OVERRIDE;
virtual void SetDownloadFileInfo(
diff --git a/ui/base/dragdrop/os_exchange_data_provider_gtk.cc b/ui/base/dragdrop/os_exchange_data_provider_gtk.cc
index 8211563..5abbed2 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_gtk.cc
+++ b/ui/base/dragdrop/os_exchange_data_provider_gtk.cc
@@ -102,8 +102,8 @@ void OSExchangeDataProviderGtk::WriteFormatToSelection(
if ((format & OSExchangeData::FILE_NAME) != 0) {
gchar* uri_array[2];
- uri_array[0] =
- strdup(net::FilePathToFileURL(FilePath(filename_)).spec().c_str());
+ uri_array[0] = strdup(net::FilePathToFileURL(
+ base::FilePath(filename_)).spec().c_str());
uri_array[1] = NULL;
gtk_selection_data_set_uris(selection, uri_array);
free(uri_array[0]);
@@ -134,7 +134,7 @@ void OSExchangeDataProviderGtk::SetURL(const GURL& url, const string16& title) {
formats_ |= OSExchangeData::URL;
}
-void OSExchangeDataProviderGtk::SetFilename(const FilePath& path) {
+void OSExchangeDataProviderGtk::SetFilename(const base::FilePath& path) {
filename_ = path;
formats_ |= OSExchangeData::FILE_NAME;
}
@@ -167,7 +167,7 @@ bool OSExchangeDataProviderGtk::GetURLAndTitle(GURL* url,
return true;
}
-bool OSExchangeDataProviderGtk::GetFilename(FilePath* path) const {
+bool OSExchangeDataProviderGtk::GetFilename(base::FilePath* path) const {
if ((formats_ & OSExchangeData::FILE_NAME) == 0)
return false;
*path = filename_;
diff --git a/ui/base/dragdrop/os_exchange_data_provider_gtk.h b/ui/base/dragdrop/os_exchange_data_provider_gtk.h
index 8a72edd..0e316fa 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_gtk.h
+++ b/ui/base/dragdrop/os_exchange_data_provider_gtk.h
@@ -60,7 +60,7 @@ class UI_EXPORT OSExchangeDataProviderGtk : public OSExchangeData::Provider {
// Provider methods.
virtual void SetString(const string16& data) OVERRIDE;
virtual void SetURL(const GURL& url, const string16& title) OVERRIDE;
- virtual void SetFilename(const FilePath& path) OVERRIDE;
+ virtual void SetFilename(const base::FilePath& path) OVERRIDE;
virtual void SetFilenames(
const std::vector<OSExchangeData::FileInfo>& filenames) OVERRIDE {
NOTREACHED();
@@ -69,7 +69,7 @@ class UI_EXPORT OSExchangeDataProviderGtk : public OSExchangeData::Provider {
const Pickle& data) OVERRIDE;
virtual bool GetString(string16* data) const OVERRIDE;
virtual bool GetURLAndTitle(GURL* url, string16* title) const OVERRIDE;
- virtual bool GetFilename(FilePath* path) const OVERRIDE;
+ virtual bool GetFilename(base::FilePath* path) const OVERRIDE;
virtual bool GetFilenames(
std::vector<OSExchangeData::FileInfo>* filenames) const OVERRIDE {
NOTREACHED();
@@ -114,7 +114,7 @@ class UI_EXPORT OSExchangeDataProviderGtk : public OSExchangeData::Provider {
string16 title_;
// File name.
- FilePath filename_;
+ base::FilePath filename_;
// PICKLED_DATA contents.
PickleData pickle_data_;
diff --git a/ui/base/dragdrop/os_exchange_data_provider_win.cc b/ui/base/dragdrop/os_exchange_data_provider_win.cc
index d1a88ab..02f87d3 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_win.cc
+++ b/ui/base/dragdrop/os_exchange_data_provider_win.cc
@@ -36,10 +36,10 @@ static void CreateValidFileNameFromTitle(const GURL& url,
const string16& title,
string16* validated);
// Creates a new STGMEDIUM object to hold a file.
-static STGMEDIUM* GetStorageForFileName(const FilePath& path);
+static STGMEDIUM* GetStorageForFileName(const base::FilePath& path);
// Creates a File Descriptor for the creation of a file to the given URL and
// returns a handle to it.
-static STGMEDIUM* GetStorageForFileDescriptor(const FilePath& path);
+static STGMEDIUM* GetStorageForFileDescriptor(const base::FilePath& path);
///////////////////////////////////////////////////////////////////////////////
// FormatEtcEnumerator
@@ -297,7 +297,7 @@ void OSExchangeDataProviderWin::SetURL(const GURL& url,
CreateValidFileNameFromTitle(url, title, &valid_file_name);
std::string shortcut_url_file_contents;
GetInternetShortcutFileContents(url, &shortcut_url_file_contents);
- SetFileContents(FilePath(valid_file_name), shortcut_url_file_contents);
+ SetFileContents(base::FilePath(valid_file_name), shortcut_url_file_contents);
// Add a UniformResourceLocator link for apps like IE and Word.
storage = GetStorageForString16(UTF8ToUTF16(url.spec()));
@@ -320,7 +320,7 @@ void OSExchangeDataProviderWin::SetURL(const GURL& url,
new DataObjectImpl::StoredDataInfo(CF_TEXT, storage));
}
-void OSExchangeDataProviderWin::SetFilename(const FilePath& path) {
+void OSExchangeDataProviderWin::SetFilename(const base::FilePath& path) {
STGMEDIUM* storage = GetStorageForFileName(path);
DataObjectImpl::StoredDataInfo* info =
new DataObjectImpl::StoredDataInfo(CF_HDROP, storage);
@@ -346,7 +346,7 @@ void OSExchangeDataProviderWin::SetPickledData(CLIPFORMAT format,
}
void OSExchangeDataProviderWin::SetFileContents(
- const FilePath& filename,
+ const base::FilePath& filename,
const std::string& file_contents) {
// Add CFSTR_FILEDESCRIPTOR
STGMEDIUM* storage = GetStorageForFileDescriptor(filename);
@@ -400,11 +400,11 @@ bool OSExchangeDataProviderWin::GetURLAndTitle(GURL* url,
return false;
}
-bool OSExchangeDataProviderWin::GetFilename(FilePath* path) const {
+bool OSExchangeDataProviderWin::GetFilename(base::FilePath* path) const {
std::vector<string16> filenames;
bool success = ClipboardUtil::GetFilenames(source_object_, &filenames);
if (success)
- *path = FilePath(filenames[0]);
+ *path = base::FilePath(filenames[0]);
return success;
}
@@ -415,7 +415,8 @@ bool OSExchangeDataProviderWin::GetFilenames(
if (success) {
for (size_t i = 0; i < filenames_local.size(); ++i)
filenames->push_back(
- OSExchangeData::FileInfo(FilePath(filenames_local[i]), FilePath()));
+ OSExchangeData::FileInfo(base::FilePath(filenames_local[i]),
+ base::FilePath()));
}
return success;
}
@@ -440,14 +441,14 @@ bool OSExchangeDataProviderWin::GetPickledData(CLIPFORMAT format,
}
bool OSExchangeDataProviderWin::GetFileContents(
- FilePath* filename,
+ base::FilePath* filename,
std::string* file_contents) const {
string16 filename_str;
if (!ClipboardUtil::GetFileContents(source_object_, &filename_str,
file_contents)) {
return false;
}
- *filename = FilePath(filename_str);
+ *filename = base::FilePath(filename_str);
return true;
}
@@ -636,7 +637,7 @@ void DataObjectImpl::RemoveData(const FORMATETC& format) {
}
}
-void DataObjectImpl::OnDownloadCompleted(const FilePath& file_path) {
+void DataObjectImpl::OnDownloadCompleted(const base::FilePath& file_path) {
CLIPFORMAT hdrop_format = ClipboardUtil::GetCFHDropFormat()->cfFormat;
DataObjectImpl::StoredData::iterator iter = contents_.begin();
for (; iter != contents_.end(); ++iter) {
@@ -934,7 +935,7 @@ static void CreateValidFileNameFromTitle(const GURL& url,
*validated += extension;
}
-static STGMEDIUM* GetStorageForFileName(const FilePath& path) {
+static STGMEDIUM* GetStorageForFileName(const base::FilePath& path) {
const size_t kDropSize = sizeof(DROPFILES);
const size_t kTotalBytes =
kDropSize + (path.value().length() + 2) * sizeof(wchar_t);
@@ -958,7 +959,7 @@ static STGMEDIUM* GetStorageForFileName(const FilePath& path) {
}
static STGMEDIUM* GetStorageForFileDescriptor(
- const FilePath& path) {
+ const base::FilePath& path) {
string16 file_name = path.value();
DCHECK(!file_name.empty());
HANDLE hdata = GlobalAlloc(GPTR, sizeof(FILEGROUPDESCRIPTOR));
diff --git a/ui/base/dragdrop/os_exchange_data_provider_win.h b/ui/base/dragdrop/os_exchange_data_provider_win.h
index 3381439..be7090b 100644
--- a/ui/base/dragdrop/os_exchange_data_provider_win.h
+++ b/ui/base/dragdrop/os_exchange_data_provider_win.h
@@ -46,7 +46,7 @@ class DataObjectImpl : public DownloadFileObserver,
size_t size() const { return contents_.size(); }
// DownloadFileObserver implementation:
- virtual void OnDownloadCompleted(const FilePath& file_path);
+ virtual void OnDownloadCompleted(const base::FilePath& file_path);
virtual void OnDownloadAborted();
// IDataObject implementation:
@@ -161,23 +161,23 @@ class UI_EXPORT OSExchangeDataProviderWin : public OSExchangeData::Provider {
// OSExchangeData::Provider methods.
virtual void SetString(const string16& data);
virtual void SetURL(const GURL& url, const string16& title);
- virtual void SetFilename(const FilePath& path);
+ virtual void SetFilename(const base::FilePath& path);
virtual void SetFilenames(
const std::vector<OSExchangeData::FileInfo>& filenames);
virtual void SetPickledData(OSExchangeData::CustomFormat format,
const Pickle& data);
- virtual void SetFileContents(const FilePath& filename,
+ virtual void SetFileContents(const base::FilePath& filename,
const std::string& file_contents);
virtual void SetHtml(const string16& html, const GURL& base_url);
virtual bool GetString(string16* data) const;
virtual bool GetURLAndTitle(GURL* url, string16* title) const;
- virtual bool GetFilename(FilePath* path) const;
+ virtual bool GetFilename(base::FilePath* path) const;
virtual bool GetFilenames(
std::vector<OSExchangeData::FileInfo>* filenames) const;
virtual bool GetPickledData(OSExchangeData::CustomFormat format,
Pickle* data) const;
- virtual bool GetFileContents(FilePath* filename,
+ virtual bool GetFileContents(base::FilePath* filename,
std::string* file_contents) const;
virtual bool GetHtml(string16* html, GURL* base_url) const;
virtual bool HasString() const;
diff --git a/ui/base/dragdrop/os_exchange_data_win_unittest.cc b/ui/base/dragdrop/os_exchange_data_win_unittest.cc
index c5b0ed5..476eba9 100644
--- a/ui/base/dragdrop/os_exchange_data_win_unittest.cc
+++ b/ui/base/dragdrop/os_exchange_data_win_unittest.cc
@@ -361,10 +361,10 @@ TEST(OSExchangeDataTest, TestPickledData) {
TEST(OSExchangeDataTest, FileContents) {
OSExchangeData data;
std::string file_contents("data\0with\0nulls", 15);
- data.SetFileContents(FilePath(L"filename.txt"), file_contents);
+ data.SetFileContents(base::FilePath(L"filename.txt"), file_contents);
OSExchangeData copy(CloneProvider(data));
- FilePath filename;
+ base::FilePath filename;
std::string read_contents;
EXPECT_TRUE(copy.GetFileContents(&filename, &read_contents));
EXPECT_EQ(L"filename.txt", filename.value());
diff --git a/ui/base/l10n/l10n_util_unittest.cc b/ui/base/l10n/l10n_util_unittest.cc
index 86dcf23..5002c68 100644
--- a/ui/base/l10n/l10n_util_unittest.cc
+++ b/ui/base/l10n/l10n_util_unittest.cc
@@ -90,7 +90,7 @@ TEST_F(L10nUtilTest, GetAppLocale) {
// Use a temporary locale dir so we don't have to actually build the locale
// pak files for this test.
base::ScopedPathOverride locale_dir_override(ui::DIR_LOCALES);
- FilePath new_locale_dir;
+ base::FilePath new_locale_dir;
ASSERT_TRUE(PathService::Get(ui::DIR_LOCALES, &new_locale_dir));
// Make fake locale files.
std::string filenames[] = {
@@ -110,7 +110,7 @@ TEST_F(L10nUtilTest, GetAppLocale) {
};
for (size_t i = 0; i < arraysize(filenames); ++i) {
- FilePath filename = new_locale_dir.AppendASCII(
+ base::FilePath filename = new_locale_dir.AppendASCII(
filenames[i] + ".pak");
file_util::WriteFile(filename, "", 0);
}
diff --git a/ui/base/resource/data_pack.cc b/ui/base/resource/data_pack.cc
index 87c8735..793e963 100644
--- a/ui/base/resource/data_pack.cc
+++ b/ui/base/resource/data_pack.cc
@@ -71,7 +71,7 @@ DataPack::DataPack(ui::ScaleFactor scale_factor)
DataPack::~DataPack() {
}
-bool DataPack::LoadFromPath(const FilePath& path) {
+bool DataPack::LoadFromPath(const base::FilePath& path) {
mmap_.reset(new file_util::MemoryMappedFile);
if (!mmap_->Initialize(path)) {
DLOG(ERROR) << "Failed to mmap datapack";
@@ -212,7 +212,7 @@ ui::ScaleFactor DataPack::GetScaleFactor() const {
}
// static
-bool DataPack::WritePack(const FilePath& path,
+bool DataPack::WritePack(const base::FilePath& path,
const std::map<uint16, base::StringPiece>& resources,
TextEncodingType textEncodingType) {
FILE* file = file_util::OpenFile(path, "wb");
diff --git a/ui/base/resource/data_pack_unittest.cc b/ui/base/resource/data_pack_unittest.cc
index ed3d6d7..3258170 100644
--- a/ui/base/resource/data_pack_unittest.cc
+++ b/ui/base/resource/data_pack_unittest.cc
@@ -24,7 +24,7 @@ extern const size_t kSamplePakSize;
TEST(DataPackTest, LoadFromPath) {
base::ScopedTempDir dir;
ASSERT_TRUE(dir.CreateUniqueTempDir());
- FilePath data_path = dir.path().Append(FILE_PATH_LITERAL("sample.pak"));
+ base::FilePath data_path = dir.path().Append(FILE_PATH_LITERAL("sample.pak"));
// Dump contents into the pak file.
ASSERT_EQ(file_util::WriteFile(data_path, kSamplePakContents, kSamplePakSize),
@@ -56,7 +56,7 @@ TEST(DataPackTest, LoadFromPath) {
TEST(DataPackTest, LoadFromFile) {
base::ScopedTempDir dir;
ASSERT_TRUE(dir.CreateUniqueTempDir());
- FilePath data_path = dir.path().Append(FILE_PATH_LITERAL("sample.pak"));
+ base::FilePath data_path = dir.path().Append(FILE_PATH_LITERAL("sample.pak"));
// Dump contents into the pak file.
ASSERT_EQ(file_util::WriteFile(data_path, kSamplePakContents, kSamplePakSize),
@@ -101,7 +101,7 @@ INSTANTIATE_TEST_CASE_P(WriteUTF16, DataPackTest, ::testing::Values(
DataPack::UTF16));
TEST(DataPackTest, LoadFileWithTruncatedHeader) {
- FilePath data_path;
+ base::FilePath data_path;
PathService::Get(base::DIR_SOURCE_ROOT, &data_path);
data_path = data_path.Append(FILE_PATH_LITERAL(
"ui/base/test/data/data_pack_unittest/truncated-header.pak"));
@@ -113,7 +113,7 @@ TEST(DataPackTest, LoadFileWithTruncatedHeader) {
TEST_P(DataPackTest, Write) {
base::ScopedTempDir dir;
ASSERT_TRUE(dir.CreateUniqueTempDir());
- FilePath file = dir.path().Append(FILE_PATH_LITERAL("data.pak"));
+ base::FilePath file = dir.path().Append(FILE_PATH_LITERAL("data.pak"));
std::string one("one");
std::string two("two");
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc
index 6ced085..2325507 100644
--- a/ui/base/resource/resource_bundle.cc
+++ b/ui/base/resource/resource_bundle.cc
@@ -153,7 +153,7 @@ void ResourceBundle::InitSharedInstanceWithPakFile(
}
// static
-void ResourceBundle::InitSharedInstanceWithPakPath(const FilePath& path) {
+void ResourceBundle::InitSharedInstanceWithPakPath(const base::FilePath& path) {
DCHECK(g_shared_instance_ == NULL) << "ResourceBundle initialized twice";
g_shared_instance_ = new ResourceBundle(NULL);
@@ -184,12 +184,12 @@ bool ResourceBundle::LocaleDataPakExists(const std::string& locale) {
return !GetLocaleFilePath(locale, true).empty();
}
-void ResourceBundle::AddDataPackFromPath(const FilePath& path,
+void ResourceBundle::AddDataPackFromPath(const base::FilePath& path,
ScaleFactor scale_factor) {
AddDataPackFromPathInternal(path, scale_factor, false);
}
-void ResourceBundle::AddOptionalDataPackFromPath(const FilePath& path,
+void ResourceBundle::AddOptionalDataPackFromPath(const base::FilePath& path,
ScaleFactor scale_factor) {
AddDataPackFromPathInternal(path, scale_factor, true);
}
@@ -210,9 +210,9 @@ void ResourceBundle::AddDataPackFromFile(base::PlatformFile file,
FilePath ResourceBundle::GetLocaleFilePath(const std::string& app_locale,
bool test_file_exists) {
if (app_locale.empty())
- return FilePath();
+ return base::FilePath();
- FilePath locale_file_path;
+ base::FilePath locale_file_path;
PathService::Get(ui::DIR_LOCALES, &locale_file_path);
@@ -226,10 +226,10 @@ FilePath ResourceBundle::GetLocaleFilePath(const std::string& app_locale,
// Don't try to load empty values or values that are not absolute paths.
if (locale_file_path.empty() || !locale_file_path.IsAbsolute())
- return FilePath();
+ return base::FilePath();
if (test_file_exists && !file_util::PathExists(locale_file_path))
- return FilePath();
+ return base::FilePath();
return locale_file_path;
}
@@ -239,7 +239,7 @@ std::string ResourceBundle::LoadLocaleResources(
const std::string& pref_locale) {
DCHECK(!locale_resources_data_.get()) << "locale.pak already loaded";
std::string app_locale = l10n_util::GetApplicationLocale(pref_locale);
- FilePath locale_file_path = GetOverriddenPakPath();
+ base::FilePath locale_file_path = GetOverriddenPakPath();
if (locale_file_path.empty()) {
CommandLine* command_line = CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kLocalePak)) {
@@ -270,8 +270,8 @@ std::string ResourceBundle::LoadLocaleResources(
return app_locale;
}
-void ResourceBundle::LoadTestResources(const FilePath& path,
- const FilePath& locale_path) {
+void ResourceBundle::LoadTestResources(const base::FilePath& path,
+ const base::FilePath& locale_path) {
// Use the given resource pak for both common and localized resources.
scoped_ptr<DataPack> data_pack(
new DataPack(SCALE_FACTOR_100P));
@@ -291,11 +291,11 @@ void ResourceBundle::UnloadLocaleResources() {
locale_resources_data_.reset();
}
-void ResourceBundle::OverrideLocalePakForTest(const FilePath& pak_path) {
+void ResourceBundle::OverrideLocalePakForTest(const base::FilePath& pak_path) {
overridden_pak_path_ = pak_path;
}
-const FilePath& ResourceBundle::GetOverriddenPakPath() {
+const base::FilePath& ResourceBundle::GetOverriddenPakPath() {
return overridden_pak_path_;
}
@@ -508,14 +508,14 @@ void ResourceBundle::FreeImages() {
images_.clear();
}
-void ResourceBundle::AddDataPackFromPathInternal(const FilePath& path,
+void ResourceBundle::AddDataPackFromPathInternal(const base::FilePath& path,
ScaleFactor scale_factor,
bool optional) {
// Do not pass an empty |path| value to this method. If the absolute path is
// unknown pass just the pack file name.
DCHECK(!path.empty());
- FilePath pack_path = path;
+ base::FilePath pack_path = path;
if (delegate_)
pack_path = delegate_->GetPathForResourcePack(pack_path, scale_factor);
diff --git a/ui/base/resource/resource_bundle.h b/ui/base/resource/resource_bundle.h
index 8d42189..7b83628 100644
--- a/ui/base/resource/resource_bundle.h
+++ b/ui/base/resource/resource_bundle.h
@@ -71,15 +71,17 @@ class UI_EXPORT ResourceBundle {
// the pack file to continue loading or an empty value to cancel loading.
// |pack_path| will contain the complete default path for the pack file if
// known or just the pack file name otherwise.
- virtual FilePath GetPathForResourcePack(const FilePath& pack_path,
- ScaleFactor scale_factor) = 0;
+ virtual base::FilePath GetPathForResourcePack(
+ const base::FilePath& pack_path,
+ ScaleFactor scale_factor) = 0;
// Called before a locale pack file is loaded. Return the full path for
// the pack file to continue loading or an empty value to cancel loading.
// |pack_path| will contain the complete default path for the pack file if
// known or just the pack file name otherwise.
- virtual FilePath GetPathForLocalePack(const FilePath& pack_path,
- const std::string& locale) = 0;
+ virtual base::FilePath GetPathForLocalePack(
+ const base::FilePath& pack_path,
+ const std::string& locale) = 0;
// Return an image resource or an empty value to attempt retrieval of the
// default resource.
@@ -138,7 +140,7 @@ class UI_EXPORT ResourceBundle {
base::PlatformFile file, bool should_load_common_resources);
// Initialize the ResourceBundle using given data pack path for testing.
- static void InitSharedInstanceWithPakPath(const FilePath& path);
+ static void InitSharedInstanceWithPakPath(const base::FilePath& path);
// Delete the ResourceBundle for this process if it exists.
static void CleanupSharedInstance();
@@ -159,14 +161,15 @@ class UI_EXPORT ResourceBundle {
// this value). |scale_factor| is the scale of images in this resource pak
// relative to the images in the 1x resource pak. This method is not thread
// safe! You should call it immediately after calling InitSharedInstance.
- void AddDataPackFromPath(const FilePath& path, ScaleFactor scale_factor);
+ void AddDataPackFromPath(const base::FilePath& path,
+ ScaleFactor scale_factor);
// Same as above but using an already open file.
void AddDataPackFromFile(base::PlatformFile file, ScaleFactor scale_factor);
// Same as AddDataPackFromPath but does not log an error if the pack fails to
// load.
- void AddOptionalDataPackFromPath(const FilePath& path,
+ void AddOptionalDataPackFromPath(const base::FilePath& path,
ScaleFactor scale_factor);
// Changes the locale for an already-initialized ResourceBundle, returning the
@@ -239,13 +242,13 @@ class UI_EXPORT ResourceBundle {
// Overrides the path to the pak file from which the locale resources will be
// loaded. Pass an empty path to undo.
- void OverrideLocalePakForTest(const FilePath& pak_path);
+ void OverrideLocalePakForTest(const base::FilePath& pak_path);
// Returns the full pathname of the locale file to load. May return an empty
// string if no locale data files are found and |test_file_exists| is true.
// Used on Android to load the local file in the browser process and pass it
// to the sandboxed renderer process.
- FilePath GetLocaleFilePath(const std::string& app_locale,
+ base::FilePath GetLocaleFilePath(const std::string& app_locale,
bool test_file_exists);
// Returns the maximum scale factor currently loaded.
@@ -277,7 +280,7 @@ class UI_EXPORT ResourceBundle {
// Implementation for AddDataPackFromPath and AddOptionalDataPackFromPath, if
// the pack is not |optional| logs an error on failure to load.
- void AddDataPackFromPathInternal(const FilePath& path,
+ void AddDataPackFromPathInternal(const base::FilePath& path,
ScaleFactor scale_factor,
bool optional);
@@ -291,7 +294,8 @@ class UI_EXPORT ResourceBundle {
// Load test resources in given paths. If either path is empty an empty
// resource pack is loaded.
- void LoadTestResources(const FilePath& path, const FilePath& locale_path);
+ void LoadTestResources(const base::FilePath& path,
+ const base::FilePath& locale_path);
// Unload the locale specific strings and prepares to load new ones. See
// comments for ReloadLocaleResources().
@@ -340,7 +344,7 @@ class UI_EXPORT ResourceBundle {
// bright red bitmap.
gfx::Image& GetEmptyImage();
- const FilePath& GetOverriddenPakPath();
+ const base::FilePath& GetOverriddenPakPath();
// This pointer is guaranteed to outlive the ResourceBundle instance and may
// be NULL.
@@ -377,7 +381,7 @@ class UI_EXPORT ResourceBundle {
scoped_ptr<gfx::Font> large_bold_font_;
scoped_ptr<gfx::Font> web_font_;
- FilePath overridden_pak_path_;
+ base::FilePath overridden_pak_path_;
DISALLOW_COPY_AND_ASSIGN(ResourceBundle);
};
diff --git a/ui/base/resource/resource_bundle_android.cc b/ui/base/resource/resource_bundle_android.cc
index bb1c9d7..3e1e8aa 100644
--- a/ui/base/resource/resource_bundle_android.cc
+++ b/ui/base/resource/resource_bundle_android.cc
@@ -17,7 +17,7 @@
namespace ui {
void ResourceBundle::LoadCommonResources() {
- FilePath path;
+ base::FilePath path;
PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &path);
AddDataPackFromPath(path.AppendASCII("chrome.pak"),
SCALE_FACTOR_NONE);
diff --git a/ui/base/resource/resource_bundle_aurax11.cc b/ui/base/resource/resource_bundle_aurax11.cc
index 810e011..389c87e6 100644
--- a/ui/base/resource/resource_bundle_aurax11.cc
+++ b/ui/base/resource/resource_bundle_aurax11.cc
@@ -17,12 +17,12 @@
namespace {
FilePath GetResourcesPakFilePath(const std::string& pak_name) {
- FilePath path;
+ base::FilePath path;
if (PathService::Get(base::DIR_MODULE, &path))
return path.AppendASCII(pak_name.c_str());
// Return just the name of the pack file.
- return FilePath(pak_name.c_str());
+ return base::FilePath(pak_name.c_str());
}
} // namespace
diff --git a/ui/base/resource/resource_bundle_gtk.cc b/ui/base/resource/resource_bundle_gtk.cc
index 4bf1bde..44c3ebc 100644
--- a/ui/base/resource/resource_bundle_gtk.cc
+++ b/ui/base/resource/resource_bundle_gtk.cc
@@ -54,12 +54,12 @@ GdkPixbuf* LoadPixbuf(base::RefCountedStaticMemory* data, bool rtl_enabled) {
}
FilePath GetResourcesPakFilePath(const std::string& pak_name) {
- FilePath path;
+ base::FilePath path;
if (PathService::Get(base::DIR_MODULE, &path))
return path.AppendASCII(pak_name.c_str());
// Return just the name of the pack file.
- return FilePath(pak_name.c_str());
+ return base::FilePath(pak_name.c_str());
}
} // namespace
diff --git a/ui/base/resource/resource_bundle_ios.mm b/ui/base/resource/resource_bundle_ios.mm
index 7140d69a..0717161 100644
--- a/ui/base/resource/resource_bundle_ios.mm
+++ b/ui/base/resource/resource_bundle_ios.mm
@@ -36,9 +36,9 @@ FilePath GetResourcesPakFilePath(NSString* name, NSString* mac_locale) {
}
if (!resource_path) {
// Return just the name of the pak file.
- return FilePath(base::SysNSStringToUTF8(name) + ".pak");
+ return base::FilePath(base::SysNSStringToUTF8(name) + ".pak");
}
- return FilePath([resource_path fileSystemRepresentation]);
+ return base::FilePath([resource_path fileSystemRepresentation]);
}
} // namespace
@@ -70,7 +70,8 @@ FilePath ResourceBundle::GetLocaleFilePath(const std::string& app_locale,
if ([mac_locale isEqual:@"en_US"])
mac_locale = @"en";
- FilePath locale_file_path = GetResourcesPakFilePath(@"locale", mac_locale);
+ base::FilePath locale_file_path =
+ GetResourcesPakFilePath(@"locale", mac_locale);
if (delegate_) {
locale_file_path =
@@ -79,10 +80,10 @@ FilePath ResourceBundle::GetLocaleFilePath(const std::string& app_locale,
// Don't try to load empty values or values that are not absolute paths.
if (locale_file_path.empty() || !locale_file_path.IsAbsolute())
- return FilePath();
+ return base::FilePath();
if (test_file_exists && !file_util::PathExists(locale_file_path))
- return FilePath();
+ return base::FilePath();
return locale_file_path;
}
diff --git a/ui/base/resource/resource_bundle_mac.mm b/ui/base/resource/resource_bundle_mac.mm
index 2ddd057..fd9a2cb 100644
--- a/ui/base/resource/resource_bundle_mac.mm
+++ b/ui/base/resource/resource_bundle_mac.mm
@@ -40,10 +40,10 @@ FilePath GetResourcesPakFilePath(NSString* name, NSString* mac_locale) {
if (!resource_path) {
// Return just the name of the pack file.
- return FilePath(base::SysNSStringToUTF8(name) + ".pak");
+ return base::FilePath(base::SysNSStringToUTF8(name) + ".pak");
}
- return FilePath([resource_path fileSystemRepresentation]);
+ return base::FilePath([resource_path fileSystemRepresentation]);
}
} // namespace
@@ -78,7 +78,8 @@ FilePath ResourceBundle::GetLocaleFilePath(const std::string& app_locale,
if ([mac_locale isEqual:@"en_US"])
mac_locale = @"en";
- FilePath locale_file_path = GetResourcesPakFilePath(@"locale", mac_locale);
+ base::FilePath locale_file_path =
+ GetResourcesPakFilePath(@"locale", mac_locale);
if (delegate_) {
locale_file_path =
@@ -87,10 +88,10 @@ FilePath ResourceBundle::GetLocaleFilePath(const std::string& app_locale,
// Don't try to load empty values or values that are not absolute paths.
if (locale_file_path.empty() || !locale_file_path.IsAbsolute())
- return FilePath();
+ return base::FilePath();
if (test_file_exists && !file_util::PathExists(locale_file_path))
- return FilePath();
+ return base::FilePath();
return locale_file_path;
}
diff --git a/ui/base/resource/resource_bundle_unittest.cc b/ui/base/resource/resource_bundle_unittest.cc
index 67f444d..70dd8c1 100644
--- a/ui/base/resource/resource_bundle_unittest.cc
+++ b/ui/base/resource/resource_bundle_unittest.cc
@@ -58,10 +58,10 @@ class MockResourceBundleDelegate : public ui::ResourceBundle::Delegate {
virtual ~MockResourceBundleDelegate() {
}
- MOCK_METHOD2(GetPathForResourcePack, FilePath(const FilePath& pack_path,
- ui::ScaleFactor scale_factor));
- MOCK_METHOD2(GetPathForLocalePack, FilePath(const FilePath& pack_path,
- const std::string& locale));
+ MOCK_METHOD2(GetPathForResourcePack, base::FilePath(
+ const base::FilePath& pack_path, ui::ScaleFactor scale_factor));
+ MOCK_METHOD2(GetPathForLocalePack, base::FilePath(
+ const base::FilePath& pack_path, const std::string& locale));
MOCK_METHOD1(GetImageNamed, gfx::Image(int resource_id));
MOCK_METHOD2(GetNativeImageNamed,
gfx::Image(int resource_id,
@@ -119,7 +119,7 @@ void AddCustomChunk(const base::StringPiece& custom_chunk,
// which is |edge_size|x|edge_size| pixels.
// If |custom_chunk| is non empty, adds it after the IHDR chunk
// in the encoded bitmap data.
-void CreateDataPackWithSingleBitmap(const FilePath& path,
+void CreateDataPackWithSingleBitmap(const base::FilePath& path,
int edge_size,
const base::StringPiece& custom_chunk) {
SkBitmap bitmap;
@@ -174,12 +174,12 @@ TEST_F(ResourceBundleTest, DelegateGetPathForResourcePack) {
MockResourceBundleDelegate delegate;
ResourceBundle* resource_bundle = CreateResourceBundle(&delegate);
- FilePath pack_path(FILE_PATH_LITERAL("/path/to/test_path.pak"));
+ base::FilePath pack_path(FILE_PATH_LITERAL("/path/to/test_path.pak"));
ui::ScaleFactor pack_scale_factor = ui::SCALE_FACTOR_200P;
EXPECT_CALL(delegate,
GetPathForResourcePack(
- Property(&FilePath::value, pack_path.value()),
+ Property(&base::FilePath::value, pack_path.value()),
pack_scale_factor))
.Times(1)
.WillOnce(Return(pack_path));
@@ -202,7 +202,7 @@ TEST_F(ResourceBundleTest, MAYBE_DelegateGetPathForLocalePack) {
// Cancel the load.
EXPECT_CALL(delegate, GetPathForLocalePack(_, locale))
.Times(2)
- .WillRepeatedly(Return(FilePath()))
+ .WillRepeatedly(Return(base::FilePath()))
.RetiresOnSaturation();
EXPECT_FALSE(resource_bundle->LocaleDataPakExists(locale));
@@ -348,7 +348,7 @@ class ResourceBundleImageTest : public ResourceBundleTest {
// Returns resource bundle which uses an empty data pak for locale data.
ui::ResourceBundle* CreateResourceBundleWithEmptyLocalePak() {
// Write an empty data pak for locale data.
- const FilePath& locale_path = dir_path().Append(
+ const base::FilePath& locale_path = dir_path().Append(
FILE_PATH_LITERAL("locale.pak"));
EXPECT_EQ(file_util::WriteFile(locale_path, kEmptyPakContents,
kEmptyPakSize),
@@ -357,12 +357,12 @@ class ResourceBundleImageTest : public ResourceBundleTest {
ui::ResourceBundle* resource_bundle = CreateResourceBundle(NULL);
// Load the empty locale data pak.
- resource_bundle->LoadTestResources(FilePath(), locale_path);
+ resource_bundle->LoadTestResources(base::FilePath(), locale_path);
return resource_bundle;
}
// Returns the path of temporary directory to write test data packs into.
- const FilePath& dir_path() { return dir_.path(); }
+ const base::FilePath& dir_path() { return dir_.path(); }
private:
scoped_ptr<DataPack> locale_pack_;
@@ -374,7 +374,7 @@ class ResourceBundleImageTest : public ResourceBundleTest {
// Verify that we don't crash when trying to load a resource that is not found.
// In some cases, we fail to mmap resources.pak, but try to keep going anyway.
TEST_F(ResourceBundleImageTest, LoadDataResourceBytes) {
- FilePath data_path = dir_path().Append(FILE_PATH_LITERAL("sample.pak"));
+ base::FilePath data_path = dir_path().Append(FILE_PATH_LITERAL("sample.pak"));
// Dump contents into the pak files.
ASSERT_EQ(file_util::WriteFile(data_path, kEmptyPakContents,
@@ -390,15 +390,16 @@ TEST_F(ResourceBundleImageTest, LoadDataResourceBytes) {
// Give a .pak file that doesn't exist so we will fail to load it.
resource_bundle->AddDataPackFromPath(
- FilePath(FILE_PATH_LITERAL("non-existant-file.pak")),
+ base::FilePath(FILE_PATH_LITERAL("non-existant-file.pak")),
ui::SCALE_FACTOR_NONE);
EXPECT_EQ(NULL, resource_bundle->LoadDataResourceBytes(
kUnfoundResourceId));
}
TEST_F(ResourceBundleImageTest, GetRawDataResource) {
- FilePath data_path = dir_path().Append(FILE_PATH_LITERAL("sample.pak"));
- FilePath data_2x_path = dir_path().Append(FILE_PATH_LITERAL("sample_2x.pak"));
+ base::FilePath data_path = dir_path().Append(FILE_PATH_LITERAL("sample.pak"));
+ base::FilePath data_2x_path =
+ dir_path().Append(FILE_PATH_LITERAL("sample_2x.pak"));
// Dump contents into the pak files.
ASSERT_EQ(file_util::WriteFile(data_path, kSamplePakContents,
@@ -429,8 +430,8 @@ TEST_F(ResourceBundleImageTest, GetRawDataResource) {
// Test requesting image reps at various scale factors from the image returned
// via ResourceBundle::GetImageNamed().
TEST_F(ResourceBundleImageTest, GetImageNamed) {
- FilePath data_1x_path = dir_path().AppendASCII("sample_1x.pak");
- FilePath data_2x_path = dir_path().AppendASCII("sample_2x.pak");
+ base::FilePath data_1x_path = dir_path().AppendASCII("sample_1x.pak");
+ base::FilePath data_2x_path = dir_path().AppendASCII("sample_2x.pak");
// Create the pak files.
CreateDataPackWithSingleBitmap(data_1x_path, 10, base::StringPiece());
@@ -470,8 +471,8 @@ TEST_F(ResourceBundleImageTest, GetImageNamed) {
// Test that GetImageNamed() behaves properly for images which GRIT has
// annotated as having fallen back to 1x.
TEST_F(ResourceBundleImageTest, GetImageNamedFallback1x) {
- FilePath data_path = dir_path().AppendASCII("sample.pak");
- FilePath data_2x_path = dir_path().AppendASCII("sample_2x.pak");
+ base::FilePath data_path = dir_path().AppendASCII("sample.pak");
+ base::FilePath data_2x_path = dir_path().AppendASCII("sample_2x.pak");
// Create the pak files.
CreateDataPackWithSingleBitmap(data_path, 10, base::StringPiece());
@@ -498,7 +499,7 @@ TEST_F(ResourceBundleImageTest, GetImageNamedFallback1x) {
}
TEST_F(ResourceBundleImageTest, FallbackToNone) {
- FilePath data_default_path = dir_path().AppendASCII("sample.pak");
+ base::FilePath data_default_path = dir_path().AppendASCII("sample.pak");
// Create the pak files.
CreateDataPackWithSingleBitmap(data_default_path, 10, base::StringPiece());
diff --git a/ui/base/resource/resource_bundle_win.cc b/ui/base/resource/resource_bundle_win.cc
index 0f6092d..aad1ef1 100644
--- a/ui/base/resource/resource_bundle_win.cc
+++ b/ui/base/resource/resource_bundle_win.cc
@@ -25,12 +25,12 @@ HINSTANCE GetCurrentResourceDLL() {
}
FilePath GetResourcesPakFilePath(const std::string& pak_name) {
- FilePath path;
+ base::FilePath path;
if (PathService::Get(base::DIR_MODULE, &path))
return path.AppendASCII(pak_name.c_str());
// Return just the name of the pack file.
- return FilePath(ASCIIToUTF16(pak_name));
+ return base::FilePath(ASCIIToUTF16(pak_name));
}
} // namespace
diff --git a/ui/base/text/text_elider.cc b/ui/base/text/text_elider.cc
index defdec8..fa466da 100644
--- a/ui/base/text/text_elider.cc
+++ b/ui/base/text/text_elider.cc
@@ -398,7 +398,7 @@ string16 ElideUrl(const GURL& url,
ELIDE_AT_END);
}
-string16 ElideFilename(const FilePath& filename,
+string16 ElideFilename(const base::FilePath& filename,
const gfx::Font& font,
int available_pixel_width) {
#if defined(OS_WIN)
diff --git a/ui/base/text/text_elider_unittest.cc b/ui/base/text/text_elider_unittest.cc
index 8f9aa9c..cbf895f 100644
--- a/ui/base/text/text_elider_unittest.cc
+++ b/ui/base/text/text_elider_unittest.cc
@@ -25,7 +25,7 @@ struct Testcase {
};
struct FileTestcase {
- const FilePath::StringType input;
+ const base::FilePath::StringType input;
const std::string output;
};
@@ -263,8 +263,8 @@ TEST(TextEliderTest, TestFileURLEliding) {
#endif
TEST(TextEliderTest, MAYBE_TestFilenameEliding) {
const std::string kEllipsisStr(kEllipsis);
- const FilePath::StringType kPathSeparator =
- FilePath::StringType().append(1, FilePath::kSeparators[0]);
+ const base::FilePath::StringType kPathSeparator =
+ base::FilePath::StringType().append(1, base::FilePath::kSeparators[0]);
FileTestcase testcases[] = {
{FILE_PATH_LITERAL(""), ""},
@@ -302,7 +302,7 @@ TEST(TextEliderTest, MAYBE_TestFilenameEliding) {
static const gfx::Font font;
for (size_t i = 0; i < arraysize(testcases); ++i) {
- FilePath filepath(testcases[i].input);
+ base::FilePath filepath(testcases[i].input);
string16 expected = UTF8ToUTF16(testcases[i].output);
expected = base::i18n::GetDisplayStringInLTRDirectionality(expected);
EXPECT_EQ(expected, ElideFilename(filepath,
diff --git a/ui/base/ui_base_paths.cc b/ui/base/ui_base_paths.cc
index 229e717..6384c97 100644
--- a/ui/base/ui_base_paths.cc
+++ b/ui/base/ui_base_paths.cc
@@ -16,12 +16,12 @@
namespace ui {
-bool PathProvider(int key, FilePath* result) {
+bool PathProvider(int key, base::FilePath* result) {
// Assume that we will not need to create the directory if it does not exist.
// This flag can be set to true for the cases where we want to create it.
bool create_dir = false;
- FilePath cur;
+ base::FilePath cur;
switch (key) {
case ui::DIR_LOCALES:
if (!PathService::Get(base::DIR_MODULE, &cur))
diff --git a/ui/base/win/shell.cc b/ui/base/win/shell.cc
index c82daf0..7409fad 100644
--- a/ui/base/win/shell.cc
+++ b/ui/base/win/shell.cc
@@ -86,12 +86,12 @@ bool OpenAnyViaShell(const string16& full_path,
return false;
}
-bool OpenItemViaShell(const FilePath& full_path) {
+bool OpenItemViaShell(const base::FilePath& full_path) {
return OpenAnyViaShell(full_path.value(), full_path.DirName().value(),
string16(), 0);
}
-bool OpenItemViaShellNoZoneCheck(const FilePath& full_path) {
+bool OpenItemViaShellNoZoneCheck(const base::FilePath& full_path) {
return OpenAnyViaShell(full_path.value(), string16(), string16(),
SEE_MASK_NOZONECHECKS | SEE_MASK_FLAG_DDEWAIT);
}
diff --git a/ui/compositor/layer_unittest.cc b/ui/compositor/layer_unittest.cc
index c87e07b..c641e8f 100644
--- a/ui/compositor/layer_unittest.cc
+++ b/ui/compositor/layer_unittest.cc
@@ -140,13 +140,15 @@ class LayerWithRealCompositorTest : public testing::Test {
gfx::Rect(0, 0, layer->bounds().width(), layer->bounds().height()));
}
- const FilePath& test_data_directory() const { return test_data_directory_; }
+ const base::FilePath& test_data_directory() const {
+ return test_data_directory_;
+ }
private:
scoped_ptr<TestCompositorHost> window_;
// The root directory for test files.
- FilePath test_data_directory_;
+ base::FilePath test_data_directory_;
DISALLOW_COPY_AND_ASSIGN(LayerWithRealCompositorTest);
};
@@ -892,8 +894,10 @@ TEST_F(LayerWithRealCompositorTest, MAYBE_ModifyHierarchy) {
scoped_ptr<Layer> l12(CreateColorLayer(SK_ColorBLUE,
gfx::Rect(10, 10, 25, 25)));
- FilePath ref_img1 = test_data_directory().AppendASCII("ModifyHierarchy1.png");
- FilePath ref_img2 = test_data_directory().AppendASCII("ModifyHierarchy2.png");
+ base::FilePath ref_img1 =
+ test_data_directory().AppendASCII("ModifyHierarchy1.png");
+ base::FilePath ref_img2 =
+ test_data_directory().AppendASCII("ModifyHierarchy2.png");
SkBitmap bitmap;
l0->Add(l11.get());
@@ -946,7 +950,7 @@ TEST_F(LayerWithRealCompositorTest, MAYBE_Opacity) {
scoped_ptr<Layer> l11(CreateColorLayer(SK_ColorGREEN,
gfx::Rect(0, 0, 25, 25)));
- FilePath ref_img = test_data_directory().AppendASCII("Opacity.png");
+ base::FilePath ref_img = test_data_directory().AppendASCII("Opacity.png");
l11->SetOpacity(0.75);
l0->Add(l11.get());
diff --git a/ui/gfx/color_profile_win.cc b/ui/gfx/color_profile_win.cc
index 5c81271..51b1b31 100644
--- a/ui/gfx/color_profile_win.cc
+++ b/ui/gfx/color_profile_win.cc
@@ -21,7 +21,7 @@ void ReadColorProfile(std::vector<char>* profile) {
if (!res)
return;
std::string profileData;
- if (!file_util::ReadFileToString(FilePath(path), &profileData))
+ if (!file_util::ReadFileToString(base::FilePath(path), &profileData))
return;
size_t length = profileData.size();
if (length > gfx::kMaxProfileLength)
diff --git a/ui/gfx/gfx_paths.cc b/ui/gfx/gfx_paths.cc
index 6fe4789..5c65674 100644
--- a/ui/gfx/gfx_paths.cc
+++ b/ui/gfx/gfx_paths.cc
@@ -11,8 +11,8 @@
namespace gfx {
-bool PathProvider(int key, FilePath* result) {
- FilePath cur;
+bool PathProvider(int key, base::FilePath* result) {
+ base::FilePath cur;
switch (key) {
// The following are only valid in the development environment, and
// will fail if executed from an installed executable (because the
diff --git a/ui/gfx/icon_util.cc b/ui/gfx/icon_util.cc
index d071a2f..4ce9779 100644
--- a/ui/gfx/icon_util.cc
+++ b/ui/gfx/icon_util.cc
@@ -344,7 +344,7 @@ SkBitmap IconUtil::CreateSkBitmapFromHICONHelper(HICON icon,
bool IconUtil::CreateIconFileFromSkBitmap(const SkBitmap& bitmap,
const SkBitmap& large_bitmap,
- const FilePath& icon_path) {
+ const base::FilePath& icon_path) {
// Only 32 bit ARGB bitmaps are supported. We also make sure the bitmap has
// been properly initialized.
SkAutoLockPixels bitmap_lock(bitmap);
diff --git a/ui/gfx/icon_util_unittest.cc b/ui/gfx/icon_util_unittest.cc
index 502c0eb..e462c2d 100644
--- a/ui/gfx/icon_util_unittest.cc
+++ b/ui/gfx/icon_util_unittest.cc
@@ -34,7 +34,8 @@ class IconUtilTest : public testing::Test {
// Given a file name for an .ico file and an image dimentions, this
// function loads the icon and returns an HICON handle.
- HICON LoadIconFromFile(const FilePath& filename, int width, int height) {
+ HICON LoadIconFromFile(const base::FilePath& filename,
+ int width, int height) {
HICON icon = static_cast<HICON>(LoadImage(NULL,
filename.value().c_str(),
IMAGE_ICON,
@@ -55,7 +56,7 @@ class IconUtilTest : public testing::Test {
protected:
// The root directory for test files.
- FilePath test_data_directory_;
+ base::FilePath test_data_directory_;
// Directory for creating files by this test.
base::ScopedTempDir temp_directory_;
@@ -69,7 +70,8 @@ class IconUtilTest : public testing::Test {
// The following test case makes sure IconUtil::SkBitmapFromHICON fails
// gracefully when called with invalid input parameters.
TEST_F(IconUtilTest, TestIconToBitmapInvalidParameters) {
- FilePath icon_filename = test_data_directory_.AppendASCII(kSmallIconName);
+ base::FilePath icon_filename =
+ test_data_directory_.AppendASCII(kSmallIconName);
gfx::Size icon_size(kSmallIconWidth, kSmallIconHeight);
HICON icon = LoadIconFromFile(icon_filename,
icon_size.width(),
@@ -126,9 +128,9 @@ TEST_F(IconUtilTest, TestBitmapToIconInvalidParameters) {
// fails gracefully when called with invalid input parameters.
TEST_F(IconUtilTest, TestCreateIconFileInvalidParameters) {
scoped_ptr<SkBitmap> bitmap;
- FilePath valid_icon_filename = test_data_directory_.AppendASCII(
+ base::FilePath valid_icon_filename = test_data_directory_.AppendASCII(
kSmallIconName);
- FilePath invalid_icon_filename(FILE_PATH_LITERAL("C:\\<>?.ico"));
+ base::FilePath invalid_icon_filename(FILE_PATH_LITERAL("C:\\<>?.ico"));
// Wrong bitmap format.
bitmap.reset(new SkBitmap);
@@ -165,7 +167,7 @@ TEST_F(IconUtilTest, TestCreateIconFileInvalidParameters) {
// the HICON into a bitmap, the bitmap has the expected format and dimentions.
TEST_F(IconUtilTest, TestCreateSkBitmapFromHICON) {
scoped_ptr<SkBitmap> bitmap;
- FilePath small_icon_filename = test_data_directory_.AppendASCII(
+ base::FilePath small_icon_filename = test_data_directory_.AppendASCII(
kSmallIconName);
gfx::Size small_icon_size(kSmallIconWidth, kSmallIconHeight);
HICON small_icon = LoadIconFromFile(small_icon_filename,
@@ -179,7 +181,7 @@ TEST_F(IconUtilTest, TestCreateSkBitmapFromHICON) {
EXPECT_EQ(bitmap->config(), SkBitmap::kARGB_8888_Config);
::DestroyIcon(small_icon);
- FilePath large_icon_filename = test_data_directory_.AppendASCII(
+ base::FilePath large_icon_filename = test_data_directory_.AppendASCII(
kLargeIconName);
gfx::Size large_icon_size(kLargeIconWidth, kLargeIconHeight);
HICON large_icon = LoadIconFromFile(large_icon_filename,
@@ -235,7 +237,8 @@ TEST_F(IconUtilTest, TestBasicCreateHICONFromSkBitmap) {
// The following test case makes sure IconUtil::CreateIconFileFromSkBitmap
// creates a valid .ico file given an SkBitmap.
TEST_F(IconUtilTest, TestCreateIconFile) {
- FilePath icon_filename = test_data_directory_.AppendASCII(kTempIconFilename);
+ base::FilePath icon_filename =
+ test_data_directory_.AppendASCII(kTempIconFilename);
SkBitmap bitmap = CreateBlackSkBitmap(kSmallIconWidth, kSmallIconHeight);
EXPECT_TRUE(IconUtil::CreateIconFileFromSkBitmap(bitmap, SkBitmap(),
@@ -254,7 +257,8 @@ TEST_F(IconUtilTest, TestCreateIconFile) {
}
TEST_F(IconUtilTest, TestCreateIconFileWithLargeBitmap) {
- const FilePath icon_path(temp_directory_.path().AppendASCII("test.ico"));
+ const base::FilePath icon_path(
+ temp_directory_.path().AppendASCII("test.ico"));
const SkBitmap bitmap_48 = CreateBlackSkBitmap(48, 48);
const SkBitmap bitmap_256 = CreateBlackSkBitmap(256, 256);
diff --git a/ui/gfx/video_decode_acceleration_support_mac.mm b/ui/gfx/video_decode_acceleration_support_mac.mm
index c02f975..d4d19ff 100644
--- a/ui/gfx/video_decode_acceleration_support_mac.mm
+++ b/ui/gfx/video_decode_acceleration_support_mac.mm
@@ -57,7 +57,7 @@ bool InitializeVdaApis() {
static bool should_initialize = true;
if (should_initialize) {
should_initialize = false;
- FilePath path;
+ base::FilePath path;
if (!base::mac::GetSearchPathDirectory(
NSLibraryDirectory, NSSystemDomainMask, &path)) {
return false;
diff --git a/ui/gl/gl_implementation_android.cc b/ui/gl/gl_implementation_android.cc
index 4dab47c..2b562a8 100644
--- a/ui/gl/gl_implementation_android.cc
+++ b/ui/gl/gl_implementation_android.cc
@@ -27,7 +27,7 @@ void GL_BINDING_CALL MarshalDepthRangeToDepthRangef(GLclampd z_near,
glDepthRangef(static_cast<GLclampf>(z_near), static_cast<GLclampf>(z_far));
}
-base::NativeLibrary LoadLibrary(const FilePath& filename) {
+base::NativeLibrary LoadLibrary(const base::FilePath& filename) {
std::string error;
base::NativeLibrary library = base::LoadNativeLibrary(filename, &error);
if (!library) {
@@ -38,7 +38,7 @@ base::NativeLibrary LoadLibrary(const FilePath& filename) {
}
base::NativeLibrary LoadLibrary(const char* filename) {
- return LoadLibrary(FilePath(filename));
+ return LoadLibrary(base::FilePath(filename));
}
} // namespace
diff --git a/ui/gl/gl_implementation_linux.cc b/ui/gl/gl_implementation_linux.cc
index dc81fbc..42f2d5c 100644
--- a/ui/gl/gl_implementation_linux.cc
+++ b/ui/gl/gl_implementation_linux.cc
@@ -34,7 +34,7 @@ void GL_BINDING_CALL MarshalDepthRangeToDepthRangef(GLclampd z_near,
}
// Load a library, printing an error message on failure.
-base::NativeLibrary LoadLibrary(const FilePath& filename) {
+base::NativeLibrary LoadLibrary(const base::FilePath& filename) {
std::string error;
base::NativeLibrary library = base::LoadNativeLibrary(filename,
&error);
@@ -46,7 +46,7 @@ base::NativeLibrary LoadLibrary(const FilePath& filename) {
}
base::NativeLibrary LoadLibrary(const char* filename) {
- return LoadLibrary(FilePath(filename));
+ return LoadLibrary(base::FilePath(filename));
}
} // namespace
@@ -72,7 +72,7 @@ bool InitializeGLBindings(GLImplementation implementation) {
switch (implementation) {
case kGLImplementationOSMesaGL: {
- FilePath module_path;
+ base::FilePath module_path;
if (!PathService::Get(base::DIR_MODULE, &module_path)) {
LOG(ERROR) << "PathService::Get failed.";
return false;
diff --git a/ui/gl/gl_implementation_mac.cc b/ui/gl/gl_implementation_mac.cc
index 0b22e43..590a14b 100644
--- a/ui/gl/gl_implementation_mac.cc
+++ b/ui/gl/gl_implementation_mac.cc
@@ -43,18 +43,18 @@ bool InitializeGLBindings(GLImplementation implementation) {
case kGLImplementationOSMesaGL: {
// osmesa.so is located in the build directory. This code path is only
// valid in a developer build environment.
- FilePath exe_path;
+ base::FilePath exe_path;
if (!PathService::Get(base::FILE_EXE, &exe_path)) {
LOG(ERROR) << "PathService::Get failed.";
return false;
}
- FilePath bundle_path = base::mac::GetAppBundlePath(exe_path);
+ base::FilePath bundle_path = base::mac::GetAppBundlePath(exe_path);
// Some unit test targets depend on osmesa but aren't built as app
// bundles. In that case, the .so is next to the executable.
if (bundle_path.empty())
bundle_path = exe_path;
- FilePath build_dir_path = bundle_path.DirName();
- FilePath osmesa_path = build_dir_path.Append("osmesa.so");
+ base::FilePath build_dir_path = bundle_path.DirName();
+ base::FilePath osmesa_path = build_dir_path.Append("osmesa.so");
// When using OSMesa, just use OSMesaGetProcAddress to find entry points.
base::NativeLibrary library = base::LoadNativeLibrary(osmesa_path, NULL);
@@ -84,7 +84,7 @@ bool InitializeGLBindings(GLImplementation implementation) {
case kGLImplementationDesktopGL:
case kGLImplementationAppleGL: {
base::NativeLibrary library = base::LoadNativeLibrary(
- FilePath(kOpenGLFrameworkPath), NULL);
+ base::FilePath(kOpenGLFrameworkPath), NULL);
if (!library) {
LOG(ERROR) << "OpenGL framework not found";
return false;
diff --git a/ui/gl/gl_implementation_win.cc b/ui/gl/gl_implementation_win.cc
index fa442b7..22fcd77 100644
--- a/ui/gl/gl_implementation_win.cc
+++ b/ui/gl/gl_implementation_win.cc
@@ -44,9 +44,10 @@ void GL_BINDING_CALL MarshalDepthRangeToDepthRangef(GLclampd z_near,
glDepthRangef(static_cast<GLclampf>(z_near), static_cast<GLclampf>(z_far));
}
-bool LoadD3DXLibrary(const FilePath& module_path,
- const FilePath::StringType& name) {
- base::NativeLibrary library = base::LoadNativeLibrary(FilePath(name), NULL);
+bool LoadD3DXLibrary(const base::FilePath& module_path,
+ const base::FilePath::StringType& name) {
+ base::NativeLibrary library =
+ base::LoadNativeLibrary(base::FilePath(name), NULL);
if (!library) {
library = base::LoadNativeLibrary(module_path.Append(name), NULL);
if (!library) {
@@ -80,7 +81,7 @@ bool InitializeGLBindings(GLImplementation implementation) {
switch (implementation) {
case kGLImplementationOSMesaGL: {
- FilePath module_path;
+ base::FilePath module_path;
if (!PathService::Get(base::DIR_MODULE, &module_path)) {
LOG(ERROR) << "PathService::Get failed.";
return false;
@@ -112,7 +113,7 @@ bool InitializeGLBindings(GLImplementation implementation) {
break;
}
case kGLImplementationEGLGLES2: {
- FilePath module_path;
+ base::FilePath module_path;
if (!PathService::Get(base::DIR_MODULE, &module_path))
return false;
@@ -125,7 +126,7 @@ bool InitializeGLBindings(GLImplementation implementation) {
LoadD3DXLibrary(module_path, kPreVistaD3DCompiler);
}
- FilePath gles_path;
+ base::FilePath gles_path;
const CommandLine* command_line = CommandLine::ForCurrentProcess();
bool using_swift_shader =
command_line->GetSwitchValueASCII(switches::kUseGL) == "swiftshader";
@@ -195,7 +196,7 @@ bool InitializeGLBindings(GLImplementation implementation) {
// When using Windows OpenGL, first try wglGetProcAddress and then
// Windows GetProcAddress.
base::NativeLibrary library = base::LoadNativeLibrary(
- FilePath(L"opengl32.dll"), NULL);
+ base::FilePath(L"opengl32.dll"), NULL);
if (!library) {
DVLOG(1) << "opengl32.dll not found";
return false;
diff --git a/ui/metro_viewer/metro_viewer_messages.h b/ui/metro_viewer/metro_viewer_messages.h
index ec625f0..fd2c5a6 100644
--- a/ui/metro_viewer/metro_viewer_messages.h
+++ b/ui/metro_viewer/metro_viewer_messages.h
@@ -80,7 +80,7 @@ IPC_MESSAGE_CONTROL2(MetroViewerHostMsg_FileOpenDone,
IPC_MESSAGE_CONTROL2(MetroViewerHostMsg_MultiFileOpenDone,
bool, /* success */
- std::vector<FilePath>) /* filenames */
+ std::vector<base::FilePath>) /* filenames */
// Messages sent from the browser to the viewer:
diff --git a/ui/shell_dialogs/gtk/select_file_dialog_impl.cc b/ui/shell_dialogs/gtk/select_file_dialog_impl.cc
index d560af9..05f5113 100644
--- a/ui/shell_dialogs/gtk/select_file_dialog_impl.cc
+++ b/ui/shell_dialogs/gtk/select_file_dialog_impl.cc
@@ -68,8 +68,8 @@ SelectFileDialogImpl::SelectFileDialogImpl(Listener* listener,
file_type_index_(0),
type_(SELECT_NONE) {
if (!last_saved_path_) {
- last_saved_path_ = new FilePath();
- last_opened_path_ = new FilePath();
+ last_saved_path_ = new base::FilePath();
+ last_opened_path_ = new base::FilePath();
}
}
@@ -83,7 +83,8 @@ bool SelectFileDialogImpl::IsRunning(gfx::NativeWindow parent_window) const {
return parents_.find(parent_window) != parents_.end();
}
-bool SelectFileDialogImpl::CallDirectoryExistsOnUIThread(const FilePath& path) {
+bool SelectFileDialogImpl::CallDirectoryExistsOnUIThread(
+ const base::FilePath& path) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
return file_util::DirectoryExists(path);
}
diff --git a/ui/shell_dialogs/gtk/select_file_dialog_impl.h b/ui/shell_dialogs/gtk/select_file_dialog_impl.h
index c575e33..b0206e0 100644
--- a/ui/shell_dialogs/gtk/select_file_dialog_impl.h
+++ b/ui/shell_dialogs/gtk/select_file_dialog_impl.h
@@ -43,20 +43,21 @@ class SelectFileDialogImpl : public SelectFileDialog {
// SelectFileDialog implementation.
// |params| is user data we pass back via the Listener interface.
- virtual void SelectFileImpl(Type type,
- const string16& title,
- const FilePath& default_path,
- const FileTypeInfo* file_types,
- int file_type_index,
- const FilePath::StringType& default_extension,
- gfx::NativeWindow owning_window,
- void* params) = 0;
+ virtual void SelectFileImpl(
+ Type type,
+ const string16& title,
+ const base::FilePath& default_path,
+ const FileTypeInfo* file_types,
+ int file_type_index,
+ const base::FilePath::StringType& default_extension,
+ gfx::NativeWindow owning_window,
+ void* params) = 0;
// Wrapper for file_util::DirectoryExists() that allow access on the UI
// thread. Use this only in the file dialog functions, where it's ok
// because the file dialog has to do many stats anyway. One more won't
// hurt too badly and it's likely already cached.
- bool CallDirectoryExistsOnUIThread(const FilePath& path);
+ bool CallDirectoryExistsOnUIThread(const base::FilePath& path);
// The file filters.
FileTypeInfo file_types_;
@@ -73,8 +74,8 @@ class SelectFileDialogImpl : public SelectFileDialog {
// These two variables track where the user last saved a file or opened a
// file so that we can display future dialogs with the same starting path.
- static FilePath* last_saved_path_;
- static FilePath* last_opened_path_;
+ static base::FilePath* last_saved_path_;
+ static base::FilePath* last_opened_path_;
DISALLOW_COPY_AND_ASSIGN(SelectFileDialogImpl);
};
diff --git a/ui/shell_dialogs/gtk/select_file_dialog_impl_gtk.cc b/ui/shell_dialogs/gtk/select_file_dialog_impl_gtk.cc
index 7175a50..f22c06b 100644
--- a/ui/shell_dialogs/gtk/select_file_dialog_impl_gtk.cc
+++ b/ui/shell_dialogs/gtk/select_file_dialog_impl_gtk.cc
@@ -47,14 +47,15 @@ class SelectFileDialogImplGTK : public ui::SelectFileDialogImpl {
// SelectFileDialog implementation.
// |params| is user data we pass back via the Listener interface.
- virtual void SelectFileImpl(Type type,
- const string16& title,
- const FilePath& default_path,
- const FileTypeInfo* file_types,
- int file_type_index,
- const FilePath::StringType& default_extension,
- gfx::NativeWindow owning_window,
- void* params) OVERRIDE;
+ virtual void SelectFileImpl(
+ Type type,
+ const string16& title,
+ const base::FilePath& default_path,
+ const FileTypeInfo* file_types,
+ int file_type_index,
+ const base::FilePath::StringType& default_extension,
+ gfx::NativeWindow owning_window,
+ void* params) OVERRIDE;
private:
virtual bool HasMultipleFileTypeChoicesImpl() OVERRIDE;
@@ -63,11 +64,11 @@ class SelectFileDialogImplGTK : public ui::SelectFileDialogImpl {
void AddFilters(GtkFileChooser* chooser);
// Notifies the listener that a single file was chosen.
- void FileSelected(GtkWidget* dialog, const FilePath& path);
+ void FileSelected(GtkWidget* dialog, const base::FilePath& path);
// Notifies the listener that multiple files were chosen.
void MultiFilesSelected(GtkWidget* dialog,
- const std::vector<FilePath>& files);
+ const std::vector<base::FilePath>& files);
// Notifies the listener that no file was chosen (the action was canceled).
// Dialog is passed so we can find that |params| pointer that was passed to
@@ -75,16 +76,16 @@ class SelectFileDialogImplGTK : public ui::SelectFileDialogImpl {
void FileNotSelected(GtkWidget* dialog);
GtkWidget* CreateSelectFolderDialog(const std::string& title,
- const FilePath& default_path, gfx::NativeWindow parent);
+ const base::FilePath& default_path, gfx::NativeWindow parent);
GtkWidget* CreateFileOpenDialog(const std::string& title,
- const FilePath& default_path, gfx::NativeWindow parent);
+ const base::FilePath& default_path, gfx::NativeWindow parent);
GtkWidget* CreateMultiFileOpenDialog(const std::string& title,
- const FilePath& default_path, gfx::NativeWindow parent);
+ const base::FilePath& default_path, gfx::NativeWindow parent);
GtkWidget* CreateSaveAsDialog(const std::string& title,
- const FilePath& default_path, gfx::NativeWindow parent);
+ const base::FilePath& default_path, gfx::NativeWindow parent);
// Removes and returns the |params| associated with |dialog| from
// |params_map_|.
@@ -105,7 +106,7 @@ class SelectFileDialogImplGTK : public ui::SelectFileDialogImpl {
// Common function for CreateFileOpenDialog and CreateMultiFileOpenDialog.
GtkWidget* CreateFileOpenHelper(const std::string& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
gfx::NativeWindow parent);
// Callback for when the user responds to a Save As or Open File dialog.
@@ -166,10 +167,10 @@ bool SelectFileDialogImplGTK::HasMultipleFileTypeChoicesImpl() {
void SelectFileDialogImplGTK::SelectFileImpl(
Type type,
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const FileTypeInfo* file_types,
int file_type_index,
- const FilePath::StringType& default_extension,
+ const base::FilePath::StringType& default_extension,
gfx::NativeWindow owning_window,
void* params) {
type_ = type;
@@ -285,7 +286,7 @@ void SelectFileDialogImplGTK::AddFilters(GtkFileChooser* chooser) {
}
void SelectFileDialogImplGTK::FileSelected(GtkWidget* dialog,
- const FilePath& path) {
+ const base::FilePath& path) {
if (type_ == SELECT_SAVEAS_FILE)
*last_saved_path_ = path.DirName();
else if (type_ == SELECT_OPEN_FILE || type_ == SELECT_FOLDER)
@@ -305,7 +306,7 @@ void SelectFileDialogImplGTK::FileSelected(GtkWidget* dialog,
}
void SelectFileDialogImplGTK::MultiFilesSelected(GtkWidget* dialog,
- const std::vector<FilePath>& files) {
+ const std::vector<base::FilePath>& files) {
*last_opened_path_ = files[0].DirName();
if (listener_)
@@ -322,7 +323,7 @@ void SelectFileDialogImplGTK::FileNotSelected(GtkWidget* dialog) {
GtkWidget* SelectFileDialogImplGTK::CreateFileOpenHelper(
const std::string& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
gfx::NativeWindow parent) {
GtkWidget* dialog =
gtk_file_chooser_dialog_new(title.c_str(), parent,
@@ -351,7 +352,7 @@ GtkWidget* SelectFileDialogImplGTK::CreateFileOpenHelper(
GtkWidget* SelectFileDialogImplGTK::CreateSelectFolderDialog(
const std::string& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
gfx::NativeWindow parent) {
std::string title_string = !title.empty() ? title :
l10n_util::GetStringUTF8(IDS_SELECT_FOLDER_DIALOG_TITLE);
@@ -378,7 +379,7 @@ GtkWidget* SelectFileDialogImplGTK::CreateSelectFolderDialog(
GtkWidget* SelectFileDialogImplGTK::CreateFileOpenDialog(
const std::string& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
gfx::NativeWindow parent) {
std::string title_string = !title.empty() ? title :
l10n_util::GetStringUTF8(IDS_OPEN_FILE_DIALOG_TITLE);
@@ -392,7 +393,7 @@ GtkWidget* SelectFileDialogImplGTK::CreateFileOpenDialog(
GtkWidget* SelectFileDialogImplGTK::CreateMultiFileOpenDialog(
const std::string& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
gfx::NativeWindow parent) {
std::string title_string = !title.empty() ? title :
l10n_util::GetStringUTF8(IDS_OPEN_FILES_DIALOG_TITLE);
@@ -405,7 +406,7 @@ GtkWidget* SelectFileDialogImplGTK::CreateMultiFileOpenDialog(
}
GtkWidget* SelectFileDialogImplGTK::CreateSaveAsDialog(const std::string& title,
- const FilePath& default_path, gfx::NativeWindow parent) {
+ const base::FilePath& default_path, gfx::NativeWindow parent) {
std::string title_string = !title.empty() ? title :
l10n_util::GetStringUTF8(IDS_SAVE_AS_DIALOG_TITLE);
@@ -493,7 +494,7 @@ void SelectFileDialogImplGTK::SelectSingleFileHelper(GtkWidget* dialog,
return;
}
- FilePath path(filename);
+ base::FilePath path(filename);
g_free(filename);
if (allow_folder) {
@@ -530,9 +531,9 @@ void SelectFileDialogImplGTK::OnSelectMultiFileDialogResponse(GtkWidget* dialog,
return;
}
- std::vector<FilePath> filenames_fp;
+ std::vector<base::FilePath> filenames_fp;
for (GSList* iter = filenames; iter != NULL; iter = g_slist_next(iter)) {
- FilePath path(static_cast<char*>(iter->data));
+ base::FilePath path(static_cast<char*>(iter->data));
g_free(iter->data);
if (CallDirectoryExistsOnUIThread(path))
continue;
diff --git a/ui/shell_dialogs/gtk/select_file_dialog_impl_kde.cc b/ui/shell_dialogs/gtk/select_file_dialog_impl_kde.cc
index 6e8d24f..b5d4fe0 100644
--- a/ui/shell_dialogs/gtk/select_file_dialog_impl_kde.cc
+++ b/ui/shell_dialogs/gtk/select_file_dialog_impl_kde.cc
@@ -47,14 +47,15 @@ class SelectFileDialogImplKDE : public ui::SelectFileDialogImpl {
// SelectFileDialog implementation.
// |params| is user data we pass back via the Listener interface.
- virtual void SelectFileImpl(Type type,
- const string16& title,
- const FilePath& default_path,
- const FileTypeInfo* file_types,
- int file_type_index,
- const FilePath::StringType& default_extension,
- gfx::NativeWindow owning_window,
- void* params) OVERRIDE;
+ virtual void SelectFileImpl(
+ Type type,
+ const string16& title,
+ const base::FilePath& default_path,
+ const FileTypeInfo* file_types,
+ int file_type_index,
+ const base::FilePath::StringType& default_extension,
+ gfx::NativeWindow owning_window,
+ void* params) OVERRIDE;
private:
virtual bool HasMultipleFileTypeChoicesImpl() OVERRIDE;
@@ -62,7 +63,7 @@ class SelectFileDialogImplKDE : public ui::SelectFileDialogImpl {
struct KDialogParams {
// This constructor can only be run from the UI thread.
KDialogParams(const std::string& type, const std::string& title,
- const FilePath& default_path, gfx::NativeWindow parent,
+ const base::FilePath& default_path, gfx::NativeWindow parent,
bool file_operation, bool multiple_selection,
void* kdialog_params,
void (SelectFileDialogImplKDE::*callback)(const std::string&,
@@ -77,7 +78,7 @@ class SelectFileDialogImplKDE : public ui::SelectFileDialogImpl {
std::string type;
std::string title;
- FilePath default_path;
+ base::FilePath default_path;
gfx::NativeWindow parent;
bool file_operation;
bool multiple_selection;
@@ -93,7 +94,7 @@ class SelectFileDialogImplKDE : public ui::SelectFileDialogImpl {
// Get KDialog command line representing the Argv array for KDialog.
void GetKDialogCommandLine(const std::string& type, const std::string& title,
- const FilePath& default_path, gfx::NativeWindow parent,
+ const base::FilePath& default_path, gfx::NativeWindow parent,
bool file_operation, bool multiple_selection, CommandLine* command_line);
// Call KDialog on a worker thread and post results back to the caller
@@ -101,10 +102,11 @@ class SelectFileDialogImplKDE : public ui::SelectFileDialogImpl {
void CallKDialogOutput(const KDialogParams& params);
// Notifies the listener that a single file was chosen.
- void FileSelected(const FilePath& path, void* params);
+ void FileSelected(const base::FilePath& path, void* params);
// Notifies the listener that multiple files were chosen.
- void MultiFilesSelected(const std::vector<FilePath>& files, void* params);
+ void MultiFilesSelected(const std::vector<base::FilePath>& files,
+ void* params);
// Notifies the listener that no file was chosen (the action was canceled).
// Dialog is passed so we can find that |params| pointer that was passed to
@@ -112,19 +114,19 @@ class SelectFileDialogImplKDE : public ui::SelectFileDialogImpl {
void FileNotSelected(void *params);
void CreateSelectFolderDialog(const std::string& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
gfx::NativeWindow parent, void* params);
void CreateFileOpenDialog(const std::string& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
gfx::NativeWindow parent, void* params);
void CreateMultiFileOpenDialog(const std::string& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
gfx::NativeWindow parent, void* params);
void CreateSaveAsDialog(const std::string& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
gfx::NativeWindow parent, void* params);
// Common function for OnSelectSingleFileDialogResponse and
@@ -162,10 +164,10 @@ SelectFileDialogImplKDE::~SelectFileDialogImplKDE() {
void SelectFileDialogImplKDE::SelectFileImpl(
Type type,
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const FileTypeInfo* file_types,
int file_type_index,
- const FilePath::StringType& default_extension,
+ const base::FilePath::StringType& default_extension,
gfx::NativeWindow owning_window,
void* params) {
type_ = type;
@@ -218,7 +220,8 @@ std::string SelectFileDialogImplKDE::GetMimeTypeFilterString() {
for (size_t j = 0; j < file_types_.extensions[i].size(); ++j) {
if (!file_types_.extensions[i][j].empty()) {
std::string mime_type = base::nix::GetFileMimeType(
- FilePath("name").ReplaceExtension(file_types_.extensions[i][j]));
+ base::FilePath("name").ReplaceExtension(
+ file_types_.extensions[i][j]));
filter_set.insert(mime_type);
}
}
@@ -260,7 +263,7 @@ void SelectFileDialogImplKDE::CallKDialogOutput(const KDialogParams& params) {
}
void SelectFileDialogImplKDE::GetKDialogCommandLine(const std::string& type,
- const std::string& title, const FilePath& path,
+ const std::string& title, const base::FilePath& path,
gfx::NativeWindow parent, bool file_operation, bool multiple_selection,
CommandLine* command_line) {
CHECK(command_line);
@@ -282,7 +285,7 @@ void SelectFileDialogImplKDE::GetKDialogCommandLine(const std::string& type,
command_line->AppendSwitch(type);
// The path should never be empty. If it is, set it to PWD.
if (path.empty())
- command_line->AppendArgPath(FilePath("."));
+ command_line->AppendArgPath(base::FilePath("."));
else
command_line->AppendArgPath(path);
// Depending on the type of the operation we need, get the path to the
@@ -292,7 +295,8 @@ void SelectFileDialogImplKDE::GetKDialogCommandLine(const std::string& type,
VLOG(1) << "KDialog command line: " << command_line->GetCommandLineString();
}
-void SelectFileDialogImplKDE::FileSelected(const FilePath& path, void* params) {
+void SelectFileDialogImplKDE::FileSelected(const base::FilePath& path,
+ void* params) {
if (type_ == SELECT_SAVEAS_FILE)
*last_saved_path_ = path.DirName();
else if (type_ == SELECT_OPEN_FILE)
@@ -308,7 +312,7 @@ void SelectFileDialogImplKDE::FileSelected(const FilePath& path, void* params) {
}
void SelectFileDialogImplKDE::MultiFilesSelected(
- const std::vector<FilePath>& files, void* params) {
+ const std::vector<base::FilePath>& files, void* params) {
*last_opened_path_ = files[0].DirName();
if (listener_)
listener_->MultiFilesSelected(files, params);
@@ -320,7 +324,7 @@ void SelectFileDialogImplKDE::FileNotSelected(void* params) {
}
void SelectFileDialogImplKDE::CreateSelectFolderDialog(
- const std::string& title, const FilePath& default_path,
+ const std::string& title, const base::FilePath& default_path,
gfx::NativeWindow parent, void *params) {
base::WorkerPool::PostTask(FROM_HERE,
base::Bind(
@@ -336,7 +340,7 @@ void SelectFileDialogImplKDE::CreateSelectFolderDialog(
}
void SelectFileDialogImplKDE::CreateFileOpenDialog(
- const std::string& title, const FilePath& default_path,
+ const std::string& title, const base::FilePath& default_path,
gfx::NativeWindow parent, void* params) {
base::WorkerPool::PostTask(FROM_HERE,
base::Bind(
@@ -352,7 +356,7 @@ void SelectFileDialogImplKDE::CreateFileOpenDialog(
}
void SelectFileDialogImplKDE::CreateMultiFileOpenDialog(
- const std::string& title, const FilePath& default_path,
+ const std::string& title, const base::FilePath& default_path,
gfx::NativeWindow parent, void* params) {
base::WorkerPool::PostTask(FROM_HERE,
base::Bind(
@@ -368,7 +372,7 @@ void SelectFileDialogImplKDE::CreateMultiFileOpenDialog(
}
void SelectFileDialogImplKDE::CreateSaveAsDialog(
- const std::string& title, const FilePath& default_path,
+ const std::string& title, const base::FilePath& default_path,
gfx::NativeWindow parent, void* params) {
base::WorkerPool::PostTask(FROM_HERE,
base::Bind(
@@ -391,7 +395,7 @@ void SelectFileDialogImplKDE::SelectSingleFileHelper(const std::string& output,
return;
}
- FilePath path(output);
+ base::FilePath path(output);
if (allow_folder) {
FileSelected(path, params);
return;
@@ -424,10 +428,10 @@ void SelectFileDialogImplKDE::OnSelectMultiFileDialogResponse(
std::vector<std::string> filenames;
Tokenize(output, "\n", &filenames);
- std::vector<FilePath> filenames_fp;
+ std::vector<base::FilePath> filenames_fp;
for (std::vector<std::string>::iterator iter = filenames.begin();
iter != filenames.end(); ++iter) {
- FilePath path(*iter);
+ base::FilePath path(*iter);
if (CallDirectoryExistsOnUIThread(path))
continue;
filenames_fp.push_back(path);
diff --git a/ui/shell_dialogs/select_file_dialog.cc b/ui/shell_dialogs/select_file_dialog.cc
index 5423329..9f440f9 100644
--- a/ui/shell_dialogs/select_file_dialog.cc
+++ b/ui/shell_dialogs/select_file_dialog.cc
@@ -55,7 +55,7 @@ void SelectFileDialog::Listener::FileSelectedWithExtraInfo(
void SelectFileDialog::Listener::MultiFilesSelectedWithExtraInfo(
const std::vector<ui::SelectedFileInfo>& files,
void* params) {
- std::vector<FilePath> file_paths;
+ std::vector<base::FilePath> file_paths;
for (size_t i = 0; i < files.size(); ++i)
file_paths.push_back(files[i].local_path);
@@ -99,14 +99,15 @@ SelectFileDialog* SelectFileDialog::Create(Listener* listener,
return NULL;
}
-void SelectFileDialog::SelectFile(Type type,
- const string16& title,
- const FilePath& default_path,
- const FileTypeInfo* file_types,
- int file_type_index,
- const FilePath::StringType& default_extension,
- gfx::NativeWindow owning_window,
- void* params) {
+void SelectFileDialog::SelectFile(
+ Type type,
+ const string16& title,
+ const base::FilePath& default_path,
+ const FileTypeInfo* file_types,
+ int file_type_index,
+ const base::FilePath::StringType& default_extension,
+ gfx::NativeWindow owning_window,
+ void* params) {
DCHECK(listener_);
if (select_file_policy_.get() &&
diff --git a/ui/shell_dialogs/select_file_dialog.h b/ui/shell_dialogs/select_file_dialog.h
index 8500150..986b097 100644
--- a/ui/shell_dialogs/select_file_dialog.h
+++ b/ui/shell_dialogs/select_file_dialog.h
@@ -47,11 +47,11 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
// file/folder path is in |path|. |params| is contextual passed to
// SelectFile. |index| specifies the index of the filter passed to the
// the initial call to SelectFile.
- virtual void FileSelected(const FilePath& path,
+ virtual void FileSelected(const base::FilePath& path,
int index, void* params) = 0;
// Similar to FileSelected() but takes SelectedFileInfo instead of
- // FilePath. Used for passing extra information (ex. display name).
+ // base::FilePath. Used for passing extra information (ex. display name).
//
// If not overridden, calls FileSelected() with path from |file|.
virtual void FileSelectedWithExtraInfo(
@@ -62,10 +62,10 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
// Notifies the Listener that many files have been selected. The
// files are in |files|. |params| is contextual passed to SelectFile.
virtual void MultiFilesSelected(
- const std::vector<FilePath>& files, void* params) {}
+ const std::vector<base::FilePath>& files, void* params) {}
// Similar to MultiFilesSelected() but takes SelectedFileInfo instead of
- // FilePath. Used for passing extra information (ex. display name).
+ // base::FilePath. Used for passing extra information (ex. display name).
//
// If not overridden, calls MultiFilesSelected() with paths from |files|.
virtual void MultiFilesSelectedWithExtraInfo(
@@ -106,7 +106,7 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
//
// Only pass more than one extension in the inner vector if the extensions
// are equivalent. Do NOT include leading periods.
- std::vector<std::vector<FilePath::StringType> > extensions;
+ std::vector<std::vector<base::FilePath::StringType> > extensions;
// Overrides the system descriptions of the specified extensions. Entries
// correspond to |extensions|; if left blank the system descriptions will
@@ -149,10 +149,10 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
// at a time (for obvious reasons).
void SelectFile(Type type,
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const FileTypeInfo* file_types,
int file_type_index,
- const FilePath::StringType& default_extension,
+ const base::FilePath::StringType& default_extension,
gfx::NativeWindow owning_window,
void* params);
bool HasMultipleFileTypeChoices();
@@ -170,14 +170,15 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
// This is overridden in the platform-specific descendants of FileSelectDialog
// and gets called from SelectFile after testing the
// AllowFileSelectionDialogs-Policy.
- virtual void SelectFileImpl(Type type,
- const string16& title,
- const FilePath& default_path,
- const FileTypeInfo* file_types,
- int file_type_index,
- const FilePath::StringType& default_extension,
- gfx::NativeWindow owning_window,
- void* params) = 0;
+ virtual void SelectFileImpl(
+ Type type,
+ const string16& title,
+ const base::FilePath& default_path,
+ const FileTypeInfo* file_types,
+ int file_type_index,
+ const base::FilePath::StringType& default_extension,
+ gfx::NativeWindow owning_window,
+ void* params) = 0;
// Returns the global ShellDialogsDelegate instance if any.
ShellDialogsDelegate* GetShellDialogsDelegate();
diff --git a/ui/shell_dialogs/select_file_dialog_android.cc b/ui/shell_dialogs/select_file_dialog_android.cc
index 993eb58..d46e37e 100644
--- a/ui/shell_dialogs/select_file_dialog_android.cc
+++ b/ui/shell_dialogs/select_file_dialog_android.cc
@@ -28,7 +28,7 @@ void SelectFileDialogImpl::OnFileSelected(JNIEnv* env,
jstring filepath) {
if (listener_) {
std::string path = base::android::ConvertJavaStringToUTF8(env, filepath);
- listener_->FileSelected(FilePath(path), 0, NULL);
+ listener_->FileSelected(base::FilePath(path), 0, NULL);
}
is_running_ = false;
@@ -54,7 +54,7 @@ void SelectFileDialogImpl::ListenerDestroyed() {
void SelectFileDialogImpl::SelectFileImpl(
ui::SelectFileDialog::Type type,
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const SelectFileDialog::FileTypeInfo* file_types,
int file_type_index,
const std::string& default_extension,
diff --git a/ui/shell_dialogs/select_file_dialog_android.h b/ui/shell_dialogs/select_file_dialog_android.h
index b900cdc..1fb89af 100644
--- a/ui/shell_dialogs/select_file_dialog_android.h
+++ b/ui/shell_dialogs/select_file_dialog_android.h
@@ -32,7 +32,7 @@ class SelectFileDialogImpl : public ui::SelectFileDialog {
virtual void SelectFileImpl(
ui::SelectFileDialog::Type type,
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const ui::SelectFileDialog::FileTypeInfo* file_types,
int file_type_index,
const std::string& default_extension,
diff --git a/ui/shell_dialogs/select_file_dialog_mac.mm b/ui/shell_dialogs/select_file_dialog_mac.mm
index 14062c4..6a0e838 100644
--- a/ui/shell_dialogs/select_file_dialog_mac.mm
+++ b/ui/shell_dialogs/select_file_dialog_mac.mm
@@ -28,7 +28,7 @@ namespace {
const int kFileTypePopupTag = 1234;
-CFStringRef CreateUTIFromExtension(const FilePath::StringType& ext) {
+CFStringRef CreateUTIFromExtension(const base::FilePath::StringType& ext) {
base::mac::ScopedCFTypeRef<CFStringRef> ext_cf(
base::SysUTF8ToCFStringRef(ext));
return UTTypeCreatePreferredIdentifierForTag(
@@ -73,7 +73,7 @@ class SelectFileDialogImpl : public ui::SelectFileDialog {
NSWindow* parent_window,
bool was_cancelled,
bool is_multi,
- const std::vector<FilePath>& files,
+ const std::vector<base::FilePath>& files,
int index);
bool ShouldEnableFilename(NSSavePanel* dialog, NSString* filename);
@@ -81,14 +81,15 @@ class SelectFileDialogImpl : public ui::SelectFileDialog {
protected:
// SelectFileDialog implementation.
// |params| is user data we pass back via the Listener interface.
- virtual void SelectFileImpl(Type type,
- const string16& title,
- const FilePath& default_path,
- const FileTypeInfo* file_types,
- int file_type_index,
- const FilePath::StringType& default_extension,
- gfx::NativeWindow owning_window,
- void* params) OVERRIDE;
+ virtual void SelectFileImpl(
+ Type type,
+ const string16& title,
+ const base::FilePath& default_path,
+ const FileTypeInfo* file_types,
+ int file_type_index,
+ const base::FilePath::StringType& default_extension,
+ gfx::NativeWindow owning_window,
+ void* params) OVERRIDE;
private:
virtual ~SelectFileDialogImpl();
@@ -131,12 +132,13 @@ void SelectFileDialogImpl::ListenerDestroyed() {
listener_ = NULL;
}
-void SelectFileDialogImpl::FileWasSelected(NSSavePanel* dialog,
- NSWindow* parent_window,
- bool was_cancelled,
- bool is_multi,
- const std::vector<FilePath>& files,
- int index) {
+void SelectFileDialogImpl::FileWasSelected(
+ NSSavePanel* dialog,
+ NSWindow* parent_window,
+ bool was_cancelled,
+ bool is_multi,
+ const std::vector<base::FilePath>& files,
+ int index) {
void* params = params_map_[dialog];
params_map_.erase(dialog);
parents_.erase(parent_window);
@@ -170,10 +172,10 @@ bool SelectFileDialogImpl::ShouldEnableFilename(NSSavePanel* dialog,
void SelectFileDialogImpl::SelectFileImpl(
Type type,
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const FileTypeInfo* file_types,
int file_type_index,
- const FilePath::StringType& default_extension,
+ const base::FilePath::StringType& default_extension,
gfx::NativeWindow owning_window,
void* params) {
DCHECK(type == SELECT_FOLDER ||
@@ -221,7 +223,7 @@ void SelectFileDialogImpl::SelectFileImpl(
// specified extensions.
NSMutableSet* file_type_set = [NSMutableSet set];
for (size_t i = 0; i < file_types->extensions.size(); ++i) {
- const std::vector<FilePath::StringType>& ext_list =
+ const std::vector<base::FilePath::StringType>& ext_list =
file_types->extensions[i];
for (size_t j = 0; j < ext_list.size(); ++j) {
base::mac::ScopedCFTypeRef<CFStringRef> uti(
@@ -335,7 +337,7 @@ NSView* SelectFileDialogImpl::GetAccessoryView(const FileTypeInfo* file_types,
} else {
// No description given for a list of extensions; pick the first one from
// the list (arbitrarily) and use its description.
- const std::vector<FilePath::StringType>& ext_list =
+ const std::vector<base::FilePath::StringType>& ext_list =
file_types->extensions[type];
DCHECK(!ext_list.empty());
base::mac::ScopedCFTypeRef<CFStringRef> uti(
@@ -372,11 +374,13 @@ bool SelectFileDialogImpl::HasMultipleFileTypeChoicesImpl() {
type:(ui::SelectFileDialog::Type)type
parentWindow:(NSWindow*)parentWindow {
int index = 0;
- std::vector<FilePath> paths;
+ std::vector<base::FilePath> paths;
if (!did_cancel) {
if (type == ui::SelectFileDialog::SELECT_SAVEAS_FILE) {
- if ([[panel URL] isFileURL])
- paths.push_back(FilePath(base::SysNSStringToUTF8([[panel URL] path])));
+ if ([[panel URL] isFileURL]) {
+ paths.push_back(base::FilePath(
+ base::SysNSStringToUTF8([[panel URL] path])));
+ }
NSView* accessoryView = [panel accessoryView];
if (accessoryView) {
@@ -393,7 +397,7 @@ bool SelectFileDialogImpl::HasMultipleFileTypeChoicesImpl() {
NSArray* urls = [static_cast<NSOpenPanel*>(panel) URLs];
for (NSURL* url in urls)
if ([url isFileURL])
- paths.push_back(FilePath(base::SysNSStringToUTF8([url path])));
+ paths.push_back(base::FilePath(base::SysNSStringToUTF8([url path])));
}
}
diff --git a/ui/shell_dialogs/select_file_dialog_win.cc b/ui/shell_dialogs/select_file_dialog_win.cc
index 2ee4c0e..35f03b9 100644
--- a/ui/shell_dialogs/select_file_dialog_win.cc
+++ b/ui/shell_dialogs/select_file_dialog_win.cc
@@ -83,7 +83,7 @@ bool CallGetSaveFileName(OPENFILENAME* ofn) {
}
// Distinguish directories from regular files.
-bool IsDirectory(const FilePath& path) {
+bool IsDirectory(const base::FilePath& path) {
base::PlatformFileInfo file_info;
return file_util::GetFileInfo(path, &file_info) ?
file_info.is_directory : file_util::EndsWithSeparator(path);
@@ -266,7 +266,7 @@ bool SaveFileAsWithFilter(HWND owner,
// Having an empty filter makes for a bad user experience. We should always
// specify a filter when saving.
DCHECK(!filter.empty());
- const FilePath suggested_path(suggested_name);
+ const base::FilePath suggested_path(suggested_name);
std::wstring file_part = suggested_path.BaseName().value();
// If the suggested_name is a root directory, file_part will be '\', and the
// call to GetSaveFileName below will fail.
@@ -389,7 +389,8 @@ bool SaveFileAsWithFilter(HWND owner,
bool SaveFileAs(HWND owner,
const std::wstring& suggested_name,
std::wstring* final_name) {
- std::wstring file_ext = FilePath(suggested_name).Extension().insert(0, L"*");
+ std::wstring file_ext =
+ base::FilePath(suggested_name).Extension().insert(0, L"*");
std::wstring filter = FormatFilterForExtensions(
std::vector<std::wstring>(1, file_ext),
std::vector<std::wstring>(),
@@ -418,14 +419,15 @@ class SelectFileDialogImpl : public ui::SelectFileDialog,
protected:
// SelectFileDialog implementation:
- virtual void SelectFileImpl(Type type,
- const string16& title,
- const FilePath& default_path,
- const FileTypeInfo* file_types,
- int file_type_index,
- const FilePath::StringType& default_extension,
- gfx::NativeWindow owning_window,
- void* params) OVERRIDE;
+ virtual void SelectFileImpl(
+ Type type,
+ const string16& title,
+ const base::FilePath& default_path,
+ const FileTypeInfo* file_types,
+ int file_type_index,
+ const base::FilePath::StringType& default_extension,
+ gfx::NativeWindow owning_window,
+ void* params) OVERRIDE;
private:
virtual ~SelectFileDialogImpl();
@@ -434,7 +436,7 @@ class SelectFileDialogImpl : public ui::SelectFileDialog,
struct ExecuteSelectParams {
ExecuteSelectParams(Type type,
const std::wstring& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const FileTypeInfo* file_types,
int file_type_index,
const std::wstring& default_extension,
@@ -455,7 +457,7 @@ class SelectFileDialogImpl : public ui::SelectFileDialog,
}
SelectFileDialog::Type type;
std::wstring title;
- FilePath default_path;
+ base::FilePath default_path;
FileTypeInfo file_types;
int file_type_index;
std::wstring default_extension;
@@ -470,11 +472,12 @@ class SelectFileDialogImpl : public ui::SelectFileDialog,
void ExecuteSelectFile(const ExecuteSelectParams& params);
// Notifies the listener that a folder was chosen. Run on the ui thread.
- void FileSelected(const FilePath& path, int index,
+ void FileSelected(const base::FilePath& path, int index,
void* params, RunState run_state);
// Notifies listener that multiple files were chosen. Run on the ui thread.
- void MultiFilesSelected(const std::vector<FilePath>& paths, void* params,
+ void MultiFilesSelected(const std::vector<base::FilePath>& paths,
+ void* params,
RunState run_state);
// Notifies the listener that no file was chosen (the action was canceled).
@@ -488,21 +491,21 @@ class SelectFileDialogImpl : public ui::SelectFileDialog,
// dialog thread.
bool RunSelectFolderDialog(const std::wstring& title,
HWND owner,
- FilePath* path);
+ base::FilePath* path);
// Runs an Open file dialog box, with similar semantics for input paramaters
// as RunSelectFolderDialog.
bool RunOpenFileDialog(const std::wstring& title,
const std::wstring& filters,
HWND owner,
- FilePath* path);
+ base::FilePath* path);
// Runs an Open file dialog box that supports multi-select, with similar
// semantics for input paramaters as RunOpenFileDialog.
bool RunOpenMultiFileDialog(const std::wstring& title,
const std::wstring& filter,
HWND owner,
- std::vector<FilePath>* paths);
+ std::vector<base::FilePath>* paths);
// The callback function for when the select folder dialog is opened.
static int CALLBACK BrowseCallbackProc(HWND window, UINT message,
@@ -533,10 +536,10 @@ SelectFileDialogImpl::~SelectFileDialogImpl() {
void SelectFileDialogImpl::SelectFileImpl(
Type type,
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const FileTypeInfo* file_types,
int file_type_index,
- const FilePath::StringType& default_extension,
+ const base::FilePath::StringType& default_extension,
gfx::NativeWindow owning_window,
void* params) {
has_multiple_file_type_choices_ =
@@ -611,7 +614,7 @@ void SelectFileDialogImpl::ExecuteSelectFile(
const ExecuteSelectParams& params) {
string16 filter = GetFilterForFileTypes(params.file_types);
- FilePath path = params.default_path;
+ base::FilePath path = params.default_path;
bool success = false;
unsigned filter_index = params.file_type_index;
if (params.type == SELECT_FOLDER) {
@@ -624,13 +627,13 @@ void SelectFileDialogImpl::ExecuteSelectFile(
params.default_path.value(), filter,
params.default_extension, false, &filter_index, &path_as_wstring);
if (success)
- path = FilePath(path_as_wstring);
+ path = base::FilePath(path_as_wstring);
DisableOwner(params.run_state.owner);
} else if (params.type == SELECT_OPEN_FILE) {
success = RunOpenFileDialog(params.title, filter,
params.run_state.owner, &path);
} else if (params.type == SELECT_OPEN_MULTI_FILE) {
- std::vector<FilePath> paths;
+ std::vector<base::FilePath> paths;
if (RunOpenMultiFileDialog(params.title, filter,
params.run_state.owner, &paths)) {
params.ui_proxy->PostTask(
@@ -654,7 +657,7 @@ void SelectFileDialogImpl::ExecuteSelectFile(
}
}
-void SelectFileDialogImpl::FileSelected(const FilePath& selected_folder,
+void SelectFileDialogImpl::FileSelected(const base::FilePath& selected_folder,
int index,
void* params,
RunState run_state) {
@@ -664,7 +667,7 @@ void SelectFileDialogImpl::FileSelected(const FilePath& selected_folder,
}
void SelectFileDialogImpl::MultiFilesSelected(
- const std::vector<FilePath>& selected_files,
+ const std::vector<base::FilePath>& selected_files,
void* params,
RunState run_state) {
if (listener_)
@@ -692,7 +695,7 @@ int CALLBACK SelectFileDialogImpl::BrowseCallbackProc(HWND window,
bool SelectFileDialogImpl::RunSelectFolderDialog(const std::wstring& title,
HWND owner,
- FilePath* path) {
+ base::FilePath* path) {
DCHECK(path);
wchar_t dir_buffer[MAX_PATH + 1];
@@ -721,14 +724,14 @@ bool SelectFileDialogImpl::RunSelectFolderDialog(const std::wstring& title,
HRESULT hr = shell_folder->GetDisplayNameOf(list, SHGDN_FORPARSING,
&out_dir_buffer);
if (SUCCEEDED(hr) && out_dir_buffer.uType == STRRET_WSTR) {
- *path = FilePath(out_dir_buffer.pOleStr);
+ *path = base::FilePath(out_dir_buffer.pOleStr);
CoTaskMemFree(out_dir_buffer.pOleStr);
result = true;
} else {
// Use old way if we don't get what we want.
wchar_t old_out_dir_buffer[MAX_PATH + 1];
if (SHGetPathFromIDList(list, old_out_dir_buffer)) {
- *path = FilePath(old_out_dir_buffer);
+ *path = base::FilePath(old_out_dir_buffer);
result = true;
}
}
@@ -746,7 +749,7 @@ bool SelectFileDialogImpl::RunOpenFileDialog(
const std::wstring& title,
const std::wstring& filter,
HWND owner,
- FilePath* path) {
+ base::FilePath* path) {
OPENFILENAME ofn;
// We must do this otherwise the ofn's FlagsEx may be initialized to random
// junk in release builds which can cause the Places Bar not to show up!
@@ -761,7 +764,7 @@ bool SelectFileDialogImpl::RunOpenFileDialog(
// Define the dir in here to keep the string buffer pointer pointed to
// ofn.lpstrInitialDir available during the period of running the
// GetOpenFileName.
- FilePath dir;
+ base::FilePath dir;
// Use lpstrInitialDir to specify the initial directory
if (!path->empty()) {
if (IsDirectory(*path)) {
@@ -787,7 +790,7 @@ bool SelectFileDialogImpl::RunOpenFileDialog(
bool success = CallGetOpenFileName(&ofn);
DisableOwner(owner);
if (success)
- *path = FilePath(filename);
+ *path = base::FilePath(filename);
return success;
}
@@ -795,7 +798,7 @@ bool SelectFileDialogImpl::RunOpenMultiFileDialog(
const std::wstring& title,
const std::wstring& filter,
HWND owner,
- std::vector<FilePath>* paths) {
+ std::vector<base::FilePath>* paths) {
OPENFILENAME ofn;
// We must do this otherwise the ofn's FlagsEx may be initialized to random
// junk in release builds which can cause the Places Bar not to show up!
@@ -820,10 +823,10 @@ bool SelectFileDialogImpl::RunOpenMultiFileDialog(
bool success = CallGetOpenFileName(&ofn);
DisableOwner(owner);
if (success) {
- std::vector<FilePath> files;
+ std::vector<base::FilePath> files;
const wchar_t* selection = ofn.lpstrFile;
while (*selection) { // Empty string indicates end of list.
- files.push_back(FilePath(selection));
+ files.push_back(base::FilePath(selection));
// Skip over filename and null-terminator.
selection += files.back().value().length() + 1;
}
@@ -835,8 +838,8 @@ bool SelectFileDialogImpl::RunOpenMultiFileDialog(
} else {
// Otherwise, the first string is the path, and the remainder are
// filenames.
- std::vector<FilePath>::iterator path = files.begin();
- for (std::vector<FilePath>::iterator file = path + 1;
+ std::vector<base::FilePath>::iterator path = files.begin();
+ for (std::vector<base::FilePath>::iterator file = path + 1;
file != files.end(); ++file) {
paths->push_back(path->Append(*file));
}
@@ -892,7 +895,7 @@ std::wstring AppendExtensionIfNeeded(
// extensions with a known MIME type, which many "known" extensions on Windows
// don't have. So we check directly for the "known extension" registry key.
std::wstring file_extension(
- GetExtensionWithoutLeadingDot(FilePath(filename).Extension()));
+ GetExtensionWithoutLeadingDot(base::FilePath(filename).Extension()));
std::wstring key(L"." + file_extension);
if (!(filter_selected.empty() || filter_selected == L"*.*") &&
!base::win::RegKey(HKEY_CLASSES_ROOT, key.c_str(), KEY_READ).Valid() &&
diff --git a/ui/shell_dialogs/selected_file_info.cc b/ui/shell_dialogs/selected_file_info.cc
index 86e8397..8bc68ab 100644
--- a/ui/shell_dialogs/selected_file_info.cc
+++ b/ui/shell_dialogs/selected_file_info.cc
@@ -8,8 +8,8 @@ namespace ui {
SelectedFileInfo::SelectedFileInfo() {}
-SelectedFileInfo::SelectedFileInfo(const FilePath& in_file_path,
- const FilePath& in_local_path)
+SelectedFileInfo::SelectedFileInfo(const base::FilePath& in_file_path,
+ const base::FilePath& in_local_path)
: file_path(in_file_path),
local_path(in_local_path) {
if (local_path.empty())
diff --git a/ui/shell_dialogs/selected_file_info.h b/ui/shell_dialogs/selected_file_info.h
index 3ace821..57228ed 100644
--- a/ui/shell_dialogs/selected_file_info.h
+++ b/ui/shell_dialogs/selected_file_info.h
@@ -16,7 +16,7 @@ namespace ui {
// Struct used for passing selected file info to WebKit.
struct SHELL_DIALOGS_EXPORT SelectedFileInfo {
// Selected file's user friendly path as seen in the UI.
- FilePath file_path;
+ base::FilePath file_path;
// The actual local path to the selected file. This can be a snapshot file
// with a human unreadable name like /blah/.d41d8cd98f00b204e9800998ecf8427e.
@@ -24,17 +24,17 @@ struct SHELL_DIALOGS_EXPORT SelectedFileInfo {
// /drive_cache/temporary/d41d8cd98f00b204e9800998ecf8427e vs.
// /special/drive/foo.txt).
// If not set, defaults to |file_path|.
- FilePath local_path;
+ base::FilePath local_path;
// This field is optional. The display name contains only the base name
// portion of a file name (ex. no path separators), and used for displaying
// selected file names. If this field is empty, the base name portion of
// |path| is used for displaying.
- FilePath::StringType display_name;
+ base::FilePath::StringType display_name;
SelectedFileInfo();
- SelectedFileInfo(const FilePath& in_file_path,
- const FilePath& in_local_path);
+ SelectedFileInfo(const base::FilePath& in_file_path,
+ const base::FilePath& in_local_path);
~SelectedFileInfo();
};
diff --git a/ui/surface/accelerated_surface_transformer_win_unittest.cc b/ui/surface/accelerated_surface_transformer_win_unittest.cc
index ed5b606..b8b1eb6 100644
--- a/ui/surface/accelerated_surface_transformer_win_unittest.cc
+++ b/ui/surface/accelerated_surface_transformer_win_unittest.cc
@@ -69,7 +69,7 @@ SkBitmap ToSkBitmap(IDirect3DSurface9* surface, bool is_single_channel) {
return result;
}
-bool WritePNGFile(const SkBitmap& bitmap, const FilePath& file_path) {
+bool WritePNGFile(const SkBitmap& bitmap, const base::FilePath& file_path) {
std::vector<unsigned char> png_data;
const bool discard_transparency = true;
if (gfx::PNGCodec::EncodeBGRASkBitmap(bitmap,
@@ -552,15 +552,16 @@ bool AssertSameColor(uint8 color_a, uint8 color_b) {
// extra columns added due to packing. That means up to 7 extra
// columns for uv, and up to 3 extra columns for y.
WritePNGFile(reference_rgb,
- FilePath(FILE_PATH_LITERAL("test_fail_src.png")));
+ base::FilePath(FILE_PATH_LITERAL("test_fail_src.png")));
WritePNGFile(reference_rgb_scaled,
- FilePath(FILE_PATH_LITERAL("test_fail_src_scaled.png")));
+ base::FilePath(
+ FILE_PATH_LITERAL("test_fail_src_scaled.png")));
WritePNGFile(ToSkBitmap(dst_y, true),
- FilePath(FILE_PATH_LITERAL("test_fail_y.png")));
+ base::FilePath(FILE_PATH_LITERAL("test_fail_y.png")));
WritePNGFile(ToSkBitmap(dst_u, true),
- FilePath(FILE_PATH_LITERAL("test_fail_u.png")));
+ base::FilePath(FILE_PATH_LITERAL("test_fail_u.png")));
WritePNGFile(ToSkBitmap(dst_v, true),
- FilePath(FILE_PATH_LITERAL("test_fail_v.png")));
+ base::FilePath(FILE_PATH_LITERAL("test_fail_v.png")));
}
}
diff --git a/ui/surface/d3d9_utils_win.cc b/ui/surface/d3d9_utils_win.cc
index aa18032..4377362 100644
--- a/ui/surface/d3d9_utils_win.cc
+++ b/ui/surface/d3d9_utils_win.cc
@@ -20,7 +20,8 @@ typedef HRESULT (WINAPI *Direct3DCreate9ExFunc)(UINT sdk_version,
namespace ui_surface_d3d9_utils {
bool LoadD3D9(base::ScopedNativeLibrary* storage) {
- storage->Reset(base::LoadNativeLibrary(FilePath(kD3D9ModuleName), NULL));
+ storage->Reset(
+ base::LoadNativeLibrary(base::FilePath(kD3D9ModuleName), NULL));
return storage->is_valid();
}
diff --git a/ui/test/test_suite.cc b/ui/test/test_suite.cc
index 4d37214..47fc790 100644
--- a/ui/test/test_suite.cc
+++ b/ui/test/test_suite.cc
@@ -42,7 +42,7 @@ void UITestSuite::Initialize() {
// TODO(port): make a resource bundle for non-app exes. What's done here
// isn't really right because this code needs to depend on chrome_dll
// being built. This is inappropriate in app.
- FilePath path;
+ base::FilePath path;
PathService::Get(base::DIR_EXE, &path);
#if defined(GOOGLE_CHROME_BUILD)
path = path.AppendASCII("Google Chrome Framework.framework");
@@ -53,7 +53,7 @@ void UITestSuite::Initialize() {
#endif
base::mac::SetOverrideFrameworkBundlePath(path);
#elif defined(OS_POSIX)
- FilePath pak_dir;
+ base::FilePath pak_dir;
#if defined(OS_ANDROID)
PathService::Get(ui::DIR_RESOURCE_PAKS_ANDROID, &pak_dir);
#else
diff --git a/ui/views/controls/textfield/native_textfield_views_unittest.cc b/ui/views/controls/textfield/native_textfield_views_unittest.cc
index 92c34aa..3cc184a 100644
--- a/ui/views/controls/textfield/native_textfield_views_unittest.cc
+++ b/ui/views/controls/textfield/native_textfield_views_unittest.cc
@@ -871,13 +871,13 @@ TEST_F(NativeTextfieldViewsTest, DragAndDrop_AcceptDrop) {
// Ensure that textfields do not accept non-OSExchangeData::STRING types.
ui::OSExchangeData bad_data;
- bad_data.SetFilename(FilePath(FILE_PATH_LITERAL("x")));
+ bad_data.SetFilename(base::FilePath(FILE_PATH_LITERAL("x")));
#if defined(OS_WIN)
ui::OSExchangeData::CustomFormat fmt = CF_BITMAP;
bad_data.SetPickledData(fmt, Pickle());
- bad_data.SetFileContents(FilePath(L"x"), "x");
+ bad_data.SetFileContents(base::FilePath(L"x"), "x");
bad_data.SetHtml(string16(ASCIIToUTF16("x")), GURL("x.org"));
- ui::OSExchangeData::DownloadFileInfo download(FilePath(), NULL);
+ ui::OSExchangeData::DownloadFileInfo download(base::FilePath(), NULL);
bad_data.SetDownloadFileInfo(download);
#endif
EXPECT_FALSE(textfield_view_->CanDrop(bad_data));
diff --git a/win8/metro_driver/file_picker.cc b/win8/metro_driver/file_picker.cc
index 71bd8fc..4979f4c 100644
--- a/win8/metro_driver/file_picker.cc
+++ b/win8/metro_driver/file_picker.cc
@@ -319,7 +319,7 @@ HRESULT OpenFilePickerSession::StartFilePicker() {
hr = extension.Set(L"*");
} else {
// Metro wants suffixes only, not patterns.
- string16 ext = FilePath(extensions_win32_style[i]).Extension();
+ string16 ext = base::FilePath(extensions_win32_style[i]).Extension();
if ((ext.size() < 2) ||
(ext.find_first_of(L"*?") != string16::npos)) {
continue;
@@ -391,7 +391,7 @@ HRESULT OpenFilePickerSession::ComposeMultiFileResult(
}
// This stores the base path that should be the parent of all the files.
- FilePath base_path;
+ base::FilePath base_path;
// Iterate through the collection and append the file paths to the result.
for (unsigned int i = 0; i < num_files; ++i) {
@@ -410,7 +410,7 @@ HRESULT OpenFilePickerSession::ComposeMultiFileResult(
if (FAILED(hr))
return hr;
- FilePath file_path(MakeStdWString(file_path_str.Get()));
+ base::FilePath file_path(MakeStdWString(file_path_str.Get()));
if (base_path.empty()) {
DCHECK(result->empty());
base_path = file_path.DirName();
@@ -424,7 +424,7 @@ HRESULT OpenFilePickerSession::ComposeMultiFileResult(
DCHECK(base_path == file_path.DirName());
// Append the base name, including the terminating zero.
- FilePath base_name = file_path.BaseName();
+ base::FilePath base_name = file_path.BaseName();
result->append(base_name.value().c_str(), base_name.value().size() + 1);
}
@@ -484,7 +484,7 @@ HRESULT SaveFilePickerSession::StartFilePicker() {
// the all files ("*") pattern in the save picker.
std::vector<string16> extensions;
for (size_t i = 0; i < extensions_win32_style.size(); ++i) {
- string16 ext = FilePath(extensions_win32_style[i]).Extension();
+ string16 ext = base::FilePath(extensions_win32_style[i]).Extension();
if ((ext.size() < 2) ||
(ext.find_first_of(L"*?") != string16::npos))
continue;
diff --git a/win8/metro_driver/file_picker_ash.cc b/win8/metro_driver/file_picker_ash.cc
index 4b73b90..816defa 100644
--- a/win8/metro_driver/file_picker_ash.cc
+++ b/win8/metro_driver/file_picker_ash.cc
@@ -177,10 +177,10 @@ HRESULT OpenFilePickerSession::MultiPickerDone(MultiFileAsyncOp* async,
// TODO(ananta)
// Consolidate this into a common place.
const wchar_t* selection = result.c_str();
- std::vector<FilePath> files;
+ std::vector<base::FilePath> files;
while (*selection) { // Empty string indicates end of list.
- files.push_back(FilePath(selection));
+ files.push_back(base::FilePath(selection));
// Skip over filename and null-terminator.
selection += files.back().value().length() + 1;
}
@@ -192,8 +192,8 @@ HRESULT OpenFilePickerSession::MultiPickerDone(MultiFileAsyncOp* async,
} else if (files.size() > 1) {
// Otherwise, the first string is the path, and the remainder are
// filenames.
- std::vector<FilePath>::iterator path = files.begin();
- for (std::vector<FilePath>::iterator file = path + 1;
+ std::vector<base::FilePath>::iterator path = files.begin();
+ for (std::vector<base::FilePath>::iterator file = path + 1;
file != files.end(); ++file) {
filenames_.push_back(path->Append(*file));
}
@@ -257,7 +257,7 @@ HRESULT OpenFilePickerSession::StartFilePicker() {
hr = extension.Set(L"*");
} else {
// Metro wants suffixes only, not patterns.
- string16 ext = FilePath(extensions_win32_style[i]).Extension();
+ string16 ext = base::FilePath(extensions_win32_style[i]).Extension();
if ((ext.size() < 2) ||
(ext.find_first_of(L"*?") != string16::npos)) {
continue;
@@ -329,7 +329,7 @@ HRESULT OpenFilePickerSession::ComposeMultiFileResult(
}
// This stores the base path that should be the parent of all the files.
- FilePath base_path;
+ base::FilePath base_path;
// Iterate through the collection and append the file paths to the result.
for (unsigned int i = 0; i < num_files; ++i) {
@@ -348,7 +348,7 @@ HRESULT OpenFilePickerSession::ComposeMultiFileResult(
if (FAILED(hr))
return hr;
- FilePath file_path(MakeStdWString(file_path_str.Get()));
+ base::FilePath file_path(MakeStdWString(file_path_str.Get()));
if (base_path.empty()) {
DCHECK(result->empty());
base_path = file_path.DirName();
@@ -362,7 +362,7 @@ HRESULT OpenFilePickerSession::ComposeMultiFileResult(
DCHECK(base_path == file_path.DirName());
// Append the base name, including the terminating zero.
- FilePath base_name = file_path.BaseName();
+ base::FilePath base_name = file_path.BaseName();
result->append(base_name.value().c_str(), base_name.value().size() + 1);
}
@@ -433,7 +433,7 @@ HRESULT SaveFilePickerSession::StartFilePicker() {
// the all files ("*") pattern in the save picker.
std::vector<string16> extensions;
for (size_t i = 0; i < extensions_win32_style.size(); ++i) {
- string16 ext = FilePath(extensions_win32_style[i]).Extension();
+ string16 ext = base::FilePath(extensions_win32_style[i]).Extension();
if ((ext.size() < 2) ||
(ext.find_first_of(L"*?") != string16::npos))
continue;
diff --git a/win8/metro_driver/secondary_tile.cc b/win8/metro_driver/secondary_tile.cc
index d58a081..dd99a8a 100644
--- a/win8/metro_driver/secondary_tile.cc
+++ b/win8/metro_driver/secondary_tile.cc
@@ -123,7 +123,7 @@ void DeleteTileFromStartScreen(const string16& tile_id,
void CreateTileOnStartScreen(const string16& tile_id,
const string16& title_str,
const string16& url_str,
- const FilePath& logo_path,
+ const base::FilePath& logo_path,
const MetroPinUmaResultCallback& callback) {
VLOG(1) << __FUNCTION__;
@@ -215,7 +215,7 @@ void MetroUnPinFromStartScreen(const string16& tile_id,
void MetroPinToStartScreen(const string16& tile_id,
const string16& title,
const string16& url,
- const FilePath& logo_path,
+ const base::FilePath& logo_path,
const MetroPinUmaResultCallback& callback) {
globals.appview_msg_loop->PostTask(
FROM_HERE, base::Bind(&CreateTileOnStartScreen,
diff --git a/win8/metro_driver/secondary_tile.h b/win8/metro_driver/secondary_tile.h
index 457a23ed..ed3f58f 100644
--- a/win8/metro_driver/secondary_tile.h
+++ b/win8/metro_driver/secondary_tile.h
@@ -21,7 +21,7 @@ void MetroPinToStartScreen(
const string16& tile_id,
const string16& title,
const string16& url,
- const FilePath& logo_path,
+ const base::FilePath& logo_path,
const base::win::MetroPinUmaResultCallback& callback);
#endif // CHROME_BROWSER_UI_METRO_DRIVER_SECONDARY_TILE_H_
diff --git a/win8/metro_driver/toast_notification_handler.cc b/win8/metro_driver/toast_notification_handler.cc
index 5545cd2..525331e 100644
--- a/win8/metro_driver/toast_notification_handler.cc
+++ b/win8/metro_driver/toast_notification_handler.cc
@@ -196,7 +196,7 @@ void ToastNotificationHandler::DisplayNotification(
toast_xml.Get(), &notification_);
CheckHR(hr);
- FilePath chrome_path;
+ base::FilePath chrome_path;
if (!PathService::Get(base::FILE_EXE, &chrome_path)) {
NOTREACHED() << "Failed to get chrome exe path";
return;
diff --git a/win8/metro_driver/winrt_utils.cc b/win8/metro_driver/winrt_utils.cc
index 04b97d0..8df33f0 100644
--- a/win8/metro_driver/winrt_utils.cc
+++ b/win8/metro_driver/winrt_utils.cc
@@ -180,7 +180,7 @@ HRESULT CompareProperties(winfoundtn::IPropertyValue* lhs,
return hr;
}
-bool GetArgumentsFromShortcut(const FilePath& shortcut,
+bool GetArgumentsFromShortcut(const base::FilePath& shortcut,
string16* arguments) {
HRESULT result;
base::win::ScopedComPtr<IShellLink> i_shell_link;
@@ -216,7 +216,7 @@ string16 ReadArgumentsFromPinnedTaskbarShortcut() {
if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_APPDATA, NULL,
SHGFP_TYPE_CURRENT, path_buffer))) {
- FilePath shortcut(path_buffer);
+ base::FilePath shortcut(path_buffer);
shortcut = shortcut.Append(
L"Microsoft\\Internet Explorer\\Quick Launch\\User Pinned\\TaskBar");