summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-02 05:12:33 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-02 05:12:33 +0000
commita3ef4830d5b5fdc52e5d7d0cb33dae8844f0961e (patch)
treebdd4dac76e6034ef6cf33450e203269a715ea0e6
parent8bc574c57115e9ffd0169f33131c0865997dcb35 (diff)
downloadchromium_src-a3ef4830d5b5fdc52e5d7d0cb33dae8844f0961e.zip
chromium_src-a3ef4830d5b5fdc52e5d7d0cb33dae8844f0961e.tar.gz
chromium_src-a3ef4830d5b5fdc52e5d7d0cb33dae8844f0961e.tar.bz2
Add FilePath to base namespace.
This updates headers that forward-declare it and a few random places to use the namespace explicitly. There us a using declaration in file_path.h that makes the rest compile, which we can do in future passes. Review URL: https://codereview.chromium.org/12163003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180245 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--android_webview/browser/net/aw_network_delegate.cc2
-rw-r--r--android_webview/browser/net/aw_network_delegate.h2
-rw-r--r--base/android/path_utils.h3
-rw-r--r--base/command_line.h15
-rw-r--r--base/event_recorder.h4
-rw-r--r--base/file_path.h17
-rw-r--r--base/file_util.h185
-rw-r--r--base/file_version_info.h4
-rw-r--r--base/i18n/file_util_icu.h8
-rw-r--r--base/i18n/rtl.h3
-rw-r--r--base/mac/bundle_locations.h3
-rw-r--r--base/mac/foundation_util.h5
-rw-r--r--base/mac/mac_util.h3
-rw-r--r--base/native_library.h4
-rw-r--r--base/nix/mime_util_xdg.h3
-rw-r--r--base/nix/xdg_util.h3
-rw-r--r--base/path_service.h11
-rw-r--r--base/perftimer.h4
-rw-r--r--base/prefs/json_pref_store.h8
-rw-r--r--base/prefs/public/pref_service_base.h9
-rw-r--r--base/scoped_native_library.h4
-rw-r--r--base/shared_memory.h4
-rw-r--r--base/test/scoped_path_override.h4
-rw-r--r--base/test/test_file_util.h26
-rw-r--r--base/value_conversions.h2
-rw-r--r--chrome/app/chrome_main_mac.h4
-rw-r--r--chrome/browser/automation/automation_provider.h1
-rw-r--r--chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h6
-rw-r--r--chrome/browser/chromeos/customization_document.h6
-rw-r--r--chrome/browser/chromeos/drive/drive_feed_loader_observer.h4
-rw-r--r--chrome/browser/chromeos/drive/drive_file_system_observer.h4
-rw-r--r--chrome/browser/chromeos/drive/drive_file_system_util.h25
-rw-r--r--chrome/browser/chromeos/drive/drive_prefetcher.h11
-rw-r--r--chrome/browser/chromeos/drive/drive_system_service.h4
-rw-r--r--chrome/browser/chromeos/drive/drive_test_util.h30
-rw-r--r--chrome/browser/chromeos/drive/drive_webapps_registry.h4
-rw-r--r--chrome/browser/chromeos/drive/file_system/copy_operation.h59
-rw-r--r--chrome/browser/chromeos/drive/file_system/drive_operations.h27
-rw-r--r--chrome/browser/chromeos/drive/file_system/move_operation.h39
-rw-r--r--chrome/browser/chromeos/drive/file_system/operation_observer.h4
-rw-r--r--chrome/browser/chromeos/drive/file_system/remove_operation.h9
-rw-r--r--chrome/browser/chromeos/drive/file_system/update_operation.h17
-rw-r--r--chrome/browser/chromeos/drive/file_write_helper.h12
-rw-r--r--chrome/browser/chromeos/enterprise_extension_observer.h7
-rw-r--r--chrome/browser/chromeos/imageburner/burn_controller.h7
-rw-r--r--chrome/browser/chromeos/login/user_image_manager.h7
-rw-r--r--chrome/browser/chromeos/login/user_image_manager_impl.h12
-rw-r--r--chrome/browser/chromeos/login/user_manager_impl.h1
-rw-r--r--chrome/browser/chromeos/mobile_config.h7
-rw-r--r--chrome/browser/chromeos/settings/owner_key_util.h6
-rw-r--r--chrome/browser/chromeos/system/name_value_pairs_parser.h4
-rw-r--r--chrome/browser/component_updater/component_updater_service.h5
-rw-r--r--chrome/browser/devtools/devtools_file_helper.h21
-rw-r--r--chrome/browser/diagnostics/diagnostics_test.h4
-rw-r--r--chrome/browser/download/download_file_picker.h16
-rw-r--r--chrome/browser/download/download_path_reservation_tracker.h14
-rw-r--r--chrome/browser/enumerate_modules_model_win.h4
-rw-r--r--chrome/browser/extensions/activity_database.h4
-rw-r--r--chrome/browser/extensions/api/bookmarks/bookmarks_api.h13
-rw-r--r--chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.h1
-rw-r--r--chrome/browser/extensions/api/media_galleries_private/media_galleries_private_event_router.h1
-rw-r--r--chrome/browser/extensions/api/messaging/native_process_launcher.h4
-rw-r--r--chrome/browser/extensions/api/page_capture/page_capture_api.h8
-rw-r--r--chrome/browser/extensions/api/storage/sync_or_local_value_store_cache.h6
-rw-r--r--chrome/browser/extensions/app_notification_manager.h2
-rw-r--r--chrome/browser/extensions/app_notification_storage.h4
-rw-r--r--chrome/browser/extensions/convert_user_script.h9
-rw-r--r--chrome/browser/extensions/convert_web_app.h5
-rw-r--r--chrome/browser/extensions/extension_apitest.h5
-rw-r--r--chrome/browser/extensions/extension_creator.h38
-rw-r--r--chrome/browser/extensions/extension_creator_filter.h6
-rw-r--r--chrome/browser/extensions/external_provider_interface.h7
-rw-r--r--chrome/browser/extensions/platform_app_launcher.h11
-rw-r--r--chrome/browser/extensions/test_extension_system.h5
-rw-r--r--chrome/browser/extensions/updater/extension_downloader_delegate.h7
-rw-r--r--chrome/browser/extensions/webstore_installer.h9
-rw-r--r--chrome/browser/first_run/first_run.h11
-rw-r--r--chrome/browser/first_run/first_run_internal.h15
-rw-r--r--chrome/browser/google_apis/drive_api_service.h11
-rw-r--r--chrome/browser/google_apis/drive_uploader.h25
-rw-r--r--chrome/browser/google_apis/gdata_wapi_parser.h7
-rw-r--r--chrome/browser/google_apis/gdata_wapi_service.h11
-rw-r--r--chrome/browser/google_apis/mock_drive_service.h12
-rw-r--r--chrome/browser/google_apis/test_util.h13
-rw-r--r--chrome/browser/google_apis/time_util.h1
-rw-r--r--chrome/browser/history/archived_database.cc2
-rw-r--r--chrome/browser/history/archived_database.h4
-rw-r--r--chrome/browser/history/download_database.h2
-rw-r--r--chrome/browser/history/history_database.h4
-rw-r--r--chrome/browser/history/history_service.h8
-rw-r--r--chrome/browser/history/in_memory_database.h4
-rw-r--r--chrome/browser/history/in_memory_history_backend.cc2
-rw-r--r--chrome/browser/history/in_memory_history_backend.h7
-rw-r--r--chrome/browser/history/thumbnail_database.h10
-rw-r--r--chrome/browser/history/top_sites.h4
-rw-r--r--chrome/browser/history/top_sites_backend.h11
-rw-r--r--chrome/browser/history/top_sites_database.h6
-rw-r--r--chrome/browser/icon_manager.h8
-rw-r--r--chrome/browser/icon_manager_android.cc2
-rw-r--r--chrome/browser/icon_manager_linux.cc3
-rw-r--r--chrome/browser/importer/firefox_importer_utils.h26
-rw-r--r--chrome/browser/importer/firefox_proxy_settings.h4
-rw-r--r--chrome/browser/importer/mork_reader.h9
-rw-r--r--chrome/browser/importer/nss_decryptor.cc2
-rw-r--r--chrome/browser/importer/nss_decryptor_mac.h6
-rw-r--r--chrome/browser/importer/nss_decryptor_null.h6
-rw-r--r--chrome/browser/importer/nss_decryptor_system_nss.h6
-rw-r--r--chrome/browser/importer/nss_decryptor_win.h6
-rw-r--r--chrome/browser/jumplist_win.h8
-rw-r--r--chrome/browser/managed_mode/managed_mode_url_filter.h1
-rw-r--r--chrome/browser/media_gallery/linux/mtp_device_delegate_impl_linux.h11
-rw-r--r--chrome/browser/media_gallery/media_file_system_context.h6
-rw-r--r--chrome/browser/media_gallery/win/mtp_device_delegate_impl_win.h11
-rw-r--r--chrome/browser/media_gallery/win/recursive_mtp_device_object_enumerator.h4
-rw-r--r--chrome/browser/nacl_host/pnacl_file_host.h7
-rw-r--r--chrome/browser/net/chrome_network_delegate.h2
-rw-r--r--chrome/browser/net/crl_set_fetcher.cc13
-rw-r--r--chrome/browser/net/crl_set_fetcher.h11
-rw-r--r--chrome/browser/net/net_log_logger.h4
-rw-r--r--chrome/browser/net/sqlite_persistent_cookie_store.h7
-rw-r--r--chrome/browser/net/sqlite_server_bound_cert_store.h5
-rw-r--r--chrome/browser/net/url_fixer_upper.h12
-rw-r--r--chrome/browser/parsers/metadata_parser.h4
-rw-r--r--chrome/browser/parsers/metadata_parser_factory.h6
-rw-r--r--chrome/browser/parsers/metadata_parser_jpeg_factory.h6
-rw-r--r--chrome/browser/parsers/metadata_parser_manager.h7
-rw-r--r--chrome/browser/platform_util.h9
-rw-r--r--chrome/browser/platform_util_android.cc4
-rw-r--r--chrome/browser/plugins/plugin_installer.h1
-rw-r--r--chrome/browser/prefs/chrome_pref_service_factory.h6
-rw-r--r--chrome/browser/prefs/pref_service.h5
-rw-r--r--chrome/browser/prefs/pref_service_builder.h4
-rw-r--r--chrome/browser/prefs/pref_service_simple.h3
-rw-r--r--chrome/browser/prefs/pref_service_syncable.h2
-rw-r--r--chrome/browser/printing/print_dialog_cloud.h7
-rw-r--r--chrome/browser/printing/printing_message_filter.h4
-rw-r--r--chrome/browser/profiles/profile.h8
-rw-r--r--chrome/browser/profiles/profile_info_cache_observer.h12
-rw-r--r--chrome/browser/profiles/profile_info_cache_unittest.h17
-rw-r--r--chrome/browser/profiles/profile_metrics.h11
-rw-r--r--chrome/browser/renderer_host/pepper/pepper_flash_device_id_host.h4
-rw-r--r--chrome/browser/safe_browsing/prefix_set.h6
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_store.h4
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_store_unittest_helper.h2
-rw-r--r--chrome/browser/safe_browsing/signature_util.h4
-rw-r--r--chrome/browser/safe_browsing/signature_util_posix.cc2
-rw-r--r--chrome/browser/sync_file_system/mock_remote_change_processor.h4
-rw-r--r--chrome/browser/sync_file_system/remote_change_processor.h4
-rw-r--r--chrome/browser/system_monitor/media_transfer_protocol_device_observer_linux.h4
-rw-r--r--chrome/browser/system_monitor/portable_device_watcher_win.h2
-rw-r--r--chrome/browser/system_monitor/removable_device_notifications_linux.h24
-rw-r--r--chrome/browser/system_monitor/removable_device_notifications_window_win.h6
-rw-r--r--chrome/browser/system_monitor/test_volume_mount_watcher_win.h16
-rw-r--r--chrome/browser/system_monitor/udev_util_linux.h4
-rw-r--r--chrome/browser/task_profiler/task_profiler_data_serializer.h5
-rw-r--r--chrome/browser/themes/browser_theme_pack.h13
-rw-r--r--chrome/browser/themes/theme_service.h9
-rw-r--r--chrome/browser/ui/browser_command_controller.h11
-rw-r--r--chrome/browser/ui/cocoa/download/download_util_mac.h4
-rw-r--r--chrome/browser/ui/hung_plugin_tab_helper.h13
-rw-r--r--chrome/browser/ui/network_profile_bubble.h7
-rw-r--r--chrome/browser/ui/startup/startup_browser_creator_impl.h11
-rw-r--r--chrome/browser/ui/user_data_dir_dialog.h4
-rw-r--r--chrome/browser/ui/webui/extensions/extension_settings_handler.h8
-rw-r--r--chrome/browser/ui/webui/feedback_ui.h4
-rw-r--r--chrome/browser/ui/webui/print_preview/print_preview_handler.h8
-rw-r--r--chrome/browser/ui/webui/print_preview/sticky_settings.h8
-rw-r--r--chrome/browser/ui/webui/screenshot_source.h11
-rw-r--r--chrome/browser/value_store/value_store_frontend.h9
-rw-r--r--chrome/browser/webdata/web_database.cc2
-rw-r--r--chrome/browser/webdata/web_database.h7
-rw-r--r--chrome/common/chrome_paths_internal.h30
-rw-r--r--chrome/common/dump_without_crashing.cc1
-rw-r--r--chrome/common/extensions/extension_file_util.h41
-rw-r--r--chrome/common/extensions/extension_l10n_util.h15
-rw-r--r--chrome/common/logging_chrome.h11
-rw-r--r--chrome/common/mac/app_mode_chrome_locator.h10
-rw-r--r--chrome/common/spellcheck_common.h6
-rw-r--r--chrome/installer/launcher_support/chrome_launcher_support.h12
-rw-r--r--chrome/installer/setup/install.h18
-rw-r--r--chrome/installer/setup/install_worker.h37
-rw-r--r--chrome/installer/setup/setup_util.h21
-rw-r--r--chrome/installer/setup/uninstall.h5
-rw-r--r--chrome/installer/test/alternate_version_generator.h17
-rw-r--r--chrome/installer/test/resource_loader.h4
-rw-r--r--chrome/installer/test/resource_updater.h6
-rw-r--r--chrome/installer/util/auto_launch_util.h6
-rw-r--r--chrome/installer/util/duplicate_tree_detector.h6
-rw-r--r--chrome/installer/util/google_chrome_distribution.h11
-rw-r--r--chrome/installer/util/helper.h7
-rw-r--r--chrome/installer/util/installation_validator.h5
-rw-r--r--chrome/installer/util/installer_util_test_common.h4
-rw-r--r--chrome/installer/util/logging_installer.h12
-rw-r--r--chrome/installer/util/lzma_util.h4
-rw-r--r--chrome/installer/util/master_preferences.h5
-rw-r--r--chrome/installer/util/master_preferences_dummy.cc2
-rw-r--r--chrome/installer/util/work_item.h27
-rw-r--r--chrome/installer/util/work_item_list.h14
-rw-r--r--chrome/renderer/chrome_content_renderer_client.h2
-rw-r--r--chrome/renderer/mock_printer.h4
-rw-r--r--chrome/service/cloud_print/print_system.h6
-rw-r--r--chrome/test/automation/automation_json_requests.h8
-rw-r--r--chrome/test/automation/tab_proxy.h5
-rw-r--r--chrome/test/base/ui_test_utils.h20
-rw-r--r--chrome/test/chromedriver/chrome_finder.h12
-rw-r--r--chrome/test/chromedriver/chrome_launcher.h7
-rw-r--r--chrome/test/chromedriver/chrome_launcher_impl.h7
-rw-r--r--chrome/test/logging/win/file_logger.h4
-rw-r--r--chrome/test/logging/win/log_file_printer.cc2
-rw-r--r--chrome/test/logging/win/log_file_printer.h4
-rw-r--r--chrome/test/logging/win/log_file_reader.h4
-rw-r--r--chrome/test/ui/ui_test.h24
-rw-r--r--chrome/test/webdriver/webdriver_session.h12
-rw-r--r--chrome/test/webdriver/webdriver_util.h13
-rw-r--r--chrome/tools/convert_dict/aff_reader.h4
-rw-r--r--chrome/tools/convert_dict/dic_reader.h4
-rw-r--r--chrome/utility/chrome_content_utility_client.h12
-rw-r--r--chrome_frame/chrome_launcher_utils.h5
-rw-r--r--chrome_frame/test/chrome_frame_test_utils.h15
-rw-r--r--chrome_frame/test_utils.h6
-rw-r--r--chrome_frame/utils.h9
-rw-r--r--chromeos/chromeos_test_utils.cc4
-rw-r--r--chromeos/chromeos_test_utils.h4
-rw-r--r--cloud_print/service/service_state.h3
-rw-r--r--cloud_print/virtual_driver/win/virtual_driver_helpers.h5
-rw-r--r--content/browser/appcache/chrome_appcache_service.h6
-rw-r--r--content/browser/child_process_security_policy_impl.h21
-rw-r--r--content/browser/dom_storage/dom_storage_context_impl.h4
-rw-r--r--content/browser/download/download_item_factory.h9
-rw-r--r--content/browser/download/download_net_log_parameters.h15
-rw-r--r--content/browser/download/drag_download_util.h12
-rw-r--r--content/browser/download/file_metadata_linux.h7
-rw-r--r--content/browser/download/file_metadata_mac.h9
-rw-r--r--content/browser/download/mhtml_generation_manager.h10
-rw-r--r--content/browser/download/save_file_manager.h12
-rw-r--r--content/browser/fileapi/fileapi_message_filter.h12
-rw-r--r--content/browser/in_process_webkit/indexed_db_context_impl.h18
-rw-r--r--content/browser/safe_util_win.h9
-rw-r--r--content/browser/storage_partition_impl_map.h10
-rw-r--r--content/common/child_process_host_impl.h2
-rw-r--r--content/common/fileapi/file_system_dispatcher.h4
-rw-r--r--content/common/sandbox_mac.h10
-rw-r--r--content/ppapi_plugin/ppapi_thread.h7
-rw-r--r--content/public/browser/browser_child_process_host.h5
-rw-r--r--content/public/browser/browser_context.h17
-rw-r--r--content/public/browser/browser_ppapi_host.h2
-rw-r--r--content/public/browser/child_process_security_policy.h8
-rw-r--r--content/public/browser/content_browser_client.h5
-rw-r--r--content/public/browser/download_item.h2
-rw-r--r--content/public/browser/gpu_data_manager.h4
-rw-r--r--content/public/browser/pepper_flash_settings_helper.h4
-rw-r--r--content/public/browser/plugin_service.h24
-rw-r--r--content/public/browser/render_view_host.h4
-rw-r--r--content/public/browser/utility_process_host.h5
-rw-r--r--content/public/browser/web_contents_delegate.h6
-rw-r--r--content/public/common/child_process_host.h4
-rw-r--r--content/public/common/sandbox_init.h7
-rw-r--r--content/public/renderer/content_renderer_client.cc2
-rw-r--r--content/public/renderer/content_renderer_client.h7
-rw-r--r--content/public/renderer/renderer_ppapi_host.h4
-rw-r--r--content/public/test/browser_test_base.h5
-rw-r--r--content/public/test/test_launcher.h7
-rw-r--r--content/renderer/pepper/pepper_plugin_delegate_impl.h12
-rw-r--r--content/shell/shell_network_delegate.h2
-rw-r--r--content/test/content_browser_test_utils.h4
-rw-r--r--content/test/net/url_request_mock_http_job.h14
-rw-r--r--content/test/net/url_request_prepackaged_interceptor.h9
-rw-r--r--content/utility/utility_thread_impl.h4
-rw-r--r--crypto/nss_util.h5
-rw-r--r--gpu/tools/compositor_model_bench/render_tree.h2
-rw-r--r--ipc/ipc_message_utils.h6
-rw-r--r--media/base/media.h4
-rw-r--r--media/base/media_stub.cc2
-rw-r--r--media/filters/pipeline_integration_test_base.h10
-rw-r--r--media/webm/chromeos/webm_encoder.h9
-rw-r--r--net/base/cert_test_util.h6
-rw-r--r--net/base/file_stream.h6
-rw-r--r--net/base/file_stream_context.h10
-rw-r--r--net/base/net_util.h21
-rw-r--r--net/base/network_delegate.cc2
-rw-r--r--net/base/network_delegate.h9
-rw-r--r--net/base/test_root_certs.h4
-rw-r--r--net/base/upload_data.h5
-rw-r--r--net/disk_cache/cache_util.h11
-rw-r--r--net/disk_cache/disk_cache.h6
-rw-r--r--net/disk_cache/file.h2
-rw-r--r--net/disk_cache/mapped_file.h4
-rw-r--r--net/http/infinite_cache.h5
-rw-r--r--net/test/python_utils.h7
-rw-r--r--net/url_request/url_fetcher.h6
-rw-r--r--net/url_request/url_request.h1
-rw-r--r--net/url_request/url_request_context_builder.h2
-rw-r--r--printing/emf_win.h8
-rw-r--r--printing/image.h6
-rw-r--r--printing/metafile.h4
-rw-r--r--printing/pdf_metafile_cg_mac.h4
-rw-r--r--printing/pdf_metafile_skia.h2
-rw-r--r--printing/printed_document.h9
-rw-r--r--remoting/host/audio_capturer_linux.cc2
-rw-r--r--remoting/host/audio_capturer_linux.h4
-rw-r--r--remoting/host/branding.cc12
-rw-r--r--remoting/host/branding.h2
-rw-r--r--remoting/host/config_file_watcher.cc15
-rw-r--r--remoting/host/config_file_watcher.h4
-rw-r--r--remoting/host/daemon_process.cc4
-rw-r--r--remoting/host/daemon_process.h2
-rw-r--r--remoting/host/daemon_process_win.cc2
-rw-r--r--remoting/host/desktop_process_main.cc4
-rw-r--r--remoting/host/desktop_session_win.cc4
-rw-r--r--remoting/host/desktop_session_win.h2
-rw-r--r--remoting/host/host_key_pair_unittest.cc2
-rw-r--r--remoting/host/ipc_constants.cc13
-rw-r--r--remoting/host/ipc_constants.h8
-rw-r--r--remoting/host/json_host_config.cc2
-rw-r--r--remoting/host/json_host_config.h4
-rw-r--r--remoting/host/json_host_config_unittest.cc8
-rw-r--r--remoting/host/linux/audio_pipe_reader.cc4
-rw-r--r--remoting/host/linux/audio_pipe_reader.h6
-rw-r--r--remoting/host/policy_hack/policy_watcher_linux.cc18
-rw-r--r--remoting/host/remoting_me2me_host.cc12
-rw-r--r--remoting/host/sas_injector_win.cc4
-rw-r--r--remoting/host/setup/daemon_controller_linux.cc14
-rw-r--r--remoting/host/setup/daemon_controller_mac.cc10
-rw-r--r--remoting/host/usage_stats_consent_mac.cc2
-rw-r--r--remoting/host/win/elevated_controller.cc28
-rw-r--r--remoting/host/win/host_service.cc4
-rw-r--r--remoting/host/win/launch_process_with_token.cc10
-rw-r--r--remoting/host/win/launch_process_with_token.h2
-rw-r--r--remoting/host/win/unprivileged_process_delegate.cc2
-rw-r--r--remoting/host/win/unprivileged_process_delegate.h4
-rw-r--r--remoting/host/win/wts_console_session_process_driver.cc2
-rw-r--r--remoting/host/win/wts_session_process_delegate.cc10
-rw-r--r--remoting/host/win/wts_session_process_delegate.h5
-rw-r--r--rlz/lib/recursive_cross_process_lock_posix.h4
-rw-r--r--rlz/lib/rlz_value_store.h4
-rw-r--r--sql/connection.cc2
-rw-r--r--sql/connection.h7
-rw-r--r--sql/connection_unittest.cc2
-rw-r--r--ui/aura/remote_root_window_host_win.h22
-rw-r--r--ui/base/clipboard/clipboard.h5
-rw-r--r--ui/base/dragdrop/download_file_interface.h2
-rw-r--r--ui/base/resource/data_pack.h7
-rw-r--r--ui/base/text/text_elider.h7
-rw-r--r--ui/base/win/shell.h6
-rw-r--r--ui/gfx/icon_util.h7
-rw-r--r--webkit/appcache/appcache_database.cc4
-rw-r--r--webkit/appcache/appcache_database.h4
-rw-r--r--webkit/appcache/appcache_database_unittest.cc24
-rw-r--r--webkit/appcache/appcache_disk_cache.cc6
-rw-r--r--webkit/appcache/appcache_disk_cache.h4
-rw-r--r--webkit/appcache/appcache_interfaces.cc3
-rw-r--r--webkit/appcache/appcache_interfaces.h3
-rw-r--r--webkit/appcache/appcache_service.cc2
-rw-r--r--webkit/appcache/appcache_service.h5
-rw-r--r--webkit/appcache/appcache_storage_impl.cc6
-rw-r--r--webkit/appcache/appcache_storage_impl.h4
-rw-r--r--webkit/appcache/appcache_storage_impl_unittest.cc4
-rw-r--r--webkit/base/data_element.cc2
-rw-r--r--webkit/base/data_element.h8
-rw-r--r--webkit/base/file_path_string_conversions.cc12
-rw-r--r--webkit/base/file_path_string_conversions.h8
-rw-r--r--webkit/blob/blob_data.cc2
-rw-r--r--webkit/blob/blob_data.h2
-rw-r--r--webkit/blob/blob_storage_controller.cc2
-rw-r--r--webkit/blob/blob_storage_controller.h5
-rw-r--r--webkit/blob/blob_url_request_job_unittest.cc12
-rw-r--r--webkit/blob/local_file_stream_reader.cc2
-rw-r--r--webkit/blob/local_file_stream_reader.h4
-rw-r--r--webkit/blob/local_file_stream_reader_unittest.cc10
-rw-r--r--webkit/blob/shareable_file_reference.cc8
-rw-r--r--webkit/blob/shareable_file_reference.h12
-rw-r--r--webkit/blob/shareable_file_reference_unittest.cc2
-rw-r--r--webkit/chromeos/fileapi/cros_mount_point_provider.cc25
-rw-r--r--webkit/chromeos/fileapi/cros_mount_point_provider.h12
-rw-r--r--webkit/chromeos/fileapi/cros_mount_point_provider_unittest.cc70
-rw-r--r--webkit/chromeos/fileapi/file_access_permissions.cc8
-rw-r--r--webkit/chromeos/fileapi/file_access_permissions.h6
-rw-r--r--webkit/chromeos/fileapi/file_access_permissions_unittest.cc16
-rw-r--r--webkit/chromeos/fileapi/file_util_async.h16
-rw-r--r--webkit/chromeos/fileapi/memory_file_util.cc46
-rw-r--r--webkit/chromeos/fileapi/memory_file_util.h52
-rw-r--r--webkit/chromeos/fileapi/memory_file_util_unittest.cc88
-rw-r--r--webkit/chromeos/fileapi/remote_file_stream_writer.cc2
-rw-r--r--webkit/chromeos/fileapi/remote_file_stream_writer.h2
-rw-r--r--webkit/chromeos/fileapi/remote_file_system_operation.cc8
-rw-r--r--webkit/chromeos/fileapi/remote_file_system_operation.h8
-rw-r--r--webkit/database/database_tracker.cc45
-rw-r--r--webkit/database/database_tracker.h15
-rw-r--r--webkit/database/database_tracker_unittest.cc36
-rw-r--r--webkit/database/database_util.cc10
-rw-r--r--webkit/database/database_util.h6
-rw-r--r--webkit/database/vfs_backend.cc12
-rw-r--r--webkit/database/vfs_backend.h12
-rw-r--r--webkit/dom_storage/dom_storage_area.cc14
-rw-r--r--webkit/dom_storage/dom_storage_area.h10
-rw-r--r--webkit/dom_storage/dom_storage_area_unittest.cc24
-rw-r--r--webkit/dom_storage/dom_storage_context.cc10
-rw-r--r--webkit/dom_storage/dom_storage_context.h14
-rw-r--r--webkit/dom_storage/dom_storage_context_unittest.cc8
-rw-r--r--webkit/dom_storage/dom_storage_database.cc10
-rw-r--r--webkit/dom_storage/dom_storage_database.h8
-rw-r--r--webkit/dom_storage/dom_storage_database_unittest.cc10
-rw-r--r--webkit/dom_storage/dom_storage_namespace.cc2
-rw-r--r--webkit/dom_storage/dom_storage_namespace.h4
-rw-r--r--webkit/dom_storage/local_storage_database_adapter.cc2
-rw-r--r--webkit/dom_storage/local_storage_database_adapter.h4
-rw-r--r--webkit/dom_storage/session_storage_database.cc2
-rw-r--r--webkit/dom_storage/session_storage_database.h4
-rw-r--r--webkit/fileapi/async_file_util.h6
-rw-r--r--webkit/fileapi/async_file_util_adapter.cc8
-rw-r--r--webkit/fileapi/async_file_util_adapter.h2
-rw-r--r--webkit/fileapi/cross_operation_delegate.cc4
-rw-r--r--webkit/fileapi/cross_operation_delegate.h2
-rw-r--r--webkit/fileapi/external_mount_points.cc68
-rw-r--r--webkit/fileapi/external_mount_points.h27
-rw-r--r--webkit/fileapi/external_mount_points_unittest.cc74
-rw-r--r--webkit/fileapi/file_system_callback_dispatcher.h2
-rw-r--r--webkit/fileapi/file_system_context.cc4
-rw-r--r--webkit/fileapi/file_system_context.h10
-rw-r--r--webkit/fileapi/file_system_context_unittest.cc48
-rw-r--r--webkit/fileapi/file_system_database_test_helper.cc6
-rw-r--r--webkit/fileapi/file_system_database_test_helper.h4
-rw-r--r--webkit/fileapi/file_system_dir_url_request_job.cc6
-rw-r--r--webkit/fileapi/file_system_dir_url_request_job_unittest.cc12
-rw-r--r--webkit/fileapi/file_system_directory_database.cc60
-rw-r--r--webkit/fileapi/file_system_directory_database.h14
-rw-r--r--webkit/fileapi/file_system_directory_database_unittest.cc82
-rw-r--r--webkit/fileapi/file_system_file_stream_reader.cc2
-rw-r--r--webkit/fileapi/file_system_file_stream_reader.h5
-rw-r--r--webkit/fileapi/file_system_file_stream_reader_unittest.cc4
-rw-r--r--webkit/fileapi/file_system_file_util.cc4
-rw-r--r--webkit/fileapi/file_system_file_util.h12
-rw-r--r--webkit/fileapi/file_system_file_util_proxy.cc4
-rw-r--r--webkit/fileapi/file_system_file_util_proxy.h4
-rw-r--r--webkit/fileapi/file_system_file_util_unittest.cc4
-rw-r--r--webkit/fileapi/file_system_mount_point_provider.h12
-rw-r--r--webkit/fileapi/file_system_mount_point_provider_unittest.cc44
-rw-r--r--webkit/fileapi/file_system_operation.h4
-rw-r--r--webkit/fileapi/file_system_origin_database.cc23
-rw-r--r--webkit/fileapi/file_system_origin_database.h10
-rw-r--r--webkit/fileapi/file_system_origin_database_unittest.cc46
-rw-r--r--webkit/fileapi/file_system_quota_client_unittest.cc8
-rw-r--r--webkit/fileapi/file_system_url.cc14
-rw-r--r--webkit/fileapi/file_system_url.h24
-rw-r--r--webkit/fileapi/file_system_url_request_job.cc4
-rw-r--r--webkit/fileapi/file_system_url_request_job.h5
-rw-r--r--webkit/fileapi/file_system_url_request_job_unittest.cc8
-rw-r--r--webkit/fileapi/file_system_url_unittest.cc26
-rw-r--r--webkit/fileapi/file_system_usage_cache.cc28
-rw-r--r--webkit/fileapi/file_system_usage_cache.h26
-rw-r--r--webkit/fileapi/file_system_usage_cache_unittest.cc26
-rw-r--r--webkit/fileapi/file_system_util.cc40
-rw-r--r--webkit/fileapi/file_system_util.h16
-rw-r--r--webkit/fileapi/file_system_util_unittest.cc16
-rw-r--r--webkit/fileapi/file_util_helper.cc26
-rw-r--r--webkit/fileapi/file_writer_delegate_unittest.cc2
-rw-r--r--webkit/fileapi/isolated_context.cc60
-rw-r--r--webkit/fileapi/isolated_context.h20
-rw-r--r--webkit/fileapi/isolated_context_unittest.cc46
-rw-r--r--webkit/fileapi/isolated_file_util.cc20
-rw-r--r--webkit/fileapi/isolated_file_util.h4
-rw-r--r--webkit/fileapi/isolated_file_util_unittest.cc80
-rw-r--r--webkit/fileapi/isolated_mount_point_provider.cc8
-rw-r--r--webkit/fileapi/isolated_mount_point_provider.h8
-rw-r--r--webkit/fileapi/local_file_stream_writer.cc2
-rw-r--r--webkit/fileapi/local_file_stream_writer.h4
-rw-r--r--webkit/fileapi/local_file_stream_writer_unittest.cc22
-rw-r--r--webkit/fileapi/local_file_system_operation.cc18
-rw-r--r--webkit/fileapi/local_file_system_operation.h14
-rw-r--r--webkit/fileapi/local_file_system_operation_unittest.cc274
-rw-r--r--webkit/fileapi/local_file_system_operation_write_unittest.cc16
-rw-r--r--webkit/fileapi/local_file_system_quota_unittest.cc48
-rw-r--r--webkit/fileapi/local_file_system_test_helper.cc32
-rw-r--r--webkit/fileapi/local_file_system_test_helper.h22
-rw-r--r--webkit/fileapi/local_file_util.cc50
-rw-r--r--webkit/fileapi/local_file_util.h10
-rw-r--r--webkit/fileapi/local_file_util_unittest.cc2
-rw-r--r--webkit/fileapi/media/device_media_file_util.cc14
-rw-r--r--webkit/fileapi/media/device_media_file_util.h12
-rw-r--r--webkit/fileapi/media/filtering_file_enumerator.cc8
-rw-r--r--webkit/fileapi/media/filtering_file_enumerator.h2
-rw-r--r--webkit/fileapi/media/media_path_filter.cc8
-rw-r--r--webkit/fileapi/media/media_path_filter.h6
-rw-r--r--webkit/fileapi/media/mtp_device_delegate.h11
-rw-r--r--webkit/fileapi/media/mtp_device_map_service.cc8
-rw-r--r--webkit/fileapi/media/mtp_device_map_service.h6
-rw-r--r--webkit/fileapi/media/native_media_file_util.cc26
-rw-r--r--webkit/fileapi/media/native_media_file_util.h8
-rw-r--r--webkit/fileapi/media/native_media_file_util_unittest.cc36
-rw-r--r--webkit/fileapi/mount_points.cc2
-rw-r--r--webkit/fileapi/mount_points.h12
-rw-r--r--webkit/fileapi/native_file_util.cc36
-rw-r--r--webkit/fileapi/native_file_util.h26
-rw-r--r--webkit/fileapi/obfuscated_file_util.cc140
-rw-r--r--webkit/fileapi/obfuscated_file_util.h30
-rw-r--r--webkit/fileapi/obfuscated_file_util_unittest.cc82
-rw-r--r--webkit/fileapi/remote_file_system_proxy.h2
-rw-r--r--webkit/fileapi/sandbox_file_stream_writer.cc2
-rw-r--r--webkit/fileapi/sandbox_file_stream_writer.h4
-rw-r--r--webkit/fileapi/sandbox_mount_point_provider.cc48
-rw-r--r--webkit/fileapi/sandbox_mount_point_provider.h16
-rw-r--r--webkit/fileapi/sandbox_mount_point_provider_unittest.cc2
-rw-r--r--webkit/fileapi/sandbox_quota_observer.cc14
-rw-r--r--webkit/fileapi/sandbox_quota_observer.h6
-rw-r--r--webkit/fileapi/syncable/canned_syncable_file_system.cc10
-rw-r--r--webkit/fileapi/syncable/canned_syncable_file_system.h4
-rw-r--r--webkit/fileapi/syncable/local_file_change_tracker.cc14
-rw-r--r--webkit/fileapi/syncable/local_file_change_tracker.h2
-rw-r--r--webkit/fileapi/syncable/local_file_sync_context.cc6
-rw-r--r--webkit/fileapi/syncable/local_file_sync_context.h4
-rw-r--r--webkit/fileapi/syncable/local_file_sync_context_unittest.cc12
-rw-r--r--webkit/fileapi/syncable/sync_file_metadata.h2
-rw-r--r--webkit/fileapi/syncable/syncable_file_system_operation.cc4
-rw-r--r--webkit/fileapi/syncable/syncable_file_system_util.cc6
-rw-r--r--webkit/fileapi/syncable/syncable_file_system_util.h3
-rw-r--r--webkit/fileapi/syncable/syncable_file_system_util_unittest.cc18
-rw-r--r--webkit/fileapi/test_file_set.cc6
-rw-r--r--webkit/fileapi/test_file_set.h6
-rw-r--r--webkit/fileapi/test_mount_point_provider.cc8
-rw-r--r--webkit/fileapi/test_mount_point_provider.h8
-rw-r--r--webkit/fileapi/upload_file_system_file_element_reader_unittest.cc4
-rw-r--r--webkit/glue/dom_operations_unittest.cc12
-rw-r--r--webkit/glue/dom_serializer_unittest.cc28
-rw-r--r--webkit/glue/glue_serialize.cc4
-rw-r--r--webkit/glue/glue_serialize.h2
-rw-r--r--webkit/glue/glue_serialize_unittest.cc6
-rw-r--r--webkit/glue/resource_loader_bridge.h2
-rw-r--r--webkit/glue/resource_request_body.cc2
-rw-r--r--webkit/glue/resource_request_body.h3
-rw-r--r--webkit/glue/resource_request_body_unittest.cc8
-rw-r--r--webkit/glue/simple_webmimeregistry_impl.cc2
-rw-r--r--webkit/glue/unittest_test_server.h2
-rw-r--r--webkit/glue/web_intent_data.cc2
-rw-r--r--webkit/glue/web_intent_data.h2
-rw-r--r--webkit/glue/web_intent_reply_data.cc2
-rw-r--r--webkit/glue/web_intent_reply_data.h4
-rw-r--r--webkit/glue/web_intent_reply_data_unittest.cc8
-rw-r--r--webkit/glue/webfileutilities_impl.cc16
-rw-r--r--webkit/media/crypto/ppapi/clear_key_cdm.cc2
-rw-r--r--webkit/mocks/mock_resource_loader_bridge.h4
-rw-r--r--webkit/plugins/npapi/plugin_host.cc4
-rw-r--r--webkit/plugins/npapi/plugin_instance.cc2
-rw-r--r--webkit/plugins/npapi/plugin_lib.cc4
-rw-r--r--webkit/plugins/npapi/plugin_lib.h6
-rw-r--r--webkit/plugins/npapi/plugin_lib_mac.mm4
-rw-r--r--webkit/plugins/npapi/plugin_lib_posix.cc9
-rw-r--r--webkit/plugins/npapi/plugin_lib_win.cc2
-rw-r--r--webkit/plugins/npapi/plugin_list.cc34
-rw-r--r--webkit/plugins/npapi/plugin_list.h25
-rw-r--r--webkit/plugins/npapi/plugin_list_mac.mm10
-rw-r--r--webkit/plugins/npapi/plugin_list_posix.cc36
-rw-r--r--webkit/plugins/npapi/plugin_list_unittest.cc10
-rw-r--r--webkit/plugins/npapi/plugin_list_win.cc74
-rw-r--r--webkit/plugins/npapi/plugin_stream.cc4
-rw-r--r--webkit/plugins/npapi/plugin_stream.h2
-rw-r--r--webkit/plugins/npapi/plugin_stream_posix.cc2
-rw-r--r--webkit/plugins/npapi/test/plugin_geturl_test.cc4
-rw-r--r--webkit/plugins/npapi/webplugin_delegate_impl.cc4
-rw-r--r--webkit/plugins/npapi/webplugin_delegate_impl.h6
-rw-r--r--webkit/plugins/npapi/webplugin_impl.cc2
-rw-r--r--webkit/plugins/npapi/webplugin_impl.h4
-rw-r--r--webkit/plugins/npapi/webplugin_page_delegate.h6
-rw-r--r--webkit/plugins/ppapi/file_callbacks.cc2
-rw-r--r--webkit/plugins/ppapi/file_callbacks.h2
-rw-r--r--webkit/plugins/ppapi/mock_plugin_delegate.cc8
-rw-r--r--webkit/plugins/ppapi/mock_plugin_delegate.h7
-rw-r--r--webkit/plugins/ppapi/plugin_delegate.h6
-rw-r--r--webkit/plugins/ppapi/plugin_module.cc4
-rw-r--r--webkit/plugins/ppapi/plugin_module.h13
-rw-r--r--webkit/plugins/ppapi/ppapi_unittest.cc2
-rw-r--r--webkit/plugins/ppapi/ppb_directory_reader_impl.cc6
-rw-r--r--webkit/plugins/ppapi/ppb_file_ref_impl.cc16
-rw-r--r--webkit/plugins/ppapi/ppb_file_ref_impl.h8
-rw-r--r--webkit/plugins/ppapi/quota_file_io_unittest.cc2
-rw-r--r--webkit/plugins/ppapi/url_request_info_util.cc2
-rw-r--r--webkit/plugins/webplugininfo.cc2
-rw-r--r--webkit/plugins/webplugininfo.h4
-rw-r--r--webkit/quota/mock_quota_manager.cc2
-rw-r--r--webkit/quota/mock_quota_manager.h2
-rw-r--r--webkit/quota/quota_database.cc2
-rw-r--r--webkit/quota/quota_database.h4
-rw-r--r--webkit/quota/quota_database_unittest.cc58
-rw-r--r--webkit/quota/quota_manager.cc6
-rw-r--r--webkit/quota/quota_manager.h9
-rw-r--r--webkit/quota/quota_manager_unittest.cc4
-rw-r--r--webkit/support/platform_support_android.cc10
-rw-r--r--webkit/support/platform_support_linux.cc8
-rw-r--r--webkit/support/platform_support_mac.mm16
-rw-r--r--webkit/support/platform_support_win.cc8
-rw-r--r--webkit/support/simple_database_system.cc8
-rw-r--r--webkit/support/simple_database_system.h2
-rw-r--r--webkit/support/test_webkit_platform_support.cc10
-rw-r--r--webkit/support/test_webkit_platform_support.h2
-rw-r--r--webkit/support/test_webplugin_page_delegate.cc4
-rw-r--r--webkit/support/test_webplugin_page_delegate.h4
-rw-r--r--webkit/support/webkit_support.cc42
-rw-r--r--webkit/support/webkit_support.h4
-rw-r--r--webkit/support/weburl_loader_mock_factory.cc8
-rw-r--r--webkit/support/weburl_loader_mock_factory.h2
-rw-r--r--webkit/tools/test_shell/image_decoder_unittest.cc40
-rw-r--r--webkit/tools/test_shell/image_decoder_unittest.h12
-rw-r--r--webkit/tools/test_shell/plugin_tests.cc12
-rw-r--r--webkit/tools/test_shell/run_all_tests.cc2
-rw-r--r--webkit/tools/test_shell/simple_appcache_system.cc2
-rw-r--r--webkit/tools/test_shell/simple_appcache_system.h6
-rw-r--r--webkit/tools/test_shell/simple_file_system.cc8
-rw-r--r--webkit/tools/test_shell/simple_file_system.h4
-rw-r--r--webkit/tools/test_shell/simple_resource_loader_bridge.cc12
-rw-r--r--webkit/tools/test_shell/simple_resource_loader_bridge.h7
-rw-r--r--webkit/tools/test_shell/test_shell.cc16
-rw-r--r--webkit/tools/test_shell/test_shell.h6
-rw-r--r--webkit/tools/test_shell/test_shell_gtk.cc18
-rw-r--r--webkit/tools/test_shell/test_shell_mac.mm20
-rw-r--r--webkit/tools/test_shell/test_shell_main.cc6
-rw-r--r--webkit/tools/test_shell/test_shell_request_context.cc6
-rw-r--r--webkit/tools/test_shell/test_shell_request_context.h6
-rw-r--r--webkit/tools/test_shell/test_shell_test.cc2
-rw-r--r--webkit/tools/test_shell/test_shell_test.h4
-rw-r--r--webkit/tools/test_shell/test_shell_webkit_init.cc6
-rw-r--r--webkit/tools/test_shell/test_shell_win.cc18
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.cc2
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.h4
-rw-r--r--webkit/tools/test_shell/test_webview_delegate_gtk.cc2
-rw-r--r--webkit/tools/test_shell/test_webview_delegate_mac.mm2
-rw-r--r--webkit/tools/test_shell/test_webview_delegate_win.cc2
-rw-r--r--webkit/tools/webcore_unit_tests/ICOImageDecoder_unittest.cpp4
-rw-r--r--win8/delegate_execute/chrome_util.cc17
-rw-r--r--win8/delegate_execute/chrome_util.h6
-rw-r--r--win8/delegate_execute/command_execute_impl.cc10
-rw-r--r--win8/delegate_execute/command_execute_impl.h4
-rw-r--r--win8/delegate_execute/delegate_execute_operation.cc3
-rw-r--r--win8/delegate_execute/delegate_execute_operation.h4
-rw-r--r--win8/delegate_execute/delegate_execute_util.cc4
-rw-r--r--win8/delegate_execute/delegate_execute_util.h4
-rw-r--r--win8/delegate_execute/delegate_execute_util_unittest.cc2
-rw-r--r--win8/metro_driver/file_picker_ash.h9
636 files changed, 3754 insertions, 3231 deletions
diff --git a/android_webview/browser/net/aw_network_delegate.cc b/android_webview/browser/net/aw_network_delegate.cc
index 0c21d06..bd69d38 100644
--- a/android_webview/browser/net/aw_network_delegate.cc
+++ b/android_webview/browser/net/aw_network_delegate.cc
@@ -87,7 +87,7 @@ bool AwNetworkDelegate::OnCanSetCookie(const net::URLRequest& request,
}
bool AwNetworkDelegate::OnCanAccessFile(const net::URLRequest& request,
- const FilePath& path) const {
+ const base::FilePath& path) const {
return true;
}
diff --git a/android_webview/browser/net/aw_network_delegate.h b/android_webview/browser/net/aw_network_delegate.h
index 281026d..de1af58 100644
--- a/android_webview/browser/net/aw_network_delegate.h
+++ b/android_webview/browser/net/aw_network_delegate.h
@@ -52,7 +52,7 @@ class AwNetworkDelegate : public net::NetworkDelegate {
const std::string& cookie_line,
net::CookieOptions* options) OVERRIDE;
virtual bool OnCanAccessFile(const net::URLRequest& request,
- const FilePath& path) const OVERRIDE;
+ const base::FilePath& path) const OVERRIDE;
virtual bool OnCanThrottleRequest(
const net::URLRequest& request) const OVERRIDE;
virtual int OnBeforeSocketStreamConnect(
diff --git a/base/android/path_utils.h b/base/android/path_utils.h
index 78f0267..6c632f2 100644
--- a/base/android/path_utils.h
+++ b/base/android/path_utils.h
@@ -9,9 +9,10 @@
#include "base/base_export.h"
+namespace base {
+
class FilePath;
-namespace base {
namespace android {
// Retrieves the absolute path to the data directory of the current
diff --git a/base/command_line.h b/base/command_line.h
index 7d8627f..aebda06 100644
--- a/base/command_line.h
+++ b/base/command_line.h
@@ -23,7 +23,9 @@
#include "base/base_export.h"
#include "build/build_config.h"
+namespace base {
class FilePath;
+}
class BASE_EXPORT CommandLine {
public:
@@ -43,7 +45,7 @@ class BASE_EXPORT CommandLine {
explicit CommandLine(NoProgram no_program);
// Construct a new command line with |program| as argv[0].
- explicit CommandLine(const FilePath& program);
+ explicit CommandLine(const base::FilePath& program);
// Construct a new command line from an argument list.
CommandLine(int argc, const CharType* const* argv);
@@ -92,8 +94,8 @@ class BASE_EXPORT CommandLine {
const StringVector& argv() const { return argv_; }
// Get and Set the program part of the command line string (the first item).
- FilePath GetProgram() const;
- void SetProgram(const FilePath& program);
+ base::FilePath GetProgram() const;
+ void SetProgram(const base::FilePath& program);
// Returns true if this command line contains the given switch.
// (Switch names are case-insensitive).
@@ -102,7 +104,7 @@ class BASE_EXPORT CommandLine {
// Returns the value associated with the given switch. If the switch has no
// value or isn't present, this method returns the empty string.
std::string GetSwitchValueASCII(const std::string& switch_string) const;
- FilePath GetSwitchValuePath(const std::string& switch_string) const;
+ base::FilePath GetSwitchValuePath(const std::string& switch_string) const;
StringType GetSwitchValueNative(const std::string& switch_string) const;
// Get a copy of all switches, along with their values.
@@ -111,7 +113,8 @@ class BASE_EXPORT CommandLine {
// Append a switch [with optional value] to the command line.
// Note: Switches will precede arguments regardless of appending order.
void AppendSwitch(const std::string& switch_string);
- void AppendSwitchPath(const std::string& switch_string, const FilePath& path);
+ void AppendSwitchPath(const std::string& switch_string,
+ const base::FilePath& path);
void AppendSwitchNative(const std::string& switch_string,
const StringType& value);
void AppendSwitchASCII(const std::string& switch_string,
@@ -131,7 +134,7 @@ class BASE_EXPORT CommandLine {
// AppendArg is primarily for ASCII; non-ASCII input is interpreted as UTF-8.
// Note: Switches will precede arguments regardless of appending order.
void AppendArg(const std::string& value);
- void AppendArgPath(const FilePath& value);
+ void AppendArgPath(const base::FilePath& value);
void AppendArgNative(const StringType& value);
// Append the switches and arguments from another command line to this one.
diff --git a/base/event_recorder.h b/base/event_recorder.h
index 979e806..bff87ed 100644
--- a/base/event_recorder.h
+++ b/base/event_recorder.h
@@ -15,10 +15,10 @@
#include <windows.h>
#endif
-class FilePath;
-
namespace base {
+class FilePath;
+
// A class for recording and playing back keyboard and mouse input events.
//
// Note - if you record events, and the playback with the windows in
diff --git a/base/file_path.h b/base/file_path.h
index 81de702..e5c4b84 100644
--- a/base/file_path.h
+++ b/base/file_path.h
@@ -125,6 +125,8 @@
class Pickle;
class PickleIterator;
+namespace base {
+
// An abstraction to isolate users from the differences between native
// pathnames on different platforms.
class BASE_EXPORT FilePath {
@@ -398,8 +400,13 @@ class BASE_EXPORT FilePath {
StringType path_;
};
+} // namespace base
+
+// TODO(brettw) remove this once callers properly use the base namespace.
+using base::FilePath;
+
// This is required by googletest to print a readable output on test failures.
-BASE_EXPORT extern void PrintTo(const FilePath& path, std::ostream* out);
+BASE_EXPORT extern void PrintTo(const base::FilePath& path, std::ostream* out);
// Macros for string literal initialization of FilePath::CharType[], and for
// using a FilePath::CharType[] in a printf-style format string.
@@ -419,15 +426,15 @@ namespace BASE_HASH_NAMESPACE {
#if defined(COMPILER_GCC)
template<>
-struct hash<FilePath> {
- size_t operator()(const FilePath& f) const {
- return hash<FilePath::StringType>()(f.value());
+struct hash<base::FilePath> {
+ size_t operator()(const base::FilePath& f) const {
+ return hash<base::FilePath::StringType>()(f.value());
}
};
#elif defined(COMPILER_MSVC)
-inline size_t hash_value(const FilePath& f) {
+inline size_t hash_value(const base::FilePath& f) {
return hash_value(f.value());
}
diff --git a/base/file_util.h b/base/file_util.h
index ffa4399..b450087 100644
--- a/base/file_util.h
+++ b/base/file_util.h
@@ -49,19 +49,20 @@ extern bool g_bug108724_debug;
// Functions that operate purely on a path string w/o touching the filesystem:
// Returns true if the given path ends with a path separator character.
-BASE_EXPORT bool EndsWithSeparator(const FilePath& path);
+BASE_EXPORT bool EndsWithSeparator(const base::FilePath& path);
// Makes sure that |path| ends with a separator IFF path is a directory that
// exists. Returns true if |path| is an existing directory, false otherwise.
-BASE_EXPORT bool EnsureEndsWithSeparator(FilePath* path);
+BASE_EXPORT bool EnsureEndsWithSeparator(base::FilePath* path);
// Convert provided relative path into an absolute path. Returns false on
// error. On POSIX, this function fails if the path does not exist.
-BASE_EXPORT bool AbsolutePath(FilePath* path);
+BASE_EXPORT bool AbsolutePath(base::FilePath* path);
// Returns true if |parent| contains |child|. Both paths are converted to
// absolute paths before doing the comparison.
-BASE_EXPORT bool ContainsPath(const FilePath& parent, const FilePath& child);
+BASE_EXPORT bool ContainsPath(const base::FilePath& parent,
+ const base::FilePath& child);
//-----------------------------------------------------------------------------
// Functions that involve filesystem access or modification:
@@ -74,7 +75,7 @@ BASE_EXPORT bool ContainsPath(const FilePath& parent, const FilePath& child);
// timestmap of file creation time. If you need to avoid such
// mis-detection perfectly, you should wait one second before
// obtaining |file_time|.
-BASE_EXPORT int CountFilesCreatedAfter(const FilePath& path,
+BASE_EXPORT int CountFilesCreatedAfter(const base::FilePath& path,
const base::Time& file_time);
// Returns the total number of bytes used by all the files under |root_path|.
@@ -82,7 +83,7 @@ BASE_EXPORT int CountFilesCreatedAfter(const FilePath& path,
//
// This function is implemented using the FileEnumerator class so it is not
// particularly speedy in any platform.
-BASE_EXPORT int64 ComputeDirectorySize(const FilePath& root_path);
+BASE_EXPORT int64 ComputeDirectorySize(const base::FilePath& root_path);
// Returns the total number of bytes used by all files matching the provided
// |pattern|, on this |directory| (without recursion). If the path does not
@@ -90,8 +91,8 @@ BASE_EXPORT int64 ComputeDirectorySize(const FilePath& root_path);
//
// This function is implemented using the FileEnumerator class so it is not
// particularly speedy in any platform.
-BASE_EXPORT int64 ComputeFilesSize(const FilePath& directory,
- const FilePath::StringType& pattern);
+BASE_EXPORT int64 ComputeFilesSize(const base::FilePath& directory,
+ const base::FilePath::StringType& pattern);
// Deletes the given path, whether it's a file or a directory.
// If it's a directory, it's perfectly happy to delete all of the
@@ -104,7 +105,7 @@ BASE_EXPORT int64 ComputeFilesSize(const FilePath& directory,
//
// WARNING: USING THIS WITH recursive==true IS EQUIVALENT
// TO "rm -rf", SO USE WITH CAUTION.
-BASE_EXPORT bool Delete(const FilePath& path, bool recursive);
+BASE_EXPORT bool Delete(const base::FilePath& path, bool recursive);
#if defined(OS_WIN)
// Schedules to delete the given path, whether it's a file or a directory, until
@@ -112,25 +113,27 @@ BASE_EXPORT bool Delete(const FilePath& path, bool recursive);
// Note:
// 1) The file/directory to be deleted should exist in a temp folder.
// 2) The directory to be deleted must be empty.
-BASE_EXPORT bool DeleteAfterReboot(const FilePath& path);
+BASE_EXPORT bool DeleteAfterReboot(const base::FilePath& path);
#endif
// Moves the given path, whether it's a file or a directory.
// If a simple rename is not possible, such as in the case where the paths are
// on different volumes, this will attempt to copy and delete. Returns
// true for success.
-BASE_EXPORT bool Move(const FilePath& from_path, const FilePath& to_path);
+BASE_EXPORT bool Move(const base::FilePath& from_path,
+ const base::FilePath& to_path);
// Renames file |from_path| to |to_path|. Both paths must be on the same
// volume, or the function will fail. Destination file will be created
// if it doesn't exist. Prefer this function over Move when dealing with
// temporary files. On Windows it preserves attributes of the target file.
// Returns true on success.
-BASE_EXPORT bool ReplaceFile(const FilePath& from_path,
- const FilePath& to_path);
+BASE_EXPORT bool ReplaceFile(const base::FilePath& from_path,
+ const base::FilePath& to_path);
// Copies a single file. Use CopyDirectory to copy directories.
-BASE_EXPORT bool CopyFile(const FilePath& from_path, const FilePath& to_path);
+BASE_EXPORT bool CopyFile(const base::FilePath& from_path,
+ const base::FilePath& to_path);
// Copies the given path, and optionally all subdirectories and their contents
// as well.
@@ -139,36 +142,37 @@ BASE_EXPORT bool CopyFile(const FilePath& from_path, const FilePath& to_path);
// Don't use wildcards on the names, it may stop working without notice.
//
// If you only need to copy a file use CopyFile, it's faster.
-BASE_EXPORT bool CopyDirectory(const FilePath& from_path,
- const FilePath& to_path,
+BASE_EXPORT bool CopyDirectory(const base::FilePath& from_path,
+ const base::FilePath& to_path,
bool recursive);
// Returns true if the given path exists on the local filesystem,
// false otherwise.
-BASE_EXPORT bool PathExists(const FilePath& path);
+BASE_EXPORT bool PathExists(const base::FilePath& path);
// Returns true if the given path is writable by the user, false otherwise.
-BASE_EXPORT bool PathIsWritable(const FilePath& path);
+BASE_EXPORT bool PathIsWritable(const base::FilePath& path);
// Returns true if the given path exists and is a directory, false otherwise.
-BASE_EXPORT bool DirectoryExists(const FilePath& path);
+BASE_EXPORT bool DirectoryExists(const base::FilePath& path);
// Returns true if the contents of the two files given are equal, false
// otherwise. If either file can't be read, returns false.
-BASE_EXPORT bool ContentsEqual(const FilePath& filename1,
- const FilePath& filename2);
+BASE_EXPORT bool ContentsEqual(const base::FilePath& filename1,
+ const base::FilePath& filename2);
// Returns true if the contents of the two text files given are equal, false
// otherwise. This routine treats "\r\n" and "\n" as equivalent.
-BASE_EXPORT bool TextContentsEqual(const FilePath& filename1,
- const FilePath& filename2);
+BASE_EXPORT bool TextContentsEqual(const base::FilePath& filename1,
+ const base::FilePath& filename2);
// Read the file at |path| into |contents|, returning true on success.
// This function fails if the |path| contains path traversal components ('..').
// |contents| may be NULL, in which case this function is useful for its
// side effect of priming the disk cache.
// Useful for unit tests.
-BASE_EXPORT bool ReadFileToString(const FilePath& path, std::string* contents);
+BASE_EXPORT bool ReadFileToString(const base::FilePath& path,
+ std::string* contents);
#if defined(OS_POSIX)
// Read exactly |bytes| bytes from file descriptor |fd|, storing the result
@@ -178,12 +182,13 @@ BASE_EXPORT bool ReadFromFD(int fd, char* buffer, size_t bytes);
// Creates a symbolic link at |symlink| pointing to |target|. Returns
// false on failure.
-BASE_EXPORT bool CreateSymbolicLink(const FilePath& target,
- const FilePath& symlink);
+BASE_EXPORT bool CreateSymbolicLink(const base::FilePath& target,
+ const base::FilePath& symlink);
// Reads the given |symlink| and returns where it points to in |target|.
// Returns false upon failure.
-BASE_EXPORT bool ReadSymbolicLink(const FilePath& symlink, FilePath* target);
+BASE_EXPORT bool ReadSymbolicLink(const base::FilePath& symlink,
+ base::FilePath* target);
// Bits ans masks of the file permission.
enum FilePermissionBits {
@@ -206,11 +211,11 @@ enum FilePermissionBits {
// Reads the permission of the given |path|, storing the file permission
// bits in |mode|. If |path| is symbolic link, |mode| is the permission of
// a file which the symlink points to.
-BASE_EXPORT bool GetPosixFilePermissions(const FilePath& path,
+BASE_EXPORT bool GetPosixFilePermissions(const base::FilePath& path,
int* mode);
// Sets the permission of the given |path|. If |path| is symbolic link, sets
// the permission of a file which the symlink points to.
-BASE_EXPORT bool SetPosixFilePermissions(const FilePath& path,
+BASE_EXPORT bool SetPosixFilePermissions(const base::FilePath& path,
int mode);
#endif // defined(OS_POSIX)
@@ -219,74 +224,76 @@ BASE_EXPORT bool SetPosixFilePermissions(const FilePath& path,
// Returns true if all operations succeed.
// This function simulates Move(), but unlike Move() it works across volumes.
// This fuction is not transactional.
-BASE_EXPORT bool CopyAndDeleteDirectory(const FilePath& from_path,
- const FilePath& to_path);
+BASE_EXPORT bool CopyAndDeleteDirectory(const base::FilePath& from_path,
+ const base::FilePath& to_path);
#endif // defined(OS_WIN)
// Return true if the given directory is empty
-BASE_EXPORT bool IsDirectoryEmpty(const FilePath& dir_path);
+BASE_EXPORT bool IsDirectoryEmpty(const base::FilePath& dir_path);
// Get the temporary directory provided by the system.
// WARNING: DON'T USE THIS. If you want to create a temporary file, use one of
// the functions below.
-BASE_EXPORT bool GetTempDir(FilePath* path);
+BASE_EXPORT bool GetTempDir(base::FilePath* path);
// Get a temporary directory for shared memory files.
// Only useful on POSIX; redirects to GetTempDir() on Windows.
-BASE_EXPORT bool GetShmemTempDir(FilePath* path, bool executable);
+BASE_EXPORT bool GetShmemTempDir(base::FilePath* path, bool executable);
// Get the home directory. This is more complicated than just getenv("HOME")
// as it knows to fall back on getpwent() etc.
-BASE_EXPORT FilePath GetHomeDir();
+BASE_EXPORT base::FilePath GetHomeDir();
// Creates a temporary file. The full path is placed in |path|, and the
// function returns true if was successful in creating the file. The file will
// be empty and all handles closed after this function returns.
-BASE_EXPORT bool CreateTemporaryFile(FilePath* path);
+BASE_EXPORT bool CreateTemporaryFile(base::FilePath* path);
// Same as CreateTemporaryFile but the file is created in |dir|.
-BASE_EXPORT bool CreateTemporaryFileInDir(const FilePath& dir,
- FilePath* temp_file);
+BASE_EXPORT bool CreateTemporaryFileInDir(const base::FilePath& dir,
+ base::FilePath* temp_file);
// Create and open a temporary file. File is opened for read/write.
// The full path is placed in |path|.
// Returns a handle to the opened file or NULL if an error occured.
-BASE_EXPORT FILE* CreateAndOpenTemporaryFile(FilePath* path);
+BASE_EXPORT FILE* CreateAndOpenTemporaryFile(base::FilePath* path);
// Like above but for shmem files. Only useful for POSIX.
// The executable flag says the file needs to support using
// mprotect with PROT_EXEC after mapping.
-BASE_EXPORT FILE* CreateAndOpenTemporaryShmemFile(FilePath* path,
+BASE_EXPORT FILE* CreateAndOpenTemporaryShmemFile(base::FilePath* path,
bool executable);
// Similar to CreateAndOpenTemporaryFile, but the file is created in |dir|.
-BASE_EXPORT FILE* CreateAndOpenTemporaryFileInDir(const FilePath& dir,
- FilePath* path);
+BASE_EXPORT FILE* CreateAndOpenTemporaryFileInDir(const base::FilePath& dir,
+ base::FilePath* path);
// Create a new directory. If prefix is provided, the new directory name is in
// the format of prefixyyyy.
// NOTE: prefix is ignored in the POSIX implementation.
// If success, return true and output the full path of the directory created.
-BASE_EXPORT bool CreateNewTempDirectory(const FilePath::StringType& prefix,
- FilePath* new_temp_path);
+BASE_EXPORT bool CreateNewTempDirectory(
+ const base::FilePath::StringType& prefix,
+ base::FilePath* new_temp_path);
// Create a directory within another directory.
// Extra characters will be appended to |prefix| to ensure that the
// new directory does not have the same name as an existing directory.
-BASE_EXPORT bool CreateTemporaryDirInDir(const FilePath& base_dir,
- const FilePath::StringType& prefix,
- FilePath* new_dir);
+BASE_EXPORT bool CreateTemporaryDirInDir(
+ const base::FilePath& base_dir,
+ const base::FilePath::StringType& prefix,
+ base::FilePath* new_dir);
// Creates a directory, as well as creating any parent directories, if they
// don't exist. Returns 'true' on successful creation, or if the directory
// already exists. The directory is only readable by the current user.
-BASE_EXPORT bool CreateDirectory(const FilePath& full_path);
+BASE_EXPORT bool CreateDirectory(const base::FilePath& full_path);
// Returns the file size. Returns true on success.
-BASE_EXPORT bool GetFileSize(const FilePath& file_path, int64* file_size);
+BASE_EXPORT bool GetFileSize(const base::FilePath& file_path, int64* file_size);
// Returns true if the given path's base name is ".".
-BASE_EXPORT bool IsDot(const FilePath& path);
+BASE_EXPORT bool IsDot(const base::FilePath& path);
// Returns true if the given path's base name is "..".
-BASE_EXPORT bool IsDotDot(const FilePath& path);
+BASE_EXPORT bool IsDotDot(const base::FilePath& path);
// Sets |real_path| to |path| with symbolic links and junctions expanded.
// On windows, make sure the path starts with a lettered drive.
@@ -294,47 +301,48 @@ BASE_EXPORT bool IsDotDot(const FilePath& path);
// a directory or to a nonexistent path. On windows, this function will
// fail if |path| is a junction or symlink that points to an empty file,
// or if |real_path| would be longer than MAX_PATH characters.
-BASE_EXPORT bool NormalizeFilePath(const FilePath& path, FilePath* real_path);
+BASE_EXPORT bool NormalizeFilePath(const base::FilePath& path,
+ base::FilePath* real_path);
#if defined(OS_WIN)
// Given a path in NT native form ("\Device\HarddiskVolumeXX\..."),
// return in |drive_letter_path| the equivalent path that starts with
// a drive letter ("C:\..."). Return false if no such path exists.
-BASE_EXPORT bool DevicePathToDriveLetterPath(const FilePath& device_path,
- FilePath* drive_letter_path);
+BASE_EXPORT bool DevicePathToDriveLetterPath(const base::FilePath& device_path,
+ base::FilePath* drive_letter_path);
// Given an existing file in |path|, set |real_path| to the path
// in native NT format, of the form "\Device\HarddiskVolumeXX\..".
// Returns false if the path can not be found. Empty files cannot
// be resolved with this function.
-BASE_EXPORT bool NormalizeToNativeFilePath(const FilePath& path,
- FilePath* nt_path);
+BASE_EXPORT bool NormalizeToNativeFilePath(const base::FilePath& path,
+ base::FilePath* nt_path);
#endif
// This function will return if the given file is a symlink or not.
-BASE_EXPORT bool IsLink(const FilePath& file_path);
+BASE_EXPORT bool IsLink(const base::FilePath& file_path);
// Returns information about the given file path.
-BASE_EXPORT bool GetFileInfo(const FilePath& file_path,
+BASE_EXPORT bool GetFileInfo(const base::FilePath& file_path,
base::PlatformFileInfo* info);
// Sets the time of the last access and the time of the last modification.
-BASE_EXPORT bool TouchFile(const FilePath& path,
+BASE_EXPORT bool TouchFile(const base::FilePath& path,
const base::Time& last_accessed,
const base::Time& last_modified);
// Set the time of the last modification. Useful for unit tests.
-BASE_EXPORT bool SetLastModifiedTime(const FilePath& path,
+BASE_EXPORT bool SetLastModifiedTime(const base::FilePath& path,
const base::Time& last_modified);
#if defined(OS_POSIX)
// Store inode number of |path| in |inode|. Return true on success.
-BASE_EXPORT bool GetInode(const FilePath& path, ino_t* inode);
+BASE_EXPORT bool GetInode(const base::FilePath& path, ino_t* inode);
#endif
// Wrapper for fopen-like calls. Returns non-NULL FILE* on success.
-BASE_EXPORT FILE* OpenFile(const FilePath& filename, const char* mode);
+BASE_EXPORT FILE* OpenFile(const base::FilePath& filename, const char* mode);
// Closes file opened by OpenFile. Returns true on success.
BASE_EXPORT bool CloseFile(FILE* file);
@@ -345,32 +353,33 @@ BASE_EXPORT bool TruncateFile(FILE* file);
// Reads the given number of bytes from the file into the buffer. Returns
// the number of read bytes, or -1 on error.
-BASE_EXPORT int ReadFile(const FilePath& filename, char* data, int size);
+BASE_EXPORT int ReadFile(const base::FilePath& filename, char* data, int size);
// Writes the given buffer into the file, overwriting any data that was
// previously there. Returns the number of bytes written, or -1 on error.
-BASE_EXPORT int WriteFile(const FilePath& filename, const char* data, int size);
+BASE_EXPORT int WriteFile(const base::FilePath& filename, const char* data,
+ int size);
#if defined(OS_POSIX)
// Append the data to |fd|. Does not close |fd| when done.
BASE_EXPORT int WriteFileDescriptor(const int fd, const char* data, int size);
#endif
// Append the given buffer into the file. Returns the number of bytes written,
// or -1 on error.
-BASE_EXPORT int AppendToFile(const FilePath& filename,
+BASE_EXPORT int AppendToFile(const base::FilePath& filename,
const char* data, int size);
// Gets the current working directory for the process.
-BASE_EXPORT bool GetCurrentDirectory(FilePath* path);
+BASE_EXPORT bool GetCurrentDirectory(base::FilePath* path);
// Sets the current working directory for the process.
-BASE_EXPORT bool SetCurrentDirectory(const FilePath& path);
+BASE_EXPORT bool SetCurrentDirectory(const base::FilePath& path);
// Attempts to find a number that can be appended to the |path| to make it
// unique. If |path| does not exist, 0 is returned. If it fails to find such
// a number, -1 is returned. If |suffix| is not empty, also checks the
// existence of it with the given suffix.
-BASE_EXPORT int GetUniquePathNumber(const FilePath& path,
- const FilePath::StringType& suffix);
+BASE_EXPORT int GetUniquePathNumber(const base::FilePath& path,
+ const base::FilePath::StringType& suffix);
#if defined(OS_POSIX)
// Test that |path| can only be changed by a given user and members of
@@ -384,8 +393,8 @@ BASE_EXPORT int GetUniquePathNumber(const FilePath& path,
// * Are not symbolic links.
// This is useful for checking that a config file is administrator-controlled.
// |base| must contain |path|.
-BASE_EXPORT bool VerifyPathControlledByUser(const FilePath& base,
- const FilePath& path,
+BASE_EXPORT bool VerifyPathControlledByUser(const base::FilePath& base,
+ const base::FilePath& path,
uid_t owner_uid,
const std::set<gid_t>& group_gids);
#endif // defined(OS_POSIX)
@@ -398,7 +407,7 @@ BASE_EXPORT bool VerifyPathControlledByUser(const FilePath& base,
// the filesystem, are owned by the superuser, controlled by the group
// "admin", are not writable by all users, and contain no symbolic links.
// Will return false if |path| does not exist.
-BASE_EXPORT bool VerifyPathControlledByAdmin(const FilePath& path);
+BASE_EXPORT bool VerifyPathControlledByAdmin(const base::FilePath& path);
#endif // defined(OS_MACOSX) && !defined(OS_IOS)
// A class to handle auto-closing of FILE*'s.
@@ -473,17 +482,17 @@ class BASE_EXPORT FileEnumerator {
// NOTE: the pattern only matches the contents of root_path, not files in
// recursive subdirectories.
// TODO(erikkay): Fix the pattern matching to work at all levels.
- FileEnumerator(const FilePath& root_path,
+ FileEnumerator(const base::FilePath& root_path,
bool recursive,
int file_type);
- FileEnumerator(const FilePath& root_path,
+ FileEnumerator(const base::FilePath& root_path,
bool recursive,
int file_type,
- const FilePath::StringType& pattern);
+ const base::FilePath::StringType& pattern);
~FileEnumerator();
// Returns an empty string if there are no more results.
- FilePath Next();
+ base::FilePath Next();
// Write the file info into |info|.
void GetFindInfo(FindInfo* info);
@@ -491,13 +500,13 @@ class BASE_EXPORT FileEnumerator {
// Looks inside a FindInfo and determines if it's a directory.
static bool IsDirectory(const FindInfo& info);
- static FilePath GetFilename(const FindInfo& find_info);
+ static base::FilePath GetFilename(const FindInfo& find_info);
static int64 GetFilesize(const FindInfo& find_info);
static base::Time GetLastModifiedTime(const FindInfo& find_info);
private:
// Returns true if the given path should be skipped in enumeration.
- bool ShouldSkip(const FilePath& path);
+ bool ShouldSkip(const base::FilePath& path);
#if defined(OS_WIN)
@@ -507,13 +516,13 @@ class BASE_EXPORT FileEnumerator {
HANDLE find_handle_;
#elif defined(OS_POSIX)
struct DirectoryEntryInfo {
- FilePath filename;
+ base::FilePath filename;
struct stat stat;
};
// Read the filenames in source into the vector of DirectoryEntryInfo's
static bool ReadDirectory(std::vector<DirectoryEntryInfo>* entries,
- const FilePath& source, bool show_links);
+ const base::FilePath& source, bool show_links);
// The files in the current directory
std::vector<DirectoryEntryInfo> directory_entries_;
@@ -522,14 +531,15 @@ class BASE_EXPORT FileEnumerator {
size_t current_directory_entry_;
#endif
- FilePath root_path_;
+ base::FilePath root_path_;
bool recursive_;
int file_type_;
- FilePath::StringType pattern_; // Empty when we want to find everything.
+ base::FilePath::StringType pattern_; // Empty when we want to find
+ // everything.
// A stack that keeps track of which subdirectories we still need to
// enumerate in the breadth-first search.
- std::stack<FilePath> pending_paths_;
+ std::stack<base::FilePath> pending_paths_;
DISALLOW_COPY_AND_ASSIGN(FileEnumerator);
};
@@ -545,7 +555,7 @@ class BASE_EXPORT MemoryMappedFile {
// then this method will fail and return false. If it cannot open the file,
// the file does not exist, or the memory mapping fails, it will return false.
// Later we may want to allow the user to specify access.
- bool Initialize(const FilePath& file_name);
+ bool Initialize(const base::FilePath& file_name);
// As above, but works with an already-opened file. MemoryMappedFile will take
// ownership of |file| and close it when done.
bool Initialize(base::PlatformFile file);
@@ -553,7 +563,7 @@ class BASE_EXPORT MemoryMappedFile {
#if defined(OS_WIN)
// Opens an existing file and maps it as an image section. Please refer to
// the Initialize function above for additional information.
- bool InitializeAsImageSection(const FilePath& file_name);
+ bool InitializeAsImageSection(const base::FilePath& file_name);
#endif // OS_WIN
const uint8* data() const { return data_; }
@@ -564,7 +574,7 @@ class BASE_EXPORT MemoryMappedFile {
private:
// Open the given file and pass it to MapFileToMemoryInternal().
- bool MapFileToMemory(const FilePath& file_name);
+ bool MapFileToMemory(const base::FilePath& file_name);
// Map the file to memory, set data_ to that memory address. Return true on
// success, false on any kind of failure. This is a helper for Initialize().
@@ -609,7 +619,8 @@ enum FileSystemType {
// Attempts determine the FileSystemType for |path|.
// Returns false if |path| doesn't exist.
-BASE_EXPORT bool GetFileSystemType(const FilePath& path, FileSystemType* type);
+BASE_EXPORT bool GetFileSystemType(const base::FilePath& path,
+ FileSystemType* type);
#endif
} // namespace file_util
diff --git a/base/file_version_info.h b/base/file_version_info.h
index 84eec41..bffa322 100644
--- a/base/file_version_info.h
+++ b/base/file_version_info.h
@@ -18,7 +18,9 @@ extern "C" IMAGE_DOS_HEADER __ImageBase;
#include "base/base_export.h"
#include "base/string16.h"
+namespace base {
class FilePath;
+}
// Provides an interface for accessing the version information for a file. This
// is the information you access when you select a file in the Windows Explorer,
@@ -38,7 +40,7 @@ class FileVersionInfo {
// goes wrong (typically the file does not exit or cannot be opened). The
// returned object should be deleted when you are done with it.
BASE_EXPORT static FileVersionInfo* CreateFileVersionInfo(
- const FilePath& file_path);
+ const base::FilePath& file_path);
#endif // OS_WIN || OS_MACOSX
#if defined(OS_WIN)
diff --git a/base/i18n/file_util_icu.h b/base/i18n/file_util_icu.h
index 4672135..cf22e7c 100644
--- a/base/i18n/file_util_icu.h
+++ b/base/i18n/file_util_icu.h
@@ -25,18 +25,18 @@ BASE_I18N_EXPORT bool IsFilenameLegal(const string16& file_name);
// file_name == "bad:file*name?.txt", changed to: "bad-file-name-.txt" when
// 'replace_char' is '-'.
BASE_I18N_EXPORT void ReplaceIllegalCharactersInPath(
- FilePath::StringType* file_name,
+ base::FilePath::StringType* file_name,
char replace_char);
// Compares two filenames using the current locale information. This can be
// used to sort directory listings. It behaves like "operator<" for use in
// std::sort.
-BASE_I18N_EXPORT bool LocaleAwareCompareFilenames(const FilePath& a,
- const FilePath& b);
+BASE_I18N_EXPORT bool LocaleAwareCompareFilenames(const base::FilePath& a,
+ const base::FilePath& b);
// Calculates the canonical file-system representation of |file_name| base name.
// Modifies |file_name| in place. No-op if not on ChromeOS.
-BASE_I18N_EXPORT void NormalizeFileNameEncoding(FilePath* file_name);
+BASE_I18N_EXPORT void NormalizeFileNameEncoding(base::FilePath* file_name);
} // namespace file_util
diff --git a/base/i18n/rtl.h b/base/i18n/rtl.h
index 202a126..2345931 100644
--- a/base/i18n/rtl.h
+++ b/base/i18n/rtl.h
@@ -12,9 +12,10 @@
#include "base/string16.h"
#include "build/build_config.h"
+namespace base {
+
class FilePath;
-namespace base {
namespace i18n {
const char16 kRightToLeftMark = 0x200F;
diff --git a/base/mac/bundle_locations.h b/base/mac/bundle_locations.h
index dd84b59..1d96539 100644
--- a/base/mac/bundle_locations.h
+++ b/base/mac/bundle_locations.h
@@ -15,9 +15,10 @@ class NSBundle;
class NSString;
#endif // __OBJC__
+namespace base {
+
class FilePath;
-namespace base {
namespace mac {
// This file provides several functions to explicitly request the various
diff --git a/base/mac/foundation_util.h b/base/mac/foundation_util.h
index e6ad784..0d78c55 100644
--- a/base/mac/foundation_util.h
+++ b/base/mac/foundation_util.h
@@ -28,8 +28,6 @@ class NSString;
#include <ApplicationServices/ApplicationServices.h>
#endif
-class FilePath;
-
// Adapted from NSPathUtilities.h and NSObjCRuntime.h.
#if __LP64__ || NS_BUILD_32_LIKE_64
typedef unsigned long NSSearchPathDirectory;
@@ -43,6 +41,9 @@ typedef struct OpaqueSecTrustRef* SecACLRef;
typedef struct OpaqueSecTrustedApplicationRef* SecTrustedApplicationRef;
namespace base {
+
+class FilePath;
+
namespace mac {
// Returns true if the application is running from a bundle
diff --git a/base/mac/mac_util.h b/base/mac/mac_util.h
index 1a35b33..2190b24 100644
--- a/base/mac/mac_util.h
+++ b/base/mac/mac_util.h
@@ -21,9 +21,10 @@
class NSImage;
#endif // __OBJC__
+namespace base {
+
class FilePath;
-namespace base {
namespace mac {
// Full screen modes, in increasing order of priority. More permissive modes
diff --git a/base/native_library.h b/base/native_library.h
index 845989d..37d7229 100644
--- a/base/native_library.h
+++ b/base/native_library.h
@@ -26,10 +26,10 @@
#define CDECL
#endif
-class FilePath;
-
namespace base {
+class FilePath;
+
#if defined(OS_WIN)
typedef HMODULE NativeLibrary;
#elif defined(OS_MACOSX)
diff --git a/base/nix/mime_util_xdg.h b/base/nix/mime_util_xdg.h
index 444ce4f..79dba89 100644
--- a/base/nix/mime_util_xdg.h
+++ b/base/nix/mime_util_xdg.h
@@ -10,9 +10,10 @@
#include "base/base_export.h"
#include "build/build_config.h"
+namespace base {
+
class FilePath;
-namespace base {
namespace nix {
// Gets the mime type for a file based on its filename. The file path does not
diff --git a/base/nix/xdg_util.h b/base/nix/xdg_util.h
index fc72663..a8b7784 100644
--- a/base/nix/xdg_util.h
+++ b/base/nix/xdg_util.h
@@ -18,11 +18,10 @@
#error asdf
#endif
-class FilePath;
-
namespace base {
class Environment;
+class FilePath;
namespace nix {
diff --git a/base/path_service.h b/base/path_service.h
index 8a7defe..832b92b 100644
--- a/base/path_service.h
+++ b/base/path_service.h
@@ -12,9 +12,8 @@
#include "base/gtest_prod_util.h"
#include "build/build_config.h"
-class FilePath;
-
namespace base {
+class FilePath;
class ScopedPathOverride;
} // namespace
@@ -30,7 +29,7 @@ class BASE_EXPORT PathService {
//
// Returns true if the directory or file was successfully retrieved. On
// failure, 'path' will not be changed.
- static bool Get(int key, FilePath* path);
+ static bool Get(int key, base::FilePath* path);
// Overrides the path to a special directory or file. This cannot be used to
// change the value of DIR_CURRENT, but that should be obvious. Also, if the
@@ -42,13 +41,13 @@ class BASE_EXPORT PathService {
//
// WARNING: Consumers of PathService::Get may expect paths to be constant
// over the lifetime of the app, so this method should be used with caution.
- static bool Override(int key, const FilePath& path);
+ static bool Override(int key, const base::FilePath& path);
// This function does the same as PathService::Override but it takes an extra
// parameter |create| which guides whether the directory to be overriden must
// be created in case it doesn't exist already.
static bool OverrideAndCreateIfNeeded(int key,
- const FilePath& path,
+ const base::FilePath& path,
bool create);
// To extend the set of supported keys, you can register a path provider,
@@ -59,7 +58,7 @@ class BASE_EXPORT PathService {
// WARNING: This function could be called on any thread from which the
// PathService is used, so a the ProviderFunc MUST BE THREADSAFE.
//
- typedef bool (*ProviderFunc)(int, FilePath*);
+ typedef bool (*ProviderFunc)(int, base::FilePath*);
// Call to register a path provider. You must specify the range "[key_start,
// key_end)" of supported path keys.
diff --git a/base/perftimer.h b/base/perftimer.h
index 1ac1a7d..9a23ff1 100644
--- a/base/perftimer.h
+++ b/base/perftimer.h
@@ -10,14 +10,16 @@
#include "base/basictypes.h"
#include "base/time.h"
+namespace base {
class FilePath;
+}
// ----------------------------------------------------------------------
// Initializes and finalizes the perf log. These functions should be
// called at the beginning and end (respectively) of running all the
// performance tests. The init function returns true on success.
// ----------------------------------------------------------------------
-bool InitPerfLog(const FilePath& log_path);
+bool InitPerfLog(const base::FilePath& log_path);
void FinalizePerfLog();
// ----------------------------------------------------------------------
diff --git a/base/prefs/json_pref_store.h b/base/prefs/json_pref_store.h
index 49dd71a..479d706 100644
--- a/base/prefs/json_pref_store.h
+++ b/base/prefs/json_pref_store.h
@@ -20,12 +20,12 @@
namespace base {
class DictionaryValue;
+class FilePath;
class SequencedWorkerPool;
class SequencedTaskRunner;
class Value;
}
-class FilePath;
// A writable PrefStore implementation that is used for user preferences.
class BASE_PREFS_EXPORT JsonPrefStore
@@ -35,12 +35,12 @@ class BASE_PREFS_EXPORT JsonPrefStore
// Returns instance of SequencedTaskRunner which guarantees that file
// operations on the same file will be executed in sequenced order.
static scoped_refptr<base::SequencedTaskRunner> GetTaskRunnerForFile(
- const FilePath& pref_filename,
+ const base::FilePath& pref_filename,
base::SequencedWorkerPool* worker_pool);
// |sequenced_task_runner| is must be a shutdown-blocking task runner, ideally
// created by GetTaskRunnerForFile() method above.
- JsonPrefStore(const FilePath& pref_filename,
+ JsonPrefStore(const base::FilePath& pref_filename,
base::SequencedTaskRunner* sequenced_task_runner);
// PrefStore overrides:
@@ -78,7 +78,7 @@ class BASE_PREFS_EXPORT JsonPrefStore
// ImportantFileWriter::DataSerializer overrides:
virtual bool SerializeData(std::string* output) OVERRIDE;
- FilePath path_;
+ base::FilePath path_;
const scoped_refptr<base::SequencedTaskRunner> sequenced_task_runner_;
scoped_ptr<base::DictionaryValue> prefs_;
diff --git a/base/prefs/public/pref_service_base.h b/base/prefs/public/pref_service_base.h
index 4115fa4..3508f40 100644
--- a/base/prefs/public/pref_service_base.h
+++ b/base/prefs/public/pref_service_base.h
@@ -18,6 +18,10 @@
#include "base/values.h"
+namespace base {
+class FilePath;
+}
+
namespace content {
class BrowserContext;
}
@@ -26,7 +30,6 @@ namespace subtle {
class PrefMemberBase;
}
-class FilePath;
class PrefObserver;
class PrefServiceBase {
@@ -118,7 +121,7 @@ class PrefServiceBase {
virtual int GetInteger(const char* path) const = 0;
virtual double GetDouble(const char* path) const = 0;
virtual std::string GetString(const char* path) const = 0;
- virtual FilePath GetFilePath(const char* path) const = 0;
+ virtual base::FilePath GetFilePath(const char* path) const = 0;
// Returns the branch if it exists, or the registered default value otherwise.
// Note that |path| must point to a registered preference. In that case, these
@@ -140,7 +143,7 @@ class PrefServiceBase {
virtual void SetInteger(const char* path, int value) = 0;
virtual void SetDouble(const char* path, double value) = 0;
virtual void SetString(const char* path, const std::string& value) = 0;
- virtual void SetFilePath(const char* path, const FilePath& value) = 0;
+ virtual void SetFilePath(const char* path, const base::FilePath& value) = 0;
// Int64 helper methods that actually store the given value as a string.
// Note that if obtaining the named value via GetDictionary or GetList, the
diff --git a/base/scoped_native_library.h b/base/scoped_native_library.h
index 94380ba..e9923f4 100644
--- a/base/scoped_native_library.h
+++ b/base/scoped_native_library.h
@@ -8,10 +8,10 @@
#include "base/base_export.h"
#include "base/native_library.h"
-class FilePath;
-
namespace base {
+class FilePath;
+
// A class which encapsulates a base::NativeLibrary object available only in a
// scope.
// This class automatically unloads the loaded library in its destructor.
diff --git a/base/shared_memory.h b/base/shared_memory.h
index 30b1a89..da6f5b7b 100644
--- a/base/shared_memory.h
+++ b/base/shared_memory.h
@@ -23,10 +23,10 @@
#include "base/file_descriptor_posix.h"
#endif
-class FilePath;
-
namespace base {
+class FilePath;
+
// SharedMemoryHandle is a platform specific type which represents
// the underlying OS handle to a shared memory segment.
#if defined(OS_WIN)
diff --git a/base/test/scoped_path_override.h b/base/test/scoped_path_override.h
index 3ac441c..bc88205 100644
--- a/base/test/scoped_path_override.h
+++ b/base/test/scoped_path_override.h
@@ -8,10 +8,10 @@
#include "base/basictypes.h"
#include "base/files/scoped_temp_dir.h"
-class FilePath;
-
namespace base {
+class FilePath;
+
// Sets a path override on construction, and removes it when the object goes out
// of scope. This class is intended to be used by tests that need to override
// paths to ensure their overrides are properly handled and reverted when the
diff --git a/base/test/test_file_util.h b/base/test/test_file_util.h
index 165af70..e97c0e5 100644
--- a/base/test/test_file_util.h
+++ b/base/test/test_file_util.h
@@ -12,18 +12,20 @@
#include "base/compiler_specific.h"
#include "base/file_path.h"
+namespace base {
class FilePath;
+}
namespace file_util {
// Wrapper over file_util::Delete. On Windows repeatedly invokes Delete in case
// of failure to workaround Windows file locking semantics. Returns true on
// success.
-bool DieFileDie(const FilePath& file, bool recurse);
+bool DieFileDie(const base::FilePath& file, bool recurse);
// Clear a specific file from the system cache. After this call, trying
// to access this file will result in a cold load from the hard drive.
-bool EvictFileFromSystemCache(const FilePath& file);
+bool EvictFileFromSystemCache(const base::FilePath& file);
// Like CopyFileNoCache but recursively copies all files and subdirectories
// in the given input directory to the output directory. Any files in the
@@ -31,39 +33,39 @@ bool EvictFileFromSystemCache(const FilePath& file);
//
// Returns true on success. False means there was some error copying, so the
// state of the destination is unknown.
-bool CopyRecursiveDirNoCache(const FilePath& source_dir,
- const FilePath& dest_dir);
+bool CopyRecursiveDirNoCache(const base::FilePath& source_dir,
+ const base::FilePath& dest_dir);
#if defined(OS_WIN)
// Returns true if the volume supports Alternate Data Streams.
-bool VolumeSupportsADS(const FilePath& path);
+bool VolumeSupportsADS(const base::FilePath& path);
// Returns true if the ZoneIdentifier is correctly set to "Internet" (3).
// Note that this function must be called from the same process as
// the one that set the zone identifier. I.e. don't use it in UI/automation
// based tests.
-bool HasInternetZoneIdentifier(const FilePath& full_path);
+bool HasInternetZoneIdentifier(const base::FilePath& full_path);
#endif // defined(OS_WIN)
// In general it's not reliable to convert a FilePath to a wstring and we use
// string16 elsewhere for Unicode strings, but in tests it is frequently
// convenient to be able to compare paths to literals like L"foobar".
-std::wstring FilePathAsWString(const FilePath& path);
-FilePath WStringAsFilePath(const std::wstring& path);
+std::wstring FilePathAsWString(const base::FilePath& path);
+base::FilePath WStringAsFilePath(const std::wstring& path);
// For testing, make the file unreadable or unwritable.
// In POSIX, this does not apply to the root user.
-bool MakeFileUnreadable(const FilePath& path) WARN_UNUSED_RESULT;
-bool MakeFileUnwritable(const FilePath& path) WARN_UNUSED_RESULT;
+bool MakeFileUnreadable(const base::FilePath& path) WARN_UNUSED_RESULT;
+bool MakeFileUnwritable(const base::FilePath& path) WARN_UNUSED_RESULT;
// Saves the current permissions for a path, and restores it on destruction.
class PermissionRestorer {
public:
- explicit PermissionRestorer(const FilePath& path);
+ explicit PermissionRestorer(const base::FilePath& path);
~PermissionRestorer();
private:
- const FilePath path_;
+ const base::FilePath path_;
void* info_; // The opaque stored permission information.
size_t length_; // The length of the stored permission information.
diff --git a/base/value_conversions.h b/base/value_conversions.h
index 99cd514..fde9a26 100644
--- a/base/value_conversions.h
+++ b/base/value_conversions.h
@@ -9,10 +9,10 @@
#include "base/base_export.h"
-class FilePath;
namespace base {
+class FilePath;
class TimeDelta;
class StringValue;
class Value;
diff --git a/chrome/app/chrome_main_mac.h b/chrome/app/chrome_main_mac.h
index 232219d..0de6cc8 100644
--- a/chrome/app/chrome_main_mac.h
+++ b/chrome/app/chrome_main_mac.h
@@ -5,11 +5,13 @@
#ifndef CHROME_APP_CHROME_MAIN_MAC_H_
#define CHROME_APP_CHROME_MAIN_MAC_H_
+namespace base {
class FilePath;
+}
// Checks if the UserDataDir policy has been set and returns its value in the
// |user_data_dir| parameter. If no policy is set the parameter is not changed.
-void CheckUserDataDirPolicy(FilePath* user_data_dir);
+void CheckUserDataDirPolicy(base::FilePath* user_data_dir);
// Sets the app bundle (base::mac::FrameworkBundle()) to the framework's bundle,
// and sets the base bundle ID (base::mac::BaseBundleID()) to the proper value
diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h
index 657dc3a..a288308 100644
--- a/chrome/browser/automation/automation_provider.h
+++ b/chrome/browser/automation/automation_provider.h
@@ -44,7 +44,6 @@ class AutomationTabTracker;
class AutomationWindowTracker;
class Browser;
class ExternalTabContainer;
-class FilePath;
class FindInPageNotificationObserver;
class InitialLoadObserver;
class LoginHandler;
diff --git a/chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h b/chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h
index ed15a16..c0dd000 100644
--- a/chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h
+++ b/chrome/browser/bookmarks/bookmark_pasteboard_helper_mac.h
@@ -11,7 +11,9 @@
@class NSString;
#endif // __OBJC__
+namespace base {
class FilePath;
+}
// This set of functions lets C++ code interact with the cocoa pasteboard
// and dragging methods.
@@ -25,12 +27,12 @@ enum PasteboardType {
// Writes a set of bookmark elements from a profile to the specified pasteboard.
void WriteToPasteboard(PasteboardType type,
const std::vector<BookmarkNodeData::Element>& elements,
- const FilePath& profile_path);
+ const base::FilePath& profile_path);
// Reads a set of bookmark elements from the specified pasteboard.
bool ReadFromPasteboard(PasteboardType type,
std::vector<BookmarkNodeData::Element>& elements,
- FilePath* profile_path);
+ base::FilePath* profile_path);
// Returns true if the specified pasteboard contains any sort of
// bookmark elements. It currently does not consider a plaintext url a
diff --git a/chrome/browser/chromeos/customization_document.h b/chrome/browser/chromeos/customization_document.h
index 93cb59a..e7a06e4 100644
--- a/chrome/browser/chromeos/customization_document.h
+++ b/chrome/browser/chromeos/customization_document.h
@@ -16,11 +16,11 @@
#include "googleurl/src/gurl.h"
#include "net/url_request/url_fetcher_delegate.h"
-class FilePath;
class PrefServiceSimple;
namespace base {
class DictionaryValue;
+class FilePath;
}
namespace net {
@@ -44,7 +44,7 @@ class CustomizationDocument {
protected:
explicit CustomizationDocument(const std::string& accepted_version);
- virtual bool LoadManifestFromFile(const FilePath& manifest_path);
+ virtual bool LoadManifestFromFile(const base::FilePath& manifest_path);
virtual bool LoadManifestFromString(const std::string& manifest);
std::string GetLocaleSpecificString(const std::string& locale,
@@ -158,7 +158,7 @@ class ServicesCustomizationDocument : public CustomizationDocument,
void StartFileFetch();
// Executes on FILE thread and reads file to string.
- void ReadFileInBackground(const FilePath& file);
+ void ReadFileInBackground(const base::FilePath& file);
// Services customization manifest URL.
GURL url_;
diff --git a/chrome/browser/chromeos/drive/drive_feed_loader_observer.h b/chrome/browser/chromeos/drive/drive_feed_loader_observer.h
index 7232a78..1d3e504 100644
--- a/chrome/browser/chromeos/drive/drive_feed_loader_observer.h
+++ b/chrome/browser/chromeos/drive/drive_feed_loader_observer.h
@@ -7,7 +7,9 @@
#include <string>
+namespace base {
class FilePath;
+}
namespace drive {
@@ -18,7 +20,7 @@ class DriveFeedLoaderObserver {
// Triggered when a content of a directory has been changed.
// |directory_path| is a virtual directory path representing the
// changed directory.
- virtual void OnDirectoryChanged(const FilePath& directory_path) {
+ virtual void OnDirectoryChanged(const base::FilePath& directory_path) {
}
// Triggered when a resource list is fetched. |num_accumulated_entries|
diff --git a/chrome/browser/chromeos/drive/drive_file_system_observer.h b/chrome/browser/chromeos/drive/drive_file_system_observer.h
index 4bc1520..0d3a678 100644
--- a/chrome/browser/chromeos/drive/drive_file_system_observer.h
+++ b/chrome/browser/chromeos/drive/drive_file_system_observer.h
@@ -7,7 +7,9 @@
#include "chrome/browser/chromeos/drive/drive_file_error.h"
+namespace base {
class FilePath;
+}
namespace drive {
@@ -19,7 +21,7 @@ class DriveFileSystemObserver {
// Triggered when a content of a directory has been changed.
// |directory_path| is a virtual directory path (/drive/...) representing
// changed directory.
- virtual void OnDirectoryChanged(const FilePath& directory_path) {
+ virtual void OnDirectoryChanged(const base::FilePath& directory_path) {
}
// Triggered when the file system is initially loaded.
diff --git a/chrome/browser/chromeos/drive/drive_file_system_util.h b/chrome/browser/chromeos/drive/drive_file_system_util.h
index c68be24..0f9a6a6 100644
--- a/chrome/browser/chromeos/drive/drive_file_system_util.h
+++ b/chrome/browser/chromeos/drive/drive_file_system_util.h
@@ -16,9 +16,12 @@
#include "chrome/browser/google_apis/gdata_errorcode.h"
#include "googleurl/src/gurl.h"
-class FilePath;
class Profile;
+namespace base {
+class FilePath;
+}
+
namespace drive {
class PlatformFileInfoProto;
@@ -39,13 +42,13 @@ const char kWildCard[] = "*";
const char kSymLinkToDevNull[] = "/dev/null";
// Returns the Drive mount point path, which looks like "/special/drive".
-const FilePath& GetDriveMountPointPath();
+const base::FilePath& GetDriveMountPointPath();
// Returns the Drive mount path as string.
const std::string& GetDriveMountPointPathAsString();
// Returns the 'local' root of remote file system as "/special".
-const FilePath& GetSpecialRemoteRootPath();
+const base::FilePath& GetSpecialRemoteRootPath();
// Returns the gdata file resource url formatted as
// chrome://drive/<resource_id>/<file_name>.
@@ -54,16 +57,16 @@ GURL GetFileResourceUrl(const std::string& resource_id,
// Given a profile and a drive_cache_path, return the file resource url.
void ModifyDriveFileResourceUrl(Profile* profile,
- const FilePath& drive_cache_path,
+ const base::FilePath& drive_cache_path,
GURL* url);
// Returns true if the given path is under the Drive mount point.
-bool IsUnderDriveMountPoint(const FilePath& path);
+bool IsUnderDriveMountPoint(const base::FilePath& path);
// Extracts the Drive path from the given path located under the Drive mount
// point. Returns an empty path if |path| is not under the Drive mount point.
// Examples: ExtractGDatPath("/special/drive/foo.txt") => "drive/foo.txt"
-FilePath ExtractDrivePath(const FilePath& path);
+base::FilePath ExtractDrivePath(const base::FilePath& path);
// Escapes a file name in Drive cache.
// Replaces percent ('%'), period ('.') and slash ('/') with %XX (hex)
@@ -90,13 +93,13 @@ std::string ExtractResourceIdFromUrl(const GURL& url);
// Case 3: Mounted files have all three parts.
// Example: path="/user/GCache/v1/persistent/pdf:a1b2.01234567.mounted" =>
// resource_id="pdf:a1b2", md5="01234567", extra_extension="mounted".
-void ParseCacheFilePath(const FilePath& path,
+void ParseCacheFilePath(const base::FilePath& path,
std::string* resource_id,
std::string* md5,
std::string* extra_extension);
-// Callback type for PrepareWritableFilePathAndRun.
-typedef base::Callback<void (DriveFileError, const FilePath& path)>
+// Callback type for PrepareWritablebase::FilePathAndRun.
+typedef base::Callback<void (DriveFileError, const base::FilePath& path)>
OpenFileCallback;
// Invokes |callback| on blocking thread pool, after converting virtual |path|
@@ -108,7 +111,7 @@ typedef base::Callback<void (DriveFileError, const FilePath& path)>
//
// Must be called from UI thread.
void PrepareWritableFileAndRun(Profile* profile,
- const FilePath& path,
+ const base::FilePath& path,
const OpenFileCallback& callback);
// Ensures the existence of |directory| of '/special/drive/foo'. This will
@@ -122,7 +125,7 @@ void PrepareWritableFileAndRun(Profile* profile,
//
// Must be called from UI/IO thread.
void EnsureDirectoryExists(Profile* profile,
- const FilePath& directory,
+ const base::FilePath& directory,
const FileOperationCallback& callback);
// Converts GData error code into file platform error code.
diff --git a/chrome/browser/chromeos/drive/drive_prefetcher.h b/chrome/browser/chromeos/drive/drive_prefetcher.h
index 39e08f9..4bb599c 100644
--- a/chrome/browser/chromeos/drive/drive_prefetcher.h
+++ b/chrome/browser/chromeos/drive/drive_prefetcher.h
@@ -17,7 +17,9 @@
#include "chrome/browser/chromeos/drive/drive_file_system_observer.h"
#include "chrome/browser/chromeos/drive/drive_sync_client_observer.h"
+namespace base {
class FilePath;
+}
namespace drive {
@@ -45,7 +47,8 @@ class DrivePrefetcher : public DriveFileSystemObserver,
// DriveFileSystemObserver overrides.
virtual void OnInitialLoadFinished(DriveFileError error) OVERRIDE;
- virtual void OnDirectoryChanged(const FilePath& directory_path) OVERRIDE;
+ virtual void OnDirectoryChanged(
+ const base::FilePath& directory_path) OVERRIDE;
// DriveSyncClientObserver overrides.
virtual void OnSyncTaskStarted() OVERRIDE;
@@ -63,7 +66,7 @@ class DrivePrefetcher : public DriveFileSystemObserver,
// Called when DoPrefetch is done.
void OnPrefetchFinished(const std::string& resource_id,
DriveFileError error,
- const FilePath& file_path,
+ const base::FilePath& file_path,
const std::string& mime_type,
DriveFileType file_type);
@@ -72,8 +75,8 @@ class DrivePrefetcher : public DriveFileSystemObserver,
// Helper methods to traverse over the file system.
void VisitFile(const DriveEntryProto& entry);
- void VisitDirectory(const FilePath& directory_path);
- void OnReadDirectory(const FilePath& directory_path,
+ void VisitDirectory(const base::FilePath& directory_path);
+ void OnReadDirectory(const base::FilePath& directory_path,
DriveFileError error,
bool hide_hosted_documents,
scoped_ptr<DriveEntryProtoVector> entries);
diff --git a/chrome/browser/chromeos/drive/drive_system_service.h b/chrome/browser/chromeos/drive/drive_system_service.h
index d36cc28..bbd0c8a 100644
--- a/chrome/browser/chromeos/drive/drive_system_service.h
+++ b/chrome/browser/chromeos/drive/drive_system_service.h
@@ -17,7 +17,9 @@
#include "chrome/browser/profiles/profile_keyed_service_factory.h"
#include "sync/notifier/invalidation_handler.h"
+namespace base {
class FilePath;
+}
namespace google_apis {
class DriveServiceInterface;
@@ -50,7 +52,7 @@ class DriveSystemService : public ProfileKeyedService,
// Pass NULL or the empty value when not interested.
DriveSystemService(Profile* profile,
google_apis::DriveServiceInterface* test_drive_service,
- const FilePath& test_cache_root,
+ const base::FilePath& test_cache_root,
DriveFileSystemInterface* test_file_system);
virtual ~DriveSystemService();
diff --git a/chrome/browser/chromeos/drive/drive_test_util.h b/chrome/browser/chromeos/drive/drive_test_util.h
index 7fc616b..fedd045 100644
--- a/chrome/browser/chromeos/drive/drive_test_util.h
+++ b/chrome/browser/chromeos/drive/drive_test_util.h
@@ -10,9 +10,8 @@
#include "chrome/browser/google_apis/gdata_errorcode.h"
#include "chrome/browser/google_apis/test_util.h"
-class FilePath;
-
namespace base {
+class FilePath;
class Value;
}
@@ -51,9 +50,9 @@ void CopyErrorCodeFromFileOperationCallback(DriveFileError* output,
// Copies |error| and |moved_file_path| to |out_error| and |out_file_path|.
// Used to run asynchronous functions that take FileMoveCallback from tests.
void CopyResultsFromFileMoveCallback(DriveFileError* out_error,
- FilePath* out_file_path,
+ base::FilePath* out_file_path,
DriveFileError error,
- const FilePath& moved_file_path);
+ const base::FilePath& moved_file_path);
// Copies |error| and |entry_proto| to |out_error| and |out_entry_proto|
// respectively. Used to run asynchronous functions that take
@@ -85,14 +84,14 @@ void CopyResultsFromReadDirectoryByPathCallback(
// Copies |error|, |drive_file_path|, and |entry_proto| to |out_error|,
// |out_drive_file_path|, and |out_entry_proto| respectively. Used to run
-// asynchronous functions that take GetEntryInfoWithFilePathCallback from
+// asynchronous functions that take GetEntryInfoWithbase::FilePathCallback from
// tests.
void CopyResultsFromGetEntryInfoWithFilePathCallback(
DriveFileError* out_error,
- FilePath* out_drive_file_path,
+ base::FilePath* out_drive_file_path,
scoped_ptr<DriveEntryProto>* out_entry_proto,
DriveFileError error,
- const FilePath& drive_file_path,
+ const base::FilePath& drive_file_path,
scoped_ptr<DriveEntryProto> entry_proto);
// Copies |result| to |out_result|. Used to run asynchronous functions
@@ -108,10 +107,11 @@ void CopyResultFromInitializeCacheCallback(bool* out_success,
// Copies results from DriveCache methods. Used to run asynchronous functions
// that take GetFileFromCacheCallback from tests.
-void CopyResultsFromGetFileFromCacheCallback(DriveFileError* out_error,
- FilePath* out_cache_file_path,
- DriveFileError error,
- const FilePath& cache_file_path);
+void CopyResultsFromGetFileFromCacheCallback(
+ DriveFileError* out_error,
+ base::FilePath* out_cache_file_path,
+ DriveFileError error,
+ const base::FilePath& cache_file_path);
// Copies results from DriveCache methods. Used to run asynchronous functions
// that take GetCacheEntryCallback from tests.
@@ -123,10 +123,10 @@ void CopyResultsFromGetCacheEntryCallback(bool* out_success,
// Copies results from DriveFileSystem methods. Used to run asynchronous
// functions that take GetFileCallback from tests.
void CopyResultsFromGetFileCallback(DriveFileError* out_error,
- FilePath* out_file_path,
+ base::FilePath* out_file_path,
DriveFileType* out_file_type,
DriveFileError error,
- const FilePath& file_path,
+ const base::FilePath& file_path,
const std::string& mime_type,
DriveFileType file_type);
@@ -143,9 +143,9 @@ void CopyResultsFromGetAvailableSpaceCallback(DriveFileError* out_error,
// of the current thread. Used to run asynchronous function that take
// OpenFileCallback.
void CopyResultsFromOpenFileCallbackAndQuit(DriveFileError* out_error,
- FilePath* out_file_path,
+ base::FilePath* out_file_path,
DriveFileError error,
- const FilePath& file_path);
+ const base::FilePath& file_path);
// Copies the results from DriveFileSystem methods and stops the message loop
// of the current thread. Used to run asynchronous function that take
diff --git a/chrome/browser/chromeos/drive/drive_webapps_registry.h b/chrome/browser/chromeos/drive/drive_webapps_registry.h
index 6827079..e907db5 100644
--- a/chrome/browser/chromeos/drive/drive_webapps_registry.h
+++ b/chrome/browser/chromeos/drive/drive_webapps_registry.h
@@ -13,7 +13,9 @@
#include "chrome/browser/google_apis/gdata_wapi_parser.h"
#include "googleurl/src/gurl.h"
+namespace base {
class FilePath;
+}
namespace google_apis {
class AppList;
@@ -57,7 +59,7 @@ class DriveWebAppsRegistry {
virtual ~DriveWebAppsRegistry();
// DriveWebAppsRegistry overrides.
- virtual void GetWebAppsForFile(const FilePath& file,
+ virtual void GetWebAppsForFile(const base::FilePath& file,
const std::string& mime_type,
ScopedVector<DriveWebAppInfo>* apps);
virtual std::set<std::string> GetExtensionsForWebStoreApp(
diff --git a/chrome/browser/chromeos/drive/file_system/copy_operation.h b/chrome/browser/chromeos/drive/file_system/copy_operation.h
index 6ca1c5d..1f1ab25 100644
--- a/chrome/browser/chromeos/drive/file_system/copy_operation.h
+++ b/chrome/browser/chromeos/drive/file_system/copy_operation.h
@@ -11,10 +11,10 @@
#include "chrome/browser/chromeos/drive/drive_resource_metadata.h"
#include "chrome/browser/google_apis/gdata_errorcode.h"
-class FilePath;
class GURL;
namespace base {
+class FilePath;
class Value;
}
@@ -49,8 +49,8 @@ class CopyOperation {
// Performs the copy operation on the file at drive path |src_file_path|
// with a target of |dest_file_path|. Invokes |callback| when finished with
// the result of the operation. |callback| must not be null.
- virtual void Copy(const FilePath& src_file_path,
- const FilePath& dest_file_path,
+ virtual void Copy(const base::FilePath& src_file_path,
+ const base::FilePath& dest_file_path,
const FileOperationCallback& callback);
// Initiates transfer of |remote_src_file_path| to |local_dest_file_path|.
@@ -60,8 +60,8 @@ class CopyOperation {
// Must be called from *UI* thread. |callback| is run on the calling thread.
// |callback| must not be null.
virtual void TransferFileFromRemoteToLocal(
- const FilePath& remote_src_file_path,
- const FilePath& local_dest_file_path,
+ const base::FilePath& remote_src_file_path,
+ const base::FilePath& local_dest_file_path,
const FileOperationCallback& callback);
// Initiates transfer of |local_src_file_path| to |remote_dest_file_path|.
@@ -72,8 +72,8 @@ class CopyOperation {
// Must be called from *UI* thread. |callback| is run on the calling thread.
// |callback| must not be null.
virtual void TransferFileFromLocalToRemote(
- const FilePath& local_src_file_path,
- const FilePath& remote_dest_file_path,
+ const base::FilePath& local_src_file_path,
+ const base::FilePath& remote_dest_file_path,
const FileOperationCallback& callback);
// Initiates transfer of |local_file_path| to |remote_dest_file_path|.
@@ -83,8 +83,8 @@ class CopyOperation {
//
// Must be called from *UI* thread. |callback| is run on the calling thread.
// |callback| must not be null.
- virtual void TransferRegularFile(const FilePath& local_file_path,
- const FilePath& remote_dest_file_path,
+ virtual void TransferRegularFile(const base::FilePath& local_file_path,
+ const base::FilePath& remote_dest_file_path,
const FileOperationCallback& callback);
private:
@@ -98,27 +98,28 @@ class CopyOperation {
//
// Can be called from UI thread. |callback| is run on the calling thread.
// |callback| must not be null.
- void OnGetFileCompleteForTransferFile(const FilePath& local_dest_file_path,
- const FileOperationCallback& callback,
- DriveFileError error,
- const FilePath& local_file_path,
- const std::string& unused_mime_type,
- DriveFileType file_type);
+ void OnGetFileCompleteForTransferFile(
+ const base::FilePath& local_dest_file_path,
+ const FileOperationCallback& callback,
+ DriveFileError error,
+ const base::FilePath& local_file_path,
+ const std::string& unused_mime_type,
+ DriveFileType file_type);
// Copies a hosted document with |resource_id| to the directory at |dir_path|
// and names the copied document as |new_name|.
//
// Can be called from UI thread. |callback| is run on the calling thread.
// |callback| must not be null.
- void CopyHostedDocumentToDirectory(const FilePath& dir_path,
+ void CopyHostedDocumentToDirectory(const base::FilePath& dir_path,
const std::string& resource_id,
- const FilePath::StringType& new_name,
+ const base::FilePath::StringType& new_name,
const FileOperationCallback& callback);
// Callback for handling document copy attempt.
// |callback| must not be null.
void OnCopyHostedDocumentCompleted(
- const FilePath& dir_path,
+ const base::FilePath& dir_path,
const FileOperationCallback& callback,
google_apis::GDataErrorCode status,
scoped_ptr<google_apis::ResourceEntry> resource_entry);
@@ -129,14 +130,14 @@ class CopyOperation {
//
// Can be called from UI thread. |callback| is run on the calling thread.
// |callback| must not be null.
- void MoveEntryFromRootDirectory(const FilePath& directory_path,
+ void MoveEntryFromRootDirectory(const base::FilePath& directory_path,
const FileOperationCallback& callback,
DriveFileError error,
- const FilePath& file_path);
+ const base::FilePath& file_path);
// Part of Copy(). Called after GetEntryInfoPairByPaths() is
// complete. |callback| must not be null.
- void CopyAfterGetEntryInfoPair(const FilePath& dest_file_path,
+ void CopyAfterGetEntryInfoPair(const base::FilePath& dest_file_path,
const FileOperationCallback& callback,
scoped_ptr<EntryInfoPairResult> result);
@@ -145,10 +146,10 @@ class CopyOperation {
// |local_file_path| to |remote_dest_file_path|.
//
// Can be called from UI thread. |callback| is run on the calling thread.
- void OnGetFileCompleteForCopy(const FilePath& remote_dest_file_path,
+ void OnGetFileCompleteForCopy(const base::FilePath& remote_dest_file_path,
const FileOperationCallback& callback,
DriveFileError error,
- const FilePath& local_file_path,
+ const base::FilePath& local_file_path,
const std::string& unused_mime_type,
DriveFileType file_type);
@@ -170,15 +171,15 @@ class CopyOperation {
void OnTransferCompleted(
const FileOperationCallback& callback,
google_apis::DriveUploadError error,
- const FilePath& drive_path,
- const FilePath& file_path,
+ const base::FilePath& drive_path,
+ const base::FilePath& file_path,
scoped_ptr<google_apis::ResourceEntry> resource_entry);
// Part of TransferFileFromLocalToRemote(). Called after
// GetEntryInfoByPath() is complete.
void TransferFileFromLocalToRemoteAfterGetEntryInfo(
- const FilePath& local_src_file_path,
- const FilePath& remote_dest_file_path,
+ const base::FilePath& local_src_file_path,
+ const base::FilePath& remote_dest_file_path,
const FileOperationCallback& callback,
DriveFileError error,
scoped_ptr<DriveEntryProto> entry_proto);
@@ -192,8 +193,8 @@ class CopyOperation {
//
// Must be called from *UI* thread. |callback| is run on the calling thread.
// |callback| must not be null.
- void TransferFileForResourceId(const FilePath& local_file_path,
- const FilePath& remote_dest_file_path,
+ void TransferFileForResourceId(const base::FilePath& local_file_path,
+ const base::FilePath& remote_dest_file_path,
const FileOperationCallback& callback,
const std::string& resource_id);
diff --git a/chrome/browser/chromeos/drive/file_system/drive_operations.h b/chrome/browser/chromeos/drive/file_system/drive_operations.h
index b9cd3e9..1f188ac 100644
--- a/chrome/browser/chromeos/drive/file_system/drive_operations.h
+++ b/chrome/browser/chromeos/drive/file_system/drive_operations.h
@@ -9,7 +9,9 @@
#include "base/sequenced_task_runner.h"
#include "chrome/browser/chromeos/drive/drive_resource_metadata.h"
+namespace base {
class FilePath;
+}
namespace google_apis {
class DriveUploaderInterface;
@@ -52,37 +54,38 @@ class DriveOperations {
// Wrapper function for copy_operation_.
// |callback| must not be null.
- void Copy(const FilePath& src_file_path,
- const FilePath& dest_file_path,
+ void Copy(const base::FilePath& src_file_path,
+ const base::FilePath& dest_file_path,
const FileOperationCallback& callback);
// Wrapper function for copy_operation_.
// |callback| must not be null.
- void TransferFileFromRemoteToLocal(const FilePath& remote_src_file_path,
- const FilePath& local_dest_file_path,
+ void TransferFileFromRemoteToLocal(const base::FilePath& remote_src_file_path,
+ const base::FilePath& local_dest_file_path,
const FileOperationCallback& callback);
// Wrapper function for copy_operation_.
// |callback| must not be null.
- void TransferFileFromLocalToRemote(const FilePath& local_src_file_path,
- const FilePath& remote_dest_file_path,
- const FileOperationCallback& callback);
+ void TransferFileFromLocalToRemote(
+ const base::FilePath& local_src_file_path,
+ const base::FilePath& remote_dest_file_path,
+ const FileOperationCallback& callback);
// Wrapper function for copy_operation_.
// |callback| must not be null.
- void TransferRegularFile(const FilePath& local_src_file_path,
- const FilePath& remote_dest_file_path,
+ void TransferRegularFile(const base::FilePath& local_src_file_path,
+ const base::FilePath& remote_dest_file_path,
const FileOperationCallback& callback);
// Wrapper function for move_operation_.
// |callback| must not be null.
- void Move(const FilePath& src_file_path,
- const FilePath& dest_file_path,
+ void Move(const base::FilePath& src_file_path,
+ const base::FilePath& dest_file_path,
const FileOperationCallback& callback);
// Wrapper function for remove_operation_.
// |callback| must not be null.
- void Remove(const FilePath& file_path,
+ void Remove(const base::FilePath& file_path,
bool is_recursive,
const FileOperationCallback& callback);
diff --git a/chrome/browser/chromeos/drive/file_system/move_operation.h b/chrome/browser/chromeos/drive/file_system/move_operation.h
index 2dd7ca9..2cf6cf9 100644
--- a/chrome/browser/chromeos/drive/file_system/move_operation.h
+++ b/chrome/browser/chromeos/drive/file_system/move_operation.h
@@ -11,9 +11,12 @@
#include "chrome/browser/chromeos/drive/drive_resource_metadata.h"
#include "chrome/browser/google_apis/gdata_errorcode.h"
-class FilePath;
class GURL;
+namespace base {
+class FilePath;
+}
+
namespace drive {
class DriveCache;
@@ -38,14 +41,14 @@ class MoveOperation {
// Performs the move operation on the file at drive path |src_file_path|
// with a target of |dest_file_path|. Invokes |callback| when finished with
// the result of the operation. |callback| must not be null.
- virtual void Move(const FilePath& src_file_path,
- const FilePath& dest_file_path,
+ virtual void Move(const base::FilePath& src_file_path,
+ const base::FilePath& dest_file_path,
const FileOperationCallback& callback);
private:
// Part of Move(). Called after GetEntryInfoPairByPaths() is
// complete. |callback| must not be null.
void MoveAfterGetEntryInfoPair(
- const FilePath& dest_file_path,
+ const base::FilePath& dest_file_path,
const FileOperationCallback& callback,
scoped_ptr<EntryInfoPairResult> result);
@@ -53,7 +56,7 @@ class MoveOperation {
// FileMoveCallback to FileOperationCallback.
void OnFilePathUpdated(const FileOperationCallback& cllback,
DriveFileError error,
- const FilePath& file_path);
+ const base::FilePath& file_path);
// Renames a file or directory at |file_path| to |new_name| in the same
// directory. |callback| will receive the new file path if the operation is
@@ -63,14 +66,14 @@ class MoveOperation {
//
// Can be called from UI thread. |callback| is run on the calling thread.
// |callback| must not be null.
- void Rename(const FilePath& file_path,
- const FilePath::StringType& new_name,
+ void Rename(const base::FilePath& file_path,
+ const base::FilePath::StringType& new_name,
const FileMoveCallback& callback);
// Part of Rename(). Called after GetEntryInfoByPath() is complete.
// |callback| must not be null.
- void RenameAfterGetEntryInfo(const FilePath& file_path,
- const FilePath::StringType& new_name,
+ void RenameAfterGetEntryInfo(const base::FilePath& file_path,
+ const base::FilePath::StringType& new_name,
const FileMoveCallback& callback,
DriveFileError error,
scoped_ptr<DriveEntryProto> entry_proto);
@@ -78,8 +81,8 @@ class MoveOperation {
// Callback for handling resource rename attempt. Renames a file or
// directory at |file_path| on the client side.
// |callback| must not be null.
- void RenameEntryLocally(const FilePath& file_path,
- const FilePath::StringType& new_name,
+ void RenameEntryLocally(const base::FilePath& file_path,
+ const base::FilePath::StringType& new_name,
const FileMoveCallback& callback,
google_apis::GDataErrorCode status);
@@ -90,7 +93,7 @@ class MoveOperation {
// |callback| must not be null.
void RemoveEntryFromDirectory(const FileMoveCallback& callback,
DriveFileError error,
- const FilePath& file_path);
+ const base::FilePath& file_path);
// Part of RemoveEntryFromDirectory(). Called after
// GetEntryInfoPairByPaths() is complete. |callback| must not be null.
@@ -103,10 +106,10 @@ class MoveOperation {
//
// Can be called from UI thread. |callback| is run on the calling thread.
// |callback| must not be null.
- void AddEntryToDirectory(const FilePath& directory_path,
+ void AddEntryToDirectory(const base::FilePath& directory_path,
const FileOperationCallback& callback,
DriveFileError error,
- const FilePath& file_path);
+ const base::FilePath& file_path);
// Part of AddEntryToDirectory(). Called after
// GetEntryInfoPairByPaths() is complete. |callback| must not be null.
@@ -117,8 +120,8 @@ class MoveOperation {
// Moves entry specified by |file_path| to the directory specified by
// |dir_path| and calls |callback| asynchronously.
// |callback| must not be null.
- void MoveEntryToDirectory(const FilePath& file_path,
- const FilePath& directory_path,
+ void MoveEntryToDirectory(const base::FilePath& file_path,
+ const base::FilePath& directory_path,
const FileMoveCallback& callback,
google_apis::GDataErrorCode status);
@@ -128,7 +131,7 @@ class MoveOperation {
void NotifyAndRunFileOperationCallback(
const FileOperationCallback& callback,
DriveFileError error,
- const FilePath& moved_file_path);
+ const base::FilePath& moved_file_path);
// Callback when an entry is moved to another directory on the client side.
// Notifies the directory change and runs |callback|.
@@ -136,7 +139,7 @@ class MoveOperation {
void NotifyAndRunFileMoveCallback(
const FileMoveCallback& callback,
DriveFileError error,
- const FilePath& moved_file_path);
+ const base::FilePath& moved_file_path);
DriveScheduler* drive_scheduler_;
DriveResourceMetadata* metadata_;
diff --git a/chrome/browser/chromeos/drive/file_system/operation_observer.h b/chrome/browser/chromeos/drive/file_system/operation_observer.h
index 3c73f53..bfa4333 100644
--- a/chrome/browser/chromeos/drive/file_system/operation_observer.h
+++ b/chrome/browser/chromeos/drive/file_system/operation_observer.h
@@ -5,7 +5,9 @@
#ifndef CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_OBSERVER_H_
#define CHROME_BROWSER_CHROMEOS_DRIVE_FILE_SYSTEM_OPERATION_OBSERVER_H_
+namespace base {
class FilePath;
+}
namespace drive {
namespace file_system {
@@ -17,7 +19,7 @@ class OperationObserver {
// |directory_path| is a virtual directory path representing the
// changed directory.
virtual void OnDirectoryChangedByOperation(
- const FilePath& directory_path) = 0;
+ const base::FilePath& directory_path) = 0;
};
} // namespace file_system
diff --git a/chrome/browser/chromeos/drive/file_system/remove_operation.h b/chrome/browser/chromeos/drive/file_system/remove_operation.h
index f856eeb..df0c0d7 100644
--- a/chrome/browser/chromeos/drive/file_system/remove_operation.h
+++ b/chrome/browser/chromeos/drive/file_system/remove_operation.h
@@ -11,9 +11,12 @@
#include "chrome/browser/chromeos/drive/drive_resource_metadata.h"
#include "chrome/browser/google_apis/gdata_errorcode.h"
-class FilePath;
class GURL;
+namespace base {
+class FilePath;
+}
+
namespace google_apis {
}
@@ -42,7 +45,7 @@ class RemoveOperation {
// Perform the remove operation on the file at drive path |file_path|.
// Invokes |callback| when finished with the result of the operation.
// |callback| must not be null.
- virtual void Remove(const FilePath& file_path,
+ virtual void Remove(const base::FilePath& file_path,
bool is_recursive,
const FileOperationCallback& callback);
@@ -67,7 +70,7 @@ class RemoveOperation {
void NotifyDirectoryChanged(
const FileOperationCallback& callback,
DriveFileError error,
- const FilePath& directory_path);
+ const base::FilePath& directory_path);
DriveScheduler* drive_scheduler_;
DriveCache* cache_;
diff --git a/chrome/browser/chromeos/drive/file_system/update_operation.h b/chrome/browser/chromeos/drive/file_system/update_operation.h
index da0f39e..e4eb37b 100644
--- a/chrome/browser/chromeos/drive/file_system/update_operation.h
+++ b/chrome/browser/chromeos/drive/file_system/update_operation.h
@@ -11,9 +11,12 @@
#include "chrome/browser/chromeos/drive/drive_resource_metadata.h"
#include "chrome/browser/google_apis/gdata_errorcode.h"
-class FilePath;
class GURL;
+namespace base {
+class FilePath;
+}
+
namespace google_apis {
class DriveUploaderInterface;
}
@@ -58,7 +61,7 @@ class UpdateOperation {
void UpdateFileByEntryInfo(
const FileOperationCallback& callback,
DriveFileError error,
- const FilePath& drive_file_path,
+ const base::FilePath& drive_file_path,
scoped_ptr<DriveEntryProto> entry_proto);
// Part of UpdateFileByResourceId().
@@ -66,10 +69,10 @@ class UpdateOperation {
// UpdateFileByResourceId().
// |callback| must not be null.
void OnGetFileCompleteForUpdateFile(const FileOperationCallback& callback,
- const FilePath& drive_file_path,
+ const base::FilePath& drive_file_path,
scoped_ptr<DriveEntryProto> entry_proto,
DriveFileError error,
- const FilePath& cache_file_path);
+ const base::FilePath& cache_file_path);
// Part of UpdateFileByResourceId().
// Called when DriveUploader::UploadUpdatedFile() is completed for
@@ -78,15 +81,15 @@ class UpdateOperation {
void OnUpdatedFileUploaded(
const FileOperationCallback& callback,
google_apis::DriveUploadError error,
- const FilePath& gdata_path,
- const FilePath& file_path,
+ const base::FilePath& gdata_path,
+ const base::FilePath& file_path,
scoped_ptr<google_apis::ResourceEntry> resource_entry);
// Part of UpdateFileByResourceId().
// |callback| must not be null.
void OnUpdatedFileRefreshed(const FileOperationCallback& callback,
DriveFileError error,
- const FilePath& drive_file_path,
+ const base::FilePath& drive_file_path,
scoped_ptr<DriveEntryProto> entry_proto);
DriveCache* cache_;
diff --git a/chrome/browser/chromeos/drive/file_write_helper.h b/chrome/browser/chromeos/drive/file_write_helper.h
index e1bf8f7..da30212 100644
--- a/chrome/browser/chromeos/drive/file_write_helper.h
+++ b/chrome/browser/chromeos/drive/file_write_helper.h
@@ -9,7 +9,9 @@
#include "chrome/browser/chromeos/drive/drive_file_error.h"
#include "chrome/browser/chromeos/drive/drive_file_system_interface.h"
+namespace base {
class FilePath;
+}
namespace drive {
@@ -26,7 +28,7 @@ class FileWriteHelper {
// file is created.
//
// Must be called from UI thread.
- void PrepareWritableFileAndRun(const FilePath& path,
+ void PrepareWritableFileAndRun(const base::FilePath& path,
const OpenFileCallback& callback);
private:
@@ -34,15 +36,15 @@ class FileWriteHelper {
// file does not exist yet, does OpenFile to download and mark the file as
// dirty, runs |callback|, and finally calls CloseFile.
void PrepareWritableFileAndRunAfterCreateFile(
- const FilePath& file_path,
+ const base::FilePath& file_path,
const OpenFileCallback& callback,
DriveFileError result);
void PrepareWritableFileAndRunAfterOpenFile(
- const FilePath& file_path,
+ const base::FilePath& file_path,
const OpenFileCallback& callback,
DriveFileError result,
- const FilePath& local_cache_path);
- void PrepareWritableFileAndRunAfterCallback(const FilePath& file_path);
+ const base::FilePath& local_cache_path);
+ void PrepareWritableFileAndRunAfterCallback(const base::FilePath& file_path);
// File system owned by DriveSystemService.
DriveFileSystemInterface* file_system_;
diff --git a/chrome/browser/chromeos/enterprise_extension_observer.h b/chrome/browser/chromeos/enterprise_extension_observer.h
index 8ffd97c..1f51da3 100644
--- a/chrome/browser/chromeos/enterprise_extension_observer.h
+++ b/chrome/browser/chromeos/enterprise_extension_observer.h
@@ -13,9 +13,12 @@
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
-class FilePath;
class Profile;
+namespace base {
+class FilePath;
+}
+
namespace chromeos {
// This observer listens for installed extensions and restarts the ChromeOS
@@ -31,7 +34,7 @@ class EnterpriseExtensionObserver
const content::NotificationDetails& details) OVERRIDE;
private:
- static void CheckExtensionAndNotifyEntd(const FilePath& path);
+ static void CheckExtensionAndNotifyEntd(const base::FilePath& path);
static void NotifyEntd();
Profile* profile_;
diff --git a/chrome/browser/chromeos/imageburner/burn_controller.h b/chrome/browser/chromeos/imageburner/burn_controller.h
index e35ecd6..a0e62c9 100644
--- a/chrome/browser/chromeos/imageburner/burn_controller.h
+++ b/chrome/browser/chromeos/imageburner/burn_controller.h
@@ -10,9 +10,8 @@
#include "base/basictypes.h"
#include "chromeos/disks/disk_mount_manager.h"
-class FilePath;
-
namespace base {
+class FilePath;
class TimeDelta;
}
@@ -69,8 +68,8 @@ class BurnController {
// Returns devices on which we can burn recovery image.
virtual std::vector<disks::DiskMountManager::Disk> GetBurnableDevices() = 0;
// Starts burning process.
- virtual void StartBurnImage(const FilePath& target_device_path,
- const FilePath& target_file_path) = 0;
+ virtual void StartBurnImage(const base::FilePath& target_device_path,
+ const base::FilePath& target_file_path) = 0;
// Cancels burning process.
virtual void CancelBurnImage() = 0;
// Creates a new instance of BurnController.
diff --git a/chrome/browser/chromeos/login/user_image_manager.h b/chrome/browser/chromeos/login/user_image_manager.h
index f6e4ea4..00bb9a7 100644
--- a/chrome/browser/chromeos/login/user_image_manager.h
+++ b/chrome/browser/chromeos/login/user_image_manager.h
@@ -9,9 +9,12 @@
#include "chrome/browser/chromeos/login/user.h"
-class FilePath;
class PrefServiceSimple;
+namespace base {
+class FilePath;
+}
+
namespace gfx {
class ImageSkia;
}
@@ -49,7 +52,7 @@ class UserImageManager {
// Tries to load user image from disk; if successful, sets it for the user,
// sends LOGIN_USER_IMAGE_CHANGED notification and updates Local State.
virtual void SaveUserImageFromFile(const std::string& username,
- const FilePath& path) = 0;
+ const base::FilePath& path) = 0;
// Sets profile image as user image for |username|, sends
// LOGIN_USER_IMAGE_CHANGED notification and updates Local State. If the user
diff --git a/chrome/browser/chromeos/login/user_image_manager_impl.h b/chrome/browser/chromeos/login/user_image_manager_impl.h
index 448be58..e6fb534 100644
--- a/chrome/browser/chromeos/login/user_image_manager_impl.h
+++ b/chrome/browser/chromeos/login/user_image_manager_impl.h
@@ -21,6 +21,10 @@
class ProfileDownloader;
class UserImage;
+namespace base {
+class FilePath;
+}
+
namespace chromeos {
class UserImageManagerImpl : public UserImageManager,
@@ -39,7 +43,7 @@ class UserImageManagerImpl : public UserImageManager,
virtual void SaveUserImage(const std::string& username,
const UserImage& user_image) OVERRIDE;
virtual void SaveUserImageFromFile(const std::string& username,
- const FilePath& path) OVERRIDE;
+ const base::FilePath& path) OVERRIDE;
virtual void SaveUserImageFromProfileImage(
const std::string& username) OVERRIDE;
virtual void DeleteUserImage(const std::string& username) OVERRIDE;
@@ -63,7 +67,7 @@ class UserImageManagerImpl : public UserImageManager,
ProfileDownloaderDelegate::FailureReason reason) OVERRIDE;
// Returns image filepath for the given user.
- FilePath GetImagePathForUser(const std::string& username);
+ base::FilePath GetImagePathForUser(const std::string& username);
// Sets one of the default images for the specified user and saves this
// setting in local state.
@@ -90,7 +94,7 @@ class UserImageManagerImpl : public UserImageManager,
// Local State on UI thread.
void SaveImageToFile(const std::string& username,
const UserImage& user_image,
- const FilePath& image_path,
+ const base::FilePath& image_path,
int image_index,
const GURL& image_url);
@@ -105,7 +109,7 @@ class UserImageManagerImpl : public UserImageManager,
// Saves |image| to the specified |image_path|. Runs on FILE thread.
bool SaveBitmapToFile(const UserImage& user_image,
- const FilePath& image_path);
+ const base::FilePath& image_path);
// Initializes |downloaded_profile_image_| with the picture of the logged-in
// user.
diff --git a/chrome/browser/chromeos/login/user_manager_impl.h b/chrome/browser/chromeos/login/user_manager_impl.h
index c9bdf7c..7d3c0f6 100644
--- a/chrome/browser/chromeos/login/user_manager_impl.h
+++ b/chrome/browser/chromeos/login/user_manager_impl.h
@@ -24,7 +24,6 @@
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-class FilePath;
class PrefService;
class ProfileSyncService;
diff --git a/chrome/browser/chromeos/mobile_config.h b/chrome/browser/chromeos/mobile_config.h
index d422ed4..1c98ff5 100644
--- a/chrome/browser/chromeos/mobile_config.h
+++ b/chrome/browser/chromeos/mobile_config.h
@@ -15,10 +15,9 @@
#include "base/time.h"
#include "chrome/browser/chromeos/customization_document.h"
-class FilePath;
-
namespace base {
class DictionaryValue;
+class FilePath;
}
namespace chromeos {
@@ -180,8 +179,8 @@ class MobileConfig : public CustomizationDocument {
const std::string& local_config);
// Executes on FILE thread and reads config files to string.
- void ReadConfigInBackground(const FilePath& global_config_file,
- const FilePath& local_config_file);
+ void ReadConfigInBackground(const base::FilePath& global_config_file,
+ const base::FilePath& local_config_file);
// Maps external carrier ID to internal carrier ID.
CarrierIdMap carrier_id_map_;
diff --git a/chrome/browser/chromeos/settings/owner_key_util.h b/chrome/browser/chromeos/settings/owner_key_util.h
index fc94394..2568cfa 100644
--- a/chrome/browser/chromeos/settings/owner_key_util.h
+++ b/chrome/browser/chromeos/settings/owner_key_util.h
@@ -14,7 +14,9 @@
#include "base/gtest_prod_util.h"
#include "base/memory/ref_counted.h"
+namespace base {
class FilePath;
+}
namespace crypto {
class RSAPrivateKey;
@@ -59,7 +61,7 @@ class OwnerKeyUtilImpl : public OwnerKeyUtil {
// key will live.
static const char kOwnerKeyFile[];
- explicit OwnerKeyUtilImpl(const FilePath& public_key_file);
+ explicit OwnerKeyUtilImpl(const base::FilePath& public_key_file);
// OwnerKeyUtil:
virtual bool ImportPublicKey(std::vector<uint8>* output) OVERRIDE;
@@ -72,7 +74,7 @@ class OwnerKeyUtilImpl : public OwnerKeyUtil {
private:
// The file that holds the public key.
- FilePath key_file_;
+ base::FilePath key_file_;
DISALLOW_COPY_AND_ASSIGN(OwnerKeyUtilImpl);
};
diff --git a/chrome/browser/chromeos/system/name_value_pairs_parser.h b/chrome/browser/chromeos/system/name_value_pairs_parser.h
index b35cd4c..a41a5ad5 100644
--- a/chrome/browser/chromeos/system/name_value_pairs_parser.h
+++ b/chrome/browser/chromeos/system/name_value_pairs_parser.h
@@ -10,7 +10,9 @@
#include "base/basictypes.h"
+namespace base {
class FilePath;
+}
namespace chromeos {
namespace system {
@@ -36,7 +38,7 @@ class NameValuePairsParser {
// Parses name-value pairs from the file.
// Returns false if there was any error in the file. Valid pairs will still be
// added to the map.
- bool GetNameValuePairsFromFile(const FilePath& file_path,
+ bool GetNameValuePairsFromFile(const base::FilePath& file_path,
const std::string& eq,
const std::string& delim);
diff --git a/chrome/browser/component_updater/component_updater_service.h b/chrome/browser/component_updater/component_updater_service.h
index 43a083f..ce17de0 100644
--- a/chrome/browser/component_updater/component_updater_service.h
+++ b/chrome/browser/component_updater/component_updater_service.h
@@ -11,14 +11,13 @@
#include "base/version.h"
#include "googleurl/src/gurl.h"
-class FilePath;
-
namespace net {
class URLRequestContextGetter;
}
namespace base {
class DictionaryValue;
+class FilePath;
}
// Component specific installers must derive from this class and implement
@@ -36,7 +35,7 @@ class ComponentInstaller {
// json dictionary and |unpack_path| contains the temporary directory
// with all the unpacked CRX files.
virtual bool Install(base::DictionaryValue* manifest,
- const FilePath& unpack_path) = 0;
+ const base::FilePath& unpack_path) = 0;
protected:
virtual ~ComponentInstaller() {}
diff --git a/chrome/browser/devtools/devtools_file_helper.h b/chrome/browser/devtools/devtools_file_helper.h
index 42fcb7d..e97e5bd 100644
--- a/chrome/browser/devtools/devtools_file_helper.h
+++ b/chrome/browser/devtools/devtools_file_helper.h
@@ -14,9 +14,12 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
-class FilePath;
class Profile;
+namespace base {
+class FilePath;
+}
+
namespace content {
class WebContents;
}
@@ -84,19 +87,21 @@ class DevToolsFileHelper {
void SaveAsFileSelected(const std::string& url,
const std::string& content,
const SaveCallback& callback,
- const FilePath& path);
+ const base::FilePath& path);
void SaveAsFileSelectionCanceled();
void InnerAddFileSystem(const AddFileSystemCallback& callback,
- const FilePath& path);
- void AddValidatedFileSystem(const AddFileSystemCallback& callback,
- const std::vector<FilePath>& permitted_paths);
- void RestoreValidatedFileSystems(const RequestFileSystemsCallback& callback,
- const std::vector<FilePath>& file_paths);
+ const base::FilePath& path);
+ void AddValidatedFileSystem(
+ const AddFileSystemCallback& callback,
+ const std::vector<base::FilePath>& permitted_paths);
+ void RestoreValidatedFileSystems(
+ const RequestFileSystemsCallback& callback,
+ const std::vector<base::FilePath>& file_paths);
content::WebContents* web_contents_;
Profile* profile_;
base::WeakPtrFactory<DevToolsFileHelper> weak_factory_;
- typedef std::map<std::string, FilePath> PathsMap;
+ typedef std::map<std::string, base::FilePath> PathsMap;
PathsMap saved_files_;
DISALLOW_COPY_AND_ASSIGN(DevToolsFileHelper);
};
diff --git a/chrome/browser/diagnostics/diagnostics_test.h b/chrome/browser/diagnostics/diagnostics_test.h
index 571145b..d1c430a 100644
--- a/chrome/browser/diagnostics/diagnostics_test.h
+++ b/chrome/browser/diagnostics/diagnostics_test.h
@@ -9,7 +9,9 @@
#include "base/string16.h"
#include "chrome/browser/diagnostics/diagnostics_model.h"
+namespace base {
class FilePath;
+}
// Represents a single diagnostic test and encapsulates the common
// functionality across platforms as well.
@@ -55,7 +57,7 @@ class DiagnosticTest : public DiagnosticsModel::TestInfo {
void RecordOutcome(const string16& additional_info,
DiagnosticsModel::TestResult result);
- static FilePath GetUserDefaultProfileDir();
+ static base::FilePath GetUserDefaultProfileDir();
protected:
// The id needs to be overridden by derived classes and must uniquely
diff --git a/chrome/browser/download/download_file_picker.h b/chrome/browser/download/download_file_picker.h
index 28f661b..b7dc8b4 100644
--- a/chrome/browser/download/download_file_picker.h
+++ b/chrome/browser/download/download_file_picker.h
@@ -8,7 +8,9 @@
#include "chrome/browser/download/chrome_download_manager_delegate.h"
#include "ui/shell_dialogs/select_file_dialog.h"
+namespace base {
class FilePath;
+}
namespace content {
class DownloadItem;
@@ -24,7 +26,7 @@ class DownloadFilePicker : public ui::SelectFileDialog::Listener {
void Init(content::DownloadManager* download_manager,
content::DownloadItem* item,
- const FilePath& suggested_path,
+ const base::FilePath& suggested_path,
const ChromeDownloadManagerDelegate::FileSelectedCallback&
callback);
@@ -33,28 +35,28 @@ class DownloadFilePicker : public ui::SelectFileDialog::Listener {
// method should be overridden to set the correct suggested path to prompt the
// user.
virtual void InitSuggestedPath(content::DownloadItem* item,
- const FilePath& suggested_path);
+ const base::FilePath& suggested_path);
- void set_suggested_path(const FilePath& suggested_path) {
+ void set_suggested_path(const base::FilePath& suggested_path) {
suggested_path_ = suggested_path;
}
// Runs |file_selected_callback_| with |path| and then deletes this object.
- void OnFileSelected(const FilePath& path);
+ void OnFileSelected(const base::FilePath& path);
- void RecordFileSelected(const FilePath& path);
+ void RecordFileSelected(const base::FilePath& path);
scoped_refptr<content::DownloadManager> download_manager_;
int32 download_id_;
private:
// SelectFileDialog::Listener implementation.
- virtual void FileSelected(const FilePath& path,
+ virtual void FileSelected(const base::FilePath& path,
int index,
void* params) OVERRIDE;
virtual void FileSelectionCanceled(void* params) OVERRIDE;
- FilePath suggested_path_;
+ base::FilePath suggested_path_;
ChromeDownloadManagerDelegate::FileSelectedCallback file_selected_callback_;
diff --git a/chrome/browser/download/download_path_reservation_tracker.h b/chrome/browser/download/download_path_reservation_tracker.h
index 9bfeea7..7c7775b 100644
--- a/chrome/browser/download/download_path_reservation_tracker.h
+++ b/chrome/browser/download/download_path_reservation_tracker.h
@@ -63,12 +63,14 @@
// It considers 'foo/bar/x.pdf' and 'foo/baz/x.pdf' to be two different paths,
// even though 'bar' might be a symlink to 'baz'.
+namespace base {
+class FilePath;
+}
+
namespace content {
class DownloadItem;
}
-class FilePath;
-
// Issues and tracks download paths that are in use by the download system. When
// a target path is set for a download, this object tracks the path and the
// associated download item so that subsequent downloads can avoid using the
@@ -84,7 +86,7 @@ class DownloadPathReservationTracker {
//
// If |requested_target_path| was not writeable, then the parent directory of
// |target_path| may be different from that of |requested_target_path|.
- typedef base::Callback<void(const FilePath& target_path,
+ typedef base::Callback<void(const base::FilePath& target_path,
bool target_path_verified)> ReservedPathCallback;
// The largest index for the uniquification suffix that we will try while
@@ -99,14 +101,14 @@ class DownloadPathReservationTracker {
// directory does not exist and is the parent directory of
// |requested_target_path|, the directory will be created.
static void GetReservedPath(content::DownloadItem& download_item,
- const FilePath& requested_target_path,
- const FilePath& default_download_path,
+ const base::FilePath& requested_target_path,
+ const base::FilePath& default_download_path,
bool should_uniquify_path,
const ReservedPathCallback& callback);
// Returns true if |path| is in use by an existing path reservation. Should
// only be called on the FILE thread. Currently only used by tests.
- static bool IsPathInUseForTesting(const FilePath& path);
+ static bool IsPathInUseForTesting(const base::FilePath& path);
};
#endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_PATH_RESERVATION_TRACKER_H_
diff --git a/chrome/browser/enumerate_modules_model_win.h b/chrome/browser/enumerate_modules_model_win.h
index aac4a9c..0d78ab0 100644
--- a/chrome/browser/enumerate_modules_model_win.h
+++ b/chrome/browser/enumerate_modules_model_win.h
@@ -17,9 +17,9 @@
#include "googleurl/src/gurl.h"
class EnumerateModulesModel;
-class FilePath;
namespace base {
+class FilePath;
class ListValue;
}
@@ -191,7 +191,7 @@ class ModuleEnumerator : public base::RefCountedThreadSafe<ModuleEnumerator> {
// Given a filename, returns the Subject (who signed it) retrieved from
// the digital signature (Authenticode).
- string16 GetSubjectNameFromDigitalSignature(const FilePath& filename);
+ string16 GetSubjectNameFromDigitalSignature(const base::FilePath& filename);
// The typedef for the vector that maps a regular file path to %env_var%.
typedef std::vector< std::pair<string16, string16> > PathMapping;
diff --git a/chrome/browser/extensions/activity_database.h b/chrome/browser/extensions/activity_database.h
index 89daecf..1c73dc9 100644
--- a/chrome/browser/extensions/activity_database.h
+++ b/chrome/browser/extensions/activity_database.h
@@ -14,7 +14,9 @@
#include "sql/connection.h"
#include "sql/init_status.h"
+namespace base {
class FilePath;
+}
namespace extensions {
@@ -30,7 +32,7 @@ class ActivityDatabase : public base::RefCountedThreadSafe<ActivityDatabase> {
void SetErrorDelegate(sql::ErrorDelegate* error_delegate);
// Opens the DB and creates tables as necessary.
- void Init(const FilePath& db_name);
+ void Init(const base::FilePath& db_name);
void LogInitFailure();
// Record a UrlAction in the database.
diff --git a/chrome/browser/extensions/api/bookmarks/bookmarks_api.h b/chrome/browser/extensions/api/bookmarks/bookmarks_api.h
index 1b12fd5..44e2259 100644
--- a/chrome/browser/extensions/api/bookmarks/bookmarks_api.h
+++ b/chrome/browser/extensions/api/bookmarks/bookmarks_api.h
@@ -17,9 +17,8 @@
#include "chrome/browser/extensions/extension_function.h"
#include "ui/shell_dialogs/select_file_dialog.h"
-class FilePath;
-
namespace base {
+class FilePath;
class ListValue;
}
@@ -274,10 +273,10 @@ class BookmarksIOFunction : public BookmarksFunction,
public:
BookmarksIOFunction();
- virtual void FileSelected(const FilePath& path, int index, void* params) = 0;
+ virtual void FileSelected(const base::FilePath& path, int index, void* params) = 0;
// ui::SelectFileDialog::Listener:
- virtual void MultiFilesSelected(const std::vector<FilePath>& files,
+ virtual void MultiFilesSelected(const std::vector<base::FilePath>& files,
void* params) OVERRIDE;
virtual void FileSelectionCanceled(void* params) OVERRIDE;
@@ -289,7 +288,7 @@ class BookmarksIOFunction : public BookmarksFunction,
private:
void ShowSelectFileDialog(
ui::SelectFileDialog::Type type,
- const FilePath& default_path);
+ const base::FilePath& default_path);
protected:
scoped_refptr<ui::SelectFileDialog> select_file_dialog_;
@@ -300,7 +299,7 @@ class BookmarksImportFunction : public BookmarksIOFunction {
DECLARE_EXTENSION_FUNCTION("bookmarks.import", BOOKMARKS_IMPORT)
// BookmarkManagerIOFunction:
- virtual void FileSelected(const FilePath& path,
+ virtual void FileSelected(const base::FilePath& path,
int index,
void* params) OVERRIDE;
@@ -316,7 +315,7 @@ class BookmarksExportFunction : public BookmarksIOFunction {
DECLARE_EXTENSION_FUNCTION("bookmarks.export", BOOKMARKS_EXPORT)
// BookmarkManagerIOFunction:
- virtual void FileSelected(const FilePath& path,
+ virtual void FileSelected(const base::FilePath& path,
int index,
void* params) OVERRIDE;
diff --git a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.h b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.h
index e18511e..5062ab4 100644
--- a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.h
+++ b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_api.h
@@ -13,7 +13,6 @@
#include "chrome/browser/extensions/extension_function.h"
#include "chrome/browser/media_gallery/media_galleries_preferences.h"
-class FilePath;
class Profile;
namespace extensions {
diff --git a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_event_router.h b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_event_router.h
index b193fae..b46543e 100644
--- a/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_event_router.h
+++ b/chrome/browser/extensions/api/media_galleries_private/media_galleries_private_event_router.h
@@ -19,7 +19,6 @@
#include "chrome/browser/media_gallery/media_galleries_preferences.h"
#include "chrome/browser/system_monitor/removable_storage_observer.h"
-class FilePath;
class Profile;
namespace base {
diff --git a/chrome/browser/extensions/api/messaging/native_process_launcher.h b/chrome/browser/extensions/api/messaging/native_process_launcher.h
index 41e735f..cbb9bd3 100644
--- a/chrome/browser/extensions/api/messaging/native_process_launcher.h
+++ b/chrome/browser/extensions/api/messaging/native_process_launcher.h
@@ -8,7 +8,9 @@
#include "base/process.h"
#include "chrome/browser/extensions/api/messaging/native_message_process_host.h"
+namespace base {
class FilePath;
+}
namespace extensions {
@@ -35,7 +37,7 @@ class NativeProcessLauncher {
protected:
static bool LaunchNativeProcess(
- const FilePath& path,
+ const base::FilePath& path,
base::ProcessHandle* native_process_handle,
base::PlatformFile* read_file,
base::PlatformFile* write_file);
diff --git a/chrome/browser/extensions/api/page_capture/page_capture_api.h b/chrome/browser/extensions/api/page_capture/page_capture_api.h
index 4d7e80f..e2d6ac4 100644
--- a/chrome/browser/extensions/api/page_capture/page_capture_api.h
+++ b/chrome/browser/extensions/api/page_capture/page_capture_api.h
@@ -12,7 +12,9 @@
#include "chrome/common/extensions/api/page_capture.h"
#include "webkit/blob/shareable_file_reference.h"
+namespace base {
class FilePath;
+}
namespace content {
class WebContents;
@@ -29,7 +31,7 @@ class PageCaptureSaveAsMHTMLFunction : public AsyncExtensionFunction {
public:
// Called on the UI thread when the temporary file that contains the
// generated data has been created.
- virtual void OnTemporaryFileCreated(const FilePath& temp_file) = 0;
+ virtual void OnTemporaryFileCreated(const base::FilePath& temp_file) = 0;
};
static void SetTestDelegate(TestDelegate* delegate);
@@ -48,7 +50,7 @@ class PageCaptureSaveAsMHTMLFunction : public AsyncExtensionFunction {
void ReturnSuccess(int64 file_size);
// Callback called once the MHTML generation is done.
- void MHTMLGenerated(const FilePath& file_path, int64 mhtml_file_size);
+ void MHTMLGenerated(const base::FilePath& file_path, int64 mhtml_file_size);
// Returns the WebContents we are associated with, NULL if it's been closed.
content::WebContents* GetWebContents();
@@ -56,7 +58,7 @@ class PageCaptureSaveAsMHTMLFunction : public AsyncExtensionFunction {
scoped_ptr<extensions::api::page_capture::SaveAsMHTML::Params> params_;
// The path to the temporary file containing the MHTML data.
- FilePath mhtml_path_;
+ base::FilePath mhtml_path_;
// The file containing the MHTML.
scoped_refptr<webkit_blob::ShareableFileReference> mhtml_file_;
diff --git a/chrome/browser/extensions/api/storage/sync_or_local_value_store_cache.h b/chrome/browser/extensions/api/storage/sync_or_local_value_store_cache.h
index 8438b45..64909ac 100644
--- a/chrome/browser/extensions/api/storage/sync_or_local_value_store_cache.h
+++ b/chrome/browser/extensions/api/storage/sync_or_local_value_store_cache.h
@@ -13,7 +13,9 @@
#include "chrome/browser/extensions/api/storage/settings_storage_quota_enforcer.h"
#include "chrome/browser/extensions/api/storage/value_store_cache.h"
+namespace base {
class FilePath;
+}
namespace extensions {
@@ -30,7 +32,7 @@ class SyncOrLocalValueStoreCache : public ValueStoreCache {
const scoped_refptr<SettingsStorageFactory>& factory,
const SettingsStorageQuotaEnforcer::Limits& quota,
const scoped_refptr<SettingsObserverList>& observers,
- const FilePath& profile_path);
+ const base::FilePath& profile_path);
virtual ~SyncOrLocalValueStoreCache();
SettingsBackend* GetAppBackend() const;
@@ -48,7 +50,7 @@ class SyncOrLocalValueStoreCache : public ValueStoreCache {
void InitOnFileThread(const scoped_refptr<SettingsStorageFactory>& factory,
const SettingsStorageQuotaEnforcer::Limits& quota,
const scoped_refptr<SettingsObserverList>& observers,
- const FilePath& profile_path);
+ const base::FilePath& profile_path);
settings_namespace::Namespace settings_namespace_;
scoped_ptr<SettingsBackend> app_backend_;
diff --git a/chrome/browser/extensions/app_notification_manager.h b/chrome/browser/extensions/app_notification_manager.h
index 405b349..4fa6e30 100644
--- a/chrome/browser/extensions/app_notification_manager.h
+++ b/chrome/browser/extensions/app_notification_manager.h
@@ -119,7 +119,7 @@ class AppNotificationManager
virtual ~AppNotificationManager();
// Starts loading storage_ using |storage_path|.
- void LoadOnFileThread(const FilePath& storage_path);
+ void LoadOnFileThread(const base::FilePath& storage_path);
// Called on the UI thread to handle the loaded results from storage_.
void HandleLoadResults(NotificationMap* map);
diff --git a/chrome/browser/extensions/app_notification_storage.h b/chrome/browser/extensions/app_notification_storage.h
index 1daf6b2..5fda2fd 100644
--- a/chrome/browser/extensions/app_notification_storage.h
+++ b/chrome/browser/extensions/app_notification_storage.h
@@ -9,7 +9,9 @@
#include "chrome/browser/extensions/app_notification.h"
+namespace base {
class FilePath;
+}
namespace extensions {
@@ -20,7 +22,7 @@ namespace extensions {
class AppNotificationStorage {
public:
// Must be called on the FILE thread. The storage will be created at |path|.
- static AppNotificationStorage* Create(const FilePath& path);
+ static AppNotificationStorage* Create(const base::FilePath& path);
virtual ~AppNotificationStorage();
diff --git a/chrome/browser/extensions/convert_user_script.h b/chrome/browser/extensions/convert_user_script.h
index fa02f90..b5937773 100644
--- a/chrome/browser/extensions/convert_user_script.h
+++ b/chrome/browser/extensions/convert_user_script.h
@@ -10,9 +10,12 @@
#include "base/memory/ref_counted.h"
#include "base/string16.h"
-class FilePath;
class GURL;
+namespace base {
+class FilePath;
+}
+
namespace extensions {
class Extension;
@@ -24,8 +27,8 @@ class Extension;
// NOTE: The caller takes ownership of the directory at extension->path() on the
// returned object.
scoped_refptr<extensions::Extension> ConvertUserScriptToExtension(
- const FilePath& user_script, const GURL& original_url,
- const FilePath& extensions_dir, string16* error);
+ const base::FilePath& user_script, const GURL& original_url,
+ const base::FilePath& extensions_dir, string16* error);
} // namespace extensions
diff --git a/chrome/browser/extensions/convert_web_app.h b/chrome/browser/extensions/convert_web_app.h
index 78d80f9..77c03d5 100644
--- a/chrome/browser/extensions/convert_web_app.h
+++ b/chrome/browser/extensions/convert_web_app.h
@@ -9,9 +9,8 @@
#include "base/memory/ref_counted.h"
-class FilePath;
-
namespace base {
+class FilePath;
class Time;
}
@@ -41,7 +40,7 @@ std::string ConvertTimeToExtensionVersion(const base::Time& time);
scoped_refptr<Extension> ConvertWebAppToExtension(
const WebApplicationInfo& web_app_info,
const base::Time& create_time,
- const FilePath& extensions_dir);
+ const base::FilePath& extensions_dir);
} // namespace extensions
diff --git a/chrome/browser/extensions/extension_apitest.h b/chrome/browser/extensions/extension_apitest.h
index 143f9fd..8d3d2e0 100644
--- a/chrome/browser/extensions/extension_apitest.h
+++ b/chrome/browser/extensions/extension_apitest.h
@@ -13,13 +13,14 @@
#include "chrome/browser/extensions/extension_browsertest.h"
#include "content/public/browser/notification_registrar.h"
+namespace base {
class FilePath;
+}
namespace extensions {
class Extension;
}
-
// The general flow of these API tests should work like this:
// (1) Setup initial browser state (e.g. create some bookmarks for the
// bookmark test)
@@ -158,7 +159,7 @@ class ExtensionApiTest : public ExtensionBrowserTest {
// Start the test WebSocket server, and store details of its state. Those
// details will be available to javascript tests using
// chrome.test.getConfig().
- bool StartWebSocketServer(const FilePath& root_directory);
+ bool StartWebSocketServer(const base::FilePath& root_directory);
// Test that exactly one extension loaded. If so, return a pointer to
// the extension. If not, return NULL and set message_.
diff --git a/chrome/browser/extensions/extension_creator.h b/chrome/browser/extensions/extension_creator.h
index 86243ba..de7aa76 100644
--- a/chrome/browser/extensions/extension_creator.h
+++ b/chrome/browser/extensions/extension_creator.h
@@ -10,12 +10,14 @@
#include "base/basictypes.h"
+namespace base {
+class FilePath;
+}
+
namespace crypto {
class RSAPrivateKey;
}
-class FilePath;
-
namespace extensions {
// This class create an installable extension (.crx file) given an input
@@ -37,10 +39,10 @@ class ExtensionCreator {
// Categories of error that may need special handling on the UI end.
enum ErrorType { kOtherError, kCRXExists };
- bool Run(const FilePath& extension_dir,
- const FilePath& crx_path,
- const FilePath& private_key_path,
- const FilePath& private_key_output_path,
+ bool Run(const base::FilePath& extension_dir,
+ const base::FilePath& crx_path,
+ const base::FilePath& private_key_path,
+ const base::FilePath& private_key_output_path,
int run_flags);
// Returns the error message that will be present if Run(...) returned false.
@@ -56,38 +58,38 @@ class ExtensionCreator {
// the extension. If not provided, a random key will be created (in which case
// it is written to |private_key_output_path| -- if provided).
// |flags| is a bitset of RunFlags values.
- bool InitializeInput(const FilePath& extension_dir,
- const FilePath& crx_path,
- const FilePath& private_key_path,
- const FilePath& private_key_output_path,
+ bool InitializeInput(const base::FilePath& extension_dir,
+ const base::FilePath& crx_path,
+ const base::FilePath& private_key_path,
+ const base::FilePath& private_key_output_path,
int run_flags);
// Validates the manifest by trying to load the extension.
- bool ValidateManifest(const FilePath& extension_dir,
+ bool ValidateManifest(const base::FilePath& extension_dir,
crypto::RSAPrivateKey* key_pair,
int run_flags);
// Reads private key from |private_key_path|.
- crypto::RSAPrivateKey* ReadInputKey(const FilePath& private_key_path);
+ crypto::RSAPrivateKey* ReadInputKey(const base::FilePath& private_key_path);
// Generates a key pair and writes the private key to |private_key_path|
// if provided.
- crypto::RSAPrivateKey* GenerateKey(const FilePath& private_key_path);
+ crypto::RSAPrivateKey* GenerateKey(const base::FilePath& private_key_path);
// Creates temporary zip file for the extension.
- bool CreateZip(const FilePath& extension_dir, const FilePath& temp_path,
- FilePath* zip_path);
+ bool CreateZip(const base::FilePath& extension_dir, const base::FilePath& temp_path,
+ base::FilePath* zip_path);
// Signs the temporary zip and returns the signature.
- bool SignZip(const FilePath& zip_path,
+ bool SignZip(const base::FilePath& zip_path,
crypto::RSAPrivateKey* private_key,
std::vector<uint8>* signature);
// Export installable .crx to |crx_path|.
- bool WriteCRX(const FilePath& zip_path,
+ bool WriteCRX(const base::FilePath& zip_path,
crypto::RSAPrivateKey* private_key,
const std::vector<uint8>& signature,
- const FilePath& crx_path);
+ const base::FilePath& crx_path);
// Holds a message for any error that is raised during Run(...).
std::string error_message_;
diff --git a/chrome/browser/extensions/extension_creator_filter.h b/chrome/browser/extensions/extension_creator_filter.h
index c13e2c2..6c0aac6 100644
--- a/chrome/browser/extensions/extension_creator_filter.h
+++ b/chrome/browser/extensions/extension_creator_filter.h
@@ -7,7 +7,9 @@
#include "base/memory/ref_counted.h"
+namespace base {
class FilePath;
+}
namespace extensions {
@@ -18,9 +20,9 @@ class ExtensionCreatorFilter
public:
ExtensionCreatorFilter() {}
- // Returns true if the given FilePath should be included in a
+ // Returns true if the given base::FilePath should be included in a
// packed extension.
- bool ShouldPackageFile(const FilePath& file_path);
+ bool ShouldPackageFile(const base::FilePath& file_path);
private:
friend class base::RefCounted<ExtensionCreatorFilter>;
diff --git a/chrome/browser/extensions/external_provider_interface.h b/chrome/browser/extensions/external_provider_interface.h
index 1d1f098..2017386 100644
--- a/chrome/browser/extensions/external_provider_interface.h
+++ b/chrome/browser/extensions/external_provider_interface.h
@@ -10,10 +10,13 @@
#include "base/memory/linked_ptr.h"
#include "chrome/common/extensions/manifest.h"
-class FilePath;
class GURL;
class Version;
+namespace base {
+class FilePath;
+}
+
namespace extensions {
// This class is an abstract class for implementing external extensions
@@ -33,7 +36,7 @@ class ExternalProviderInterface {
virtual bool OnExternalExtensionFileFound(
const std::string& id,
const Version* version,
- const FilePath& path,
+ const base::FilePath& path,
Manifest::Location location,
int creation_flags,
bool mark_acknowledged) = 0;
diff --git a/chrome/browser/extensions/platform_app_launcher.h b/chrome/browser/extensions/platform_app_launcher.h
index 9665641..ae9cfa5 100644
--- a/chrome/browser/extensions/platform_app_launcher.h
+++ b/chrome/browser/extensions/platform_app_launcher.h
@@ -8,9 +8,12 @@
#include <string>
class CommandLine;
-class FilePath;
class Profile;
+namespace base {
+class FilePath;
+}
+
namespace content {
class WebContents;
class WebIntentsDispatcher;
@@ -27,20 +30,20 @@ class Extension;
void LaunchPlatformApp(Profile* profile,
const Extension* extension,
const CommandLine* command_line,
- const FilePath& current_directory);
+ const base::FilePath& current_directory);
// Launches the platform app |extension| with the contents of |file_path|
// available through the launch data.
void LaunchPlatformAppWithPath(Profile* profile,
const Extension* extension,
- const FilePath& file_path);
+ const base::FilePath& file_path);
// Launches the platform app |extension| with the contents of |file_path|
// available through the launch data.
void LaunchPlatformAppWithFileHandler(Profile* profile,
const Extension* extension,
const std::string& handler_id,
- const FilePath& file_path);
+ const base::FilePath& file_path);
#if defined(ENABLE_WEB_INTENTS)
// Launches the platform app |extension| with the supplied web intent. Creates
diff --git a/chrome/browser/extensions/test_extension_system.h b/chrome/browser/extensions/test_extension_system.h
index 47faa2f..d17ac02 100644
--- a/chrome/browser/extensions/test_extension_system.h
+++ b/chrome/browser/extensions/test_extension_system.h
@@ -8,8 +8,9 @@
#include "chrome/browser/extensions/extension_system.h"
class CommandLine;
-class FilePath;
+
namespace base {
+class FilePath;
class Time;
}
@@ -27,7 +28,7 @@ class TestExtensionSystem : public ExtensionSystem {
// Creates an ExtensionService initialized with the testing profile and
// returns it.
ExtensionService* CreateExtensionService(const CommandLine* command_line,
- const FilePath& install_directory,
+ const base::FilePath& install_directory,
bool autoupdate_enabled);
// Creates an ExtensionProcessManager. If not invoked, the
diff --git a/chrome/browser/extensions/updater/extension_downloader_delegate.h b/chrome/browser/extensions/updater/extension_downloader_delegate.h
index dd0b6c1..58e0dc9 100644
--- a/chrome/browser/extensions/updater/extension_downloader_delegate.h
+++ b/chrome/browser/extensions/updater/extension_downloader_delegate.h
@@ -11,9 +11,12 @@
#include "base/time.h"
#include "chrome/browser/extensions/updater/manifest_fetch_data.h"
-class FilePath;
class GURL;
+namespace base {
+class FilePath;
+}
+
namespace extensions {
class ExtensionDownloaderDelegate {
@@ -80,7 +83,7 @@ class ExtensionDownloaderDelegate {
// to the delegate.
virtual void OnExtensionDownloadFinished(
const std::string& id,
- const FilePath& path,
+ const base::FilePath& path,
const GURL& download_url,
const std::string& version,
const PingResult& ping_result,
diff --git a/chrome/browser/extensions/webstore_installer.h b/chrome/browser/extensions/webstore_installer.h
index b263f81..bda4aa0 100644
--- a/chrome/browser/extensions/webstore_installer.h
+++ b/chrome/browser/extensions/webstore_installer.h
@@ -21,9 +21,12 @@
#include "googleurl/src/gurl.h"
#include "net/base/net_errors.h"
-class FilePath;
class Profile;
+namespace base {
+class FilePath;
+}
+
namespace content {
class NavigationController;
}
@@ -142,7 +145,7 @@ class WebstoreInstaller :public content::NotificationObserver,
// Instead of using the default download directory, use |directory| instead.
// This does *not* transfer ownership of |directory|.
- static void SetDownloadDirectoryForTests(FilePath* directory);
+ static void SetDownloadDirectoryForTests(base::FilePath* directory);
private:
friend struct content::BrowserThread::DeleteOnThread<
@@ -158,7 +161,7 @@ class WebstoreInstaller :public content::NotificationObserver,
virtual void OnDownloadDestroyed(content::DownloadItem* download) OVERRIDE;
// Starts downloading the extension to |file_path|.
- void StartDownload(const FilePath& file_path);
+ void StartDownload(const base::FilePath& file_path);
// Reports an install |error| to the delegate for the given extension if this
// managed its installation. This also removes the associated PendingInstall.
diff --git a/chrome/browser/first_run/first_run.h b/chrome/browser/first_run/first_run.h
index 970cdd4..cf93bcf 100644
--- a/chrome/browser/first_run/first_run.h
+++ b/chrome/browser/first_run/first_run.h
@@ -17,12 +17,15 @@
#include "ui/gfx/native_widget_types.h"
class CommandLine;
-class FilePath;
class GURL;
class PrefServiceSyncable;
class Profile;
class ProcessSingleton;
+namespace base {
+class FilePath;
+}
+
// This namespace contains the chrome first-run installation actions needed to
// fully test the custom installer. It also contains the opposite actions to
// execute during uninstall. When the first run UI is ready we won't
@@ -133,10 +136,10 @@ void DoPostImportTasks(Profile* profile, bool make_chrome_default);
int ImportNow(Profile* profile, const CommandLine& cmdline);
// Returns the path for the master preferences file.
-FilePath MasterPrefsPath();
+base::FilePath MasterPrefsPath();
// Set a master preferences file path that overrides platform defaults.
-void SetMasterPrefsPathForTesting(const FilePath& master_prefs);
+void SetMasterPrefsPathForTesting(const base::FilePath& master_prefs);
// The master preferences is a JSON file with the same entries as the
// 'Default\Preferences' file. This function locates this file from a standard
@@ -152,7 +155,7 @@ void SetMasterPrefsPathForTesting(const FilePath& master_prefs);
// See chrome/installer/util/master_preferences.h for a description of
// 'master_preferences' file.
ProcessMasterPreferencesResult ProcessMasterPreferences(
- const FilePath& user_data_dir,
+ const base::FilePath& user_data_dir,
MasterPrefs* out_prefs);
// Show the first run search engine bubble at the first appropriate opportunity.
diff --git a/chrome/browser/first_run/first_run_internal.h b/chrome/browser/first_run/first_run_internal.h
index 9e56673..7f8bd14 100644
--- a/chrome/browser/first_run/first_run_internal.h
+++ b/chrome/browser/first_run/first_run_internal.h
@@ -14,7 +14,6 @@
#include "ui/gfx/native_widget_types.h"
class CommandLine;
-class FilePath;
class GURL;
class ImporterHost;
class ImporterList;
@@ -22,6 +21,10 @@ class Profile;
class ProcessSingleton;
class TemplateURLService;
+namespace base {
+class FilePath;
+}
+
namespace installer {
class MasterPreferences;
}
@@ -42,12 +45,12 @@ extern FirstRunState first_run_;
// master preferences. Passes the master preference file path out in
// master_prefs_path. Returns the pointer to installer::MasterPreferences object
// if successful; otherwise, returns NULL.
-installer::MasterPreferences* LoadMasterPrefs(FilePath* master_prefs_path);
+installer::MasterPreferences* LoadMasterPrefs(base::FilePath* master_prefs_path);
// Copies user preference file to master preference file. Returns true if
// successful.
-bool CopyPrefFile(const FilePath& user_data_dir,
- const FilePath& master_prefs_path);
+bool CopyPrefFile(const base::FilePath& user_data_dir,
+ const base::FilePath& master_prefs_path);
// Sets up master preferences by preferences passed by installer.
void SetupMasterPrefsFromInstallPrefs(
@@ -75,7 +78,7 @@ void DoPostImportPlatformSpecificTasks();
// Gives the full path to the sentinel file. The file might not exist.
// This function has a common implementation on OS_POSIX and a windows specific
// implementation.
-bool GetFirstRunSentinelFilePath(FilePath* path);
+bool GetFirstRunSentinelFilePath(base::FilePath* path);
// This function has a common implementationin for all non-linux platforms, and
// a linux specific implementation.
@@ -100,7 +103,7 @@ int ImportBookmarkFromFileIfNeeded(Profile* profile,
const CommandLine& cmdline);
#if !defined(OS_WIN)
-bool ImportBookmarks(const FilePath& import_bookmarks_path);
+bool ImportBookmarks(const base::FilePath& import_bookmarks_path);
#endif
// Shows the EULA dialog if required. Returns true if the EULA is accepted,
diff --git a/chrome/browser/google_apis/drive_api_service.h b/chrome/browser/google_apis/drive_api_service.h
index 45876d1..4da9568 100644
--- a/chrome/browser/google_apis/drive_api_service.h
+++ b/chrome/browser/google_apis/drive_api_service.h
@@ -14,10 +14,13 @@
#include "chrome/browser/google_apis/drive_api_url_generator.h"
#include "chrome/browser/google_apis/drive_service_interface.h"
-class FilePath;
class GURL;
class Profile;
+namespace base {
+class FilePath;
+}
+
namespace net {
class URLRequestContextGetter;
} // namespace net
@@ -51,7 +54,7 @@ class DriveAPIService : public DriveServiceInterface,
virtual void RemoveObserver(DriveServiceObserver* observer) OVERRIDE;
virtual bool CanStartOperation() const OVERRIDE;
virtual void CancelAll() OVERRIDE;
- virtual bool CancelForFilePath(const FilePath& file_path) OVERRIDE;
+ virtual bool CancelForFilePath(const base::FilePath& file_path) OVERRIDE;
virtual OperationProgressStatusList GetProgressStatusList() const OVERRIDE;
virtual bool HasAccessToken() const OVERRIDE;
virtual bool HasRefreshToken() const OVERRIDE;
@@ -74,8 +77,8 @@ class DriveAPIService : public DriveServiceInterface,
const std::string& resource_id,
const EntryActionCallback& callback) OVERRIDE;
virtual void DownloadFile(
- const FilePath& virtual_path,
- const FilePath& local_cache_path,
+ const base::FilePath& virtual_path,
+ const base::FilePath& local_cache_path,
const GURL& content_url,
const DownloadActionCallback& download_action_callback,
const GetContentCallback& get_content_callback) OVERRIDE;
diff --git a/chrome/browser/google_apis/drive_uploader.h b/chrome/browser/google_apis/drive_uploader.h
index c0007288..4dc496b 100644
--- a/chrome/browser/google_apis/drive_uploader.h
+++ b/chrome/browser/google_apis/drive_uploader.h
@@ -15,17 +15,20 @@
#include "chrome/browser/google_apis/gdata_errorcode.h"
#include "chrome/browser/google_apis/gdata_wapi_parser.h"
-class FilePath;
class GURL;
+namespace base {
+class FilePath;
+}
+
namespace google_apis {
class DriveServiceInterface;
struct ResumeUploadResponse;
// Callback to be invoked once the upload has completed.
typedef base::Callback<void(DriveUploadError error,
- const FilePath& drive_path,
- const FilePath& file_path,
+ const base::FilePath& drive_path,
+ const base::FilePath& file_path,
scoped_ptr<ResourceEntry> resource_entry)>
UploadCompletionCallback;
@@ -55,8 +58,8 @@ class DriveUploaderInterface {
// Called when an upload is done regardless of it was successful or not.
// Must not be null.
virtual void UploadNewFile(const GURL& upload_location,
- const FilePath& drive_file_path,
- const FilePath& local_file_path,
+ const base::FilePath& drive_file_path,
+ const base::FilePath& local_file_path,
const std::string& title,
const std::string& content_type,
const UploadCompletionCallback& callback) = 0;
@@ -70,8 +73,8 @@ class DriveUploaderInterface {
// fails with UPLOAD_ERROR_CONFLICT.
// If |etag| is empty, the test is skipped.
virtual void UploadExistingFile(const GURL& upload_location,
- const FilePath& drive_file_path,
- const FilePath& local_file_path,
+ const base::FilePath& drive_file_path,
+ const base::FilePath& local_file_path,
const std::string& content_type,
const std::string& etag,
const UploadCompletionCallback& callback) = 0;
@@ -84,15 +87,15 @@ class DriveUploader : public DriveUploaderInterface {
// DriveUploaderInterface overrides.
virtual void UploadNewFile(const GURL& upload_location,
- const FilePath& drive_file_path,
- const FilePath& local_file_path,
+ const base::FilePath& drive_file_path,
+ const base::FilePath& local_file_path,
const std::string& title,
const std::string& content_type,
const UploadCompletionCallback& callback) OVERRIDE;
virtual void UploadExistingFile(
const GURL& upload_location,
- const FilePath& drive_file_path,
- const FilePath& local_file_path,
+ const base::FilePath& drive_file_path,
+ const base::FilePath& local_file_path,
const std::string& content_type,
const std::string& etag,
const UploadCompletionCallback& callback) OVERRIDE;
diff --git a/chrome/browser/google_apis/gdata_wapi_parser.h b/chrome/browser/google_apis/gdata_wapi_parser.h
index 8f5c8f7..2d973af 100644
--- a/chrome/browser/google_apis/gdata_wapi_parser.h
+++ b/chrome/browser/google_apis/gdata_wapi_parser.h
@@ -17,12 +17,13 @@
#include "chrome/browser/google_apis/drive_entry_kinds.h"
#include "googleurl/src/gurl.h"
-class FilePath;
class Profile;
namespace base {
-class Value;
+class FilePath;
class DictionaryValue;
+class Value;
+
template <class StructType>
class JSONValueConverter;
@@ -421,7 +422,7 @@ class ResourceEntry : public FeedEntry {
static bool ParseChangestamp(const base::Value* value, int64* result);
// Returns true if |file| has one of the hosted document extensions.
- static bool HasHostedDocumentExtension(const FilePath& file);
+ static bool HasHostedDocumentExtension(const base::FilePath& file);
// The resource ID is used to identify a resource, which looks like:
// file:d41d8cd98f00b204e9800998ecf8
diff --git a/chrome/browser/google_apis/gdata_wapi_service.h b/chrome/browser/google_apis/gdata_wapi_service.h
index 2866a7c..b454f2e 100644
--- a/chrome/browser/google_apis/gdata_wapi_service.h
+++ b/chrome/browser/google_apis/gdata_wapi_service.h
@@ -15,10 +15,13 @@
#include "chrome/browser/google_apis/gdata_wapi_operations.h"
#include "chrome/browser/google_apis/gdata_wapi_url_generator.h"
-class FilePath;
class GURL;
class Profile;
+namespace base {
+class FilePath;
+}
+
namespace net {
class URLRequestContextGetter;
} // namespace net
@@ -55,7 +58,7 @@ class GDataWapiService : public DriveServiceInterface,
virtual void RemoveObserver(DriveServiceObserver* observer) OVERRIDE;
virtual bool CanStartOperation() const OVERRIDE;
virtual void CancelAll() OVERRIDE;
- virtual bool CancelForFilePath(const FilePath& file_path) OVERRIDE;
+ virtual bool CancelForFilePath(const base::FilePath& file_path) OVERRIDE;
virtual OperationProgressStatusList GetProgressStatusList() const OVERRIDE;
virtual bool HasAccessToken() const OVERRIDE;
virtual bool HasRefreshToken() const OVERRIDE;
@@ -76,8 +79,8 @@ class GDataWapiService : public DriveServiceInterface,
virtual void DeleteResource(const std::string& resource_id,
const EntryActionCallback& callback) OVERRIDE;
virtual void DownloadFile(
- const FilePath& virtual_path,
- const FilePath& local_cache_path,
+ const base::FilePath& virtual_path,
+ const base::FilePath& local_cache_path,
const GURL& content_url,
const DownloadActionCallback& download_action_callback,
const GetContentCallback& get_content_callback) OVERRIDE;
diff --git a/chrome/browser/google_apis/mock_drive_service.h b/chrome/browser/google_apis/mock_drive_service.h
index 42cbfe9..eb8a9dc 100644
--- a/chrome/browser/google_apis/mock_drive_service.h
+++ b/chrome/browser/google_apis/mock_drive_service.h
@@ -13,7 +13,9 @@
#include "chrome/browser/google_apis/drive_service_interface.h"
#include "testing/gmock/include/gmock/gmock.h"
+namespace base {
class FilePath;
+}
namespace google_apis {
@@ -30,7 +32,7 @@ class MockDriveService : public DriveServiceInterface {
void(DriveServiceObserver* observer));
MOCK_CONST_METHOD0(CanStartOperation, bool());
MOCK_METHOD0(CancelAll, void(void));
- MOCK_METHOD1(CancelForFilePath, bool(const FilePath& file_path));
+ MOCK_METHOD1(CancelForFilePath, bool(const base::FilePath& file_path));
MOCK_CONST_METHOD0(GetProgressStatusList,
OperationProgressStatusList());
MOCK_CONST_METHOD0(GetRootResourceId, std::string());
@@ -72,8 +74,8 @@ class MockDriveService : public DriveServiceInterface {
const GetResourceEntryCallback& callback));
MOCK_METHOD5(
DownloadFile,
- void(const FilePath& virtual_path,
- const FilePath& local_cache_path,
+ void(const base::FilePath& virtual_path,
+ const base::FilePath& local_cache_path,
const GURL& content_url,
const DownloadActionCallback&
donwload_action_callback,
@@ -151,8 +153,8 @@ class MockDriveService : public DriveServiceInterface {
// portion of the URL as the temporary file path. If |file_data_| is not null,
// |file_data_| is written to the temporary file.
void DownloadFileStub(
- const FilePath& virtual_path,
- const FilePath& local_tmp_path,
+ const base::FilePath& virtual_path,
+ const base::FilePath& local_tmp_path,
const GURL& content_url,
const DownloadActionCallback& download_action_callback,
const GetContentCallback& get_content_callback);
diff --git a/chrome/browser/google_apis/test_util.h b/chrome/browser/google_apis/test_util.h
index e0ba436..38a1051 100644
--- a/chrome/browser/google_apis/test_util.h
+++ b/chrome/browser/google_apis/test_util.h
@@ -11,9 +11,8 @@
#include "chrome/browser/google_apis/gdata_errorcode.h"
#include "googleurl/src/gurl.h"
-class FilePath;
-
namespace base {
+class FilePath;
class Value;
}
@@ -42,7 +41,7 @@ void RunBlockingPoolTask();
// Returns the absolute path for a test file stored under
// chrome/test/data/chromeos.
-FilePath GetTestFilePath(const std::string& relative_path);
+base::FilePath GetTestFilePath(const std::string& relative_path);
// Returns the base URL for communicating with the local test server for
// testing, running at the specified port number.
@@ -103,13 +102,13 @@ void CopyResultsFromGetAppListCallback(
// Copies the results from DownloadActionCallback.
void CopyResultsFromDownloadActionCallback(
GDataErrorCode* error_out,
- FilePath* temp_file_out,
+ base::FilePath* temp_file_out,
GDataErrorCode error_in,
- const FilePath& temp_file_in);
+ const base::FilePath& temp_file_in);
// Returns a HttpResponse created from the given file path.
scoped_ptr<test_server::HttpResponse> CreateHttpResponseFromFile(
- const FilePath& file_path);
+ const base::FilePath& file_path);
// Does nothing for ReAuthenticateCallback(). This function should be used
// if it is not expected to reach this method as there won't be any
@@ -120,7 +119,7 @@ void DoNothingForReAuthenticateCallback(
// Returns true if |json_data| is not NULL and equals to the content in
// |expected_json_file_path|. The failure reason will be logged into LOG(ERROR)
// if necessary.
-bool VerifyJsonData(const FilePath& expected_json_file_path,
+bool VerifyJsonData(const base::FilePath& expected_json_file_path,
const base::Value* json_data);
} // namespace test_util
diff --git a/chrome/browser/google_apis/time_util.h b/chrome/browser/google_apis/time_util.h
index f40aecc..222045b 100644
--- a/chrome/browser/google_apis/time_util.h
+++ b/chrome/browser/google_apis/time_util.h
@@ -9,7 +9,6 @@
#include "base/string_piece.h"
-class FilePath;
class Profile;
namespace base {
diff --git a/chrome/browser/history/archived_database.cc b/chrome/browser/history/archived_database.cc
index 3eae2d6..b80509e 100644
--- a/chrome/browser/history/archived_database.cc
+++ b/chrome/browser/history/archived_database.cc
@@ -24,7 +24,7 @@ ArchivedDatabase::ArchivedDatabase() {
ArchivedDatabase::~ArchivedDatabase() {
}
-bool ArchivedDatabase::Init(const FilePath& file_name) {
+bool ArchivedDatabase::Init(const base::FilePath& file_name) {
// Set the database page size to something a little larger to give us
// better performance (we're typically seek rather than bandwidth limited).
// This only has an effect before any tables have been created, otherwise
diff --git a/chrome/browser/history/archived_database.h b/chrome/browser/history/archived_database.h
index b157f66..0fe7184 100644
--- a/chrome/browser/history/archived_database.h
+++ b/chrome/browser/history/archived_database.h
@@ -12,7 +12,9 @@
#include "sql/init_status.h"
#include "sql/meta_table.h"
+namespace base {
class FilePath;
+}
namespace history {
@@ -30,7 +32,7 @@ class ArchivedDatabase : public URLDatabase,
// Initializes the database connection. This must return true before any other
// functions on this class are called.
- bool Init(const FilePath& file_name);
+ bool Init(const base::FilePath& file_name);
// Transactions on the database. We support nested transactions and only
// commit when the outermost one is committed (sqlite doesn't support true
diff --git a/chrome/browser/history/download_database.h b/chrome/browser/history/download_database.h
index 8cf07ab..929b097 100644
--- a/chrome/browser/history/download_database.h
+++ b/chrome/browser/history/download_database.h
@@ -11,8 +11,6 @@
#include "base/threading/platform_thread.h"
#include "sql/meta_table.h"
-class FilePath;
-
namespace sql {
class Connection;
}
diff --git a/chrome/browser/history/history_database.h b/chrome/browser/history/history_database.h
index b374260..981c8a5 100644
--- a/chrome/browser/history/history_database.h
+++ b/chrome/browser/history/history_database.h
@@ -23,7 +23,9 @@
#include "chrome/browser/history/android/android_urls_database.h"
#endif
+namespace base {
class FilePath;
+}
namespace history {
@@ -67,7 +69,7 @@ class HistoryDatabase : public DownloadDatabase,
// Must call this function to complete initialization. Will return
// sql::INIT_OK on success. Otherwise, no other function should be called. You
// may want to call BeginExclusiveMode after this when you are ready.
- sql::InitStatus Init(const FilePath& history_name,
+ sql::InitStatus Init(const base::FilePath& history_name,
sql::ErrorDelegate* error_delegate);
// Call to set the mode on the database to exclusive. The default locking mode
diff --git a/chrome/browser/history/history_service.h b/chrome/browser/history/history_service.h
index bd7307f..c778783 100644
--- a/chrome/browser/history/history_service.h
+++ b/chrome/browser/history/history_service.h
@@ -40,7 +40,6 @@
#endif
class BookmarkService;
-class FilePath;
class GURL;
class HistoryURLProvider;
class PageUsageData;
@@ -49,6 +48,7 @@ class Profile;
struct HistoryURLProviderParams;
namespace base {
+class FilePath;
class Thread;
}
@@ -129,7 +129,7 @@ class HistoryService : public CancelableRequestProvider,
// not call any other functions. The given directory will be used for storing
// the history files. The BookmarkService is used when deleting URLs to
// test if a URL is bookmarked; it may be NULL during testing.
- bool Init(const FilePath& history_dir, BookmarkService* bookmark_service) {
+ bool Init(const base::FilePath& history_dir, BookmarkService* bookmark_service) {
return Init(history_dir, bookmark_service, false);
}
@@ -666,7 +666,7 @@ class HistoryService : public CancelableRequestProvider,
// Low-level Init(). Same as the public version, but adds a |no_db| parameter
// that is only set by unittests which causes the backend to not init its DB.
- bool Init(const FilePath& history_dir,
+ bool Init(const base::FilePath& history_dir,
BookmarkService* bookmark_service,
bool no_db);
@@ -1094,7 +1094,7 @@ class HistoryService : public CancelableRequestProvider,
int current_backend_id_;
// Cached values from Init(), used whenever we need to reload the backend.
- FilePath history_dir_;
+ base::FilePath history_dir_;
BookmarkService* bookmark_service_;
bool no_db_;
diff --git a/chrome/browser/history/in_memory_database.h b/chrome/browser/history/in_memory_database.h
index 17cb6f1..b729686 100644
--- a/chrome/browser/history/in_memory_database.h
+++ b/chrome/browser/history/in_memory_database.h
@@ -9,7 +9,9 @@
#include "chrome/browser/history/url_database.h"
#include "sql/connection.h"
+namespace base {
class FilePath;
+}
namespace history {
@@ -28,7 +30,7 @@ class InMemoryDatabase : public URLDatabase {
// file. Conceptually, the InMemoryHistoryBackend should do the populating
// after this object does some common initialization, but that would be
// much slower.
- bool InitFromDisk(const FilePath& history_name);
+ bool InitFromDisk(const base::FilePath& history_name);
protected:
// Implemented for URLDatabase.
diff --git a/chrome/browser/history/in_memory_history_backend.cc b/chrome/browser/history/in_memory_history_backend.cc
index b0dac72..f75d1c9 100644
--- a/chrome/browser/history/in_memory_history_backend.cc
+++ b/chrome/browser/history/in_memory_history_backend.cc
@@ -27,7 +27,7 @@ InMemoryHistoryBackend::InMemoryHistoryBackend()
InMemoryHistoryBackend::~InMemoryHistoryBackend() {}
-bool InMemoryHistoryBackend::Init(const FilePath& history_filename,
+bool InMemoryHistoryBackend::Init(const base::FilePath& history_filename,
URLDatabase* db) {
db_.reset(new InMemoryDatabase);
return db_->InitFromDisk(history_filename);
diff --git a/chrome/browser/history/in_memory_history_backend.h b/chrome/browser/history/in_memory_history_backend.h
index addfac9..a2d1f72 100644
--- a/chrome/browser/history/in_memory_history_backend.h
+++ b/chrome/browser/history/in_memory_history_backend.h
@@ -21,10 +21,13 @@
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
-class FilePath;
class GURL;
class Profile;
+namespace base {
+class FilePath;
+}
+
namespace history {
class InMemoryDatabase;
@@ -42,7 +45,7 @@ class InMemoryHistoryBackend : public content::NotificationObserver {
// Initializes the backend from the history database pointed to by the
// full path in |history_filename|. |db| is used for setting up the
// InMemoryDatabase.
- bool Init(const FilePath& history_filename, URLDatabase* db);
+ bool Init(const base::FilePath& history_filename, URLDatabase* db);
// Does initialization work when this object is attached to the history
// system on the main thread. The argument is the profile with which the
diff --git a/chrome/browser/history/thumbnail_database.h b/chrome/browser/history/thumbnail_database.h
index 9ee17c7..4e8f789 100644
--- a/chrome/browser/history/thumbnail_database.h
+++ b/chrome/browser/history/thumbnail_database.h
@@ -15,11 +15,11 @@
#include "sql/meta_table.h"
#include "sql/statement.h"
-class FilePath;
struct ThumbnailScore;
class SkBitmap;
namespace base {
+class FilePath;
class RefCountedMemory;
class Time;
}
@@ -47,7 +47,7 @@ class ThumbnailDatabase {
// Must be called after creation but before any other methods are called.
// When not INIT_OK, no other functions should be called.
- sql::InitStatus Init(const FilePath& db_name,
+ sql::InitStatus Init(const base::FilePath& db_name,
const HistoryPublisher* history_publisher,
URLDatabase* url_database);
@@ -56,7 +56,7 @@ class ThumbnailDatabase {
// |db| is the database to open.
// |db_name| is a path to the database file.
static sql::InitStatus OpenDatabase(sql::Connection* db,
- const FilePath& db_name);
+ const base::FilePath& db_name);
// Transactions on the database.
void BeginTransaction();
@@ -308,8 +308,8 @@ class ThumbnailDatabase {
bool NeedsMigrationToTopSites();
// Renames the database file and drops the Thumbnails table.
- bool RenameAndDropThumbnails(const FilePath& old_db_file,
- const FilePath& new_db_file);
+ bool RenameAndDropThumbnails(const base::FilePath& old_db_file,
+ const base::FilePath& new_db_file);
private:
friend class ExpireHistoryBackend;
diff --git a/chrome/browser/history/top_sites.h b/chrome/browser/history/top_sites.h
index e87f25d..7ea4fa6 100644
--- a/chrome/browser/history/top_sites.h
+++ b/chrome/browser/history/top_sites.h
@@ -29,10 +29,10 @@
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/image/image.h"
-class FilePath;
class Profile;
namespace base {
+class FilePath;
class RefCountedBytes;
class RefCountedMemory;
}
@@ -57,7 +57,7 @@ class TopSites
explicit TopSites(Profile* profile);
// Initializes TopSites.
- void Init(const FilePath& db_name);
+ void Init(const base::FilePath& db_name);
// Sets the given thumbnail for the given URL. Returns true if the thumbnail
// was updated. False means either the URL wasn't known to us, or we felt
diff --git a/chrome/browser/history/top_sites_backend.h b/chrome/browser/history/top_sites_backend.h
index 163af2c..5028286 100644
--- a/chrome/browser/history/top_sites_backend.h
+++ b/chrome/browser/history/top_sites_backend.h
@@ -12,7 +12,10 @@
#include "chrome/browser/history/history_types.h"
class CancelableTaskTracker;
+
+namespace base {
class FilePath;
+}
namespace history {
@@ -31,7 +34,7 @@ class TopSitesBackend : public base::RefCountedThreadSafe<TopSitesBackend> {
TopSitesBackend();
- void Init(const FilePath& path);
+ void Init(const base::FilePath& path);
// Schedules the db to be shutdown.
void Shutdown();
@@ -64,7 +67,7 @@ class TopSitesBackend : public base::RefCountedThreadSafe<TopSitesBackend> {
virtual ~TopSitesBackend();
// Invokes Init on the db_.
- void InitDBOnDBThread(const FilePath& path);
+ void InitDBOnDBThread(const base::FilePath& path);
// Shuts down the db.
void ShutdownDBOnDBThread();
@@ -83,9 +86,9 @@ class TopSitesBackend : public base::RefCountedThreadSafe<TopSitesBackend> {
const Images& thumbnail);
// Resets the database.
- void ResetDatabaseOnDBThread(const FilePath& file_path);
+ void ResetDatabaseOnDBThread(const base::FilePath& file_path);
- FilePath db_path_;
+ base::FilePath db_path_;
scoped_ptr<TopSitesDatabase> db_;
diff --git a/chrome/browser/history/top_sites_database.h b/chrome/browser/history/top_sites_database.h
index 313c706..42e04ed 100644
--- a/chrome/browser/history/top_sites_database.h
+++ b/chrome/browser/history/top_sites_database.h
@@ -13,7 +13,9 @@
#include "chrome/browser/history/url_database.h" // For DBCloseScoper.
#include "sql/meta_table.h"
+namespace base {
class FilePath;
+}
namespace sql {
class Connection;
@@ -28,7 +30,7 @@ class TopSitesDatabase {
// Must be called after creation but before any other methods are called.
// Returns true on success. If false, no other functions should be called.
- bool Init(const FilePath& db_name);
+ bool Init(const base::FilePath& db_name);
// Returns true if migration of top sites from history may be needed. A value
// of true means either migration is definitely needed (the top sites file is
@@ -92,7 +94,7 @@ class TopSitesDatabase {
// Returns the number of URLs (rows) in the database.
int GetRowCount();
- sql::Connection* CreateDB(const FilePath& db_name);
+ sql::Connection* CreateDB(const base::FilePath& db_name);
// Encodes redirects into a string.
static std::string GetRedirects(const MostVisitedURL& url);
diff --git a/chrome/browser/icon_manager.h b/chrome/browser/icon_manager.h
index d6e17d4..875c6d8 100644
--- a/chrome/browser/icon_manager.h
+++ b/chrome/browser/icon_manager.h
@@ -51,7 +51,9 @@
#include "chrome/common/cancelable_task_tracker.h"
#include "ui/gfx/image/image.h"
+namespace base {
class FilePath;
+}
class IconManager : public IconLoader::Delegate {
public:
@@ -63,7 +65,7 @@ class IconManager : public IconLoader::Delegate {
// it via 'LoadIcon'. The returned bitmap is owned by the IconManager and must
// not be free'd by the caller. If the caller needs to modify the icon, it
// must make a copy and modify the copy.
- gfx::Image* LookupIcon(const FilePath& file_name, IconLoader::IconSize size);
+ gfx::Image* LookupIcon(const base::FilePath& file_name, IconLoader::IconSize size);
typedef base::Callback<void(gfx::Image*)> IconRequestCallback;
@@ -77,7 +79,7 @@ class IconManager : public IconLoader::Delegate {
// should never keep it or delete it.
// 3. The gfx::Image pointer passed to the callback may be NULL if decoding
// failed.
- CancelableTaskTracker::TaskId LoadIcon(const FilePath& file_name,
+ CancelableTaskTracker::TaskId LoadIcon(const base::FilePath& file_name,
IconLoader::IconSize size,
const IconRequestCallback& callback,
CancelableTaskTracker* tracker);
@@ -87,7 +89,7 @@ class IconManager : public IconLoader::Delegate {
// Get the identifying string for the given file. The implementation
// is in icon_manager_[platform].cc.
- static IconGroupID GetGroupIDFromFilepath(const FilePath& path);
+ static IconGroupID GetGroupIDFromFilepath(const base::FilePath& path);
private:
struct CacheKey {
diff --git a/chrome/browser/icon_manager_android.cc b/chrome/browser/icon_manager_android.cc
index 787d21c..393af5e 100644
--- a/chrome/browser/icon_manager_android.cc
+++ b/chrome/browser/icon_manager_android.cc
@@ -5,7 +5,7 @@
#include "base/logging.h"
#include "chrome/browser/icon_manager.h"
-IconGroupID IconManager::GetGroupIDFromFilepath(const FilePath& filepath) {
+IconGroupID IconManager::GetGroupIDFromFilepath(const base::FilePath& filepath) {
NOTIMPLEMENTED();
return 0;
}
diff --git a/chrome/browser/icon_manager_linux.cc b/chrome/browser/icon_manager_linux.cc
index df7c629..5dfa155 100644
--- a/chrome/browser/icon_manager_linux.cc
+++ b/chrome/browser/icon_manager_linux.cc
@@ -7,7 +7,8 @@
#include "base/nix/mime_util_xdg.h"
#include "base/threading/thread_restrictions.h"
-IconGroupID IconManager::GetGroupIDFromFilepath(const FilePath& filepath) {
+IconGroupID IconManager::GetGroupIDFromFilepath(
+ const base::FilePath& filepath) {
// It turns out the call to base::nix::GetFileMimeType below does IO, but
// callers of GetGroupIDFromFilepath assume it does not do IO (the Windows
// and Mac implementations do not). We should fix this by either not doing IO
diff --git a/chrome/browser/importer/firefox_importer_utils.h b/chrome/browser/importer/firefox_importer_utils.h
index 1ba9bfe..f723ba4 100644
--- a/chrome/browser/importer/firefox_importer_utils.h
+++ b/chrome/browser/importer/firefox_importer_utils.h
@@ -12,12 +12,12 @@
#include "base/string16.h"
#include "build/build_config.h"
-class FilePath;
class GURL;
class TemplateURL;
namespace base {
class DictionaryValue;
+class FilePath;
}
#if defined(OS_WIN)
@@ -29,7 +29,7 @@ int GetCurrentFirefoxMajorVersionFromRegistry();
// Detects where Firefox lives. Returns an empty path if Firefox is not
// installed.
-FilePath GetFirefoxInstallPathFromRegistry();
+base::FilePath GetFirefoxInstallPathFromRegistry();
#endif // OS_WIN
#if defined(OS_MACOSX)
@@ -37,21 +37,21 @@ FilePath GetFirefoxInstallPathFromRegistry();
// in order to decoded FF profile passwords.
// The Path is usuall FF App Bundle/Contents/Mac OS/
// Returns empty path on failure.
-FilePath GetFirefoxDylibPath();
+base::FilePath GetFirefoxDylibPath();
#endif // OS_MACOSX
// Returns the path to the Firefox profile.
-FilePath GetFirefoxProfilePath();
+base::FilePath GetFirefoxProfilePath();
// Detects version of Firefox and installation path for the given Firefox
// profile.
-bool GetFirefoxVersionAndPathFromProfile(const FilePath& profile_path,
+bool GetFirefoxVersionAndPathFromProfile(const base::FilePath& profile_path,
int* version,
- FilePath* app_path);
+ base::FilePath* app_path);
// Gets the full path of the profiles.ini file. This file records the profiles
// that can be used by Firefox. Returns an empty path if failed.
-FilePath GetProfilesINI();
+base::FilePath GetProfilesINI();
// Parses the profile.ini file, and stores its information in |root|.
// This file is a plain-text file. Key/value pairs are stored one per line, and
@@ -65,7 +65,7 @@ FilePath GetProfilesINI();
// Path=Profiles/abcdefeg.default
// We set "[value]" in path "<Section>.<Key>". For example, the path
// "Genenral.StartWithLastProfile" has the value "1".
-void ParseProfileINI(const FilePath& file, base::DictionaryValue* root);
+void ParseProfileINI(const base::FilePath& file, base::DictionaryValue* root);
// Returns true if we want to add the URL to the history. We filter out the URL
// with a unsupported scheme.
@@ -73,16 +73,16 @@ bool CanImportURL(const GURL& url);
// Parses the OpenSearch XML files in |xml_files| and populates |search_engines|
// with the resulting TemplateURLs.
-void ParseSearchEnginesFromXMLFiles(const std::vector<FilePath>& xml_files,
+void ParseSearchEnginesFromXMLFiles(const std::vector<base::FilePath>& xml_files,
std::vector<TemplateURL*>* search_engines);
// Returns the home page set in Firefox in a particular profile.
-GURL GetHomepage(const FilePath& profile_path);
+GURL GetHomepage(const base::FilePath& profile_path);
// Checks to see if this home page is a default home page, as specified by
// the resource file browserconfig.properties in the Firefox application
// directory.
-bool IsDefaultHomepage(const GURL& homepage, const FilePath& app_path);
+bool IsDefaultHomepage(const GURL& homepage, const base::FilePath& app_path);
// Parses the prefs found in the file |pref_file| and puts the key/value pairs
// in |prefs|. Keys are strings, and values can be strings, booleans or
@@ -90,7 +90,7 @@ bool IsDefaultHomepage(const GURL& homepage, const FilePath& app_path);
// |prefs| is not filled).
// Note: for strings, only valid UTF-8 string values are supported. If a
// key/pair is not valid UTF-8, it is ignored and will not appear in |prefs|.
-bool ParsePrefFile(const FilePath& pref_file, base::DictionaryValue* prefs);
+bool ParsePrefFile(const base::FilePath& pref_file, base::DictionaryValue* prefs);
// Parses the value of a particular firefox preference from a string that is the
// contents of the prefs file.
@@ -101,6 +101,6 @@ std::string GetPrefsJsValue(const std::string& prefs,
// This is useful to differentiate between Firefox and Iceweasel.
// If anything goes wrong while trying to obtain the branding name,
// the function assumes it's Firefox.
-string16 GetFirefoxImporterName(const FilePath& app_path);
+string16 GetFirefoxImporterName(const base::FilePath& app_path);
#endif // CHROME_BROWSER_IMPORTER_FIREFOX_IMPORTER_UTILS_H_
diff --git a/chrome/browser/importer/firefox_proxy_settings.h b/chrome/browser/importer/firefox_proxy_settings.h
index 6f74494..41657a2 100644
--- a/chrome/browser/importer/firefox_proxy_settings.h
+++ b/chrome/browser/importer/firefox_proxy_settings.h
@@ -10,7 +10,9 @@
#include "base/basictypes.h"
+namespace base {
class FilePath;
+}
namespace net {
class ProxyConfig;
@@ -78,7 +80,7 @@ class FirefoxProxySettings {
// Gets the settings from the passed prefs.js file and returns true if
// successful.
// Protected for tests.
- static bool GetSettingsFromFile(const FilePath& pref_file,
+ static bool GetSettingsFromFile(const base::FilePath& pref_file,
FirefoxProxySettings* settings);
private:
diff --git a/chrome/browser/importer/mork_reader.h b/chrome/browser/importer/mork_reader.h
index d139477..05eed2c 100644
--- a/chrome/browser/importer/mork_reader.h
+++ b/chrome/browser/importer/mork_reader.h
@@ -49,9 +49,12 @@
#include "base/basictypes.h"
-class FilePath;
class ImporterBridge;
+namespace base {
+class FilePath;
+}
+
// The nsMorkReader object allows a consumer to read in a mork-format
// file and enumerate the rows that it contains. It does not provide
// any functionality for modifying mork tables.
@@ -90,7 +93,7 @@ class MorkReader {
// Read in the given mork file. Returns true on success.
// Note: currently, only single-table mork files are supported
- bool Read(const FilePath& filename);
+ bool Read(const base::FilePath& filename);
// Returns the list of columns in the current table.
const MorkColumnList& columns() const { return columns_; }
@@ -158,6 +161,6 @@ class MorkReader {
};
// ImportHistoryFromFirefox2 is the main entry point to the importer.
-void ImportHistoryFromFirefox2(const FilePath& file, ImporterBridge* bridge);
+void ImportHistoryFromFirefox2(const base::FilePath& file, ImporterBridge* bridge);
#endif // CHROME_BROWSER_IMPORTER_MORK_READER_H_
diff --git a/chrome/browser/importer/nss_decryptor.cc b/chrome/browser/importer/nss_decryptor.cc
index 4439813..7a00b35 100644
--- a/chrome/browser/importer/nss_decryptor.cc
+++ b/chrome/browser/importer/nss_decryptor.cc
@@ -232,7 +232,7 @@ void NSSDecryptor::ParseSignons(
}
}
-bool NSSDecryptor::ReadAndParseSignons(const FilePath& sqlite_file,
+bool NSSDecryptor::ReadAndParseSignons(const base::FilePath& sqlite_file,
std::vector<content::PasswordForm>* forms) {
sql::Connection db;
if (!db.Open(sqlite_file))
diff --git a/chrome/browser/importer/nss_decryptor_mac.h b/chrome/browser/importer/nss_decryptor_mac.h
index 7cae82e..e8c7857 100644
--- a/chrome/browser/importer/nss_decryptor_mac.h
+++ b/chrome/browser/importer/nss_decryptor_mac.h
@@ -11,7 +11,9 @@
#include "base/basictypes.h"
#include "base/string16.h"
+namespace base {
class FilePath;
+}
// The following declarations of functions and types are from Firefox
// NSS library.
@@ -120,7 +122,7 @@ class NSSDecryptor {
~NSSDecryptor();
// Initializes NSS if it hasn't already been initialized.
- bool Init(const FilePath& dll_path, const FilePath& db_path);
+ bool Init(const base::FilePath& dll_path, const base::FilePath& db_path);
// Decrypts Firefox stored passwords. Before using this method,
// make sure Init() returns true.
@@ -135,7 +137,7 @@ class NSSDecryptor {
// Reads and parses the Firefox password sqlite db, decrypts the
// username/password and reads other related information.
// The result will be stored in |forms|.
- bool ReadAndParseSignons(const FilePath& sqlite_file,
+ bool ReadAndParseSignons(const base::FilePath& sqlite_file,
std::vector<content::PasswordForm>* forms);
private:
PK11SlotInfo* GetKeySlotForDB() const { return PK11_GetInternalKeySlot(); }
diff --git a/chrome/browser/importer/nss_decryptor_null.h b/chrome/browser/importer/nss_decryptor_null.h
index 4fd6934..5e690f4 100644
--- a/chrome/browser/importer/nss_decryptor_null.h
+++ b/chrome/browser/importer/nss_decryptor_null.h
@@ -11,7 +11,9 @@
#include "base/basictypes.h"
#include "base/string16.h"
+namespace base {
class FilePath;
+}
namespace content {
struct PasswordForm;
@@ -22,11 +24,11 @@ struct PasswordForm;
class NSSDecryptor {
public:
NSSDecryptor() {}
- bool Init(const FilePath& dll_path, const FilePath& db_path) { return false; }
+ bool Init(const base::FilePath& dll_path, const base::FilePath& db_path) { return false; }
string16 Decrypt(const std::string& crypt) const { return string16(); }
void ParseSignons(const std::string& content,
std::vector<content::PasswordForm>* forms) {}
- bool ReadAndParseSignons(const FilePath& sqlite_file,
+ bool ReadAndParseSignons(const base::FilePath& sqlite_file,
std::vector<content::PasswordForm>* forms) {
return false;
}
diff --git a/chrome/browser/importer/nss_decryptor_system_nss.h b/chrome/browser/importer/nss_decryptor_system_nss.h
index c125da9..41c4227 100644
--- a/chrome/browser/importer/nss_decryptor_system_nss.h
+++ b/chrome/browser/importer/nss_decryptor_system_nss.h
@@ -12,7 +12,9 @@
#include "base/basictypes.h"
#include "base/string16.h"
+namespace base {
class FilePath;
+}
namespace content {
struct PasswordForm;
@@ -25,7 +27,7 @@ class NSSDecryptor {
~NSSDecryptor();
// Initializes NSS if it hasn't already been initialized.
- bool Init(const FilePath& dll_path, const FilePath& db_path);
+ bool Init(const base::FilePath& dll_path, const base::FilePath& db_path);
// Decrypts Firefox stored passwords. Before using this method,
// make sure Init() returns true.
@@ -40,7 +42,7 @@ class NSSDecryptor {
// Reads and parses the Firefox password sqlite db, decrypts the
// username/password and reads other related information.
// The result will be stored in |forms|.
- bool ReadAndParseSignons(const FilePath& sqlite_file,
+ bool ReadAndParseSignons(const base::FilePath& sqlite_file,
std::vector<content::PasswordForm>* forms);
private:
// Does not actually free the slot, since we'll free it when NSSDecryptor is
diff --git a/chrome/browser/importer/nss_decryptor_win.h b/chrome/browser/importer/nss_decryptor_win.h
index 1aeb266..0a7b5ba 100644
--- a/chrome/browser/importer/nss_decryptor_win.h
+++ b/chrome/browser/importer/nss_decryptor_win.h
@@ -117,7 +117,7 @@ class NSSDecryptor {
// Loads NSS3 library and returns true if successful.
// |dll_path| indicates the location of NSS3 DLL files, and |db_path|
// is the location of the database file that stores the keys.
- bool Init(const FilePath& dll_path, const FilePath& db_path);
+ bool Init(const base::FilePath& dll_path, const base::FilePath& db_path);
// Frees the libraries.
void Free();
@@ -135,12 +135,12 @@ class NSSDecryptor {
// Reads and parses the Firefox password sqlite db, decrypts the
// username/password and reads other related information.
// The result will be stored in |forms|.
- bool ReadAndParseSignons(const FilePath& sqlite_file,
+ bool ReadAndParseSignons(const base::FilePath& sqlite_file,
std::vector<content::PasswordForm>* forms);
private:
// Call NSS initialization funcs.
- bool InitNSS(const FilePath& db_path,
+ bool InitNSS(const base::FilePath& db_path,
base::NativeLibrary plds4_dll,
base::NativeLibrary nspr4_dll);
diff --git a/chrome/browser/jumplist_win.h b/chrome/browser/jumplist_win.h
index 401b541..d4865ab 100644
--- a/chrome/browser/jumplist_win.h
+++ b/chrome/browser/jumplist_win.h
@@ -21,10 +21,14 @@
#include "content/public/browser/browser_thread.h"
#include "third_party/skia/include/core/SkBitmap.h"
+namespace base {
+class FilePath;
+}
+
namespace content {
class NotificationRegistrar;
}
-class FilePath;
+
class Profile;
class PageUsageData;
@@ -222,7 +226,7 @@ class JumpList : public TabRestoreServiceObserver,
std::wstring app_id_;
// The directory which contains JumpList icons.
- FilePath icon_dir_;
+ base::FilePath icon_dir_;
// Items in the "Most Visited" category of the application JumpList,
// protected by the list_lock_.
diff --git a/chrome/browser/managed_mode/managed_mode_url_filter.h b/chrome/browser/managed_mode/managed_mode_url_filter.h
index 875b64f..2059cb4 100644
--- a/chrome/browser/managed_mode/managed_mode_url_filter.h
+++ b/chrome/browser/managed_mode/managed_mode_url_filter.h
@@ -19,7 +19,6 @@ namespace policy {
class URLBlacklist;
} // namespace policy
-class FilePath;
class GURL;
// This class manages the filtering behavior for a given URL, i.e. it tells
diff --git a/chrome/browser/media_gallery/linux/mtp_device_delegate_impl_linux.h b/chrome/browser/media_gallery/linux/mtp_device_delegate_impl_linux.h
index bf98cbc..fff7110 100644
--- a/chrome/browser/media_gallery/linux/mtp_device_delegate_impl_linux.h
+++ b/chrome/browser/media_gallery/linux/mtp_device_delegate_impl_linux.h
@@ -15,9 +15,8 @@
#include "webkit/fileapi/file_system_file_util.h"
#include "webkit/fileapi/media/mtp_device_delegate.h"
-class FilePath;
-
namespace base {
+class FilePath;
class SequencedTaskRunner;
}
@@ -52,14 +51,14 @@ class MTPDeviceDelegateImplLinux : public fileapi::MTPDeviceDelegate {
// MTPDeviceDelegate:
virtual base::PlatformFileError GetFileInfo(
- const FilePath& file_path,
+ const base::FilePath& file_path,
base::PlatformFileInfo* file_info) OVERRIDE;
virtual scoped_ptr<fileapi::FileSystemFileUtil::AbstractFileEnumerator>
- CreateFileEnumerator(const FilePath& root,
+ CreateFileEnumerator(const base::FilePath& root,
bool recursive) OVERRIDE;
virtual base::PlatformFileError CreateSnapshotFile(
- const FilePath& device_file_path,
- const FilePath& local_path,
+ const base::FilePath& device_file_path,
+ const base::FilePath& local_path,
base::PlatformFileInfo* file_info) OVERRIDE;
virtual void CancelPendingTasksAndDeleteDelegate() OVERRIDE;
diff --git a/chrome/browser/media_gallery/media_file_system_context.h b/chrome/browser/media_gallery/media_file_system_context.h
index 0925990..1714732 100644
--- a/chrome/browser/media_gallery/media_file_system_context.h
+++ b/chrome/browser/media_gallery/media_file_system_context.h
@@ -13,7 +13,9 @@
#include "chrome/browser/media_gallery/scoped_mtp_device_map_entry.h"
#include "webkit/fileapi/media/mtp_device_file_system_config.h"
+namespace base {
class FilePath;
+}
namespace chrome {
@@ -26,14 +28,14 @@ class MediaFileSystemContext {
// Register a media file system (filtered to media files) for |path| and
// return the new file system id.
virtual std::string RegisterFileSystemForMassStorage(
- const std::string& device_id, const FilePath& path) = 0;
+ const std::string& device_id, const base::FilePath& path) = 0;
#if defined(SUPPORT_MTP_DEVICE_FILESYSTEM)
// Registers and returns the file system id for the MTP or PTP device
// specified by |device_id| and |path|. Updates |entry| with the corresponding
// ScopedMTPDeviceMapEntry object.
virtual std::string RegisterFileSystemForMTPDevice(
- const std::string& device_id, const FilePath& path,
+ const std::string& device_id, const base::FilePath& path,
scoped_refptr<ScopedMTPDeviceMapEntry>* entry) = 0;
#endif
diff --git a/chrome/browser/media_gallery/win/mtp_device_delegate_impl_win.h b/chrome/browser/media_gallery/win/mtp_device_delegate_impl_win.h
index db41cf0..d439edd 100644
--- a/chrome/browser/media_gallery/win/mtp_device_delegate_impl_win.h
+++ b/chrome/browser/media_gallery/win/mtp_device_delegate_impl_win.h
@@ -18,9 +18,8 @@
#include "webkit/fileapi/file_system_file_util.h"
#include "webkit/fileapi/media/mtp_device_delegate.h"
-class FilePath;
-
namespace base {
+class FilePath;
class SequencedTaskRunner;
}
@@ -56,14 +55,14 @@ class MTPDeviceDelegateImplWin : public fileapi::MTPDeviceDelegate {
// MTPDeviceDelegate:
virtual base::PlatformFileError GetFileInfo(
- const FilePath& file_path,
+ const base::FilePath& file_path,
base::PlatformFileInfo* file_info) OVERRIDE;
virtual scoped_ptr<fileapi::FileSystemFileUtil::AbstractFileEnumerator>
- CreateFileEnumerator(const FilePath& root,
+ CreateFileEnumerator(const base::FilePath& root,
bool recursive) OVERRIDE;
virtual base::PlatformFileError CreateSnapshotFile(
- const FilePath& device_file_path,
- const FilePath& local_path,
+ const base::FilePath& device_file_path,
+ const base::FilePath& local_path,
base::PlatformFileInfo* file_info) OVERRIDE;
virtual void CancelPendingTasksAndDeleteDelegate() OVERRIDE;
diff --git a/chrome/browser/media_gallery/win/recursive_mtp_device_object_enumerator.h b/chrome/browser/media_gallery/win/recursive_mtp_device_object_enumerator.h
index 7c7d991..8cf6a6b 100644
--- a/chrome/browser/media_gallery/win/recursive_mtp_device_object_enumerator.h
+++ b/chrome/browser/media_gallery/win/recursive_mtp_device_object_enumerator.h
@@ -18,7 +18,9 @@
#include "chrome/browser/media_gallery/win/mtp_device_object_entry.h"
#include "webkit/fileapi/file_system_file_util.h"
+namespace base {
class FilePath;
+}
namespace chrome {
@@ -40,7 +42,7 @@ class RecursiveMTPDeviceObjectEnumerator
virtual ~RecursiveMTPDeviceObjectEnumerator();
// AbstractFileEnumerator:
- virtual FilePath Next() OVERRIDE;
+ virtual base::FilePath Next() OVERRIDE;
virtual int64 Size() OVERRIDE;
virtual bool IsDirectory() OVERRIDE;
virtual base::Time LastModifiedTime() OVERRIDE;
diff --git a/chrome/browser/nacl_host/pnacl_file_host.h b/chrome/browser/nacl_host/pnacl_file_host.h
index 7187561..f1a31bd 100644
--- a/chrome/browser/nacl_host/pnacl_file_host.h
+++ b/chrome/browser/nacl_host/pnacl_file_host.h
@@ -8,7 +8,10 @@
#include <string>
class ChromeRenderMessageFilter;
+
+namespace base {
class FilePath;
+}
namespace IPC {
class Message;
@@ -24,9 +27,9 @@ void GetReadonlyPnaclFd(ChromeRenderMessageFilter* chrome_render_message_filter,
IPC::Message* reply_msg);
// Return true if the filename requested is valid for opening.
-// Sets file_to_open to the FilePath which we will attempt to open.
+// Sets file_to_open to the base::FilePath which we will attempt to open.
bool PnaclCanOpenFile(const std::string& filename,
- FilePath* file_to_open);
+ base::FilePath* file_to_open);
// Creates a temporary file that will be deleted when the last handle
// is closed, or earlier.
diff --git a/chrome/browser/net/chrome_network_delegate.h b/chrome/browser/net/chrome_network_delegate.h
index 90e7a75..85bfd0f 100644
--- a/chrome/browser/net/chrome_network_delegate.h
+++ b/chrome/browser/net/chrome_network_delegate.h
@@ -154,7 +154,7 @@ class ChromeNetworkDelegate : public net::NetworkDelegate {
const std::string& cookie_line,
net::CookieOptions* options) OVERRIDE;
virtual bool OnCanAccessFile(const net::URLRequest& request,
- const FilePath& path) const OVERRIDE;
+ const base::FilePath& path) const OVERRIDE;
virtual bool OnCanThrottleRequest(
const net::URLRequest& request) const OVERRIDE;
virtual int OnBeforeSocketStreamConnect(
diff --git a/chrome/browser/net/crl_set_fetcher.cc b/chrome/browser/net/crl_set_fetcher.cc
index 6630285..9c869b3 100644
--- a/chrome/browser/net/crl_set_fetcher.cc
+++ b/chrome/browser/net/crl_set_fetcher.cc
@@ -22,7 +22,7 @@ using content::BrowserThread;
CRLSetFetcher::CRLSetFetcher() : cus_(NULL) {}
-bool CRLSetFetcher::GetCRLSetFilePath(FilePath* path) const {
+bool CRLSetFetcher::GetCRLSetFilePath(base::FilePath* path) const {
bool ok = PathService::Get(chrome::DIR_USER_DATA, path);
if (!ok) {
NOTREACHED();
@@ -47,7 +47,7 @@ void CRLSetFetcher::StartInitialLoad(ComponentUpdateService* cus) {
void CRLSetFetcher::DoInitialLoadFromDisk() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- FilePath crl_set_file_path;
+ base::FilePath crl_set_file_path;
if (!GetCRLSetFilePath(&crl_set_file_path))
return;
@@ -69,7 +69,7 @@ void CRLSetFetcher::DoInitialLoadFromDisk() {
}
}
-void CRLSetFetcher::LoadFromDisk(FilePath path,
+void CRLSetFetcher::LoadFromDisk(base::FilePath path,
scoped_refptr<net::CRLSet>* out_crl_set) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
@@ -143,11 +143,12 @@ void CRLSetFetcher::OnUpdateError(int error) {
}
bool CRLSetFetcher::Install(base::DictionaryValue* manifest,
- const FilePath& unpack_path) {
+ const base::FilePath& unpack_path) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
- FilePath crl_set_file_path = unpack_path.Append(FILE_PATH_LITERAL("crl-set"));
- FilePath save_to;
+ base::FilePath crl_set_file_path =
+ unpack_path.Append(FILE_PATH_LITERAL("crl-set"));
+ base::FilePath save_to;
if (!GetCRLSetFilePath(&save_to))
return true;
diff --git a/chrome/browser/net/crl_set_fetcher.h b/chrome/browser/net/crl_set_fetcher.h
index 86dd8ee..8bcca1f 100644
--- a/chrome/browser/net/crl_set_fetcher.h
+++ b/chrome/browser/net/crl_set_fetcher.h
@@ -11,10 +11,9 @@
#include "base/memory/ref_counted.h"
#include "chrome/browser/component_updater/component_updater_service.h"
-class FilePath;
-
namespace base {
class DictionaryValue;
+class FilePath;
}
namespace net {
@@ -33,16 +32,16 @@ class CRLSetFetcher : public ComponentInstaller,
// ComponentInstaller interface
virtual void OnUpdateError(int error) OVERRIDE;
virtual bool Install(base::DictionaryValue* manifest,
- const FilePath& unpack_path) OVERRIDE;
+ const base::FilePath& unpack_path) OVERRIDE;
private:
friend class base::RefCountedThreadSafe<CRLSetFetcher>;
virtual ~CRLSetFetcher();
- // GetCRLSetFilePath gets the path of the CRL set file in the user data
+ // GetCRLSetbase::FilePath gets the path of the CRL set file in the user data
// dir.
- bool GetCRLSetFilePath(FilePath* path) const;
+ bool GetCRLSetFilePath(base::FilePath* path) const;
// DoInitialLoadFromDisk runs on the FILE thread and attempts to load a CRL
// set from the user-data dir. It then registers this object as a component
@@ -51,7 +50,7 @@ class CRLSetFetcher : public ComponentInstaller,
// LoadFromDisk runs on the FILE thread and attempts to load a CRL set
// from |load_from|.
- void LoadFromDisk(FilePath load_from,
+ void LoadFromDisk(base::FilePath load_from,
scoped_refptr<net::CRLSet>* out_crl_set);
// SetCRLSetIfNewer runs on the IO thread and installs a CRL set
diff --git a/chrome/browser/net/net_log_logger.h b/chrome/browser/net/net_log_logger.h
index e8505b1..33e8217 100644
--- a/chrome/browser/net/net_log_logger.h
+++ b/chrome/browser/net/net_log_logger.h
@@ -8,7 +8,9 @@
#include "base/memory/scoped_handle.h"
#include "net/base/net_log.h"
+namespace base {
class FilePath;
+}
// NetLogLogger watches the NetLog event stream, and sends all entries to
// VLOG(1) or a path specified on creation. This is to debug errors that
@@ -25,7 +27,7 @@ class NetLogLogger : public net::NetLog::ThreadSafeObserver {
// If |log_path| is empty or file creation fails, writes to VLOG(1).
// Otherwise, writes to |log_path|. Uses one line per entry, for
// easy parsing.
- explicit NetLogLogger(const FilePath &log_path);
+ explicit NetLogLogger(const base::FilePath &log_path);
virtual ~NetLogLogger();
// Starts observing specified NetLog. Must not already be watching a NetLog.
diff --git a/chrome/browser/net/sqlite_persistent_cookie_store.h b/chrome/browser/net/sqlite_persistent_cookie_store.h
index 72675da..bb6206d 100644
--- a/chrome/browser/net/sqlite_persistent_cookie_store.h
+++ b/chrome/browser/net/sqlite_persistent_cookie_store.h
@@ -16,9 +16,12 @@
#include "net/cookies/cookie_monster.h"
class ClearOnExitPolicy;
-class FilePath;
class Task;
+namespace base {
+class FilePath;
+}
+
namespace net {
class CanonicalCookie;
}
@@ -34,7 +37,7 @@ class SQLitePersistentCookieStore
// If non-NULL, SQLitePersistentCookieStore will keep a scoped_refptr to the
// |clear_on_exit_policy| throughout its lifetime.
SQLitePersistentCookieStore(
- const FilePath& path,
+ const base::FilePath& path,
bool restore_old_session_cookies,
ClearOnExitPolicy* clear_on_exit_policy);
diff --git a/chrome/browser/net/sqlite_server_bound_cert_store.h b/chrome/browser/net/sqlite_server_bound_cert_store.h
index 183923a..e20383f 100644
--- a/chrome/browser/net/sqlite_server_bound_cert_store.h
+++ b/chrome/browser/net/sqlite_server_bound_cert_store.h
@@ -11,7 +11,10 @@
#include "net/base/default_server_bound_cert_store.h"
class ClearOnExitPolicy;
+
+namespace base {
class FilePath;
+}
// Implements the net::DefaultServerBoundCertStore::PersistentStore interface
// in terms of a SQLite database. For documentation about the actual member
@@ -24,7 +27,7 @@ class SQLiteServerBoundCertStore
public:
// If non-NULL, SQLiteServerBoundCertStore will keep a scoped_refptr to the
// |clear_on_exit_policy| throughout its lifetime.
- SQLiteServerBoundCertStore(const FilePath& path,
+ SQLiteServerBoundCertStore(const base::FilePath& path,
ClearOnExitPolicy* clear_on_exit_policy);
// net::DefaultServerBoundCertStore::PersistentStore:
diff --git a/chrome/browser/net/url_fixer_upper.h b/chrome/browser/net/url_fixer_upper.h
index 72e07a9..0a137d8 100644
--- a/chrome/browser/net/url_fixer_upper.h
+++ b/chrome/browser/net/url_fixer_upper.h
@@ -10,12 +10,14 @@
#include "base/string16.h"
#include "googleurl/src/gurl.h"
-namespace url_parse {
- struct Component;
- struct Parsed;
+namespace base {
+class FilePath;
}
-class FilePath;
+namespace url_parse {
+struct Component;
+struct Parsed;
+}
// This object is designed to convert various types of input into URLs that we
// know are valid. For example, user typing in the URL bar or command line
@@ -62,7 +64,7 @@ namespace URLFixerUpper {
// For "regular" input, even if it is possibly a file with a full path, you
// should use FixupURL() directly. This function should only be used when
// relative path handling is desired, as for command line processing.
- GURL FixupRelativeFile(const FilePath& base_dir, const FilePath& text);
+ GURL FixupRelativeFile(const base::FilePath& base_dir, const base::FilePath& text);
// Offsets the beginning index of |part| by |offset|, which is allowed to be
// negative. In some cases, the desired component does not exist at the given
diff --git a/chrome/browser/parsers/metadata_parser.h b/chrome/browser/parsers/metadata_parser.h
index 6700d14..8034a36 100644
--- a/chrome/browser/parsers/metadata_parser.h
+++ b/chrome/browser/parsers/metadata_parser.h
@@ -7,7 +7,9 @@
#include <string>
+namespace base {
class FilePath;
+}
// Allows for Iteration on the Properties of a given file.
class MetadataPropertyIterator {
@@ -30,7 +32,7 @@ class MetadataPropertyIterator {
// Represents a single instance of parsing on a particular file.
class MetadataParser {
public:
- explicit MetadataParser(const FilePath& path) {}
+ explicit MetadataParser(const base::FilePath& path) {}
virtual ~MetadataParser() {}
diff --git a/chrome/browser/parsers/metadata_parser_factory.h b/chrome/browser/parsers/metadata_parser_factory.h
index d1d1279..c6c5a26 100644
--- a/chrome/browser/parsers/metadata_parser_factory.h
+++ b/chrome/browser/parsers/metadata_parser_factory.h
@@ -7,7 +7,9 @@
#include "chrome/browser/parsers/metadata_parser.h"
+namespace base {
class FilePath;
+}
// Used to check to see if a parser can parse a particular file, and allows
// for creation of a parser on a particular file.
@@ -18,13 +20,13 @@ class MetadataParserFactory {
// Used to check to see if the parser can parse the given file. This
// should not do any additional reading of the file.
- virtual bool CanParse(const FilePath& path,
+ virtual bool CanParse(const base::FilePath& path,
char* bytes,
int bytes_size) = 0;
// Creates the parser on the given file. Creating the parser does not
// do any parsing on the file. Parse has to be called on the parser.
- virtual MetadataParser* CreateParser(const FilePath& path) = 0;
+ virtual MetadataParser* CreateParser(const base::FilePath& path) = 0;
};
#endif // CHROME_BROWSER_PARSERS_METADATA_PARSER_FACTORY_H_
diff --git a/chrome/browser/parsers/metadata_parser_jpeg_factory.h b/chrome/browser/parsers/metadata_parser_jpeg_factory.h
index 705f964d5..1c21144 100644
--- a/chrome/browser/parsers/metadata_parser_jpeg_factory.h
+++ b/chrome/browser/parsers/metadata_parser_jpeg_factory.h
@@ -9,17 +9,19 @@
#include "base/compiler_specific.h"
#include "chrome/browser/parsers/metadata_parser_factory.h"
+namespace base {
class FilePath;
+}
class MetadataParserJpegFactory : public MetadataParserFactory {
public:
MetadataParserJpegFactory();
// Implementation of MetadataParserFactory
- virtual bool CanParse(const FilePath& path,
+ virtual bool CanParse(const base::FilePath& path,
char* bytes,
int bytes_size) OVERRIDE;
- virtual MetadataParser* CreateParser(const FilePath& path) OVERRIDE;
+ virtual MetadataParser* CreateParser(const base::FilePath& path) OVERRIDE;
private:
DISALLOW_COPY_AND_ASSIGN(MetadataParserJpegFactory);
diff --git a/chrome/browser/parsers/metadata_parser_manager.h b/chrome/browser/parsers/metadata_parser_manager.h
index 910629f..2d5a759 100644
--- a/chrome/browser/parsers/metadata_parser_manager.h
+++ b/chrome/browser/parsers/metadata_parser_manager.h
@@ -9,9 +9,12 @@
#include "base/memory/scoped_vector.h"
class MetadataParserFactory;
-class FilePath;
class MetadataParser;
+namespace base {
+class FilePath;
+}
+
// Metadata Parser manager is used to find the correct parser for a
// given file. Allows parsers to register themselves.
class MetadataParserManager {
@@ -28,7 +31,7 @@ class MetadataParserManager {
bool RegisterParserFactory(MetadataParserFactory* parser);
// Returns a new metadata parser for a given file.
- MetadataParser* GetParserForFile(const FilePath& path);
+ MetadataParser* GetParserForFile(const base::FilePath& path);
private:
ScopedVector<MetadataParserFactory> factories_;
diff --git a/chrome/browser/platform_util.h b/chrome/browser/platform_util.h
index 44fde5d..629d756 100644
--- a/chrome/browser/platform_util.h
+++ b/chrome/browser/platform_util.h
@@ -10,18 +10,21 @@
#include "base/string16.h"
#include "ui/gfx/native_widget_types.h"
-class FilePath;
class GURL;
+namespace base {
+class FilePath;
+}
+
namespace platform_util {
// Show the given file in a file manager. If possible, select the file.
// Must be called from the UI thread.
-void ShowItemInFolder(const FilePath& full_path);
+void ShowItemInFolder(const base::FilePath& full_path);
// Open the given file in the desktop's default manner.
// Must be called from the UI thread.
-void OpenItem(const FilePath& full_path);
+void OpenItem(const base::FilePath& full_path);
// Open the given external protocol URL in the desktop's default manner.
// (For example, mailto: URLs in the default mail user agent.)
diff --git a/chrome/browser/platform_util_android.cc b/chrome/browser/platform_util_android.cc
index b938f5d..e29bea8 100644
--- a/chrome/browser/platform_util_android.cc
+++ b/chrome/browser/platform_util_android.cc
@@ -10,11 +10,11 @@ namespace platform_util {
// TODO: crbug/115682 to track implementation of the following methods.
-void ShowItemInFolder(const FilePath& full_path) {
+void ShowItemInFolder(const base::FilePath& full_path) {
NOTIMPLEMENTED();
}
-void OpenItem(const FilePath& full_path) {
+void OpenItem(const base::FilePath& full_path) {
NOTIMPLEMENTED();
}
diff --git a/chrome/browser/plugins/plugin_installer.h b/chrome/browser/plugins/plugin_installer.h
index ac872dd..36b7eb3 100644
--- a/chrome/browser/plugins/plugin_installer.h
+++ b/chrome/browser/plugins/plugin_installer.h
@@ -13,7 +13,6 @@
#include "googleurl/src/gurl.h"
#include "net/base/net_errors.h"
-class FilePath;
class PluginInstallerObserver;
class WeakPluginInstallerObserver;
diff --git a/chrome/browser/prefs/chrome_pref_service_factory.h b/chrome/browser/prefs/chrome_pref_service_factory.h
index 84e5a63..7ba5053 100644
--- a/chrome/browser/prefs/chrome_pref_service_factory.h
+++ b/chrome/browser/prefs/chrome_pref_service_factory.h
@@ -6,6 +6,7 @@
#define CHROME_BROWSER_PREFS_CHROME_PREF_SERVICE_FACTORY_H_
namespace base {
+class FilePath;
class SequencedTaskRunner;
}
@@ -13,7 +14,6 @@ namespace policy {
class PolicyService;
}
-class FilePath;
class PrefServiceSimple;
class PrefServiceSyncable;
class PrefStore;
@@ -35,14 +35,14 @@ namespace chrome_prefs {
// function returned.
PrefServiceSimple* CreateLocalState(
- const FilePath& pref_filename,
+ const base::FilePath& pref_filename,
base::SequencedTaskRunner* pref_io_task_runner,
policy::PolicyService* policy_service,
PrefStore* extension_prefs,
bool async);
PrefServiceSyncable* CreateProfilePrefs(
- const FilePath& pref_filename,
+ const base::FilePath& pref_filename,
base::SequencedTaskRunner* pref_io_task_runner,
policy::PolicyService* policy_service,
PrefStore* extension_prefs,
diff --git a/chrome/browser/prefs/pref_service.h b/chrome/browser/prefs/pref_service.h
index ff57a72..0bc7f77 100644
--- a/chrome/browser/prefs/pref_service.h
+++ b/chrome/browser/prefs/pref_service.h
@@ -119,7 +119,7 @@ class PrefService : public PrefServiceBase, public base::NonThreadSafe {
virtual int GetInteger(const char* path) const OVERRIDE;
virtual double GetDouble(const char* path) const OVERRIDE;
virtual std::string GetString(const char* path) const OVERRIDE;
- virtual FilePath GetFilePath(const char* path) const OVERRIDE;
+ virtual base::FilePath GetFilePath(const char* path) const OVERRIDE;
virtual const base::DictionaryValue* GetDictionary(
const char* path) const OVERRIDE;
virtual const base::ListValue* GetList(const char* path) const OVERRIDE;
@@ -129,7 +129,8 @@ class PrefService : public PrefServiceBase, public base::NonThreadSafe {
virtual void SetInteger(const char* path, int value) OVERRIDE;
virtual void SetDouble(const char* path, double value) OVERRIDE;
virtual void SetString(const char* path, const std::string& value) OVERRIDE;
- virtual void SetFilePath(const char* path, const FilePath& value) OVERRIDE;
+ virtual void SetFilePath(const char* path,
+ const base::FilePath& value) OVERRIDE;
virtual void SetInt64(const char* path, int64 value) OVERRIDE;
virtual int64 GetInt64(const char* path) const OVERRIDE;
virtual void SetUint64(const char* path, uint64 value) OVERRIDE;
diff --git a/chrome/browser/prefs/pref_service_builder.h b/chrome/browser/prefs/pref_service_builder.h
index adcbdf0..208e334 100644
--- a/chrome/browser/prefs/pref_service_builder.h
+++ b/chrome/browser/prefs/pref_service_builder.h
@@ -11,10 +11,10 @@
#include "base/prefs/persistent_pref_store.h"
#include "base/prefs/pref_store.h"
-class FilePath;
class PrefServiceSimple;
namespace base {
+class FilePath;
class SequencedTaskRunner;
}
@@ -40,7 +40,7 @@ class PrefServiceBuilder {
// Specifies to use an actual file-backed user pref store.
PrefServiceBuilder& WithUserFilePrefs(
- const FilePath& prefs_file,
+ const base::FilePath& prefs_file,
base::SequencedTaskRunner* task_runner);
PrefServiceBuilder& WithAsync(bool async);
diff --git a/chrome/browser/prefs/pref_service_simple.h b/chrome/browser/prefs/pref_service_simple.h
index c37d7d0..fd1e612 100644
--- a/chrome/browser/prefs/pref_service_simple.h
+++ b/chrome/browser/prefs/pref_service_simple.h
@@ -26,7 +26,8 @@ class PrefServiceSimple : public PrefService {
void RegisterIntegerPref(const char* path, int default_value);
void RegisterDoublePref(const char* path, double default_value);
void RegisterStringPref(const char* path, const std::string& default_value);
- void RegisterFilePathPref(const char* path, const FilePath& default_value);
+ void RegisterFilePathPref(const char* path,
+ const base::FilePath& default_value);
void RegisterListPref(const char* path);
void RegisterDictionaryPref(const char* path);
void RegisterListPref(const char* path, base::ListValue* default_value);
diff --git a/chrome/browser/prefs/pref_service_syncable.h b/chrome/browser/prefs/pref_service_syncable.h
index c0da135..f280d7c 100644
--- a/chrome/browser/prefs/pref_service_syncable.h
+++ b/chrome/browser/prefs/pref_service_syncable.h
@@ -70,7 +70,7 @@ class PrefServiceSyncable : public PrefService {
const std::string& default_value,
PrefSyncStatus sync_status);
void RegisterFilePathPref(const char* path,
- const FilePath& default_value,
+ const base::FilePath& default_value,
PrefSyncStatus sync_status);
void RegisterListPref(const char* path,
PrefSyncStatus sync_status);
diff --git a/chrome/browser/printing/print_dialog_cloud.h b/chrome/browser/printing/print_dialog_cloud.h
index 98cf1b5..7526646 100644
--- a/chrome/browser/printing/print_dialog_cloud.h
+++ b/chrome/browser/printing/print_dialog_cloud.h
@@ -13,9 +13,12 @@
#include "base/string16.h"
#include "ui/gfx/native_widget_types.h"
-class FilePath;
class CommandLine;
+namespace base {
+class FilePath;
+}
+
namespace content {
class BrowserContext;
}
@@ -29,7 +32,7 @@ namespace print_dialog_cloud {
// to.
void CreatePrintDialogForFile(content::BrowserContext* browser_context,
gfx::NativeWindow modal_parent,
- const FilePath& path_to_file,
+ const base::FilePath& path_to_file,
const string16& print_job_title,
const string16& print_ticket,
const std::string& file_type,
diff --git a/chrome/browser/printing/printing_message_filter.h b/chrome/browser/printing/printing_message_filter.h
index d8fdc92..5347526 100644
--- a/chrome/browser/printing/printing_message_filter.h
+++ b/chrome/browser/printing/printing_message_filter.h
@@ -14,13 +14,13 @@
#include "base/shared_memory.h"
#endif
-class FilePath;
struct PrintHostMsg_ScriptedPrint_Params;
class Profile;
class ProfileIOData;
namespace base {
class DictionaryValue;
+class FilePath;
}
namespace content {
@@ -60,7 +60,7 @@ class PrintingMessageFilter : public content::BrowserMessageFilter {
void OnAllocateTempFileForPrinting(base::FileDescriptor* temp_file_fd,
int* sequence_number);
void OnTempFileForPrintingWritten(int render_view_id, int sequence_number);
- void CreatePrintDialogForFile(int render_view_id, const FilePath& path);
+ void CreatePrintDialogForFile(int render_view_id, const base::FilePath& path);
#endif
// Given a render_view_id get the corresponding WebContents.
diff --git a/chrome/browser/profiles/profile.h b/chrome/browser/profiles/profile.h
index 02d1b09..40ca85d 100644
--- a/chrome/browser/profiles/profile.h
+++ b/chrome/browser/profiles/profile.h
@@ -143,7 +143,7 @@ class Profile : public content::BrowserContext {
// Create a new profile given a path. If |create_mode| is
// CREATE_MODE_ASYNCHRONOUS then the profile is initialized asynchronously.
- static Profile* CreateProfile(const FilePath& path,
+ static Profile* CreateProfile(const base::FilePath& path,
Delegate* delegate,
CreateMode create_mode);
@@ -227,7 +227,7 @@ class Profile : public content::BrowserContext {
// Returns the request context used within |partition_id|.
virtual net::URLRequestContextGetter* GetRequestContextForStoragePartition(
- const FilePath& partition_path,
+ const base::FilePath& partition_path,
bool in_memory) = 0;
// Returns the SSLConfigService for this profile.
@@ -253,8 +253,8 @@ class Profile : public content::BrowserContext {
virtual base::Time GetStartTime() const = 0;
// Returns the last directory that was chosen for uploading or opening a file.
- virtual FilePath last_selected_directory() = 0;
- virtual void set_last_selected_directory(const FilePath& path) = 0;
+ virtual base::FilePath last_selected_directory() = 0;
+ virtual void set_last_selected_directory(const base::FilePath& path) = 0;
#if defined(OS_CHROMEOS)
enum AppLocaleChangedVia {
diff --git a/chrome/browser/profiles/profile_info_cache_observer.h b/chrome/browser/profiles/profile_info_cache_observer.h
index 853f8dd..746c1ed 100644
--- a/chrome/browser/profiles/profile_info_cache_observer.h
+++ b/chrome/browser/profiles/profile_info_cache_observer.h
@@ -8,7 +8,9 @@
#include "base/string16.h"
#include "ui/gfx/image/image.h"
+namespace base {
class FilePath;
+}
// This class provides an Observer interface to watch for changes to the
// ProfileInfoCache.
@@ -16,13 +18,13 @@ class ProfileInfoCacheObserver {
public:
virtual ~ProfileInfoCacheObserver() {}
- virtual void OnProfileAdded(const FilePath& profile_path) = 0;
- virtual void OnProfileWillBeRemoved(const FilePath& profile_path) = 0;
- virtual void OnProfileWasRemoved(const FilePath& profile_path,
+ virtual void OnProfileAdded(const base::FilePath& profile_path) = 0;
+ virtual void OnProfileWillBeRemoved(const base::FilePath& profile_path) = 0;
+ virtual void OnProfileWasRemoved(const base::FilePath& profile_path,
const string16& profile_name) = 0;
- virtual void OnProfileNameChanged(const FilePath& profile_path,
+ virtual void OnProfileNameChanged(const base::FilePath& profile_path,
const string16& old_profile_name) = 0;
- virtual void OnProfileAvatarChanged(const FilePath& profile_path) = 0;
+ virtual void OnProfileAvatarChanged(const base::FilePath& profile_path) = 0;
protected:
ProfileInfoCacheObserver() {}
diff --git a/chrome/browser/profiles/profile_info_cache_unittest.h b/chrome/browser/profiles/profile_info_cache_unittest.h
index 640f4da..ec2ec70 100644
--- a/chrome/browser/profiles/profile_info_cache_unittest.h
+++ b/chrome/browser/profiles/profile_info_cache_unittest.h
@@ -13,9 +13,12 @@
#include "content/public/test/test_browser_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
-class FilePath;
class ProfileInfoCache;
+namespace base {
+class FilePath;
+}
+
// Class used to test that ProfileInfoCache does not try to access any
// unexpected profile names.
class ProfileNameVerifierObserver : public ProfileInfoCacheObserver {
@@ -25,16 +28,16 @@ class ProfileNameVerifierObserver : public ProfileInfoCacheObserver {
virtual ~ProfileNameVerifierObserver();
// ProfileInfoCacheObserver overrides:
- virtual void OnProfileAdded(const FilePath& profile_path) OVERRIDE;
+ virtual void OnProfileAdded(const base::FilePath& profile_path) OVERRIDE;
virtual void OnProfileWillBeRemoved(
- const FilePath& profile_path) OVERRIDE;
+ const base::FilePath& profile_path) OVERRIDE;
virtual void OnProfileWasRemoved(
- const FilePath& profile_path,
+ const base::FilePath& profile_path,
const string16& profile_name) OVERRIDE;
virtual void OnProfileNameChanged(
- const FilePath& profile_path,
+ const base::FilePath& profile_path,
const string16& old_profile_name) OVERRIDE;
- virtual void OnProfileAvatarChanged(const FilePath& profile_path) OVERRIDE;
+ virtual void OnProfileAvatarChanged(const base::FilePath& profile_path) OVERRIDE;
private:
ProfileInfoCache* GetCache();
@@ -52,7 +55,7 @@ class ProfileInfoCacheTest : public testing::Test {
virtual void TearDown() OVERRIDE;
ProfileInfoCache* GetCache();
- FilePath GetProfilePath(const std::string& base_name);
+ base::FilePath GetProfilePath(const std::string& base_name);
void ResetCache();
protected:
diff --git a/chrome/browser/profiles/profile_metrics.h b/chrome/browser/profiles/profile_metrics.h
index 2850a4f..c74a8ce 100644
--- a/chrome/browser/profiles/profile_metrics.h
+++ b/chrome/browser/profiles/profile_metrics.h
@@ -10,9 +10,12 @@
#include "base/basictypes.h"
-class FilePath;
class ProfileManager;
+namespace base {
+class FilePath;
+}
+
class ProfileMetrics {
public:
// Enum for counting the ways users were added.
@@ -80,9 +83,9 @@ class ProfileMetrics {
// These functions should only be called on the UI thread because they hook
// into g_browser_process through a helper function.
- static void LogProfileLaunch(const FilePath& profile_path);
- static void LogProfileSyncSignIn(const FilePath& profile_path);
- static void LogProfileUpdate(const FilePath& profile_path);
+ static void LogProfileLaunch(const base::FilePath& profile_path);
+ static void LogProfileSyncSignIn(const base::FilePath& profile_path);
+ static void LogProfileUpdate(const base::FilePath& profile_path);
};
diff --git a/chrome/browser/renderer_host/pepper/pepper_flash_device_id_host.h b/chrome/browser/renderer_host/pepper/pepper_flash_device_id_host.h
index 3980f36..f3cf568 100644
--- a/chrome/browser/renderer_host/pepper/pepper_flash_device_id_host.h
+++ b/chrome/browser/renderer_host/pepper/pepper_flash_device_id_host.h
@@ -11,7 +11,9 @@
#include "ppapi/host/resource_host.h"
#include "ppapi/proxy/resource_message_params.h"
+namespace base {
class FilePath;
+}
namespace content {
class BrowserPpapiHost;
@@ -63,7 +65,7 @@ class PepperFlashDeviceIDHost : public ppapi::host::ResourceHost {
// Called on the file thread to read the contents of the file and to
// forward it to the IO thread. The path will be empty on error (in
// which case it will forward the empty string to the IO thread).
- void ReadDRMFileOnFileThread(const FilePath& path);
+ void ReadDRMFileOnFileThread(const base::FilePath& path);
// Called on the IO thread to call back into the device ID host with the
// file contents, or the empty string on failure.
diff --git a/chrome/browser/safe_browsing/prefix_set.h b/chrome/browser/safe_browsing/prefix_set.h
index 914dd5e..064c192 100644
--- a/chrome/browser/safe_browsing/prefix_set.h
+++ b/chrome/browser/safe_browsing/prefix_set.h
@@ -53,7 +53,9 @@
#include "chrome/browser/safe_browsing/safe_browsing_util.h"
+namespace base {
class FilePath;
+}
namespace safe_browsing {
@@ -66,8 +68,8 @@ class PrefixSet {
bool Exists(SBPrefix prefix) const;
// Persist the set on disk.
- static PrefixSet* LoadFile(const FilePath& filter_name);
- bool WriteFile(const FilePath& filter_name) const;
+ static PrefixSet* LoadFile(const base::FilePath& filter_name);
+ bool WriteFile(const base::FilePath& filter_name) const;
// Regenerate the vector of prefixes passed to the constructor into
// |prefixes|. Prefixes will be added in sorted order.
diff --git a/chrome/browser/safe_browsing/safe_browsing_store.h b/chrome/browser/safe_browsing/safe_browsing_store.h
index 731f319..d88fedb 100644
--- a/chrome/browser/safe_browsing/safe_browsing_store.h
+++ b/chrome/browser/safe_browsing/safe_browsing_store.h
@@ -14,7 +14,9 @@
#include "base/time.h"
#include "chrome/browser/safe_browsing/safe_browsing_util.h"
+namespace base {
class FilePath;
+}
// SafeBrowsingStore provides a storage abstraction for the
// safe-browsing data used to build the bloom filter. The items
@@ -163,7 +165,7 @@ class SafeBrowsingStore {
// is detected, which could happen as part of any call other than
// Delete(). The appropriate action is to use Delete() to clear the
// store.
- virtual void Init(const FilePath& filename,
+ virtual void Init(const base::FilePath& filename,
const base::Closure& corruption_callback) = 0;
// Deletes the files which back the store, returning true if
diff --git a/chrome/browser/safe_browsing/safe_browsing_store_unittest_helper.h b/chrome/browser/safe_browsing/safe_browsing_store_unittest_helper.h
index 20a0fc3..5854523 100644
--- a/chrome/browser/safe_browsing/safe_browsing_store_unittest_helper.h
+++ b/chrome/browser/safe_browsing/safe_browsing_store_unittest_helper.h
@@ -41,7 +41,7 @@ void SafeBrowsingStoreTestDeleteChunks(SafeBrowsingStore* store);
// Test that deleting the store deletes the store.
void SafeBrowsingStoreTestDelete(SafeBrowsingStore* store,
- const FilePath& filename);
+ const base::FilePath& filename);
// Wrap all the tests up for implementation subclasses.
// |test_fixture| is the class that would be passed to TEST_F(),
diff --git a/chrome/browser/safe_browsing/signature_util.h b/chrome/browser/safe_browsing/signature_util.h
index 2233a55..00aef61 100644
--- a/chrome/browser/safe_browsing/signature_util.h
+++ b/chrome/browser/safe_browsing/signature_util.h
@@ -11,7 +11,9 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
+namespace base {
class FilePath;
+}
namespace safe_browsing {
class ClientDownloadRequest_SignatureInfo;
@@ -23,7 +25,7 @@ class SignatureUtil : public base::RefCountedThreadSafe<SignatureUtil> {
// Fills in the DownloadRequest_SignatureInfo for the given file path.
// This method may be called on any thread.
virtual void CheckSignature(
- const FilePath& file_path,
+ const base::FilePath& file_path,
ClientDownloadRequest_SignatureInfo* signature_info);
protected:
diff --git a/chrome/browser/safe_browsing/signature_util_posix.cc b/chrome/browser/safe_browsing/signature_util_posix.cc
index b3c2b17..7a98a54 100644
--- a/chrome/browser/safe_browsing/signature_util_posix.cc
+++ b/chrome/browser/safe_browsing/signature_util_posix.cc
@@ -14,7 +14,7 @@ SignatureUtil::SignatureUtil() {}
SignatureUtil::~SignatureUtil() {}
void SignatureUtil::CheckSignature(
- const FilePath& file_path,
+ const base::FilePath& file_path,
ClientDownloadRequest_SignatureInfo* signature_info) {}
} // namespace safe_browsing
diff --git a/chrome/browser/sync_file_system/mock_remote_change_processor.h b/chrome/browser/sync_file_system/mock_remote_change_processor.h
index ebf1969..a48cd36 100644
--- a/chrome/browser/sync_file_system/mock_remote_change_processor.h
+++ b/chrome/browser/sync_file_system/mock_remote_change_processor.h
@@ -11,7 +11,9 @@
#include "webkit/fileapi/syncable/file_change.h"
#include "webkit/fileapi/syncable/sync_callbacks.h"
+namespace base {
class FilePath;
+}
namespace fileapi {
class FileSystemURL;
@@ -31,7 +33,7 @@ class MockRemoteChangeProcessor : public RemoteChangeProcessor {
const PrepareChangeCallback& callback));
MOCK_METHOD4(ApplyRemoteChange,
void(const fileapi::FileChange& change,
- const FilePath& local_path,
+ const base::FilePath& local_path,
const fileapi::FileSystemURL& url,
const fileapi::SyncStatusCallback& callback));
MOCK_METHOD2(ClearLocalChanges,
diff --git a/chrome/browser/sync_file_system/remote_change_processor.h b/chrome/browser/sync_file_system/remote_change_processor.h
index e76a826..8fb00ad 100644
--- a/chrome/browser/sync_file_system/remote_change_processor.h
+++ b/chrome/browser/sync_file_system/remote_change_processor.h
@@ -10,7 +10,9 @@
#include "webkit/fileapi/syncable/sync_callbacks.h"
#include "webkit/fileapi/syncable/sync_status_code.h"
+namespace base {
class FilePath;
+}
namespace fileapi {
class FileChange;
@@ -59,7 +61,7 @@ class RemoteChangeProcessor {
// have disabled any further writing).
virtual void ApplyRemoteChange(
const fileapi::FileChange& change,
- const FilePath& local_path,
+ const base::FilePath& local_path,
const fileapi::FileSystemURL& url,
const fileapi::SyncStatusCallback& callback) = 0;
diff --git a/chrome/browser/system_monitor/media_transfer_protocol_device_observer_linux.h b/chrome/browser/system_monitor/media_transfer_protocol_device_observer_linux.h
index fd40f1f..45c9e67 100644
--- a/chrome/browser/system_monitor/media_transfer_protocol_device_observer_linux.h
+++ b/chrome/browser/system_monitor/media_transfer_protocol_device_observer_linux.h
@@ -12,7 +12,9 @@
#include "chrome/browser/system_monitor/removable_storage_notifications.h"
#include "device/media_transfer_protocol/media_transfer_protocol_manager.h"
+namespace base {
class FilePath;
+}
namespace chrome {
@@ -37,7 +39,7 @@ class MediaTransferProtocolDeviceObserverLinux
// Finds the storage that contains |path| and populates |storage_info|.
// Returns false if unable to find the storage.
bool GetStorageInfoForPath(
- const FilePath& path,
+ const base::FilePath& path,
RemovableStorageNotifications::StorageInfo* storage_info) const;
protected:
diff --git a/chrome/browser/system_monitor/portable_device_watcher_win.h b/chrome/browser/system_monitor/portable_device_watcher_win.h
index 5f0e9d8..0d16ba6 100644
--- a/chrome/browser/system_monitor/portable_device_watcher_win.h
+++ b/chrome/browser/system_monitor/portable_device_watcher_win.h
@@ -20,8 +20,6 @@ namespace base {
class SequencedTaskRunner;
}
-class FilePath;
-
namespace chrome {
namespace test {
diff --git a/chrome/browser/system_monitor/removable_device_notifications_linux.h b/chrome/browser/system_monitor/removable_device_notifications_linux.h
index cd595c9..dea74249 100644
--- a/chrome/browser/system_monitor/removable_device_notifications_linux.h
+++ b/chrome/browser/system_monitor/removable_device_notifications_linux.h
@@ -25,11 +25,13 @@
#include "chrome/browser/system_monitor/removable_storage_notifications.h"
#include "content/public/browser/browser_thread.h"
+namespace base {
class FilePath;
+}
// Gets device information given a |device_path|. On success, fills in
// |unique_id|, |name|, |removable| and |partition_size_in_bytes|.
-typedef void (*GetDeviceInfoFunc)(const FilePath& device_path,
+typedef void (*GetDeviceInfoFunc)(const base::FilePath& device_path,
std::string* unique_id,
string16* name,
bool* removable,
@@ -43,7 +45,7 @@ class RemovableDeviceNotificationsLinux
content::BrowserThread::DeleteOnFileThread> {
public:
// Should only be called by browser start up code. Use GetInstance() instead.
- explicit RemovableDeviceNotificationsLinux(const FilePath& path);
+ explicit RemovableDeviceNotificationsLinux(const base::FilePath& path);
// Must be called for RemovableDeviceNotificationsLinux to work.
void Init();
@@ -51,7 +53,7 @@ class RemovableDeviceNotificationsLinux
// Finds the device that contains |path| and populates |device_info|.
// Returns false if unable to find the device.
virtual bool GetDeviceInfoForPath(
- const FilePath& path,
+ const base::FilePath& path,
StorageInfo* device_info) const OVERRIDE;
// Returns the storage partition size of the device present at |location|.
@@ -60,7 +62,7 @@ class RemovableDeviceNotificationsLinux
protected:
// Only for use in unit tests.
- RemovableDeviceNotificationsLinux(const FilePath& path,
+ RemovableDeviceNotificationsLinux(const base::FilePath& path,
GetDeviceInfoFunc getDeviceInfo);
// Avoids code deleting the object while there are references to it.
@@ -69,7 +71,7 @@ class RemovableDeviceNotificationsLinux
// error.
virtual ~RemovableDeviceNotificationsLinux();
- virtual void OnFilePathChanged(const FilePath& path, bool error);
+ virtual void OnFilePathChanged(const base::FilePath& path, bool error);
private:
friend class base::RefCountedThreadSafe<RemovableDeviceNotificationsLinux>;
@@ -82,24 +84,24 @@ class RemovableDeviceNotificationsLinux
struct MountPointInfo {
MountPointInfo();
- FilePath mount_device;
+ base::FilePath mount_device;
std::string device_id;
string16 device_name;
uint64 partition_size_in_bytes;
};
// Mapping of mount points to MountPointInfo.
- typedef std::map<FilePath, MountPointInfo> MountMap;
+ typedef std::map<base::FilePath, MountPointInfo> MountMap;
// (mount point, priority)
// For devices that are mounted to multiple mount points, this helps us track
// which one we've notified system monitor about.
- typedef std::map<FilePath, bool> ReferencedMountPoint;
+ typedef std::map<base::FilePath, bool> ReferencedMountPoint;
// (mount device, map of known mount points)
// For each mount device, track the places it is mounted and which one (if
// any) we have notified system monitor about.
- typedef std::map<FilePath, ReferencedMountPoint> MountPriorityMap;
+ typedef std::map<base::FilePath, ReferencedMountPoint> MountPriorityMap;
// Do initialization on the File Thread.
void InitOnFileThread();
@@ -109,13 +111,13 @@ class RemovableDeviceNotificationsLinux
// Adds |mount_device| as mounted on |mount_point|. If the device is a new
// device any listeners are notified.
- void AddNewMount(const FilePath& mount_device, const FilePath& mount_point);
+ void AddNewMount(const base::FilePath& mount_device, const base::FilePath& mount_point);
// Whether Init() has been called or not.
bool initialized_;
// Mtab file that lists the mount points.
- const FilePath mtab_path_;
+ const base::FilePath mtab_path_;
// Watcher for |mtab_path_|.
base::FilePathWatcher file_watcher_;
diff --git a/chrome/browser/system_monitor/removable_device_notifications_window_win.h b/chrome/browser/system_monitor/removable_device_notifications_window_win.h
index a2afd31..deb4bc5 100644
--- a/chrome/browser/system_monitor/removable_device_notifications_window_win.h
+++ b/chrome/browser/system_monitor/removable_device_notifications_window_win.h
@@ -10,7 +10,9 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/system_monitor/removable_storage_notifications.h"
+namespace base {
class FilePath;
+}
namespace chrome {
@@ -35,7 +37,7 @@ class RemovableDeviceNotificationsWindowWin
// RemovableStorageNotifications:
virtual bool GetDeviceInfoForPath(
- const FilePath& path,
+ const base::FilePath& path,
StorageInfo* device_info) const OVERRIDE;
virtual uint64 GetStorageSize(const std::string& location) const OVERRIDE;
virtual bool GetMTPStorageInfoFromDeviceId(
@@ -57,7 +59,7 @@ class RemovableDeviceNotificationsWindowWin
// Gets the removable storage information given a |device_path|. On success,
// returns true and fills in |device_location|, |unique_id|, |name| and
// |removable|.
- bool GetDeviceInfo(const FilePath& device_path,
+ bool GetDeviceInfo(const base::FilePath& device_path,
string16* device_location,
std::string* unique_id,
string16* name,
diff --git a/chrome/browser/system_monitor/test_volume_mount_watcher_win.h b/chrome/browser/system_monitor/test_volume_mount_watcher_win.h
index 0771d70..a4b7227 100644
--- a/chrome/browser/system_monitor/test_volume_mount_watcher_win.h
+++ b/chrome/browser/system_monitor/test_volume_mount_watcher_win.h
@@ -15,7 +15,9 @@
#include "base/synchronization/waitable_event.h"
#include "chrome/browser/system_monitor/volume_mount_watcher_win.h"
+namespace base {
class FilePath;
+}
namespace chrome {
namespace test {
@@ -25,7 +27,7 @@ class TestVolumeMountWatcherWin : public VolumeMountWatcherWin {
TestVolumeMountWatcherWin();
virtual ~TestVolumeMountWatcherWin();
- void AddDeviceForTesting(const FilePath& device_path,
+ void AddDeviceForTesting(const base::FilePath& device_path,
const std::string& device_id,
const std::string& unique_id,
const string16& device_name,
@@ -35,30 +37,30 @@ class TestVolumeMountWatcherWin : public VolumeMountWatcherWin {
void FlushWorkerPoolForTesting();
- virtual void DeviceCheckComplete(const FilePath& device_path);
+ virtual void DeviceCheckComplete(const base::FilePath& device_path);
- std::vector<FilePath> devices_checked() const { return devices_checked_; }
+ std::vector<base::FilePath> devices_checked() const { return devices_checked_; }
void BlockDeviceCheckForTesting();
void ReleaseDeviceCheck();
// VolumeMountWatcherWin:
- virtual bool GetDeviceInfo(const FilePath& device_path,
+ virtual bool GetDeviceInfo(const base::FilePath& device_path,
string16* device_location,
std::string* unique_id,
string16* name,
bool* removable) const OVERRIDE;
- virtual std::vector<FilePath> GetAttachedDevices();
+ virtual std::vector<base::FilePath> GetAttachedDevices();
- bool GetRawDeviceInfo(const FilePath& device_path,
+ bool GetRawDeviceInfo(const base::FilePath& device_path,
string16* device_location,
std::string* unique_id,
string16* name,
bool* removable);
private:
- std::vector<FilePath> devices_checked_;
+ std::vector<base::FilePath> devices_checked_;
scoped_ptr<base::WaitableEvent> device_check_complete_event_;
DISALLOW_COPY_AND_ASSIGN(TestVolumeMountWatcherWin);
diff --git a/chrome/browser/system_monitor/udev_util_linux.h b/chrome/browser/system_monitor/udev_util_linux.h
index c138f4c..dffcb9f 100644
--- a/chrome/browser/system_monitor/udev_util_linux.h
+++ b/chrome/browser/system_monitor/udev_util_linux.h
@@ -11,7 +11,9 @@
#include "base/memory/scoped_generic_obj.h"
+namespace base {
class FilePath;
+}
namespace chrome {
@@ -42,7 +44,7 @@ std::string GetUdevDevicePropertyValue(struct udev_device* udev_device,
// Helper for udev_device_new_from_syspath()/udev_device_get_property_value()
// pair. |device_path| is the absolute path to the device, including /sys.
-bool GetUdevDevicePropertyValueByPath(const FilePath& device_path,
+bool GetUdevDevicePropertyValueByPath(const base::FilePath& device_path,
const char* key,
std::string* result);
diff --git a/chrome/browser/task_profiler/task_profiler_data_serializer.h b/chrome/browser/task_profiler/task_profiler_data_serializer.h
index 6c2020e..9d58f3c 100644
--- a/chrome/browser/task_profiler/task_profiler_data_serializer.h
+++ b/chrome/browser/task_profiler/task_profiler_data_serializer.h
@@ -8,10 +8,9 @@
#include "base/basictypes.h"
#include "content/public/common/process_type.h"
-class FilePath;
-
namespace base {
class DictionaryValue;
+class FilePath;
}
namespace tracked_objects {
@@ -31,7 +30,7 @@ class TaskProfilerDataSerializer {
content::ProcessType process_type,
base::DictionaryValue* dictionary);
- bool WriteToFile(const FilePath& path);
+ bool WriteToFile(const base::FilePath& path);
private:
DISALLOW_COPY_AND_ASSIGN(TaskProfilerDataSerializer);
diff --git a/chrome/browser/themes/browser_theme_pack.h b/chrome/browser/themes/browser_theme_pack.h
index d15aeb5..6447566 100644
--- a/chrome/browser/themes/browser_theme_pack.h
+++ b/chrome/browser/themes/browser_theme_pack.h
@@ -18,10 +18,9 @@
#include "ui/base/layout.h"
#include "ui/gfx/color_utils.h"
-class FilePath;
-
namespace base {
class DictionaryValue;
+class FilePath;
class RefCountedMemory;
}
@@ -67,14 +66,14 @@ class BrowserThemePack : public base::RefCountedThreadSafe<
// operation should be relatively fast, as it should be an mmap() and some
// pointer swizzling. Returns NULL on any error attempting to read |path|.
static scoped_refptr<BrowserThemePack> BuildFromDataPack(
- const FilePath& path, const std::string& expected_id);
+ const base::FilePath& path, const std::string& expected_id);
// Builds a data pack on disk at |path| for future quick loading by
// BuildFromDataPack(). Often (but not always) called from the file thread;
// implementation should be threadsafe because neither thread will write to
// |image_memory_| and the worker thread will keep a reference to prevent
// destruction.
- bool WriteToDisk(const FilePath& path) const;
+ bool WriteToDisk(const base::FilePath& path) const;
// If this theme specifies data for the corresponding |id|, return true and
// write the corresponding value to the output parameter. These functions
@@ -112,8 +111,8 @@ class BrowserThemePack : public base::RefCountedThreadSafe<
// The type passed to ui::DataPack::WritePack.
typedef std::map<uint16, base::StringPiece> RawDataForWriting;
- // An association between an id and the FilePath that has the image data.
- typedef std::map<int, FilePath> FilePathMap;
+ // An association between an id and the base::FilePath that has the image data.
+ typedef std::map<int, base::FilePath> FilePathMap;
// Default. Everything is empty.
BrowserThemePack();
@@ -141,7 +140,7 @@ class BrowserThemePack : public base::RefCountedThreadSafe<
// Parses the image names out of an extension.
void ParseImageNamesFromJSON(base::DictionaryValue* images_value,
- const FilePath& images_path,
+ const base::FilePath& images_path,
FilePathMap* file_paths) const;
// Creates the data for |source_images_| from |file_paths|.
diff --git a/chrome/browser/themes/theme_service.h b/chrome/browser/themes/theme_service.h
index 89942ed..29b9778 100644
--- a/chrome/browser/themes/theme_service.h
+++ b/chrome/browser/themes/theme_service.h
@@ -20,9 +20,12 @@
class BrowserThemePack;
class ThemeServiceTest;
class ThemeSyncableService;
-class FilePath;
class Profile;
+namespace base {
+class FilePath;
+}
+
namespace color_utils {
struct HSL;
}
@@ -247,7 +250,7 @@ class ThemeService : public base::NonThreadSafe,
virtual ThemeSyncableService* GetThemeSyncableService() const;
// Save the images to be written to disk, mapping file path to id.
- typedef std::map<FilePath, int> ImagesDiskCache;
+ typedef std::map<base::FilePath, int> ImagesDiskCache;
protected:
// Get the specified tint - |id| is one of the TINT_* enum values.
@@ -277,7 +280,7 @@ class ThemeService : public base::NonThreadSafe,
friend class ThemeServiceTest;
// Saves the filename of the cached theme pack.
- void SavePackName(const FilePath& pack_path);
+ void SavePackName(const base::FilePath& pack_path);
// Save the id of the last theme installed.
void SaveThemeID(const std::string& id);
diff --git a/chrome/browser/ui/browser_command_controller.h b/chrome/browser/ui/browser_command_controller.h
index 8d4eefe..f65780b 100644
--- a/chrome/browser/ui/browser_command_controller.h
+++ b/chrome/browser/ui/browser_command_controller.h
@@ -102,13 +102,14 @@ class BrowserCommandController : public CommandUpdaterDelegate,
const content::NotificationDetails& details) OVERRIDE;
// Overridden from ProfileInfoCacheObserver:
- virtual void OnProfileAdded(const FilePath& profile_path) OVERRIDE;
- virtual void OnProfileWillBeRemoved(const FilePath& profile_path) OVERRIDE;
- virtual void OnProfileWasRemoved(const FilePath& profile_path,
+ virtual void OnProfileAdded(const base::FilePath& profile_path) OVERRIDE;
+ virtual void OnProfileWillBeRemoved(
+ const base::FilePath& profile_path) OVERRIDE;
+ virtual void OnProfileWasRemoved(const base::FilePath& profile_path,
const string16& profile_name) OVERRIDE;
- virtual void OnProfileNameChanged(const FilePath& profile_path,
+ virtual void OnProfileNameChanged(const base::FilePath& profile_path,
const string16& old_profile_name) OVERRIDE;
- virtual void OnProfileAvatarChanged(const FilePath& profile_path) OVERRIDE;
+ virtual void OnProfileAvatarChanged(const base::FilePath& profile_path) OVERRIDE;
// Overridden from ProfileSyncServiceObserver:
virtual void OnStateChanged() OVERRIDE;
diff --git a/chrome/browser/ui/cocoa/download/download_util_mac.h b/chrome/browser/ui/cocoa/download/download_util_mac.h
index 968f1a1c..b873cc8 100644
--- a/chrome/browser/ui/cocoa/download/download_util_mac.h
+++ b/chrome/browser/ui/cocoa/download/download_util_mac.h
@@ -9,11 +9,13 @@
#import <Cocoa/Cocoa.h>
+namespace base {
class FilePath;
+}
namespace download_util {
-void AddFileToPasteboard(NSPasteboard* pasteboard, const FilePath& path);
+void AddFileToPasteboard(NSPasteboard* pasteboard, const base::FilePath& path);
} // namespace download_util
diff --git a/chrome/browser/ui/hung_plugin_tab_helper.h b/chrome/browser/ui/hung_plugin_tab_helper.h
index 0cf6b336..51feb42 100644
--- a/chrome/browser/ui/hung_plugin_tab_helper.h
+++ b/chrome/browser/ui/hung_plugin_tab_helper.h
@@ -17,9 +17,12 @@
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
-class FilePath;
class InfoBarDelegate;
+namespace base {
+class FilePath;
+}
+
// Manages per-tab state with regard to hung plugins. This only handles
// Pepper plugins which we know are windowless. Hung NPAPI plugins (which
// may have native windows) can not be handled with infobars and have a
@@ -40,10 +43,10 @@ class HungPluginTabHelper
virtual ~HungPluginTabHelper();
// content::WebContentsObserver overrides:
- virtual void PluginCrashed(const FilePath& plugin_path,
+ virtual void PluginCrashed(const base::FilePath& plugin_path,
base::ProcessId plugin_pid) OVERRIDE;
virtual void PluginHungStatusChanged(int plugin_child_id,
- const FilePath& plugin_path,
+ const base::FilePath& plugin_path,
bool is_hung) OVERRIDE;
// NotificationObserver overrides.
@@ -64,10 +67,10 @@ class HungPluginTabHelper
// not we're currently showing the infobar.
struct PluginState {
// Initializes the plugin state to be a hung plugin.
- PluginState(const FilePath& p, const string16& n);
+ PluginState(const base::FilePath& p, const string16& n);
~PluginState();
- FilePath path;
+ base::FilePath path;
string16 name;
// Possibly-null if we're not showing an infobar right now.
diff --git a/chrome/browser/ui/network_profile_bubble.h b/chrome/browser/ui/network_profile_bubble.h
index 7829539b..74eb2fa 100644
--- a/chrome/browser/ui/network_profile_bubble.h
+++ b/chrome/browser/ui/network_profile_bubble.h
@@ -8,10 +8,13 @@
#include "base/basictypes.h"
class Browser;
-class FilePath;
class PrefServiceSyncable;
class Profile;
+namespace base {
+class FilePath;
+}
+
// This class will try to detect if the profile is on a network share and if
// this is the case notify the user with an info bubble.
class NetworkProfileBubble {
@@ -47,7 +50,7 @@ class NetworkProfileBubble {
// Verifies that the profile folder is not located on a network share, and if
// it is shows the warning bubble to the user.
- static void CheckNetworkProfile(const FilePath& profile_folder);
+ static void CheckNetworkProfile(const base::FilePath& profile_folder);
// Shows the notification bubble using the provided |browser|.
static void ShowNotification(Browser* browser);
diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.h b/chrome/browser/ui/startup/startup_browser_creator_impl.h
index 73806e3..4a0905c 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_impl.h
+++ b/chrome/browser/ui/startup/startup_browser_creator_impl.h
@@ -16,10 +16,13 @@
class Browser;
class CommandLine;
-class FilePath;
class Profile;
class StartupBrowserCreator;
+namespace base {
+class FilePath;
+}
+
namespace content {
class WebContents;
}
@@ -40,10 +43,10 @@ class StartupBrowserCreatorImpl {
// and thus no access to distribution-specific first-run behaviors. The
// second one is always called when the browser starts even if it is not
// the first run. |is_first_run| indicates that this is a new profile.
- StartupBrowserCreatorImpl(const FilePath& cur_dir,
+ StartupBrowserCreatorImpl(const base::FilePath& cur_dir,
const CommandLine& command_line,
chrome::startup::IsFirstRun is_first_run);
- StartupBrowserCreatorImpl(const FilePath& cur_dir,
+ StartupBrowserCreatorImpl(const base::FilePath& cur_dir,
const CommandLine& command_line,
StartupBrowserCreator* browser_creator,
chrome::startup::IsFirstRun is_first_run);
@@ -148,7 +151,7 @@ class StartupBrowserCreatorImpl {
Profile* profile,
const std::vector<GURL>& startup_urls);
- const FilePath cur_dir_;
+ const base::FilePath cur_dir_;
const CommandLine& command_line_;
Profile* profile_;
StartupBrowserCreator* browser_creator_;
diff --git a/chrome/browser/ui/user_data_dir_dialog.h b/chrome/browser/ui/user_data_dir_dialog.h
index 7b25933..eb8418e 100644
--- a/chrome/browser/ui/user_data_dir_dialog.h
+++ b/chrome/browser/ui/user_data_dir_dialog.h
@@ -5,7 +5,9 @@
#ifndef CHROME_BROWSER_UI_USER_DATA_DIR_DIALOG_H_
#define CHROME_BROWSER_UI_USER_DATA_DIR_DIALOG_H_
+namespace base {
class FilePath;
+}
namespace chrome {
@@ -13,7 +15,7 @@ namespace chrome {
// is showing. If the user picks a directory, this method returns the chosen
// directory. |user_data_dir| is the value of the directory we were not able to
// use.
-FilePath ShowUserDataDirDialog(const FilePath& user_data_dir);
+base::FilePath ShowUserDataDirDialog(const base::FilePath& user_data_dir);
} // namespace chrome
diff --git a/chrome/browser/ui/webui/extensions/extension_settings_handler.h b/chrome/browser/ui/webui/extensions/extension_settings_handler.h
index 82acd58..4ba5a3d 100644
--- a/chrome/browser/ui/webui/extensions/extension_settings_handler.h
+++ b/chrome/browser/ui/webui/extensions/extension_settings_handler.h
@@ -28,11 +28,11 @@
#include "ui/shell_dialogs/select_file_dialog.h"
class ExtensionService;
-class FilePath;
class PrefServiceSyncable;
namespace base {
class DictionaryValue;
+class FilePath;
class ListValue;
}
@@ -104,10 +104,10 @@ class ExtensionSettingsHandler
virtual void RegisterMessages() OVERRIDE;
// SelectFileDialog::Listener implementation.
- virtual void FileSelected(const FilePath& path,
+ virtual void FileSelected(const base::FilePath& path,
int index, void* params) OVERRIDE;
virtual void MultiFilesSelected(
- const std::vector<FilePath>& files, void* params) OVERRIDE;
+ const std::vector<base::FilePath>& files, void* params) OVERRIDE;
virtual void FileSelectionCanceled(void* params) OVERRIDE {}
// content::NotificationObserver implementation.
@@ -218,7 +218,7 @@ class ExtensionSettingsHandler
// Used to start the |load_extension_dialog_| in the last directory that was
// loaded.
- FilePath last_unpacked_directory_;
+ base::FilePath last_unpacked_directory_;
// Used to show confirmation UI for uninstalling extensions in incognito mode.
scoped_ptr<ExtensionUninstallDialog> extension_uninstall_dialog_;
diff --git a/chrome/browser/ui/webui/feedback_ui.h b/chrome/browser/ui/webui/feedback_ui.h
index 1aef958..4bef57d 100644
--- a/chrome/browser/ui/webui/feedback_ui.h
+++ b/chrome/browser/ui/webui/feedback_ui.h
@@ -10,7 +10,9 @@
#include "base/basictypes.h"
#include "ui/web_dialogs/web_dialog_ui.h"
+namespace base {
class FilePath;
+}
class FeedbackUI : public ui::WebDialogUI {
public:
@@ -18,7 +20,7 @@ class FeedbackUI : public ui::WebDialogUI {
#if defined(OS_CHROMEOS)
static void GetMostRecentScreenshots(
- const FilePath& filepath,
+ const base::FilePath& filepath,
std::vector<std::string>* saved_screenshots,
size_t max_saved);
#endif
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_handler.h b/chrome/browser/ui/webui/print_preview/print_preview_handler.h
index 5be2f94..553ecff 100644
--- a/chrome/browser/ui/webui/print_preview/print_preview_handler.h
+++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.h
@@ -17,11 +17,11 @@
#include "printing/print_job_constants.h"
#include "ui/shell_dialogs/select_file_dialog.h"
-class FilePath;
class PrintSystemTaskProxy;
namespace base {
class DictionaryValue;
+class FilePath;
class RefCountedBytes;
}
@@ -48,7 +48,7 @@ class PrintPreviewHandler : public content::WebUIMessageHandler,
virtual void RegisterMessages() OVERRIDE;
// SelectFileDialog::Listener implementation.
- virtual void FileSelected(const FilePath& path,
+ virtual void FileSelected(const base::FilePath& path,
int index,
void* params) OVERRIDE;
virtual void FileSelectionCanceled(void* params) OVERRIDE;
@@ -57,7 +57,7 @@ class PrintPreviewHandler : public content::WebUIMessageHandler,
virtual void OnPrintDialogShown() OVERRIDE;
// Displays a modal dialog, prompting the user to select a file.
- void SelectFile(const FilePath& default_path);
+ void SelectFile(const base::FilePath& default_path);
// Called when the print preview dialog is destroyed. This is the last time
// this object has access to the PrintViewManager in order to disconnect the
@@ -220,7 +220,7 @@ class PrintPreviewHandler : public content::WebUIMessageHandler,
// Holds the path to the print to pdf request. It is empty if no such request
// exists.
- scoped_ptr<FilePath> print_to_pdf_path_;
+ scoped_ptr<base::FilePath> print_to_pdf_path_;
DISALLOW_COPY_AND_ASSIGN(PrintPreviewHandler);
};
diff --git a/chrome/browser/ui/webui/print_preview/sticky_settings.h b/chrome/browser/ui/webui/print_preview/sticky_settings.h
index ab3395d..77a4c10 100644
--- a/chrome/browser/ui/webui/print_preview/sticky_settings.h
+++ b/chrome/browser/ui/webui/print_preview/sticky_settings.h
@@ -11,13 +11,13 @@
#include "base/memory/scoped_ptr.h"
-class FilePath;
class PrintPreviewHandlerTest;
class PrefService;
class PrefServiceSyncable;
namespace base {
class DictionaryValue;
+class FilePath;
}
namespace printing {
@@ -30,20 +30,20 @@ class StickySettings {
StickySettings();
~StickySettings();
- FilePath* save_path();
+ base::FilePath* save_path();
std::string* printer_app_state();
// Stores app state for the last used printer.
void StoreAppState(const std::string& app_state);
// Stores the last path the user used to save to pdf.
- void StoreSavePath(const FilePath& path);
+ void StoreSavePath(const base::FilePath& path);
void SaveInPrefs(PrefService* profile);
void RestoreFromPrefs(PrefService* profile);
static void RegisterUserPrefs(PrefServiceSyncable* prefs);
private:
- scoped_ptr<FilePath> save_path_;
+ scoped_ptr<base::FilePath> save_path_;
scoped_ptr<std::string> printer_app_state_;
};
diff --git a/chrome/browser/ui/webui/screenshot_source.h b/chrome/browser/ui/webui/screenshot_source.h
index 4c7c0c5..30d80f4 100644
--- a/chrome/browser/ui/webui/screenshot_source.h
+++ b/chrome/browser/ui/webui/screenshot_source.h
@@ -23,9 +23,12 @@
typedef std::vector<unsigned char> ScreenshotData;
typedef linked_ptr<ScreenshotData> ScreenshotDataPtr;
-class FilePath;
class Profile;
+namespace base {
+class FilePath;
+}
+
// ScreenshotSource is the data source that serves screenshots (saved
// or current) to the bug report html ui.
class ScreenshotSource : public content::URLDataSource {
@@ -40,7 +43,7 @@ class ScreenshotSource : public content::URLDataSource {
// Common access for the screenshot directory, parameter is set to the
// requested directory and return value of true is given upon success.
- static bool GetScreenshotDirectory(FilePath* directory);
+ static bool GetScreenshotDirectory(base::FilePath* directory);
#endif
// Get the basefilename for screenshots
@@ -89,14 +92,14 @@ class ScreenshotSource : public content::URLDataSource {
void SendSavedScreenshot(
const std::string& screenshot_path,
const content::URLDataSource::GotDataCallback& callback,
- const FilePath& file);
+ const base::FilePath& file);
// The callback for Drive's getting file method.
void GetSavedScreenshotCallback(
const std::string& screenshot_path,
const content::URLDataSource::GotDataCallback& callback,
drive::DriveFileError error,
- const FilePath& file,
+ const base::FilePath& file,
const std::string& unused_mime_type,
drive::DriveFileType file_type);
diff --git a/chrome/browser/value_store/value_store_frontend.h b/chrome/browser/value_store/value_store_frontend.h
index 19c0f23..0a4c0ba 100644
--- a/chrome/browser/value_store/value_store_frontend.h
+++ b/chrome/browser/value_store/value_store_frontend.h
@@ -14,9 +14,12 @@
#include "base/threading/non_thread_safe.h"
#include "base/values.h"
-class FilePath;
class ValueStore;
+namespace base {
+class FilePath;
+}
+
// A frontend for a LeveldbValueStore, for use on the UI thread.
class ValueStoreFrontend
: public base::SupportsWeakPtr<ValueStoreFrontend>,
@@ -25,12 +28,12 @@ class ValueStoreFrontend
typedef base::Callback<void(scoped_ptr<base::Value>)> ReadCallback;
ValueStoreFrontend();
- explicit ValueStoreFrontend(const FilePath& db_path);
+ explicit ValueStoreFrontend(const base::FilePath& db_path);
// This variant is useful for testing (using a mock ValueStore).
explicit ValueStoreFrontend(ValueStore* value_store);
~ValueStoreFrontend();
- void Init(const FilePath& db_path);
+ void Init(const base::FilePath& db_path);
// Retrieves a value from the database asynchronously, passing a copy to
// |callback| when ready. NULL is passed if no matching entry is found.
diff --git a/chrome/browser/webdata/web_database.cc b/chrome/browser/webdata/web_database.cc
index 48316da..a645d4d 100644
--- a/chrome/browser/webdata/web_database.cc
+++ b/chrome/browser/webdata/web_database.cc
@@ -89,7 +89,7 @@ sql::Connection* WebDatabase::GetSQLConnection() {
return &db_;
}
-sql::InitStatus WebDatabase::Init(const FilePath& db_name,
+sql::InitStatus WebDatabase::Init(const base::FilePath& db_name,
const std::string& app_locale) {
// When running in unit tests, there is already a NotificationService object.
// Since only one can exist at a time per thread, check first.
diff --git a/chrome/browser/webdata/web_database.h b/chrome/browser/webdata/web_database.h
index d384e65..273148e 100644
--- a/chrome/browser/webdata/web_database.h
+++ b/chrome/browser/webdata/web_database.h
@@ -11,13 +11,16 @@
#include "sql/meta_table.h"
class AutofillTable;
-class FilePath;
class KeywordTable;
class LoginsTable;
class TokenServiceTable;
class WebAppsTable;
class WebIntentsTable;
+namespace base {
+class FilePath;
+}
+
namespace content {
class NotificationService;
}
@@ -35,7 +38,7 @@ class WebDatabase {
// file is. If this returns an error code, no other method should be called.
// Requires the |app_locale| to be passed as a parameter as the locale can
// only safely be queried on the UI thread.
- sql::InitStatus Init(const FilePath& db_name, const std::string& app_locale);
+ sql::InitStatus Init(const base::FilePath& db_name, const std::string& app_locale);
// Transactions management
void BeginTransaction();
diff --git a/chrome/common/chrome_paths_internal.h b/chrome/common/chrome_paths_internal.h
index 1d91a6f..5f9b18b 100644
--- a/chrome/common/chrome_paths_internal.h
+++ b/chrome/common/chrome_paths_internal.h
@@ -17,18 +17,20 @@ class NSBundle;
#endif
#endif
+namespace base {
class FilePath;
+}
namespace chrome {
// Get the path to the user's data directory, regardless of whether
// DIR_USER_DATA has been overridden by a command-line option.
-bool GetDefaultUserDataDirectory(FilePath* result);
+bool GetDefaultUserDataDirectory(base::FilePath* result);
// This returns the base directory in which Chrome Frame stores user profiles.
// Note that this cannot be wrapped in a preprocessor define since
// CF and Google Chrome want to share the same binaries.
-bool GetChromeFrameUserDataDirectory(FilePath* result);
+bool GetChromeFrameUserDataDirectory(base::FilePath* result);
// Get the path to the user's cache directory. This is normally the
// same as the profile directory, but on Linux it can also be
@@ -37,54 +39,54 @@ bool GetChromeFrameUserDataDirectory(FilePath* result);
// of this directory, with names like "Cache" and "Media Cache".
// This will always fill in |result| with a directory, sometimes
// just |profile_dir|.
-void GetUserCacheDirectory(const FilePath& profile_dir, FilePath* result);
+void GetUserCacheDirectory(const base::FilePath& profile_dir, base::FilePath* result);
// Get the path to the user's documents directory.
-bool GetUserDocumentsDirectory(FilePath* result);
+bool GetUserDocumentsDirectory(base::FilePath* result);
#if defined(OS_WIN) || defined(OS_LINUX)
// Gets the path to a safe default download directory for a user.
-bool GetUserDownloadsDirectorySafe(FilePath* result);
+bool GetUserDownloadsDirectorySafe(base::FilePath* result);
#endif
// Get the path to the user's downloads directory.
-bool GetUserDownloadsDirectory(FilePath* result);
+bool GetUserDownloadsDirectory(base::FilePath* result);
// Gets the path to the user's music directory.
-bool GetUserMusicDirectory(FilePath* result);
+bool GetUserMusicDirectory(base::FilePath* result);
// Gets the path to the user's pictures directory.
-bool GetUserPicturesDirectory(FilePath* result);
+bool GetUserPicturesDirectory(base::FilePath* result);
// Gets the path to the user's videos directory.
-bool GetUserVideosDirectory(FilePath* result);
+bool GetUserVideosDirectory(base::FilePath* result);
#if defined(OS_MACOSX) && !defined(OS_IOS)
// The "versioned directory" is a directory in the browser .app bundle. It
// contains the bulk of the application, except for the things that the system
// requires be located at spepcific locations. The versioned directory is
// in the .app at Contents/Versions/w.x.y.z.
-FilePath GetVersionedDirectory();
+base::FilePath GetVersionedDirectory();
// This overrides the directory returned by |GetVersionedDirectory()|, to be
// used when |GetVersionedDirectory()| can't automatically determine the proper
// location. This is the case when the browser didn't load itself but by, e.g.,
// the app mode loader. This should be called before |ChromeMain()|. This takes
// ownership of the object |path| and the caller must not delete it.
-void SetOverrideVersionedDirectory(const FilePath* path);
+void SetOverrideVersionedDirectory(const base::FilePath* path);
// Most of the application is further contained within the framework. The
// framework bundle is located within the versioned directory at a specific
// path. The only components in the versioned directory not included in the
// framework are things that also depend on the framework, such as the helper
// app bundle.
-FilePath GetFrameworkBundlePath();
+base::FilePath GetFrameworkBundlePath();
// Get the local library directory.
-bool GetLocalLibraryDirectory(FilePath* result);
+bool GetLocalLibraryDirectory(base::FilePath* result);
// Get the global Application Support directory (under /Library/).
-bool GetGlobalApplicationSupportDirectory(FilePath* result);
+bool GetGlobalApplicationSupportDirectory(base::FilePath* result);
// Returns the NSBundle for the outer browser application, even when running
// inside the helper. In unbundled applications, such as tests, returns nil.
diff --git a/chrome/common/dump_without_crashing.cc b/chrome/common/dump_without_crashing.cc
index 8c692e4..75023d9 100644
--- a/chrome/common/dump_without_crashing.cc
+++ b/chrome/common/dump_without_crashing.cc
@@ -6,6 +6,7 @@
#include "chrome/common/dump_without_crashing.h"
+#include "base/logging.h"
#include "chrome/common/chrome_constants.h"
#if defined(OS_WIN)
diff --git a/chrome/common/extensions/extension_file_util.h b/chrome/common/extensions/extension_file_util.h
index 339c90b..430ec38 100644
--- a/chrome/common/extensions/extension_file_util.h
+++ b/chrome/common/extensions/extension_file_util.h
@@ -12,11 +12,11 @@
#include "chrome/common/extensions/manifest.h"
#include "chrome/common/extensions/message_bundle.h"
-class FilePath;
class GURL;
namespace base {
class DictionaryValue;
+class FilePath;
}
namespace extensions {
@@ -31,26 +31,26 @@ namespace extension_file_util {
// Copies |unpacked_source_dir| into the right location under |extensions_dir|.
// The destination directory is returned on success, or empty path is returned
// on failure.
-FilePath InstallExtension(const FilePath& unpacked_source_dir,
- const std::string& id,
- const std::string& version,
- const FilePath& extensions_dir);
+base::FilePath InstallExtension(const base::FilePath& unpacked_source_dir,
+ const std::string& id,
+ const std::string& version,
+ const base::FilePath& extensions_dir);
// Removes all versions of the extension with |id| from |extensions_dir|.
-void UninstallExtension(const FilePath& extensions_dir,
+void UninstallExtension(const base::FilePath& extensions_dir,
const std::string& id);
// Loads and validates an extension from the specified directory. Returns NULL
// on failure, with a description of the error in |error|.
scoped_refptr<extensions::Extension> LoadExtension(
- const FilePath& extension_root,
+ const base::FilePath& extension_root,
extensions::Manifest::Location location,
int flags,
std::string* error);
// The same as LoadExtension except use the provided |extension_id|.
scoped_refptr<extensions::Extension> LoadExtension(
- const FilePath& extension_root,
+ const base::FilePath& extension_root,
const std::string& extension_id,
extensions::Manifest::Location location,
int flags,
@@ -58,11 +58,11 @@ scoped_refptr<extensions::Extension> LoadExtension(
// Loads an extension manifest from the specified directory. Returns NULL
// on failure, with a description of the error in |error|.
-base::DictionaryValue* LoadManifest(const FilePath& extension_root,
+base::DictionaryValue* LoadManifest(const base::FilePath& extension_root,
std::string* error);
// Returns true if the given file path exists and is not zero-length.
-bool ValidateFilePath(const FilePath& path);
+bool ValidateFilePath(const base::FilePath& path);
// Returns true if the given extension object is valid and consistent.
// May also append a series of warning messages to |warnings|, but they
@@ -75,7 +75,7 @@ bool ValidateExtension(const extensions::Extension* extension,
std::vector<extensions::InstallWarning>* warnings);
// Returns a list of files that contain private keys inside |extension_dir|.
-std::vector<FilePath> FindPrivateKeyFiles(const FilePath& extension_dir);
+std::vector<base::FilePath> FindPrivateKeyFiles(const base::FilePath& extension_dir);
// Cleans up the extension install directory. It can end up with garbage in it
// if extensions can't initially be removed when they are uninstalled (eg if a
@@ -87,20 +87,20 @@ std::vector<FilePath> FindPrivateKeyFiles(const FilePath& extension_dir);
// Obsolete version directories are removed, as are directories that aren't
// found in |extension_paths|.
void GarbageCollectExtensions(
- const FilePath& extensions_dir,
- const std::multimap<std::string, FilePath>& extension_paths);
+ const base::FilePath& extensions_dir,
+ const std::multimap<std::string, base::FilePath>& extension_paths);
// Loads extension message catalogs and returns message bundle.
// Returns NULL on error, or if extension is not localized.
extensions::MessageBundle* LoadMessageBundle(
- const FilePath& extension_path,
+ const base::FilePath& extension_path,
const std::string& default_locale,
std::string* error);
// Loads the extension message bundle substitution map. Contains at least
// extension_id item.
extensions::MessageBundle::SubstitutionMap* LoadMessageBundleSubstitutionMap(
- const FilePath& extension_path,
+ const base::FilePath& extension_path,
const std::string& extension_id,
const std::string& default_locale);
@@ -108,27 +108,28 @@ extensions::MessageBundle::SubstitutionMap* LoadMessageBundleSubstitutionMap(
// use by Chrome.
// If any files or directories are found using "_" prefix and are not on
// reserved list we return false, and set error message.
-bool CheckForIllegalFilenames(const FilePath& extension_path,
+bool CheckForIllegalFilenames(const base::FilePath& extension_path,
std::string* error);
// Get a relative file path from a chrome-extension:// URL.
-FilePath ExtensionURLToRelativeFilePath(const GURL& url);
+base::FilePath ExtensionURLToRelativeFilePath(const GURL& url);
// Get a full file path from a chrome-extension-resource:// URL, If the URL
// points a file outside of root, this function will return empty FilePath.
-FilePath ExtensionResourceURLToFilePath(const GURL& url, const FilePath& root);
+base::FilePath ExtensionResourceURLToFilePath(const GURL& url,
+ const base::FilePath& root);
// Returns a path to a temporary directory for unpacking an extension that will
// be installed into |extensions_dir|. Creates the directory if necessary.
// The directory will be on the same file system as |extensions_dir| so
// that the extension directory can be efficiently renamed into place. Returns
// an empty file path on failure.
-FilePath GetInstallTempDir(const FilePath& extensions_dir);
+base::FilePath GetInstallTempDir(const base::FilePath& extensions_dir);
// Helper function to delete files. This is used to avoid ugly casts which
// would be necessary with PostMessage since file_util::Delete is overloaded.
// TODO(skerner): Make a version of Delete that is not overloaded in file_util.
-void DeleteFile(const FilePath& path, bool recursive);
+void DeleteFile(const base::FilePath& path, bool recursive);
} // namespace extension_file_util
diff --git a/chrome/common/extensions/extension_l10n_util.h b/chrome/common/extensions/extension_l10n_util.h
index 24178a0..ad90892 100644
--- a/chrome/common/extensions/extension_l10n_util.h
+++ b/chrome/common/extensions/extension_l10n_util.h
@@ -11,10 +11,9 @@
#include <string>
#include <vector>
-class FilePath;
-
namespace base {
class DictionaryValue;
+class FilePath;
}
namespace extensions {
@@ -46,7 +45,7 @@ bool LocalizeManifest(const extensions::MessageBundle& messages,
// Load message catalogs, localize manifest and attach message bundle to the
// extension.
-bool LocalizeExtension(const FilePath& extension_path,
+bool LocalizeExtension(const base::FilePath& extension_path,
base::DictionaryValue* manifest,
std::string* error);
@@ -56,7 +55,7 @@ bool LocalizeExtension(const FilePath& extension_path,
// error with locale_name.
// If file name starts with . return true (helps testing extensions under svn).
bool AddLocale(const std::set<std::string>& chrome_locales,
- const FilePath& locale_folder,
+ const base::FilePath& locale_folder,
const std::string& locale_name,
std::set<std::string>* valid_locales,
std::string* error);
@@ -82,7 +81,7 @@ void GetAllFallbackLocales(const std::string& application_locale,
// 4. Intersect both lists, and add intersection to the extension.
// Returns false if any of supplied locales don't match chrome list of locales.
// Fills out error with offending locale name.
-bool GetValidLocales(const FilePath& locale_path,
+bool GetValidLocales(const base::FilePath& locale_path,
std::set<std::string>* locales,
std::string* error);
@@ -92,7 +91,7 @@ bool GetValidLocales(const FilePath& locale_path,
// Returns message bundle if it can load default locale messages file, and all
// messages are valid, else returns NULL and sets error.
extensions::MessageBundle* LoadMessageCatalogs(
- const FilePath& locale_path,
+ const base::FilePath& locale_path,
const std::string& default_locale,
const std::string& app_locale,
const std::set<std::string>& valid_locales,
@@ -103,8 +102,8 @@ extensions::MessageBundle* LoadMessageCatalogs(
// |locales_path| is extension_id/_locales
// |locale_path| is extension_id/_locales/xx
// |all_locales| is a set of all valid Chrome locales.
-bool ShouldSkipValidation(const FilePath& locales_path,
- const FilePath& locale_path,
+bool ShouldSkipValidation(const base::FilePath& locales_path,
+ const base::FilePath& locale_path,
const std::set<std::string>& all_locales);
// Sets the process locale for the duration of the current scope, then reverts
diff --git a/chrome/common/logging_chrome.h b/chrome/common/logging_chrome.h
index dee2533..bde1793 100644
--- a/chrome/common/logging_chrome.h
+++ b/chrome/common/logging_chrome.h
@@ -12,7 +12,10 @@
#include "base/time.h"
class CommandLine;
+
+namespace base {
class FilePath;
+}
namespace logging {
@@ -34,7 +37,7 @@ void InitChromeLogging(const CommandLine& command_line,
#if defined(OS_CHROMEOS)
// Get the log file location.
-FilePath GetSessionLogFile(const CommandLine& command_line);
+base::FilePath GetSessionLogFile(const CommandLine& command_line);
// Redirects chrome logging to the appropriate session log dir.
void RedirectChromeLogging(const CommandLine& command_line);
@@ -44,7 +47,7 @@ void RedirectChromeLogging(const CommandLine& command_line);
void CleanupChromeLogging();
// Returns the fully-qualified name of the log file.
-FilePath GetLogFileName();
+base::FilePath GetLogFileName();
// Returns true when error/assertion dialogs are to be shown,
// false otherwise.
@@ -64,8 +67,8 @@ size_t GetFatalAssertions(AssertionList* assertions);
// Inserts timestamp before file extension in the format
// "_yymmdd-hhmmss".
-FilePath GenerateTimestampedName(const FilePath& base_path,
- base::Time timestamp);
+base::FilePath GenerateTimestampedName(const base::FilePath& base_path,
+ base::Time timestamp);
} // namespace logging
#endif // CHROME_COMMON_LOGGING_CHROME_H_
diff --git a/chrome/common/mac/app_mode_chrome_locator.h b/chrome/common/mac/app_mode_chrome_locator.h
index 860298c..e7da4c4 100644
--- a/chrome/common/mac/app_mode_chrome_locator.h
+++ b/chrome/common/mac/app_mode_chrome_locator.h
@@ -11,13 +11,15 @@
@class NSString;
+namespace base {
class FilePath;
+}
namespace app_mode {
// Given a bundle id, return the path of the corresponding bundle.
// Returns true if the bundle was found, false otherwise.
-bool FindBundleById(NSString* bundle_id, FilePath* out_bundle);
+bool FindBundleById(NSString* bundle_id, base::FilePath* out_bundle);
// Given the path to the Chrome bundle, read the following information:
// |raw_version_str| - Chrome version.
@@ -25,10 +27,10 @@ bool FindBundleById(NSString* bundle_id, FilePath* out_bundle);
// |framework_shlib_path| - Path to the chrome framework's shared library (not
// the framework directory).
// Returns true if all information read succesfuly, false otherwise.
-bool GetChromeBundleInfo(const FilePath& chrome_bundle,
+bool GetChromeBundleInfo(const base::FilePath& chrome_bundle,
string16* raw_version_str,
- FilePath* version_path,
- FilePath* framework_shlib_path);
+ base::FilePath* version_path,
+ base::FilePath* framework_shlib_path);
} // namespace app_mode
diff --git a/chrome/common/spellcheck_common.h b/chrome/common/spellcheck_common.h
index 55f8272..c2d8498 100644
--- a/chrome/common/spellcheck_common.h
+++ b/chrome/common/spellcheck_common.h
@@ -8,7 +8,9 @@
#include <string>
#include <vector>
+namespace base {
class FilePath;
+}
namespace chrome {
namespace spellcheck_common {
@@ -28,8 +30,8 @@ static const size_t MAX_CUSTOM_DICTIONARY_WORD_BYTES = 99;
typedef std::vector<std::string> WordList;
-FilePath GetVersionedFileName(const std::string& input_language,
- const FilePath& dict_dir);
+base::FilePath GetVersionedFileName(const std::string& input_language,
+ const base::FilePath& dict_dir);
std::string GetCorrespondingSpellCheckLanguage(const std::string& language);
diff --git a/chrome/installer/launcher_support/chrome_launcher_support.h b/chrome/installer/launcher_support/chrome_launcher_support.h
index caca2a5..ea4d12e 100644
--- a/chrome/installer/launcher_support/chrome_launcher_support.h
+++ b/chrome/installer/launcher_support/chrome_launcher_support.h
@@ -5,7 +5,9 @@
#ifndef CHROME_INSTALLER_LAUNCHER_SUPPORT_CHROME_LAUNCHER_SUPPORT_H_
#define CHROME_INSTALLER_LAUNCHER_SUPPORT_CHROME_LAUNCHER_SUPPORT_H_
+namespace base {
class FilePath;
+}
namespace chrome_launcher_support {
@@ -16,17 +18,17 @@ enum InstallationLevel {
// Returns the path to an existing setup.exe at the specified level, if it can
// be found via Omaha client state.
-FilePath GetSetupExeForInstallationLevel(InstallationLevel level);
+base::FilePath GetSetupExeForInstallationLevel(InstallationLevel level);
// Returns the path to an installed chrome.exe at the specified level, if it can
// be found via Omaha client state. Prefers the installer from a multi-install,
// but may also return that of a single-install of Chrome if no multi-install
// exists.
-FilePath GetChromePathForInstallationLevel(InstallationLevel level);
+base::FilePath GetChromePathForInstallationLevel(InstallationLevel level);
// Returns the path to an installed app_host.exe at the specified level, if
// it can be found via Omaha client state.
-FilePath GetAppHostPathForInstallationLevel(InstallationLevel level);
+base::FilePath GetAppHostPathForInstallationLevel(InstallationLevel level);
// Returns the path to an installed chrome.exe, or an empty path. Prefers a
// system-level installation to a user-level installation. Uses Omaha client
@@ -34,7 +36,7 @@ FilePath GetAppHostPathForInstallationLevel(InstallationLevel level);
// In non-official builds, to ease development, this will first look for a
// chrome.exe in the same directory as the current executable.
// The file path returned (if any) is guaranteed to exist.
-FilePath GetAnyChromePath();
+base::FilePath GetAnyChromePath();
// Returns the path to an installed app_host.exe, or an empty path. Prefers a
// system-level installation to a user-level installation. Uses Omaha client
@@ -42,7 +44,7 @@ FilePath GetAnyChromePath();
// In non-official builds, to ease development, this will first look for a
// app_host.exe in the same directory as the current executable.
// The file path returned (if any) is guaranteed to exist.
-FilePath GetAnyAppHostPath();
+base::FilePath GetAnyAppHostPath();
// Returns true if App Host is installed (system-level or user-level),
// or in the same directory as the current executable.
diff --git a/chrome/installer/setup/install.h b/chrome/installer/setup/install.h
index abf0ab3..4ce974b 100644
--- a/chrome/installer/setup/install.h
+++ b/chrome/installer/setup/install.h
@@ -17,7 +17,9 @@
#include "chrome/installer/util/product.h"
#include "chrome/installer/util/util_constants.h"
+namespace base {
class FilePath;
+}
namespace installer {
@@ -55,7 +57,7 @@ void EscapeXmlAttributeValueInSingleQuotes(string16* att_value);
// Creates VisualElementsManifest.xml beside chrome.exe in |src_path| if
// |src_path|\VisualElements exists.
// Returns true unless the manifest is supposed to be created, but fails to be.
-bool CreateVisualElementsManifest(const FilePath& src_path,
+bool CreateVisualElementsManifest(const base::FilePath& src_path,
const Version& version);
// Overwrites shortcuts (desktop, quick launch, and start menu) if they are
@@ -71,7 +73,7 @@ bool CreateVisualElementsManifest(const FilePath& src_path,
// If creating the Start menu shortcut is successful, it is also pinned to the
// taskbar.
void CreateOrUpdateShortcuts(
- const FilePath& target,
+ const base::FilePath& target,
const Product& product,
const MasterPreferences& prefs,
InstallShortcutLevel install_level,
@@ -107,11 +109,11 @@ void RegisterChromeOnMachine(const InstallerState& installer_state,
InstallStatus InstallOrUpdateProduct(
const InstallationState& original_state,
const InstallerState& installer_state,
- const FilePath& setup_path,
- const FilePath& archive_path,
- const FilePath& install_temp_path,
- const FilePath& src_path,
- const FilePath& prefs_path,
+ const base::FilePath& setup_path,
+ const base::FilePath& archive_path,
+ const base::FilePath& install_temp_path,
+ const base::FilePath& src_path,
+ const base::FilePath& prefs_path,
const installer::MasterPreferences& prefs,
const Version& new_version);
@@ -127,7 +129,7 @@ void HandleOsUpgradeForBrowser(const InstallerState& installer_state,
// Shortcut creation is skipped if the First Run beacon is present (unless
// |force| is set to true).
// |chrome| The installed product (must be a browser).
-void HandleActiveSetupForBrowser(const FilePath& installation_root,
+void HandleActiveSetupForBrowser(const base::FilePath& installation_root,
const Product& chrome,
bool force);
diff --git a/chrome/installer/setup/install_worker.h b/chrome/installer/setup/install_worker.h
index a9d59b3..7c96302 100644
--- a/chrome/installer/setup/install_worker.h
+++ b/chrome/installer/setup/install_worker.h
@@ -14,10 +14,13 @@
class BrowserDistribution;
class CommandLine;
-class FilePath;
class Version;
class WorkItemList;
+namespace base {
+class FilePath;
+}
+
namespace installer {
class InstallationState;
@@ -28,7 +31,7 @@ class Product;
// either the Control Panel->Add/Remove Programs list or in the Omaha client
// state key if running under an MSI installer.
void AddUninstallShortcutWorkItems(const InstallerState& installer_state,
- const FilePath& setup_path,
+ const base::FilePath& setup_path,
const Version& new_version,
const Product& product,
WorkItemList* install_list);
@@ -79,10 +82,10 @@ void AddUsageStatsWorkItems(const InstallationState& original_state,
// false.
// |current_version| can be NULL to indicate no Chrome is currently installed.
bool AppendPostInstallTasks(const InstallerState& installer_state,
- const FilePath& setup_path,
+ const base::FilePath& setup_path,
const Version* current_version,
const Version& new_version,
- const FilePath& temp_path,
+ const base::FilePath& temp_path,
WorkItemList* post_install_task_list);
// Builds the complete WorkItemList used to build the set of installation steps
@@ -99,10 +102,10 @@ bool AppendPostInstallTasks(const InstallerState& installer_state,
// |current_version| can be NULL to indicate no Chrome is currently installed.
void AddInstallWorkItems(const InstallationState& original_state,
const InstallerState& installer_state,
- const FilePath& setup_path,
- const FilePath& archive_path,
- const FilePath& src_path,
- const FilePath& temp_path,
+ const base::FilePath& setup_path,
+ const base::FilePath& archive_path,
+ const base::FilePath& src_path,
+ const base::FilePath& temp_path,
const Version* current_version,
const Version& new_version,
WorkItemList* install_list);
@@ -116,8 +119,8 @@ void AddInstallWorkItems(const InstallationState& original_state,
// |may_fail| states whether this is best effort or not. If |may_fail| is true
// then |work_item_list| will still succeed if the registration fails and
// no registration rollback will be performed.
-void AddRegisterComDllWorkItems(const FilePath& dll_folder,
- const std::vector<FilePath>& dll_files,
+void AddRegisterComDllWorkItems(const base::FilePath& dll_folder,
+ const std::vector<base::FilePath>& dll_files,
bool system_level,
bool do_register,
bool ignore_failures,
@@ -133,7 +136,7 @@ void AddSetMsiMarkerWorkItem(const InstallerState& installer_state,
// installation. This includes handling of the ready-mode option.
void AddChromeFrameWorkItems(const InstallationState& original_state,
const InstallerState& installer_state,
- const FilePath& setup_path,
+ const base::FilePath& setup_path,
const Version& new_version,
const Product& product,
WorkItemList* list);
@@ -143,7 +146,7 @@ void AddChromeFrameWorkItems(const InstallationState& original_state,
// If |new_version| is empty, the registrations will point to
// delegate_execute.exe directly in |target_path|.
void AddDelegateExecuteWorkItems(const InstallerState& installer_state,
- const FilePath& target_path,
+ const base::FilePath& target_path,
const Version& new_version,
const Product& product,
WorkItemList* list);
@@ -154,7 +157,7 @@ void AddDelegateExecuteWorkItems(const InstallerState& installer_state,
// |product|: The product being installed. This method is a no-op if this is
// anything other than system-level Chrome/Chromium.
void AddActiveSetupWorkItems(const InstallerState& installer_state,
- const FilePath& setup_path,
+ const base::FilePath& setup_path,
const Version& new_version,
const Product& product,
WorkItemList* list);
@@ -186,7 +189,7 @@ void RefreshElevationPolicy();
// (and may therefore be empty) when uninstalling.
void AddQuickEnableChromeFrameWorkItems(const InstallerState& installer_state,
const InstallationState& machine_state,
- const FilePath& setup_path,
+ const base::FilePath& setup_path,
const Version& new_version,
WorkItemList* work_item_list);
@@ -201,7 +204,7 @@ void AddQuickEnableChromeFrameWorkItems(const InstallerState& installer_state,
void AddQuickEnableApplicationLauncherWorkItems(
const InstallerState& installer_state,
const InstallationState& machine_state,
- const FilePath& setup_path,
+ const base::FilePath& setup_path,
const Version& new_version,
WorkItemList* work_item_list);
@@ -210,7 +213,7 @@ void AddQuickEnableApplicationLauncherWorkItems(
// |installer_state|). |new_version| is the version of the product(s)
// currently being installed -- can be empty on uninstall.
void AddOsUpgradeWorkItems(const InstallerState& installer_state,
- const FilePath& setup_path,
+ const base::FilePath& setup_path,
const Version& new_version,
const Product& product,
WorkItemList* install_list);
@@ -220,7 +223,7 @@ void AddOsUpgradeWorkItems(const InstallerState& installer_state,
// in |installer_state|). |new_version| is the version of the product(s)
// currently being installed -- can be empty on uninstall.
void AddQueryEULAAcceptanceWorkItems(const InstallerState& installer_state,
- const FilePath& setup_path,
+ const base::FilePath& setup_path,
const Version& new_version,
const Product& product,
WorkItemList* work_item_list);
diff --git a/chrome/installer/setup/setup_util.h b/chrome/installer/setup/setup_util.h
index e2e893e..b2fa990 100644
--- a/chrome/installer/setup/setup_util.h
+++ b/chrome/installer/setup/setup_util.h
@@ -16,9 +16,12 @@
#include "chrome/installer/util/util_constants.h"
class CommandLine;
-class FilePath;
class Version;
+namespace base {
+class FilePath;
+}
+
namespace installer {
class InstallationState;
@@ -29,15 +32,15 @@ class ProductState;
// since it checks for courgette header and fails quickly. If that fails
// tries to apply the patch using regular bsdiff. Returns status code.
// The installer stage is updated if |installer_state| is non-NULL.
-int ApplyDiffPatch(const FilePath& src,
- const FilePath& patch,
- const FilePath& dest,
+int ApplyDiffPatch(const base::FilePath& src,
+ const base::FilePath& patch,
+ const base::FilePath& dest,
const InstallerState* installer_state);
// Find the version of Chrome from an install source directory.
// Chrome_path should contain at least one version folder.
// Returns the maximum version found or NULL if no version is found.
-Version* GetMaxVersionFromArchiveDir(const FilePath& chrome_path);
+Version* GetMaxVersionFromArchiveDir(const base::FilePath& chrome_path);
// Spawns a new process that waits for a specified amount of time before
// attempting to delete |path|. This is useful for setup to delete the
@@ -46,7 +49,7 @@ Version* GetMaxVersionFromArchiveDir(const FilePath& chrome_path);
// Returns true if a new process was started, false otherwise. Note that
// given the nature of this function, it is not possible to know if the
// delete operation itself succeeded.
-bool DeleteFileFromTempProcess(const FilePath& path,
+bool DeleteFileFromTempProcess(const base::FilePath& path,
uint32 delay_before_delete_ms);
// Returns true and populates |setup_exe| with the path to an existing product
@@ -55,17 +58,17 @@ bool DeleteFileFromTempProcess(const FilePath& path,
bool GetExistingHigherInstaller(const InstallationState& original_state,
bool system_install,
const Version& installer_version,
- FilePath* setup_exe);
+ base::FilePath* setup_exe);
// Invokes the pre-existing |setup_exe| to handle the current operation (as
// dictated by |command_line|). An installerdata file, if specified, is first
// unconditionally copied into place so that it will be in effect in case the
// invoked |setup_exe| runs the newly installed product prior to exiting.
// Returns true if |setup_exe| was launched, false otherwise.
-bool DeferToExistingInstall(const FilePath& setup_exe,
+bool DeferToExistingInstall(const base::FilePath& setup_exe,
const CommandLine& command_line,
const InstallerState& installer_state,
- const FilePath& temp_path,
+ const base::FilePath& temp_path,
InstallStatus* install_status);
// This class will enable the privilege defined by |privilege_name| on the
diff --git a/chrome/installer/setup/uninstall.h b/chrome/installer/setup/uninstall.h
index 206bd35..f76005b 100644
--- a/chrome/installer/setup/uninstall.h
+++ b/chrome/installer/setup/uninstall.h
@@ -14,7 +14,10 @@
class BrowserDistribution;
class CommandLine;
+
+namespace base {
class FilePath;
+}
namespace installer {
@@ -54,7 +57,7 @@ void RemoveChromeLegacyRegistryKeys(BrowserDistribution* dist,
installer::InstallStatus UninstallProduct(
const InstallationState& original_state,
const InstallerState& installer_state,
- const FilePath& setup_path,
+ const base::FilePath& setup_path,
const Product& dist,
bool remove_all,
bool force_uninstall,
diff --git a/chrome/installer/test/alternate_version_generator.h b/chrome/installer/test/alternate_version_generator.h
index 0ae0d5c..fe60a6a 100644
--- a/chrome/installer/test/alternate_version_generator.h
+++ b/chrome/installer/test/alternate_version_generator.h
@@ -9,9 +9,12 @@
#include <string>
-class FilePath;
class Version;
+namespace base {
+class FilePath;
+}
+
namespace upgrade_test {
enum Direction {
@@ -25,8 +28,8 @@ enum Direction {
// |target_path| is clobbered. Returns true on success. |original_version| and
// |new_version|, when non-NULL, are given the original and new version numbers
// on success.
-bool GenerateAlternateVersion(const FilePath& original_installer_path,
- const FilePath& target_path,
+bool GenerateAlternateVersion(const base::FilePath& original_installer_path,
+ const base::FilePath& target_path,
Direction direction,
std::wstring* original_version,
std::wstring* new_version);
@@ -35,16 +38,16 @@ bool GenerateAlternateVersion(const FilePath& original_installer_path,
// |target_file|, modifying the version of the copy according to |direction|.
// Any previous file at |target_file| is clobbered. Returns true on success.
// Note that |target_file| may still be mutated on failure.
-bool GenerateAlternatePEFileVersion(const FilePath& original_file,
- const FilePath& target_file,
+bool GenerateAlternatePEFileVersion(const base::FilePath& original_file,
+ const base::FilePath& target_file,
Direction direction);
// Given a path to a PEImage in |original_file|, copy that file to
// |target_file|, modifying the version of the copy according to |version|.
// Any previous file at |target_file| is clobbered. Returns true on success.
// Note that |target_file| may still be mutated on failure.
-bool GenerateSpecificPEFileVersion(const FilePath& original_file,
- const FilePath& target_file,
+bool GenerateSpecificPEFileVersion(const base::FilePath& original_file,
+ const base::FilePath& target_file,
const Version& version);
} // namespace upgrade_test
diff --git a/chrome/installer/test/resource_loader.h b/chrome/installer/test/resource_loader.h
index 026e21c..b43056c 100644
--- a/chrome/installer/test/resource_loader.h
+++ b/chrome/installer/test/resource_loader.h
@@ -14,7 +14,9 @@
#include "base/basictypes.h"
+namespace base {
class FilePath;
+}
namespace upgrade_test {
@@ -25,7 +27,7 @@ class ResourceLoader {
~ResourceLoader();
// Loads |pe_image_path| in preparation for loading its resources.
- bool Initialize(const FilePath& pe_image_path);
+ bool Initialize(const base::FilePath& pe_image_path);
// Places the address and size of the resource |name| of |type| into
// |resource_data|, returning true on success. The address of the resource is
diff --git a/chrome/installer/test/resource_updater.h b/chrome/installer/test/resource_updater.h
index dbbca9f..6d6bb9f 100644
--- a/chrome/installer/test/resource_updater.h
+++ b/chrome/installer/test/resource_updater.h
@@ -14,7 +14,9 @@
#include "base/basictypes.h"
+namespace base {
class FilePath;
+}
namespace upgrade_test {
@@ -25,12 +27,12 @@ class ResourceUpdater {
~ResourceUpdater();
// Loads |pe_image_path| in preparation for updating its resources.
- bool Initialize(const FilePath& pe_image_path);
+ bool Initialize(const base::FilePath& pe_image_path);
// Replaces the contents of the resource |name| of |type| and |language_id|
// with the contents of |input_file|, returning true on success.
bool Update(const std::wstring& name, const std::wstring& type,
- WORD language_id, const FilePath& input_file);
+ WORD language_id, const base::FilePath& input_file);
// Commits all updates to the file on disk.
bool Commit();
diff --git a/chrome/installer/util/auto_launch_util.h b/chrome/installer/util/auto_launch_util.h
index 862ebd0..2f2b650 100644
--- a/chrome/installer/util/auto_launch_util.h
+++ b/chrome/installer/util/auto_launch_util.h
@@ -7,7 +7,9 @@
#include "base/string16.h"
+namespace base {
class FilePath;
+}
// A namespace containing the platform specific implementation of setting Chrome
// to launch at user login.
@@ -32,7 +34,7 @@ namespace auto_launch_util {
// (as it will default to the application path of the current executable).
bool AutoStartRequested(const string16& profile_directory,
bool window_requested,
- const FilePath& application_path);
+ const base::FilePath& application_path);
// Disables all auto-start features. |profile_directory| is the name of the
// directory (leaf, not the full path) that contains the profile that was set
@@ -47,7 +49,7 @@ void DisableAllAutoStartFeatures(const string16& profile_directory);
// auto-launch, ie. the installer. This is because |application_path|, if left
// blank, defaults to the application path of the current executable.
void EnableForegroundStartAtLogin(const string16& profile_directory,
- const FilePath& application_path);
+ const base::FilePath& application_path);
// Disables auto-starting Chrome in foreground mode at user login.
// |profile_directory| is the name of the directory (leaf, not the full path)
diff --git a/chrome/installer/util/duplicate_tree_detector.h b/chrome/installer/util/duplicate_tree_detector.h
index 1ae26f0..0528260 100644
--- a/chrome/installer/util/duplicate_tree_detector.h
+++ b/chrome/installer/util/duplicate_tree_detector.h
@@ -9,7 +9,9 @@
#ifndef CHROME_INSTALLER_UTIL_DUPLICATE_TREE_DETECTOR_H_
#define CHROME_INSTALLER_UTIL_DUPLICATE_TREE_DETECTOR_H_
+namespace base {
class FilePath;
+}
namespace installer {
@@ -19,8 +21,8 @@ namespace installer {
// Note that THIS IS A WEAK DEFINITION OF IDENTICAL and is intended only to
// catch cases of missing files or obvious modifications.
// It notably DOES NOT CHECKSUM the files.
-bool IsIdenticalFileHierarchy(const FilePath& src_path,
- const FilePath& dest_path);
+bool IsIdenticalFileHierarchy(const base::FilePath& src_path,
+ const base::FilePath& dest_path);
} // namespace installer
diff --git a/chrome/installer/util/google_chrome_distribution.h b/chrome/installer/util/google_chrome_distribution.h
index 0a315bd..32bacd0 100644
--- a/chrome/installer/util/google_chrome_distribution.h
+++ b/chrome/installer/util/google_chrome_distribution.h
@@ -13,10 +13,9 @@
#include "chrome/installer/util/browser_distribution.h"
#include "chrome/installer/util/util_constants.h"
-class FilePath;
-
namespace base {
class DictionaryValue;
+class FilePath;
}
class GoogleChromeDistribution : public BrowserDistribution {
@@ -32,7 +31,7 @@ class GoogleChromeDistribution : public BrowserDistribution {
// the user has opted in to providing anonymous usage data.
virtual void DoPostUninstallOperations(
const Version& version,
- const FilePath& local_data_path,
+ const base::FilePath& local_data_path,
const string16& distribution_data) OVERRIDE;
virtual string16 GetActiveSetupGuid() OVERRIDE;
@@ -92,7 +91,7 @@ class GoogleChromeDistribution : public BrowserDistribution {
int flavor) OVERRIDE;
virtual void LaunchUserExperiment(
- const FilePath& setup_path,
+ const base::FilePath& setup_path,
installer::InstallStatus status,
const Version& version,
const installer::Product& product,
@@ -105,7 +104,7 @@ class GoogleChromeDistribution : public BrowserDistribution {
int flavor,
const string16& experiment_group,
const installer::Product& installation,
- const FilePath& application_path) OVERRIDE;
+ const base::FilePath& application_path) OVERRIDE;
virtual bool ShouldSetExperimentLabels() OVERRIDE;
@@ -128,7 +127,7 @@ class GoogleChromeDistribution : public BrowserDistribution {
// Returns true if uninstall_metrics has been successfully populated with
// the uninstall metrics, false otherwise.
virtual bool ExtractUninstallMetricsFromFile(
- const FilePath& file_path, string16* uninstall_metrics);
+ const base::FilePath& file_path, string16* uninstall_metrics);
// Extracts uninstall metrics from the given JSON value.
virtual bool ExtractUninstallMetrics(const base::DictionaryValue& root,
diff --git a/chrome/installer/util/helper.h b/chrome/installer/util/helper.h
index e588be1..68d873c 100644
--- a/chrome/installer/util/helper.h
+++ b/chrome/installer/util/helper.h
@@ -11,7 +11,10 @@
#include <vector>
class BrowserDistribution;
+
+namespace base {
class FilePath;
+}
namespace installer {
@@ -20,7 +23,7 @@ namespace installer {
// system_install: if true, the function returns system wide location
// (ProgramFiles\Google). Otherwise it returns user specific
// location (Document And Settings\<user>\Local Settings...)
-FilePath GetChromeInstallPath(bool system_install, BrowserDistribution* dist);
+base::FilePath GetChromeInstallPath(bool system_install, BrowserDistribution* dist);
// Returns the path(s) to the directory that holds the user data (primary and,
// if applicable to |dist|, alternate). This is always inside a user's local
@@ -31,7 +34,7 @@ FilePath GetChromeInstallPath(bool system_install, BrowserDistribution* dist);
// otherwise. If more than one path is returned, they are guaranteed to be
// siblings.
void GetChromeUserDataPaths(BrowserDistribution* dist,
- std::vector<FilePath>* paths);
+ std::vector<base::FilePath>* paths);
// Returns the distribution corresponding to the current process's binaries.
// In the case of a multi-install product, this will be the CHROME_BINARIES
diff --git a/chrome/installer/util/installation_validator.h b/chrome/installer/util/installation_validator.h
index 6315a74..dfc7c3e 100644
--- a/chrome/installer/util/installation_validator.h
+++ b/chrome/installer/util/installation_validator.h
@@ -15,7 +15,10 @@
#include "chrome/installer/util/browser_distribution.h"
class CommandLine;
+
+namespace base {
class FilePath;
+}
namespace installer {
@@ -214,7 +217,7 @@ class InstallationValidator {
const ProductState& binaries_state,
bool* is_valid);
static void ValidateSetupPath(const ProductContext& ctx,
- const FilePath& setup_exe,
+ const base::FilePath& setup_exe,
const char* purpose,
bool* is_valid);
static void ValidateCommandExpectations(const ProductContext& ctx,
diff --git a/chrome/installer/util/installer_util_test_common.h b/chrome/installer/util/installer_util_test_common.h
index 8839f6d..0a40968 100644
--- a/chrome/installer/util/installer_util_test_common.h
+++ b/chrome/installer/util/installer_util_test_common.h
@@ -5,7 +5,9 @@
#ifndef CHROME_INSTALLER_UTIL_INSTALLER_UTIL_TEST_COMMON_H_
#define CHROME_INSTALLER_UTIL_INSTALLER_UTIL_TEST_COMMON_H_
+namespace base {
class FilePath;
+}
namespace installer {
@@ -13,7 +15,7 @@ namespace test {
// Copies the hierarcy in |from| to |to|.
// Keeps all file properties identical (creation time, etc.).
-bool CopyFileHierarchy(const FilePath& from, const FilePath& to);
+bool CopyFileHierarchy(const base::FilePath& from, const base::FilePath& to);
} // namespace test
diff --git a/chrome/installer/util/logging_installer.h b/chrome/installer/util/logging_installer.h
index c7ccb46..42153ba 100644
--- a/chrome/installer/util/logging_installer.h
+++ b/chrome/installer/util/logging_installer.h
@@ -7,14 +7,14 @@
#include "base/basictypes.h"
-namespace installer {
- class MasterPreferences;
-}
-
+namespace base {
class FilePath;
+}
namespace installer {
+class MasterPreferences;
+
// Verbose installer runs clock in at around 50K, non-verbose much less than
// that. Some installer operations span multiple setup.exe runs, so we try
// to keep enough for at least 10 runs or so at any given time.
@@ -41,7 +41,7 @@ enum TruncateResult {
// If the file needed truncation, but the truncation failed, the file will be
// deleted and the function returns LOGFILE_DELETED. This is done to prevent
// run-away log files and guard against full disks.
-TruncateResult TruncateLogFileIfNeeded(const FilePath& log_file);
+TruncateResult TruncateLogFileIfNeeded(const base::FilePath& log_file);
// Call to initialize logging for Chrome installer.
void InitInstallerLogging(const installer::MasterPreferences& prefs);
@@ -50,7 +50,7 @@ void InitInstallerLogging(const installer::MasterPreferences& prefs);
void EndInstallerLogging();
// Returns the full path of the log file.
-FilePath GetLogFilePath(const installer::MasterPreferences& prefs);
+base::FilePath GetLogFilePath(const installer::MasterPreferences& prefs);
} // namespace installer
diff --git a/chrome/installer/util/lzma_util.h b/chrome/installer/util/lzma_util.h
index 09a8643..634309c 100644
--- a/chrome/installer/util/lzma_util.h
+++ b/chrome/installer/util/lzma_util.h
@@ -12,7 +12,9 @@
#include "base/basictypes.h"
+namespace base {
class FilePath;
+}
// This is a utility class that acts as a wrapper around LZMA SDK library
class LzmaUtil {
@@ -40,7 +42,7 @@ class LzmaUtil {
void CloseArchive();
protected:
- bool CreateDirectory(const FilePath& dir);
+ bool CreateDirectory(const base::FilePath& dir);
private:
HANDLE archive_handle_;
diff --git a/chrome/installer/util/master_preferences.h b/chrome/installer/util/master_preferences.h
index 46dc7c9..773d603 100644
--- a/chrome/installer/util/master_preferences.h
+++ b/chrome/installer/util/master_preferences.h
@@ -15,10 +15,9 @@
#include "base/memory/scoped_ptr.h"
#include "googleurl/src/gurl.h"
-class FilePath;
-
namespace base {
class DictionaryValue;
+class FilePath;
}
namespace installer {
@@ -91,7 +90,7 @@ class MasterPreferences {
// Parses a specific preferences file and does not merge any command line
// switches with the distribution dictionary.
- explicit MasterPreferences(const FilePath& prefs_path);
+ explicit MasterPreferences(const base::FilePath& prefs_path);
// Parses a preferences directly from |prefs| and does not merge any command
// line switches with the distribution dictionary.
diff --git a/chrome/installer/util/master_preferences_dummy.cc b/chrome/installer/util/master_preferences_dummy.cc
index 75377f5..610d7d3 100644
--- a/chrome/installer/util/master_preferences_dummy.cc
+++ b/chrome/installer/util/master_preferences_dummy.cc
@@ -22,7 +22,7 @@ MasterPreferences::MasterPreferences(const CommandLine& cmd_line)
: distribution_(NULL), preferences_read_from_file_(false) {
}
-MasterPreferences::MasterPreferences(const FilePath& prefs_path)
+MasterPreferences::MasterPreferences(const base::FilePath& prefs_path)
: distribution_(NULL), preferences_read_from_file_(false) {
}
diff --git a/chrome/installer/util/work_item.h b/chrome/installer/util/work_item.h
index d7b3ae7..3011860 100644
--- a/chrome/installer/util/work_item.h
+++ b/chrome/installer/util/work_item.h
@@ -25,12 +25,15 @@ class CreateRegKeyWorkItem;
class DeleteTreeWorkItem;
class DeleteRegKeyWorkItem;
class DeleteRegValueWorkItem;
-class FilePath;
class MoveTreeWorkItem;
class SelfRegWorkItem;
class SetRegValueWorkItem;
class WorkItemList;
+namespace base {
+class FilePath;
+}
+
// A base class that defines APIs to perform/rollback an action or a
// sequence of actions during install/update/uninstall.
class WorkItem {
@@ -78,14 +81,14 @@ class WorkItem {
// * If overwrite_option is NEW_NAME_IF_IN_USE, file is copied with an
// alternate name specified by alternative_path.
static CopyTreeWorkItem* CreateCopyTreeWorkItem(
- const FilePath& source_path,
- const FilePath& dest_path,
- const FilePath& temp_dir,
+ const base::FilePath& source_path,
+ const base::FilePath& dest_path,
+ const base::FilePath& temp_dir,
CopyOverWriteOption overwrite_option,
- const FilePath& alternative_path);
+ const base::FilePath& alternative_path);
// Create a CreateDirWorkItem that creates a directory at the given path.
- static CreateDirWorkItem* CreateCreateDirWorkItem(const FilePath& path);
+ static CreateDirWorkItem* CreateCreateDirWorkItem(const base::FilePath& path);
// Create a CreateRegKeyWorkItem that creates a registry key at the given
// path.
@@ -107,16 +110,16 @@ class WorkItem {
// hierarchy at the given root path. A key file can be optionally specified
// by key_path.
static DeleteTreeWorkItem* CreateDeleteTreeWorkItem(
- const FilePath& root_path,
- const FilePath& temp_path,
- const std::vector<FilePath>& key_paths);
+ const base::FilePath& root_path,
+ const base::FilePath& temp_path,
+ const std::vector<base::FilePath>& key_paths);
// Create a MoveTreeWorkItem that recursively moves a file system hierarchy
// from source path to destination path.
static MoveTreeWorkItem* CreateMoveTreeWorkItem(
- const FilePath& source_path,
- const FilePath& dest_path,
- const FilePath& temp_dir,
+ const base::FilePath& source_path,
+ const base::FilePath& dest_path,
+ const base::FilePath& temp_dir,
MoveTreeOption duplicate_option);
// Create a SetRegValueWorkItem that sets a registry value with REG_SZ type
diff --git a/chrome/installer/util/work_item_list.h b/chrome/installer/util/work_item_list.h
index f350f39..29a4587 100644
--- a/chrome/installer/util/work_item_list.h
+++ b/chrome/installer/util/work_item_list.h
@@ -15,7 +15,9 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/installer/util/work_item.h"
+namespace base {
class FilePath;
+}
// A WorkItem subclass that recursively contains a list of WorkItems. Thus it
// provides functionalities to carry out or roll back the sequence of actions
@@ -58,7 +60,7 @@ class WorkItemList : public WorkItem {
const std::wstring& alternative_path = L"");
// Add a CreateDirWorkItem that creates a directory at the given path.
- virtual WorkItem* AddCreateDirWorkItem(const FilePath& path);
+ virtual WorkItem* AddCreateDirWorkItem(const base::FilePath& path);
// Add a CreateRegKeyWorkItem that creates a registry key at the given
// path.
@@ -80,13 +82,13 @@ class WorkItemList : public WorkItem {
// hierarchy at the given root path. A key file can be optionally specified
// by key_path.
virtual WorkItem* AddDeleteTreeWorkItem(
- const FilePath& root_path,
- const FilePath& temp_path,
- const std::vector<FilePath>& key_paths);
+ const base::FilePath& root_path,
+ const base::FilePath& temp_path,
+ const std::vector<base::FilePath>& key_paths);
// Same as above but without support for key files.
- virtual WorkItem* AddDeleteTreeWorkItem(const FilePath& root_path,
- const FilePath& temp_path);
+ virtual WorkItem* AddDeleteTreeWorkItem(const base::FilePath& root_path,
+ const base::FilePath& temp_path);
// Add a MoveTreeWorkItem to the list of work items.
virtual WorkItem* AddMoveTreeWorkItem(const std::wstring& source_path,
diff --git a/chrome/renderer/chrome_content_renderer_client.h b/chrome/renderer/chrome_content_renderer_client.h
index 1c805af..ba9f3dc 100644
--- a/chrome/renderer/chrome_content_renderer_client.h
+++ b/chrome/renderer/chrome_content_renderer_client.h
@@ -66,7 +66,7 @@ class ChromeContentRendererClient : public content::ContentRendererClient {
WebKit::WebPlugin** plugin) OVERRIDE;
virtual WebKit::WebPlugin* CreatePluginReplacement(
content::RenderView* render_view,
- const FilePath& plugin_path) OVERRIDE;
+ const base::FilePath& plugin_path) OVERRIDE;
virtual bool HasErrorPage(int http_status_code,
std::string* error_domain) OVERRIDE;
virtual void GetNavigationErrorStrings(
diff --git a/chrome/renderer/mock_printer.h b/chrome/renderer/mock_printer.h
index 625c140..5f49475 100644
--- a/chrome/renderer/mock_printer.h
+++ b/chrome/renderer/mock_printer.h
@@ -99,8 +99,8 @@ class MockPrinter {
bool GetBitmapChecksum(unsigned int page, std::string* checksum) const;
bool GetSource(unsigned int page, const void** data, uint32* size) const;
bool GetBitmap(unsigned int page, const void** data, uint32* size) const;
- bool SaveSource(unsigned int page, const FilePath& filepath) const;
- bool SaveBitmap(unsigned int page, const FilePath& filepath) const;
+ bool SaveSource(unsigned int page, const base::FilePath& filepath) const;
+ bool SaveBitmap(unsigned int page, const base::FilePath& filepath) const;
protected:
int CreateDocumentCookie();
diff --git a/chrome/service/cloud_print/print_system.h b/chrome/service/cloud_print/print_system.h
index 5e73640..cf62466 100644
--- a/chrome/service/cloud_print/print_system.h
+++ b/chrome/service/cloud_print/print_system.h
@@ -11,13 +11,11 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
-
#include "printing/backend/print_backend.h"
-class FilePath;
-
namespace base {
class DictionaryValue;
+class FilePath;
}
namespace printing {
@@ -131,7 +129,7 @@ class PrintSystem : public base::RefCountedThreadSafe<PrintSystem> {
// time. Subsequent calls to Spool (before the Delegate::OnJobSpoolSucceeded
// or Delegate::OnJobSpoolFailed methods are called) can fail.
virtual bool Spool(const std::string& print_ticket,
- const FilePath& print_data_file_path,
+ const base::FilePath& print_data_file_path,
const std::string& print_data_mime_type,
const std::string& printer_name,
const std::string& job_title,
diff --git a/chrome/test/automation/automation_json_requests.h b/chrome/test/automation/automation_json_requests.h
index 860fa61..6f1fb45 100644
--- a/chrome/test/automation/automation_json_requests.h
+++ b/chrome/test/automation/automation_json_requests.h
@@ -16,10 +16,10 @@
#include "ui/base/keycodes/keyboard_codes.h"
class AutomationMessageSender;
-class FilePath;
namespace base {
class DictionaryValue;
+class FilePath;
class ListValue;
class Value;
}
@@ -244,7 +244,7 @@ bool SendReloadJSONRequest(
bool SendCaptureEntirePageJSONRequest(
AutomationMessageSender* sender,
const WebViewLocator& locator,
- const FilePath& path,
+ const base::FilePath& path,
automation::Error* error) WARN_UNUSED_RESULT;
#if !defined(NO_TCMALLOC) && (defined(OS_LINUX) || defined(OS_CHROMEOS))
@@ -410,7 +410,7 @@ bool SendDragAndDropFilePathsJSONRequest(
const WebViewLocator& locator,
int x,
int y,
- const std::vector<FilePath::StringType>& paths,
+ const std::vector<base::FilePath::StringType>& paths,
automation::Error* error) WARN_UNUSED_RESULT;
// Requests to set the given view's bounds. Returns true on success.
@@ -466,7 +466,7 @@ bool SendGetChromeDriverAutomationVersion(
// the extension will be installed silently. Returns true on success.
bool SendInstallExtensionJSONRequest(
AutomationMessageSender* sender,
- const FilePath& path,
+ const base::FilePath& path,
bool with_ui,
std::string* extension_id,
automation::Error* error) WARN_UNUSED_RESULT;
diff --git a/chrome/test/automation/tab_proxy.h b/chrome/test/automation/tab_proxy.h
index 2c417e9..22942dc 100644
--- a/chrome/test/automation/tab_proxy.h
+++ b/chrome/test/automation/tab_proxy.h
@@ -27,13 +27,14 @@
#include "ui/base/window_open_disposition.h"
class BrowserProxy;
-class FilePath;
class GURL;
+
namespace IPC {
class Message;
}
namespace base {
+class FilePath;
class Value;
}
@@ -203,7 +204,7 @@ class TabProxy : public AutomationResourceProxy {
// Captures the entire page and saves as a PNG at the given path. Returns
// true on success.
- bool CaptureEntirePageAsPNG(const FilePath& path) WARN_UNUSED_RESULT;
+ bool CaptureEntirePageAsPNG(const base::FilePath& path) WARN_UNUSED_RESULT;
#if defined(OS_WIN)
// Resizes the tab window.
diff --git a/chrome/test/base/ui_test_utils.h b/chrome/test/base/ui_test_utils.h
index 603419c..fd5cc18 100644
--- a/chrome/test/base/ui_test_utils.h
+++ b/chrome/test/base/ui_test_utils.h
@@ -29,12 +29,15 @@
class AppModalDialog;
class BookmarkModel;
class Browser;
-class FilePath;
class LocationBar;
class Profile;
class SkBitmap;
class TemplateURLService;
+namespace base {
+class FilePath;
+}
+
namespace chrome {
struct NavigateParams;
}
@@ -107,17 +110,18 @@ void NavigateToURLBlockUntilNavigationsComplete(Browser* browser,
// Generate the file path for testing a particular test.
// The file for the tests is all located in
// test_root_directory/dir/<file>
-// The returned path is FilePath format.
-FilePath GetTestFilePath(const FilePath& dir, const FilePath& file);
+// The returned path is base::FilePath format.
+base::FilePath GetTestFilePath(const base::FilePath& dir,
+ const base::FilePath& file);
// Generate the URL for testing a particular test.
// HTML for the tests is all located in
// test_root_directory/dir/<file>
// The returned path is GURL format.
-GURL GetTestUrl(const FilePath& dir, const FilePath& file);
+GURL GetTestUrl(const base::FilePath& dir, const base::FilePath& file);
// Generate the path of the build directory, relative to the source root.
-bool GetRelativeBuildDirectory(FilePath* build_dir);
+bool GetRelativeBuildDirectory(base::FilePath* build_dir);
// Blocks until an application modal dialog is showns and returns it.
AppModalDialog* WaitForAppModalDialog();
@@ -275,12 +279,12 @@ bool TakeEntirePageSnapshot(content::RenderViewHost* rvh,
// Saves a snapshot of the entire screen to a file named
// ChromiumSnapshotYYYYMMDDHHMMSS.png to |directory|, returning true on success.
// The path to the file produced is returned in |screenshot_path| if non-NULL.
-bool SaveScreenSnapshotToDirectory(const FilePath& directory,
- FilePath* screenshot_path);
+bool SaveScreenSnapshotToDirectory(const base::FilePath& directory,
+ base::FilePath* screenshot_path);
// Saves a snapshot of the entire screen as above to the current user's desktop.
// The Chrome path provider must be registered prior to calling this function.
-bool SaveScreenSnapshotToDesktop(FilePath* screenshot_path);
+bool SaveScreenSnapshotToDesktop(base::FilePath* screenshot_path);
#endif
// Configures the geolocation provider to always return the given position.
diff --git a/chrome/test/chromedriver/chrome_finder.h b/chrome/test/chromedriver/chrome_finder.h
index e9df71e..0e7ca90 100644
--- a/chrome/test/chromedriver/chrome_finder.h
+++ b/chrome/test/chromedriver/chrome_finder.h
@@ -9,18 +9,20 @@
#include "base/callback_forward.h"
+namespace base {
class FilePath;
+}
// Gets the path to the default Chrome executable. Returns true on success.
-bool FindChrome(FilePath* browser_exe);
+bool FindChrome(base::FilePath* browser_exe);
namespace internal {
bool FindExe(
- const base::Callback<bool(const FilePath&)>& exists_func,
- const std::vector<FilePath>& rel_paths,
- const std::vector<FilePath>& locations,
- FilePath* out_path);
+ const base::Callback<bool(const base::FilePath&)>& exists_func,
+ const std::vector<base::FilePath>& rel_paths,
+ const std::vector<base::FilePath>& locations,
+ base::FilePath* out_path);
} // namespace internal
diff --git a/chrome/test/chromedriver/chrome_launcher.h b/chrome/test/chromedriver/chrome_launcher.h
index a0caa1a..3763d2c 100644
--- a/chrome/test/chromedriver/chrome_launcher.h
+++ b/chrome/test/chromedriver/chrome_launcher.h
@@ -8,9 +8,12 @@
#include "base/memory/scoped_ptr.h"
class Chrome;
-class FilePath;
class Status;
+namespace base {
+class FilePath;
+}
+
// Launches Chrome. Must be thread safe.
class ChromeLauncher {
public:
@@ -18,7 +21,7 @@ class ChromeLauncher {
// Launches Chrome found at the given path. If the path
// is empty, the default Chrome binary is to be used.
- virtual Status Launch(const FilePath& chrome_exe,
+ virtual Status Launch(const base::FilePath& chrome_exe,
scoped_ptr<Chrome>* chrome) = 0;
};
diff --git a/chrome/test/chromedriver/chrome_launcher_impl.h b/chrome/test/chromedriver/chrome_launcher_impl.h
index 1910ac5..f8a4cf6 100644
--- a/chrome/test/chromedriver/chrome_launcher_impl.h
+++ b/chrome/test/chromedriver/chrome_launcher_impl.h
@@ -13,10 +13,13 @@
#include "chrome/test/chromedriver/net/sync_websocket_factory.h"
class Chrome;
-class FilePath;
class Status;
class URLRequestContextGetter;
+namespace base {
+class FilePath;
+}
+
class ChromeLauncherImpl : public ChromeLauncher {
public:
explicit ChromeLauncherImpl(URLRequestContextGetter* context_getter,
@@ -24,7 +27,7 @@ class ChromeLauncherImpl : public ChromeLauncher {
virtual ~ChromeLauncherImpl();
// Overridden from ChromeLauncher:
- virtual Status Launch(const FilePath& chrome_exe,
+ virtual Status Launch(const base::FilePath& chrome_exe,
scoped_ptr<Chrome>* chrome) OVERRIDE;
private:
diff --git a/chrome/test/logging/win/file_logger.h b/chrome/test/logging/win/file_logger.h
index d09b682..5a6caa6 100644
--- a/chrome/test/logging/win/file_logger.h
+++ b/chrome/test/logging/win/file_logger.h
@@ -11,7 +11,9 @@
#include "base/string16.h"
#include "base/win/event_trace_controller.h"
+namespace base {
class FilePath;
+}
namespace logging_win {
@@ -59,7 +61,7 @@ class FileLogger {
// extension for such files is .etl. Returns false if the session could not
// be started (e.g., if not running as admin) or if no providers could be
// enabled.
- bool StartLogging(const FilePath& log_file);
+ bool StartLogging(const base::FilePath& log_file);
// Stops capturing logs.
void StopLogging();
diff --git a/chrome/test/logging/win/log_file_printer.cc b/chrome/test/logging/win/log_file_printer.cc
index 1d5dfd2..162c1e3 100644
--- a/chrome/test/logging/win/log_file_printer.cc
+++ b/chrome/test/logging/win/log_file_printer.cc
@@ -242,7 +242,7 @@ void EventPrinter::OnTraceEvent(const EVENT_TRACE* event,
} // namespace
-void logging_win::PrintLogFile(const FilePath& log_file,
+void logging_win::PrintLogFile(const base::FilePath& log_file,
std::ostream* out) {
EventPrinter printer(out);
logging_win::ReadLogFile(log_file, &printer);
diff --git a/chrome/test/logging/win/log_file_printer.h b/chrome/test/logging/win/log_file_printer.h
index 85a54e9..d9953f1 100644
--- a/chrome/test/logging/win/log_file_printer.h
+++ b/chrome/test/logging/win/log_file_printer.h
@@ -11,14 +11,16 @@
#include <iosfwd>
+namespace base {
class FilePath;
+}
namespace logging_win {
// Reads |log_file|, emitting messages to |out|. Although it is safe to call
// this from multiple threads, only one file may be read at a time; other
// threads trying to read other log files will be blocked waiting.
-void PrintLogFile(const FilePath& log_file, std::ostream* out);
+void PrintLogFile(const base::FilePath& log_file, std::ostream* out);
} // namespace logging_win
diff --git a/chrome/test/logging/win/log_file_reader.h b/chrome/test/logging/win/log_file_reader.h
index 762a840..aca4b0a 100644
--- a/chrome/test/logging/win/log_file_reader.h
+++ b/chrome/test/logging/win/log_file_reader.h
@@ -17,7 +17,9 @@
#include "base/logging.h"
#include "base/string_piece.h"
+namespace base {
class FilePath;
+}
namespace logging_win {
@@ -69,7 +71,7 @@ class LogFileDelegate {
// parsed. Although it is safe to call this from multiple threads, only one
// file may be read at a time; other threads trying to read other log files will
// be blocked waiting.
-void ReadLogFile(const FilePath& log_file, LogFileDelegate* delegate);
+void ReadLogFile(const base::FilePath& log_file, LogFileDelegate* delegate);
} // namespace logging_win
diff --git a/chrome/test/ui/ui_test.h b/chrome/test/ui/ui_test.h
index 98c75fe..ade8dfb 100644
--- a/chrome/test/ui/ui_test.h
+++ b/chrome/test/ui/ui_test.h
@@ -30,12 +30,12 @@
class AutomationProxy;
class BrowserProxy;
-class FilePath;
class GURL;
class TabProxy;
namespace base {
class DictionaryValue;
+class FilePath;
}
// Base class for UI Tests. This implements the core of the functions.
@@ -146,15 +146,15 @@ class UITestBase {
bool CloseBrowser(BrowserProxy* browser, bool* application_closed) const;
// Gets the executable file path of the Chrome browser process.
- const FilePath::CharType* GetExecutablePath();
+ const base::FilePath::CharType* GetExecutablePath();
// Returns the directory name where the "typical" user data is that we use
// for testing.
- static FilePath ComputeTypicalUserDataSource(ProfileType profile_type);
+ static base::FilePath ComputeTypicalUserDataSource(ProfileType profile_type);
// Return the user data directory being used by the browser instance in
// UITest::SetUp().
- FilePath user_data_dir() const {
+ base::FilePath user_data_dir() const {
return launcher_->user_data_dir();
}
@@ -163,8 +163,8 @@ class UITestBase {
// copied into the user data directory for the test and the files will be
// evicted from the OS cache. To start with a blank profile, supply an empty
// string (the default).
- const FilePath& template_user_data() const { return template_user_data_; }
- void set_template_user_data(const FilePath& template_user_data) {
+ const base::FilePath& template_user_data() const { return template_user_data_; }
+ void set_template_user_data(const base::FilePath& template_user_data) {
template_user_data_ = template_user_data;
}
@@ -226,7 +226,7 @@ class UITestBase {
std::string CheckErrorsAndCrashes() const;
// Use Chromium binaries from the given directory.
- void SetBrowserDirectory(const FilePath& dir);
+ void SetBrowserDirectory(const base::FilePath& dir);
// Appends a command-line switch (no associated value) to be passed to the
// browser when launched.
@@ -283,10 +283,10 @@ class UITestBase {
// ********* Member variables *********
// Path to the browser executable.
- FilePath browser_directory_;
+ base::FilePath browser_directory_;
// Path to the unit test data.
- FilePath test_data_directory_;
+ base::FilePath test_data_directory_;
// Command to launch the browser
CommandLine launch_arguments_;
@@ -310,7 +310,7 @@ class UITestBase {
bool dom_automation_enabled_;
// See set_template_user_data().
- FilePath template_user_data_;
+ base::FilePath template_user_data_;
// Determines if the window is shown or hidden. Defaults to hidden.
bool show_window_;
@@ -332,7 +332,7 @@ class UITestBase {
ProfileType profile_type_;
// PID file for websocket server.
- FilePath websocket_pid_file_;
+ base::FilePath websocket_pid_file_;
private:
// Time the test was started (so we can check for new crash dumps)
@@ -377,7 +377,7 @@ class UITest : public UITestBase, public PlatformTest {
// Apparently needed for Windows buildbots (to workaround an error when
// file is in use).
// TODO(phajdan.jr): Move to test_file_util if we need it in more places.
- bool EvictFileFromSystemCacheWrapper(const FilePath& path);
+ bool EvictFileFromSystemCacheWrapper(const base::FilePath& path);
// Polls the tab for a JavaScript condition and returns once one of the
// following conditions hold true:
diff --git a/chrome/test/webdriver/webdriver_session.h b/chrome/test/webdriver/webdriver_session.h
index 23395af..9f02c4a 100644
--- a/chrome/test/webdriver/webdriver_session.h
+++ b/chrome/test/webdriver/webdriver_session.h
@@ -24,10 +24,9 @@
#include "chrome/test/webdriver/webdriver_element_id.h"
#include "chrome/test/webdriver/webdriver_logging.h"
-class FilePath;
-
namespace base {
class DictionaryValue;
+class FilePath;
class ListValue;
class Value;
class WaitableEvent;
@@ -120,8 +119,9 @@ class Session {
Error* SendKeys(const string16& keys);
// Sets the file paths to the file upload control under the given location.
- Error* DragAndDropFilePaths(const Point& location,
- const std::vector<FilePath::StringType>& paths);
+ Error* DragAndDropFilePaths(
+ const Point& location,
+ const std::vector<base::FilePath::StringType>& paths);
// Clicks the mouse at the given location using the given button.
Error* MouseMoveAndClick(const Point& location,
@@ -315,7 +315,7 @@ class Session {
Error* WaitForAllViewsToStopLoading();
// Install extension at |path|.
- Error* InstallExtension(const FilePath& path, std::string* extension_id);
+ Error* InstallExtension(const base::FilePath& path, std::string* extension_id);
Error* GetExtensionsInfo(base::ListValue* extension_ids);
@@ -393,7 +393,7 @@ class Session {
const Logger& logger() const;
- const FilePath& temp_dir() const;
+ const base::FilePath& temp_dir() const;
const Capabilities& capabilities() const;
diff --git a/chrome/test/webdriver/webdriver_util.h b/chrome/test/webdriver/webdriver_util.h
index af01ee95..937af22 100644
--- a/chrome/test/webdriver/webdriver_util.h
+++ b/chrome/test/webdriver/webdriver_util.h
@@ -15,9 +15,12 @@
#include "chrome/test/webdriver/webdriver_error.h"
class AutomationId;
-class FilePath;
class WebViewId;
+namespace base {
+class FilePath;
+}
+
namespace webdriver {
// Generates a random, 32-character hexidecimal ID.
@@ -30,7 +33,7 @@ bool Base64Decode(const std::string& base64, std::string* bytes);
// Unzip the given zip archive, after base64 decoding, into the given directory.
// Returns true on success.
-bool Base64DecodeAndUnzip(const FilePath& unzip_dir,
+bool Base64DecodeAndUnzip(const base::FilePath& unzip_dir,
const std::string& base64,
std::string* error_msg);
@@ -40,9 +43,9 @@ bool Base64DecodeAndUnzip(const FilePath& unzip_dir,
// |file| to the unzipped file.
// TODO(kkania): Remove the ability to parse single zip file entries when
// the current versions of all WebDriver clients send actual zip files.
-bool UnzipSoleFile(const FilePath& unzip_dir,
+bool UnzipSoleFile(const base::FilePath& unzip_dir,
const std::string& bytes,
- FilePath* file,
+ base::FilePath* file,
std::string* error_msg);
// Returns the equivalent JSON string for the given value.
@@ -72,7 +75,7 @@ Error* FlattenStringArray(const ListValue* src, string16* dest);
#if defined(OS_MACOSX)
// Gets the paths to the user and local application directory.
-void GetApplicationDirs(std::vector<FilePath>* app_dirs);
+void GetApplicationDirs(std::vector<base::FilePath>* app_dirs);
#endif
// Parses a given value.
diff --git a/chrome/tools/convert_dict/aff_reader.h b/chrome/tools/convert_dict/aff_reader.h
index e353d67..6a1aae8 100644
--- a/chrome/tools/convert_dict/aff_reader.h
+++ b/chrome/tools/convert_dict/aff_reader.h
@@ -10,13 +10,15 @@
#include <string>
#include <vector>
+namespace base {
class FilePath;
+}
namespace convert_dict {
class AffReader {
public:
- explicit AffReader(const FilePath& path);
+ explicit AffReader(const base::FilePath& path);
~AffReader();
bool Read();
diff --git a/chrome/tools/convert_dict/dic_reader.h b/chrome/tools/convert_dict/dic_reader.h
index 05410ba..74ceafd 100644
--- a/chrome/tools/convert_dict/dic_reader.h
+++ b/chrome/tools/convert_dict/dic_reader.h
@@ -10,7 +10,9 @@
#include <string>
#include <vector>
+namespace base {
class FilePath;
+}
namespace convert_dict {
@@ -25,7 +27,7 @@ class DicReader {
typedef std::pair<std::string, std::vector<int> > WordEntry;
typedef std::vector<WordEntry> WordList;
- explicit DicReader(const FilePath& path);
+ explicit DicReader(const base::FilePath& path);
~DicReader();
// Non-numeric affixes will be added to the given AffReader and converted into
diff --git a/chrome/utility/chrome_content_utility_client.h b/chrome/utility/chrome_content_utility_client.h
index 5ef6c704..b28b86e 100644
--- a/chrome/utility/chrome_content_utility_client.h
+++ b/chrome/utility/chrome_content_utility_client.h
@@ -11,11 +11,11 @@
#include "content/public/utility/content_utility_client.h"
#include "printing/pdf_render_settings.h"
-class FilePath;
class Importer;
namespace base {
class DictionaryValue;
+class FilePath;
class Thread;
struct FileDescriptor;
}
@@ -48,7 +48,7 @@ class ChromeContentUtilityClient : public content::ContentUtilityClient {
virtual bool Send(IPC::Message* message);
// IPC message handlers.
- void OnUnpackExtension(const FilePath& extension_path,
+ void OnUnpackExtension(const base::FilePath& extension_path,
const std::string& extension_id,
int location, int creation_flags);
void OnUnpackWebResource(const std::string& resource_data);
@@ -57,7 +57,7 @@ class ChromeContentUtilityClient : public content::ContentUtilityClient {
void OnDecodeImageBase64(const std::string& encoded_data);
void OnRenderPDFPagesToMetafile(
base::PlatformFile pdf_file,
- const FilePath& metafile_path,
+ const base::FilePath& metafile_path,
const printing::PdfRenderSettings& pdf_render_settings,
const std::vector<printing::PageRange>& page_ranges);
void OnRobustJPEGDecodeImage(
@@ -65,8 +65,8 @@ class ChromeContentUtilityClient : public content::ContentUtilityClient {
void OnParseJSON(const std::string& json);
#if defined(OS_CHROMEOS)
- void OnCreateZipFile(const FilePath& src_dir,
- const std::vector<FilePath>& src_relative_paths,
+ void OnCreateZipFile(const base::FilePath& src_dir,
+ const std::vector<base::FilePath>& src_relative_paths,
const base::FileDescriptor& dest_fd);
#endif // defined(OS_CHROMEOS)
@@ -75,7 +75,7 @@ class ChromeContentUtilityClient : public content::ContentUtilityClient {
// |highest_rendered_page_number| is set to -1 on failure to render any page.
bool RenderPDFToWinMetafile(
base::PlatformFile pdf_file,
- const FilePath& metafile_path,
+ const base::FilePath& metafile_path,
const gfx::Rect& render_area,
int render_dpi,
bool autorotate,
diff --git a/chrome_frame/chrome_launcher_utils.h b/chrome_frame/chrome_launcher_utils.h
index a4b79e9..d13f4b0 100644
--- a/chrome_frame/chrome_launcher_utils.h
+++ b/chrome_frame/chrome_launcher_utils.h
@@ -9,7 +9,10 @@
#include "base/memory/scoped_ptr.h"
class CommandLine;
+
+namespace base {
class FilePath;
+}
namespace chrome_launcher {
@@ -35,7 +38,7 @@ bool CreateUpdateCommandLine(const std::wstring& update_command,
scoped_ptr<CommandLine>* command_line);
// Returns the full path to the Chrome executable.
-FilePath GetChromeExecutablePath();
+base::FilePath GetChromeExecutablePath();
} // namespace chrome_launcher
diff --git a/chrome_frame/test/chrome_frame_test_utils.h b/chrome_frame/test/chrome_frame_test_utils.h
index f53eefd..59b00ef 100644
--- a/chrome_frame/test/chrome_frame_test_utils.h
+++ b/chrome_frame/test/chrome_frame_test_utils.h
@@ -37,16 +37,19 @@
#define GMOCK_MUTANT_INCLUDE_LATE_OBJECT_BINDING
#include "testing/gmock_mutant.h"
-class FilePath;
interface IWebBrowser2;
+namespace base {
+class FilePath;
+}
+
namespace chrome_frame_test {
int CloseVisibleWindowsOnAllThreads(HANDLE process);
base::ProcessHandle LaunchIE(const std::wstring& url);
base::ProcessHandle LaunchChrome(const std::wstring& url,
- const FilePath& user_data_dir);
+ const base::FilePath& user_data_dir);
// Attempts to close all open IE windows.
// The return value is the number of windows closed.
@@ -243,7 +246,7 @@ class TimedMsgLoop {
private:
static void SnapshotAndQuit() {
- FilePath snapshot;
+ base::FilePath snapshot;
if (ui_test_utils::SaveScreenSnapshotToDesktop(&snapshot)) {
testing::UnitTest* unit_test = testing::UnitTest::GetInstance();
const testing::TestInfo* test_info = unit_test->current_test_info();
@@ -286,7 +289,7 @@ HRESULT LaunchIEAsComServer(IWebBrowser2** web_browser);
std::wstring GetExecutableAppPath(const std::wstring& file);
// Returns the profile path to be used for IE. This varies as per version.
-FilePath GetProfilePathForIE();
+base::FilePath GetProfilePathForIE();
// Returns the version of the exe passed in.
std::wstring GetExeVersion(const std::wstring& exe_path);
@@ -295,10 +298,10 @@ std::wstring GetExeVersion(const std::wstring& exe_path);
IEVersion GetInstalledIEVersion();
// Returns the folder for CF test data.
-FilePath GetTestDataFolder();
+base::FilePath GetTestDataFolder();
// Returns the folder for Selenium core.
-FilePath GetSeleniumTestFolder();
+base::FilePath GetSeleniumTestFolder();
// Returns the path portion of the url.
std::wstring GetPathFromUrl(const std::wstring& url);
diff --git a/chrome_frame/test_utils.h b/chrome_frame/test_utils.h
index f07bfbe..6366ad9 100644
--- a/chrome_frame/test_utils.h
+++ b/chrome_frame/test_utils.h
@@ -12,7 +12,9 @@
#include "base/string16.h"
+namespace base {
class FilePath;
+}
extern const wchar_t kChromeFrameDllName[];
extern const wchar_t kChromeLauncherExeName[];
@@ -50,7 +52,7 @@ class ScopedChromeFrameRegistrar {
static void UnregisterAtPath(const std::wstring& path,
RegistrationType registration_type);
static void RegisterDefaults();
- static FilePath GetReferenceChromeFrameDllPath();
+ static base::FilePath GetReferenceChromeFrameDllPath();
// Registers or unregisters a COM DLL and exits the process if the process's
// command line is:
@@ -89,7 +91,7 @@ class ScopedChromeFrameRegistrar {
// Returns the path to the Chrome Frame DLL in the build directory. Assumes
// that the test executable is running from the build folder or a similar
// folder structure.
-FilePath GetChromeFrameBuildPath();
+base::FilePath GetChromeFrameBuildPath();
// Callback description for onload, onloaderror, onmessage
static _ATL_FUNC_INFO g_single_param = {CC_STDCALL, VT_EMPTY, 1, {VT_VARIANT}};
diff --git a/chrome_frame/utils.h b/chrome_frame/utils.h
index 2204571..29084db 100644
--- a/chrome_frame/utils.h
+++ b/chrome_frame/utils.h
@@ -20,12 +20,15 @@
#include "googleurl/src/gurl.h"
#include "ui/gfx/rect.h"
-class FilePath;
class RegistryListPreferencesHolder;
interface IBrowserService;
interface IWebBrowser2;
struct ContextMenuModel;
+namespace base {
+class FilePath;
+}
+
// utils.h : Various utility functions and classes
extern const char kGCFProtocol[];
@@ -207,7 +210,7 @@ IEVersion GetIEVersion();
// hosted. Returns 0 if the current process is not IE or any other error occurs.
uint32 GetIEMajorVersion();
-FilePath GetIETemporaryFilesFolder();
+base::FilePath GetIETemporaryFilesFolder();
// Retrieves the file version from a module handle without extra round trips
// to the disk (as happens with the regular GetFileVersionInfo API).
@@ -601,6 +604,6 @@ bool IncreaseWinInetConnections(DWORD connections);
// Sets |profile_path| to the path for the Chrome Frame |profile_name|
// profile.
void GetChromeFrameProfilePath(const string16& profile_name,
- FilePath* profile_path);
+ base::FilePath* profile_path);
#endif // CHROME_FRAME_UTILS_H_
diff --git a/chromeos/chromeos_test_utils.cc b/chromeos/chromeos_test_utils.cc
index 3455644..90ee92a 100644
--- a/chromeos/chromeos_test_utils.cc
+++ b/chromeos/chromeos_test_utils.cc
@@ -13,8 +13,8 @@ namespace test_utils {
bool GetTestDataPath(const std::string& component,
const std::string& filename,
- FilePath* data_dir) {
- FilePath path;
+ base::FilePath* data_dir) {
+ base::FilePath path;
if (!PathService::Get(base::DIR_SOURCE_ROOT, &path))
return false;
path = path.Append(FILE_PATH_LITERAL("chromeos"));
diff --git a/chromeos/chromeos_test_utils.h b/chromeos/chromeos_test_utils.h
index b424580..db0bc66 100644
--- a/chromeos/chromeos_test_utils.h
+++ b/chromeos/chromeos_test_utils.h
@@ -7,7 +7,9 @@
#include <string>
+namespace base {
class FilePath;
+}
namespace chromeos {
namespace test_utils {
@@ -15,7 +17,7 @@ namespace test_utils {
// Returns the path to the given test data file for this library.
bool GetTestDataPath(const std::string& component,
const std::string& filename,
- FilePath* data_dir);
+ base::FilePath* data_dir);
} // namespace test_utils
} // namespace chromeos
diff --git a/cloud_print/service/service_state.h b/cloud_print/service/service_state.h
index ef037bb..2c051f6 100644
--- a/cloud_print/service/service_state.h
+++ b/cloud_print/service/service_state.h
@@ -7,12 +7,9 @@
#include <string>
-#include "base/file_path.h"
#include "base/memory/scoped_ptr.h"
#include "base/values.h"
-class FilePath;
-
// Manages Cloud Print part of Service State.
class ServiceState {
public:
diff --git a/cloud_print/virtual_driver/win/virtual_driver_helpers.h b/cloud_print/virtual_driver/win/virtual_driver_helpers.h
index db59479f..5380a36 100644
--- a/cloud_print/virtual_driver/win/virtual_driver_helpers.h
+++ b/cloud_print/virtual_driver/win/virtual_driver_helpers.h
@@ -6,9 +6,12 @@
#define CLOUD_PRINT_VIRTUAL_DRIVER_WIN_VIRTUAL_DRIVER_HELPERS_H_
#include <windows.h>
+
#include "base/string16.h"
+namespace base {
class FilePath;
+}
namespace cloud_print {
@@ -27,7 +30,7 @@ HRESULT GetLastHResult();
string16 GetPortMonitorDllName();
// Gets the standard install path for "version 3" print drivers.
-HRESULT GetPrinterDriverDir(FilePath* path);
+HRESULT GetPrinterDriverDir(base::FilePath* path);
// Retrieves a string from the string table of the module that contains the
// calling code.
diff --git a/content/browser/appcache/chrome_appcache_service.h b/content/browser/appcache/chrome_appcache_service.h
index 24a509c..e11f3f9 100644
--- a/content/browser/appcache/chrome_appcache_service.h
+++ b/content/browser/appcache/chrome_appcache_service.h
@@ -13,7 +13,9 @@
#include "webkit/appcache/appcache_service.h"
#include "webkit/quota/special_storage_policy.h"
+namespace base {
class FilePath;
+}
namespace net {
class URLRequestContextGetter;
@@ -44,7 +46,7 @@ class CONTENT_EXPORT ChromeAppCacheService
explicit ChromeAppCacheService(quota::QuotaManagerProxy* proxy);
void InitializeOnIOThread(
- const FilePath& cache_path, // may be empty to use in-memory structures
+ const base::FilePath& cache_path, // May be empty to use in-memory structs.
ResourceContext* resource_context,
net::URLRequestContextGetter* request_context_getter,
scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy);
@@ -67,7 +69,7 @@ class CONTENT_EXPORT ChromeAppCacheService
void DeleteOnCorrectThread() const;
ResourceContext* resource_context_;
- FilePath cache_path_;
+ base::FilePath cache_path_;
DISALLOW_COPY_AND_ASSIGN(ChromeAppCacheService);
};
diff --git a/content/browser/child_process_security_policy_impl.h b/content/browser/child_process_security_policy_impl.h
index a2136b7..6525968 100644
--- a/content/browser/child_process_security_policy_impl.h
+++ b/content/browser/child_process_security_policy_impl.h
@@ -17,9 +17,12 @@
#include "content/public/browser/child_process_security_policy.h"
#include "webkit/glue/resource_type.h"
-class FilePath;
class GURL;
+namespace base {
+class FilePath;
+}
+
namespace content {
class CONTENT_EXPORT ChildProcessSecurityPolicyImpl
@@ -37,9 +40,9 @@ class CONTENT_EXPORT ChildProcessSecurityPolicyImpl
virtual void RegisterDisabledSchemes(const std::set<std::string>& schemes)
OVERRIDE;
virtual void GrantPermissionsForFile(int child_id,
- const FilePath& file,
+ const base::FilePath& file,
int permissions) OVERRIDE;
- virtual void GrantReadFile(int child_id, const FilePath& file) OVERRIDE;
+ virtual void GrantReadFile(int child_id, const base::FilePath& file) OVERRIDE;
virtual void GrantReadFileSystem(
int child_id,
const std::string& filesystem_id) OVERRIDE;
@@ -50,7 +53,7 @@ class CONTENT_EXPORT ChildProcessSecurityPolicyImpl
int child_id,
const std::string& filesystem_id) OVERRIDE;
virtual void GrantScheme(int child_id, const std::string& scheme) OVERRIDE;
- virtual bool CanReadFile(int child_id, const FilePath& file) OVERRIDE;
+ virtual bool CanReadFile(int child_id, const base::FilePath& file) OVERRIDE;
virtual bool CanReadFileSystem(int child_id,
const std::string& filesystem_id) OVERRIDE;
virtual bool CanReadWriteFileSystem(
@@ -95,10 +98,10 @@ class CONTENT_EXPORT ChildProcessSecurityPolicyImpl
// Grants the child process permission to enumerate all the files in
// this directory and read those files.
- void GrantReadDirectory(int child_id, const FilePath& directory);
+ void GrantReadDirectory(int child_id, const base::FilePath& directory);
// Revokes all permissions granted to the given file.
- void RevokeAllPermissionsForFile(int child_id, const FilePath& file);
+ void RevokeAllPermissionsForFile(int child_id, const base::FilePath& file);
// Grant the child process the ability to use Web UI Bindings.
void GrantWebUIBindings(int child_id);
@@ -123,12 +126,12 @@ class CONTENT_EXPORT ChildProcessSecurityPolicyImpl
// Before servicing a child process's request to enumerate a directory
// the browser should call this method to check for the capability.
- bool CanReadDirectory(int child_id, const FilePath& directory);
+ bool CanReadDirectory(int child_id, const base::FilePath& directory);
// Determines if certain permissions were granted for a file. |permissions|
// must be a bit-set of base::PlatformFileFlags.
bool HasPermissionsForFile(int child_id,
- const FilePath& file,
+ const base::FilePath& file,
int permissions);
// Returns true if the specified child_id has been granted WebUIBindings.
@@ -194,7 +197,7 @@ class CONTENT_EXPORT ChildProcessSecurityPolicyImpl
// Determines if certain permissions were granted for a file to given child
// process. |permissions| must be a bit-set of base::PlatformFileFlags.
bool ChildProcessHasPermissionsForFile(int child_id,
- const FilePath& file,
+ const base::FilePath& file,
int permissions);
// You must acquire this lock before reading or writing any members of this
diff --git a/content/browser/dom_storage/dom_storage_context_impl.h b/content/browser/dom_storage/dom_storage_context_impl.h
index 21f68df..a418ea3 100644
--- a/content/browser/dom_storage/dom_storage_context_impl.h
+++ b/content/browser/dom_storage/dom_storage_context_impl.h
@@ -8,7 +8,9 @@
#include "base/memory/ref_counted.h"
#include "content/public/browser/dom_storage_context.h"
+namespace base {
class FilePath;
+}
namespace dom_storage {
class DomStorageContext;
@@ -27,7 +29,7 @@ class CONTENT_EXPORT DOMStorageContextImpl :
public base::RefCountedThreadSafe<DOMStorageContextImpl> {
public:
// If |data_path| is empty, nothing will be saved to disk.
- DOMStorageContextImpl(const FilePath& data_path,
+ DOMStorageContextImpl(const base::FilePath& data_path,
quota::SpecialStoragePolicy* special_storage_policy);
// DOMStorageContext implementation.
diff --git a/content/browser/download/download_item_factory.h b/content/browser/download/download_item_factory.h
index 5922e6e..8104b06 100644
--- a/content/browser/download/download_item_factory.h
+++ b/content/browser/download/download_item_factory.h
@@ -15,9 +15,12 @@
#include "content/public/browser/download_id.h"
#include "content/public/browser/download_item.h"
-class FilePath;
class GURL;
+namespace base {
+class FilePath;
+}
+
namespace net {
class BoundNetLog;
}
@@ -37,7 +40,7 @@ public:
virtual DownloadItemImpl* CreatePersistedItem(
DownloadItemImplDelegate* delegate,
DownloadId download_id,
- const FilePath& path,
+ const base::FilePath& path,
const GURL& url,
const GURL& referrer_url,
const base::Time& start_time,
@@ -55,7 +58,7 @@ public:
virtual DownloadItemImpl* CreateSavePageItem(
DownloadItemImplDelegate* delegate,
- const FilePath& path,
+ const base::FilePath& path,
const GURL& url,
DownloadId download_id,
const std::string& mime_type,
diff --git a/content/browser/download/download_net_log_parameters.h b/content/browser/download/download_net_log_parameters.h
index fc38e95..1c12b8d 100644
--- a/content/browser/download/download_net_log_parameters.h
+++ b/content/browser/download/download_net_log_parameters.h
@@ -11,9 +11,12 @@
#include "net/base/net_errors.h"
#include "net/base/net_log.h"
-class FilePath;
class GURL;
+namespace base {
+class FilePath;
+}
+
namespace content {
enum DownloadType {
@@ -35,8 +38,8 @@ base::Value* ItemCheckedNetLogCallback(
net::NetLog::LogLevel log_level);
// Returns NetLog parameters when a DownloadItem is renamed.
-base::Value* ItemRenamedNetLogCallback(const FilePath* old_filename,
- const FilePath* new_filename,
+base::Value* ItemRenamedNetLogCallback(const base::FilePath* old_filename,
+ const base::FilePath* new_filename,
net::NetLog::LogLevel log_level);
// Returns NetLog parameters when a DownloadItem is interrupted.
@@ -67,7 +70,7 @@ base::Value* ItemCanceledNetLogCallback(int64 bytes_so_far,
net::NetLog::LogLevel log_level);
// Returns NetLog parameters when a DownloadFile is opened.
-base::Value* FileOpenedNetLogCallback(const FilePath* file_name,
+base::Value* FileOpenedNetLogCallback(const base::FilePath* file_name,
int64 start_offset,
net::NetLog::LogLevel log_level);
@@ -77,8 +80,8 @@ base::Value* FileStreamDrainedNetLogCallback(size_t stream_size,
net::NetLog::LogLevel log_level);
// Returns NetLog parameters when a DownloadFile is renamed.
-base::Value* FileRenamedNetLogCallback(const FilePath* old_filename,
- const FilePath* new_filename,
+base::Value* FileRenamedNetLogCallback(const base::FilePath* old_filename,
+ const base::FilePath* new_filename,
net::NetLog::LogLevel log_level);
// Returns NetLog parameters when a File has an error.
diff --git a/content/browser/download/drag_download_util.h b/content/browser/download/drag_download_util.h
index c968ae4..c6568c9 100644
--- a/content/browser/download/drag_download_util.h
+++ b/content/browser/download/drag_download_util.h
@@ -11,8 +11,12 @@
#include "content/browser/download/drag_download_file.h"
#include "ui/base/dragdrop/download_file_interface.h"
-class FilePath;
class GURL;
+
+namespace base {
+class FilePath;
+}
+
namespace net {
class FileStream;
}
@@ -30,7 +34,7 @@ namespace content {
// text/plain:example.txt:http://example.com/example.txt
bool ParseDownloadMetadata(const string16& metadata,
string16* mime_type,
- FilePath* file_name,
+ base::FilePath* file_name,
GURL* url);
// Create a new file at the specified path. If the file already exists, try to
@@ -38,7 +42,7 @@ bool ParseDownloadMetadata(const string16& metadata,
// Return a FileStream if successful.
// |net_log| is a NetLog for the stream.
CONTENT_EXPORT net::FileStream* CreateFileStreamForDrop(
- FilePath* file_path, net::NetLog* net_log);
+ base::FilePath* file_path, net::NetLog* net_log);
// Implementation of DownloadFileObserver to finalize the download process.
class PromiseFileFinalizer : public ui::DownloadFileObserver {
@@ -46,7 +50,7 @@ class PromiseFileFinalizer : public ui::DownloadFileObserver {
explicit PromiseFileFinalizer(DragDownloadFile* drag_file_downloader);
// DownloadFileObserver methods.
- virtual void OnDownloadCompleted(const FilePath& file_path) OVERRIDE;
+ virtual void OnDownloadCompleted(const base::FilePath& file_path) OVERRIDE;
virtual void OnDownloadAborted() OVERRIDE;
protected:
diff --git a/content/browser/download/file_metadata_linux.h b/content/browser/download/file_metadata_linux.h
index 5494add..c4fc304 100644
--- a/content/browser/download/file_metadata_linux.h
+++ b/content/browser/download/file_metadata_linux.h
@@ -7,9 +7,12 @@
#include "content/common/content_export.h"
-class FilePath;
class GURL;
+namespace base {
+class FilePath;
+}
+
namespace content {
// The source URL attribute is part of the XDG standard.
@@ -22,7 +25,7 @@ CONTENT_EXPORT extern const char kReferrerURLAttrName[];
// Adds origin metadata to the file.
// |source| should be the source URL for the download, and |referrer| should be
// the URL the user initiated the download from.
-CONTENT_EXPORT void AddOriginMetadataToFile(const FilePath& file,
+CONTENT_EXPORT void AddOriginMetadataToFile(const base::FilePath& file,
const GURL& source,
const GURL& referrer);
diff --git a/content/browser/download/file_metadata_mac.h b/content/browser/download/file_metadata_mac.h
index 7d63a3c..19a3f07 100644
--- a/content/browser/download/file_metadata_mac.h
+++ b/content/browser/download/file_metadata_mac.h
@@ -5,22 +5,25 @@
#ifndef CONTENT_BROWSER_DOWNLOAD_FILE_METADATA_MAC_H_
#define CONTENT_BROWSER_DOWNLOAD_FILE_METADATA_MAC_H_
-class FilePath;
class GURL;
+namespace base {
+class FilePath;
+}
+
namespace content {
// Adds origin metadata to the file.
// |source| should be the source URL for the download, and |referrer| should be
// the URL the user initiated the download from.
-void AddOriginMetadataToFile(const FilePath& file, const GURL& source,
+void AddOriginMetadataToFile(const base::FilePath& file, const GURL& source,
const GURL& referrer);
// Adds quarantine metadata to the file, assuming it has already been
// quarantined by the OS.
// |source| should be the source URL for the download, and |referrer| should be
// the URL the user initiated the download from.
-void AddQuarantineMetadataToFile(const FilePath& file, const GURL& source,
+void AddQuarantineMetadataToFile(const base::FilePath& file, const GURL& source,
const GURL& referrer);
} // namespace content
diff --git a/content/browser/download/mhtml_generation_manager.h b/content/browser/download/mhtml_generation_manager.h
index 54b8733..ffdb95b 100644
--- a/content/browser/download/mhtml_generation_manager.h
+++ b/content/browser/download/mhtml_generation_manager.h
@@ -12,7 +12,9 @@
#include "base/process.h"
#include "ipc/ipc_platform_file.h"
+namespace base {
class FilePath;
+}
namespace content {
class WebContents;
@@ -21,13 +23,13 @@ class MHTMLGenerationManager {
public:
static MHTMLGenerationManager* GetInstance();
- typedef base::Callback<void(const FilePath& /* path to the MHTML file */,
+ typedef base::Callback<void(const base::FilePath& /* path to the MHTML file */,
int64 /* size of the file */)> GenerateMHTMLCallback;
// Instructs the render view to generate a MHTML representation of the current
// page for |web_contents|.
void GenerateMHTML(WebContents* web_contents,
- const FilePath& file,
+ const base::FilePath& file,
const GenerateMHTMLCallback& callback);
// Notification from the renderer that the MHTML generation finished.
@@ -42,7 +44,7 @@ class MHTMLGenerationManager {
Job();
~Job();
- FilePath file_path;
+ base::FilePath file_path;
// The handles to file the MHTML is saved to, for the browser and renderer
// processes.
@@ -62,7 +64,7 @@ class MHTMLGenerationManager {
// Called on the file thread to create |file|.
void CreateFile(int job_id,
- const FilePath& file,
+ const base::FilePath& file,
base::ProcessHandle renderer_process);
// Called on the UI thread when the file that should hold the MHTML data has
diff --git a/content/browser/download/save_file_manager.h b/content/browser/download/save_file_manager.h
index 73c7711..8e3523e 100644
--- a/content/browser/download/save_file_manager.h
+++ b/content/browser/download/save_file_manager.h
@@ -66,9 +66,11 @@
#include "content/browser/download/save_types.h"
#include "content/common/content_export.h"
-class FilePath;
class GURL;
+namespace base {
+class FilePath;
+}
namespace net {
class IOBuffer;
@@ -99,7 +101,7 @@ class SaveFileManager : public base::RefCountedThreadSafe<SaveFileManager> {
int render_process_host_id,
int render_view_id,
SaveFileCreateInfo::SaveFileSource save_source,
- const FilePath& file_full_path,
+ const base::FilePath& file_full_path,
ResourceContext* context,
SavePackage* save_package);
@@ -121,7 +123,7 @@ class SaveFileManager : public base::RefCountedThreadSafe<SaveFileManager> {
SavePackage* package);
// Helper function for deleting specified file.
- void DeleteDirectoryOrFile(const FilePath& full_path, bool is_dir);
+ void DeleteDirectoryOrFile(const base::FilePath& full_path, bool is_dir);
// Runs on file thread to save a file by copying from file system when
// original url is using file scheme.
@@ -134,7 +136,7 @@ class SaveFileManager : public base::RefCountedThreadSafe<SaveFileManager> {
// final names of successfully saved files.
void RenameAllFiles(
const FinalNameList& final_names,
- const FilePath& resource_dir,
+ const base::FilePath& resource_dir,
int render_process_id,
int render_view_id,
int save_package_id);
@@ -199,7 +201,7 @@ class SaveFileManager : public base::RefCountedThreadSafe<SaveFileManager> {
// Notifications sent from the UI thread and run on the file thread.
// Deletes a specified file on the file thread.
- void OnDeleteDirectoryOrFile(const FilePath& full_path, bool is_dir);
+ void OnDeleteDirectoryOrFile(const base::FilePath& full_path, bool is_dir);
// Notifications sent from the UI thread and run on the IO thread
diff --git a/content/browser/fileapi/fileapi_message_filter.h b/content/browser/fileapi/fileapi_message_filter.h
index 610fed1..c0c6990 100644
--- a/content/browser/fileapi/fileapi_message_filter.h
+++ b/content/browser/fileapi/fileapi_message_filter.h
@@ -18,10 +18,10 @@
#include "webkit/blob/blob_data.h"
#include "webkit/fileapi/file_system_types.h"
-class FilePath;
class GURL;
namespace base {
+class FilePath;
class Time;
}
@@ -113,7 +113,7 @@ class FileAPIMessageFilter : public BrowserMessageFilter {
void OnWillUpdate(const GURL& path);
void OnDidUpdate(const GURL& path, int64 delta);
void OnSyncGetPlatformPath(const GURL& path,
- FilePath* platform_path);
+ base::FilePath* platform_path);
void OnCreateSnapshotFile(int request_id,
const GURL& blob_url,
const GURL& path);
@@ -133,7 +133,7 @@ class FileAPIMessageFilter : public BrowserMessageFilter {
void DidGetMetadata(int request_id,
base::PlatformFileError result,
const base::PlatformFileInfo& info,
- const FilePath& platform_path);
+ const base::FilePath& platform_path);
void DidReadDirectory(int request_id,
base::PlatformFileError result,
const std::vector<base::FileUtilProxy::Entry>& entries,
@@ -155,17 +155,17 @@ class FileAPIMessageFilter : public BrowserMessageFilter {
base::PlatformFileError result);
void DidCreateSnapshot(
int request_id,
- const base::Callback<void(const FilePath&)>& register_file_callback,
+ const base::Callback<void(const base::FilePath&)>& register_file_callback,
base::PlatformFileError result,
const base::PlatformFileInfo& info,
- const FilePath& platform_path,
+ const base::FilePath& platform_path,
const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref);
// Registers the given file pointed by |virtual_path| and backed by
// |platform_path| as the |blob_url|. Called by DidCreateSnapshot.
void RegisterFileAsBlob(const GURL& blob_url,
const fileapi::FileSystemURL& url,
- const FilePath& platform_path);
+ const base::FilePath& platform_path);
// Checks renderer's access permissions for single file.
bool HasPermissionsForFile(const fileapi::FileSystemURL& url,
diff --git a/content/browser/in_process_webkit/indexed_db_context_impl.h b/content/browser/in_process_webkit/indexed_db_context_impl.h
index 11a3a68..e8a2a7c0 100644
--- a/content/browser/in_process_webkit/indexed_db_context_impl.h
+++ b/content/browser/in_process_webkit/indexed_db_context_impl.h
@@ -17,7 +17,6 @@
#include "webkit/quota/quota_types.h"
class GURL;
-class FilePath;
namespace WebKit {
class WebIDBDatabase;
@@ -25,6 +24,7 @@ class WebIDBFactory;
}
namespace base {
+class FilePath;
class MessageLoopProxy;
}
@@ -39,7 +39,7 @@ class CONTENT_EXPORT IndexedDBContextImpl
: NON_EXPORTED_BASE(public IndexedDBContext) {
public:
// If |data_path| is empty, nothing will be saved to disk.
- IndexedDBContextImpl(const FilePath& data_path,
+ IndexedDBContextImpl(const base::FilePath& data_path,
quota::SpecialStoragePolicy* special_storage_policy,
quota::QuotaManagerProxy* quota_manager_proxy,
base::MessageLoopProxy* webkit_thread_loop);
@@ -47,10 +47,10 @@ class CONTENT_EXPORT IndexedDBContextImpl
WebKit::WebIDBFactory* GetIDBFactory();
// The indexed db directory.
- static const FilePath::CharType kIndexedDBDirectory[];
+ static const base::FilePath::CharType kIndexedDBDirectory[];
// The indexed db file extension.
- static const FilePath::CharType kIndexedDBExtension[];
+ static const base::FilePath::CharType kIndexedDBExtension[];
// Disables the exit-time deletion of session-only data.
void SetForceKeepSessionState() {
@@ -62,7 +62,7 @@ class CONTENT_EXPORT IndexedDBContextImpl
virtual int64 GetOriginDiskUsage(const GURL& origin_url) OVERRIDE;
virtual base::Time GetOriginLastModified(const GURL& origin_url) OVERRIDE;
virtual void DeleteForOrigin(const GURL& origin_url) OVERRIDE;
- virtual FilePath GetFilePathForTesting(
+ virtual base::FilePath GetFilePathForTesting(
const string16& origin_id) const OVERRIDE;
// Methods called by IndexedDBDispatcherHost for quota support.
@@ -74,10 +74,10 @@ class CONTENT_EXPORT IndexedDBContextImpl
quota::QuotaManagerProxy* quota_manager_proxy();
- FilePath data_path() const { return data_path_; }
+ base::FilePath data_path() const { return data_path_; }
// For unit tests allow to override the |data_path_|.
- void set_data_path_for_testing(const FilePath& data_path) {
+ void set_data_path_for_testing(const base::FilePath& data_path) {
data_path_ = data_path;
}
@@ -94,7 +94,7 @@ class CONTENT_EXPORT IndexedDBContextImpl
typedef std::map<GURL, int64> OriginToSizeMap;
class IndexedDBGetUsageAndQuotaCallback;
- FilePath GetIndexedDBFilePath(const string16& origin_id) const;
+ base::FilePath GetIndexedDBFilePath(const string16& origin_id) const;
int64 ReadUsageFromDisk(const GURL& origin_url) const;
void EnsureDiskUsageCacheInitialized(const GURL& origin_url);
void QueryDiskAndUpdateQuotaUsage(const GURL& origin_url);
@@ -119,7 +119,7 @@ class CONTENT_EXPORT IndexedDBContextImpl
void ResetCaches();
scoped_ptr<WebKit::WebIDBFactory> idb_factory_;
- FilePath data_path_;
+ base::FilePath data_path_;
// If true, nothing (not even session-only data) should be deleted on exit.
bool force_keep_session_state_;
scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_;
diff --git a/content/browser/safe_util_win.h b/content/browser/safe_util_win.h
index a8cb077..1636748 100644
--- a/content/browser/safe_util_win.h
+++ b/content/browser/safe_util_win.h
@@ -8,9 +8,12 @@
#include <string>
#include <windows.h>
-class FilePath;
class GURL;
+namespace base {
+class FilePath;
+}
+
namespace content {
// Open or run a downloaded file via the Windows shell, possibly showing first
@@ -38,7 +41,7 @@ namespace content {
// dialog.
// Returns 'true' on successful open, 'false' otherwise.
bool SaferOpenItemViaShell(HWND hwnd, const std::wstring& window_title,
- const FilePath& full_path,
+ const base::FilePath& full_path,
const std::wstring& source_url);
// Invokes IAttachmentExecute::Save to validate the downloaded file. The call
@@ -66,7 +69,7 @@ bool SaferOpenItemViaShell(HWND hwnd, const std::wstring& window_title,
// |full_path| : is the path to the downloaded file. This should be the final
// path of the download.
// |source_url|: the source URL for the download.
-HRESULT ScanAndSaveDownloadedFile(const FilePath& full_path,
+HRESULT ScanAndSaveDownloadedFile(const base::FilePath& full_path,
const GURL& source_url);
} // namespace content
diff --git a/content/browser/storage_partition_impl_map.h b/content/browser/storage_partition_impl_map.h
index 196a388..7f69dea 100644
--- a/content/browser/storage_partition_impl_map.h
+++ b/content/browser/storage_partition_impl_map.h
@@ -15,9 +15,8 @@
#include "content/browser/storage_partition_impl.h"
#include "content/public/browser/browser_context.h"
-class FilePath;
-
namespace base {
+class FilePath;
class SequencedTaskRunner;
} // namespace base
@@ -51,7 +50,7 @@ class StoragePartitionImplMap : public base::SupportsUserData::Data {
//
// The |done| closure is executed on the calling thread when garbage
// collection is complete.
- void GarbageCollect(scoped_ptr<base::hash_set<FilePath> > active_paths,
+ void GarbageCollect(scoped_ptr<base::hash_set<base::FilePath> > active_paths,
const base::Closure& done);
void ForEach(const BrowserContext::StoragePartitionCallback& callback);
@@ -106,8 +105,9 @@ class StoragePartitionImplMap : public base::SupportsUserData::Data {
// Returns the relative path from the profile's base directory, to the
// directory that holds all the state for storage contexts in the given
// |partition_domain| and |partition_name|.
- static FilePath GetStoragePartitionPath(const std::string& partition_domain,
- const std::string& partition_name);
+ static base::FilePath GetStoragePartitionPath(
+ const std::string& partition_domain,
+ const std::string& partition_name);
// This must always be called *after* |partition| has been added to the
// partitions_.
diff --git a/content/common/child_process_host_impl.h b/content/common/child_process_host_impl.h
index fe34911a..be2ea1e 100644
--- a/content/common/child_process_host_impl.h
+++ b/content/common/child_process_host_impl.h
@@ -18,7 +18,9 @@
#include "ipc/ipc_listener.h"
#include "content/public/common/child_process_host.h"
+namespace base {
class FilePath;
+}
namespace content {
class ChildProcessHostDelegate;
diff --git a/content/common/fileapi/file_system_dispatcher.h b/content/common/fileapi/file_system_dispatcher.h
index 99afa50..4d1171b 100644
--- a/content/common/fileapi/file_system_dispatcher.h
+++ b/content/common/fileapi/file_system_dispatcher.h
@@ -18,10 +18,10 @@
#include "webkit/fileapi/file_system_types.h"
namespace base {
+class FilePath;
struct PlatformFileInfo;
}
-class FilePath;
class GURL;
namespace content {
@@ -102,7 +102,7 @@ class FileSystemDispatcher : public IPC::Listener {
void OnDidSucceed(int request_id);
void OnDidReadMetadata(int request_id,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path);
+ const base::FilePath& platform_path);
void OnDidReadDirectory(
int request_id,
const std::vector<base::FileUtilProxy::Entry>& entries,
diff --git a/content/common/sandbox_mac.h b/content/common/sandbox_mac.h
index d28fdf7..ea23ce5 100644
--- a/content/common/sandbox_mac.h
+++ b/content/common/sandbox_mac.h
@@ -13,7 +13,9 @@
#include "content/common/content_export.h"
#include "content/public/common/sandbox_type_mac.h"
+namespace base {
class FilePath;
+}
#if __OBJC__
@class NSArray;
@@ -73,7 +75,7 @@ class CONTENT_EXPORT Sandbox {
//
// Returns true on success, false if an error occurred enabling the sandbox.
static bool EnableSandbox(int sandbox_type,
- const FilePath& allowed_dir);
+ const base::FilePath& allowed_dir);
// Exposed for testing purposes, used by an accessory function of our tests
@@ -89,7 +91,7 @@ class CONTENT_EXPORT Sandbox {
// The returned string contains embedded variables. The function fills in
// |substitutions| to contain the values for these variables.
static NSString* BuildAllowDirectoryAccessSandboxString(
- const FilePath& allowed_dir,
+ const base::FilePath& allowed_dir,
SandboxVariableSubstitions* substitutions);
// Assemble the final sandbox profile from a template by removing comments
@@ -126,7 +128,7 @@ class CONTENT_EXPORT Sandbox {
private:
// Returns an (allow file-read-metadata) rule for |allowed_path| and all its
// parent directories.
- static NSString* AllowMetadataForPath(const FilePath& allowed_path);
+ static NSString* AllowMetadataForPath(const base::FilePath& allowed_path);
// Escape |src_utf8| for use in a plain string variable in a sandbox
// configuraton file. On return |dst| is set to the quoted output.
@@ -151,7 +153,7 @@ class CONTENT_EXPORT Sandbox {
// Convert provided path into a "canonical" path matching what the Sandbox
// expects i.e. one without symlinks.
// This path is not necessarily unique e.g. in the face of hardlinks.
- static FilePath GetCanonicalSandboxPath(const FilePath& path);
+ static base::FilePath GetCanonicalSandboxPath(const base::FilePath& path);
FRIEND_TEST_ALL_PREFIXES(MacDirAccessSandboxTest, StringEscape);
FRIEND_TEST_ALL_PREFIXES(MacDirAccessSandboxTest, RegexEscape);
diff --git a/content/ppapi_plugin/ppapi_thread.h b/content/ppapi_plugin/ppapi_thread.h
index d7fd039..0e21d56 100644
--- a/content/ppapi_plugin/ppapi_thread.h
+++ b/content/ppapi_plugin/ppapi_thread.h
@@ -28,7 +28,10 @@
#endif
class CommandLine;
+
+namespace base {
class FilePath;
+}
namespace IPC {
struct ChannelHandle;
@@ -88,7 +91,7 @@ class PpapiThread : public ChildThread,
virtual void SetActiveURL(const std::string& url) OVERRIDE;
// Message handlers.
- void OnLoadPlugin(const FilePath& path,
+ void OnLoadPlugin(const base::FilePath& path,
const ppapi::PpapiPermissions& permissions);
void OnCreateChannel(base::ProcessId renderer_pid,
int renderer_child_id,
@@ -108,7 +111,7 @@ class PpapiThread : public ChildThread,
IPC::ChannelHandle* handle);
// Sets up the name of the plugin for logging using the given path.
- void SavePluginName(const FilePath& path);
+ void SavePluginName(const base::FilePath& path);
// True if running in a broker process rather than a normal plugin process.
bool is_broker_;
diff --git a/content/public/browser/browser_child_process_host.h b/content/public/browser/browser_child_process_host.h
index e56404d..d1bbb81 100644
--- a/content/public/browser/browser_child_process_host.h
+++ b/content/public/browser/browser_child_process_host.h
@@ -13,7 +13,10 @@
#include "ipc/ipc_sender.h"
class CommandLine;
+
+namespace base {
class FilePath;
+}
namespace content {
@@ -36,7 +39,7 @@ class CONTENT_EXPORT BrowserChildProcessHost : public IPC::Sender {
// Takes ownership of |cmd_line|.
virtual void Launch(
#if defined(OS_WIN)
- const FilePath& exposed_dir,
+ const base::FilePath& exposed_dir,
#elif defined(OS_POSIX)
bool use_zygote,
const base::EnvironmentVector& environ,
diff --git a/content/public/browser/browser_context.h b/content/public/browser/browser_context.h
index 1bd5949..d82326a 100644
--- a/content/public/browser/browser_context.h
+++ b/content/public/browser/browser_context.h
@@ -11,6 +11,12 @@
#include "base/supports_user_data.h"
#include "content/common/content_export.h"
+class GURL;
+
+namespace base {
+class FilePath;
+}
+
namespace fileapi {
class ExternalMountPoints;
}
@@ -23,9 +29,6 @@ namespace quota {
class SpecialStoragePolicy;
}
-class FilePath;
-class GURL;
-
namespace content {
class DownloadManager;
@@ -69,7 +72,7 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
// ownership of the pointer.
static void GarbageCollectStoragePartitions(
BrowserContext* browser_context,
- scoped_ptr<base::hash_set<FilePath> > active_paths,
+ scoped_ptr<base::hash_set<base::FilePath> > active_paths,
const base::Closure& done);
// DON'T USE THIS. GetDefaultStoragePartition() is going away.
@@ -94,7 +97,7 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
virtual ~BrowserContext();
// Returns the path of the directory where this context's data is stored.
- virtual FilePath GetPath() = 0;
+ virtual base::FilePath GetPath() = 0;
// Return whether this context is incognito. Default is false.
// This doesn't belong here; http://crbug.com/89628
@@ -114,7 +117,7 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
int renderer_child_id) = 0;
virtual net::URLRequestContextGetter* GetRequestContextForStoragePartition(
- const FilePath& partition_path,
+ const base::FilePath& partition_path,
bool in_memory) = 0;
// Returns the default request context for media resources associated with
@@ -128,7 +131,7 @@ class CONTENT_EXPORT BrowserContext : public base::SupportsUserData {
int renderer_child_id) = 0;
virtual net::URLRequestContextGetter*
GetMediaRequestContextForStoragePartition(
- const FilePath& partition_path,
+ const base::FilePath& partition_path,
bool in_memory) = 0;
// Returns the resource context.
diff --git a/content/public/browser/browser_ppapi_host.h b/content/public/browser/browser_ppapi_host.h
index ac62a07..d23908e 100644
--- a/content/public/browser/browser_ppapi_host.h
+++ b/content/public/browser/browser_ppapi_host.h
@@ -77,7 +77,7 @@ class CONTENT_EXPORT BrowserPpapiHost {
virtual const std::string& GetPluginName() = 0;
// Returns the user's profile data directory.
- virtual const FilePath& GetProfileDataDirectory() = 0;
+ virtual const base::FilePath& GetProfileDataDirectory() = 0;
// Get the Document/Plugin URLs for the given PP_Instance.
virtual GURL GetDocumentURLForInstance(PP_Instance instance) = 0;
diff --git a/content/public/browser/child_process_security_policy.h b/content/public/browser/child_process_security_policy.h
index 189effa..b56f7f8 100644
--- a/content/public/browser/child_process_security_policy.h
+++ b/content/public/browser/child_process_security_policy.h
@@ -11,7 +11,9 @@
#include "base/basictypes.h"
#include "content/common/content_export.h"
+namespace base {
class FilePath;
+}
namespace content {
@@ -49,18 +51,18 @@ class ChildProcessSecurityPolicy {
// Grants certain permissions to a file. |permissions| must be a bit-set of
// base::PlatformFileFlags.
virtual void GrantPermissionsForFile(int child_id,
- const FilePath& file,
+ const base::FilePath& file,
int permissions) = 0;
// Before servicing a child process's request to upload a file to the web, the
// browser should call this method to determine whether the process has the
// capability to upload the requested file.
- virtual bool CanReadFile(int child_id, const FilePath& file) = 0;
+ virtual bool CanReadFile(int child_id, const base::FilePath& file) = 0;
// Whenever the user picks a file from a <input type="file"> element, the
// browser should call this function to grant the child process the capability
// to upload the file to the web.
- virtual void GrantReadFile(int child_id, const FilePath& file) = 0;
+ virtual void GrantReadFile(int child_id, const base::FilePath& file) = 0;
// Grants read access permission to the given isolated file system
// identified by |filesystem_id|. An isolated file system can be
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 9b5fea3..b332073 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -23,9 +23,12 @@
#endif
class CommandLine;
-class FilePath;
class GURL;
+namespace base {
+class FilePath;
+}
+
namespace webkit_glue {
struct WebPreferences;
}
diff --git a/content/public/browser/download_item.h b/content/public/browser/download_item.h
index 2d4c5a8..3e29c07 100644
--- a/content/public/browser/download_item.h
+++ b/content/public/browser/download_item.h
@@ -28,10 +28,10 @@
#include "content/public/browser/download_interrupt_reasons.h"
#include "content/public/common/page_transition_types.h"
-class FilePath;
class GURL;
namespace base {
+class FilePath;
class Time;
class TimeDelta;
}
diff --git a/content/public/browser/gpu_data_manager.h b/content/public/browser/gpu_data_manager.h
index c89e9be..ebe56d6 100644
--- a/content/public/browser/gpu_data_manager.h
+++ b/content/public/browser/gpu_data_manager.h
@@ -13,10 +13,10 @@
#include "content/public/common/gpu_feature_type.h"
#include "content/public/common/gpu_switching_option.h"
-class FilePath;
class GURL;
namespace base {
+class FilePath;
class ListValue;
}
@@ -66,7 +66,7 @@ class GpuDataManager {
virtual bool ShouldUseSoftwareRendering() const = 0;
// Register a path to the SwiftShader software renderer.
- virtual void RegisterSwiftShaderPath(const FilePath& path) = 0;
+ virtual void RegisterSwiftShaderPath(const base::FilePath& path) = 0;
// Registers/unregister |observer|.
virtual void AddObserver(GpuDataManagerObserver* observer) = 0;
diff --git a/content/public/browser/pepper_flash_settings_helper.h b/content/public/browser/pepper_flash_settings_helper.h
index 7fb4cc4..72f069d 100644
--- a/content/public/browser/pepper_flash_settings_helper.h
+++ b/content/public/browser/pepper_flash_settings_helper.h
@@ -9,7 +9,9 @@
#include "base/memory/ref_counted.h"
#include "content/common/content_export.h"
+namespace base {
class FilePath;
+}
namespace IPC {
struct ChannelHandle;
@@ -29,7 +31,7 @@ class CONTENT_EXPORT PepperFlashSettingsHelper
typedef base::Callback<void(bool /* success */,
const IPC::ChannelHandle& /* channel_handle */)>
OpenChannelCallback;
- virtual void OpenChannelToBroker(const FilePath& path,
+ virtual void OpenChannelToBroker(const base::FilePath& path,
const OpenChannelCallback& callback) = 0;
protected:
diff --git a/content/public/browser/plugin_service.h b/content/public/browser/plugin_service.h
index 7364195..f8d5e89 100644
--- a/content/public/browser/plugin_service.h
+++ b/content/public/browser/plugin_service.h
@@ -12,9 +12,12 @@
#include "base/string16.h"
#include "content/common/content_export.h"
-class FilePath;
class GURL;
+namespace base {
+class FilePath;
+}
+
namespace webkit {
struct WebPluginInfo;
namespace npapi {
@@ -86,13 +89,14 @@ class PluginService {
// Get plugin info by plugin path (including disabled plugins). Returns true
// if the plugin is found and WebPluginInfo has been filled in |info|. This
// will use cached data in the plugin list.
- virtual bool GetPluginInfoByPath(const FilePath& plugin_path,
+ virtual bool GetPluginInfoByPath(const base::FilePath& plugin_path,
webkit::WebPluginInfo* info) = 0;
// Returns the display name for the plugin identified by the given path. If
// the path doesn't identify a plugin, or the plugin has no display name,
// this will attempt to generate a display name from the path.
- virtual string16 GetPluginDisplayNameByPath(const FilePath& plugin_path) = 0;
+ virtual string16 GetPluginDisplayNameByPath(
+ const base::FilePath& plugin_path) = 0;
// Asynchronously loads plugins if necessary and then calls back to the
// provided function on the calling MessageLoop on completion.
@@ -102,17 +106,17 @@ class PluginService {
// The caller does not own the pointer, and it's not guaranteed to live past
// the call stack.
virtual PepperPluginInfo* GetRegisteredPpapiPluginInfo(
- const FilePath& plugin_path) = 0;
+ const base::FilePath& plugin_path) = 0;
virtual void SetFilter(PluginServiceFilter* filter) = 0;
virtual PluginServiceFilter* GetFilter() = 0;
// If the plugin with the given path is running, cleanly shuts it down.
- virtual void ForcePluginShutdown(const FilePath& plugin_path) = 0;
+ virtual void ForcePluginShutdown(const base::FilePath& plugin_path) = 0;
// Used to monitor plug-in stability. An unstable plug-in is one that has
// crashed more than a set number of times in a set time period.
- virtual bool IsPluginUnstable(const FilePath& plugin_path) = 0;
+ virtual bool IsPluginUnstable(const base::FilePath& plugin_path) = 0;
// The following functions are wrappers around webkit::npapi::PluginList.
// These must be used instead of those in order to ensure that we have a
@@ -120,10 +124,10 @@ class PluginService {
// accidentally load plugins in the wrong process or thread. Refer to
// PluginList for further documentation of these functions.
virtual void RefreshPlugins() = 0;
- virtual void AddExtraPluginPath(const FilePath& path) = 0;
- virtual void AddExtraPluginDir(const FilePath& path) = 0;
- virtual void RemoveExtraPluginPath(const FilePath& path) = 0;
- virtual void UnregisterInternalPlugin(const FilePath& path) = 0;
+ virtual void AddExtraPluginPath(const base::FilePath& path) = 0;
+ virtual void AddExtraPluginDir(const base::FilePath& path) = 0;
+ virtual void RemoveExtraPluginPath(const base::FilePath& path) = 0;
+ virtual void UnregisterInternalPlugin(const base::FilePath& path) = 0;
virtual void RegisterInternalPlugin(const webkit::WebPluginInfo& info,
bool add_at_beginning) = 0;
virtual void GetInternalPlugins(
diff --git a/content/public/browser/render_view_host.h b/content/public/browser/render_view_host.h
index c92e926..10f7724 100644
--- a/content/public/browser/render_view_host.h
+++ b/content/public/browser/render_view_host.h
@@ -12,7 +12,6 @@
#include "content/public/common/stop_find_action.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDragOperation.h"
-class FilePath;
class GURL;
struct WebDropData;
@@ -21,6 +20,7 @@ class Point;
}
namespace base {
+class FilePath;
class Value;
}
@@ -113,7 +113,7 @@ class CONTENT_EXPORT RenderViewHost : virtual public RenderWidgetHost {
// Notifies the listener that a directory enumeration is complete.
virtual void DirectoryEnumerationFinished(
int request_id,
- const std::vector<FilePath>& files) = 0;
+ const std::vector<base::FilePath>& files) = 0;
// Tells the renderer not to add scrollbars with height and width below a
// threshold.
diff --git a/content/public/browser/utility_process_host.h b/content/public/browser/utility_process_host.h
index 240fbe5..5f280c6 100644
--- a/content/public/browser/utility_process_host.h
+++ b/content/public/browser/utility_process_host.h
@@ -9,9 +9,8 @@
#include "content/common/content_export.h"
#include "ipc/ipc_sender.h"
-class FilePath;
-
namespace base {
+class FilePath;
class SequencedTaskRunner;
}
@@ -49,7 +48,7 @@ class UtilityProcessHost : public IPC::Sender,
// Allows a directory to be opened through the sandbox, in case it's needed by
// the operation.
- virtual void SetExposedDir(const FilePath& dir) = 0;
+ virtual void SetExposedDir(const base::FilePath& dir) = 0;
// Make the process run without a sandbox.
virtual void DisableSandbox() = 0;
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index ba57196..63e6380 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -21,10 +21,10 @@
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/rect_f.h"
-class FilePath;
class GURL;
namespace base {
+class FilePath;
class ListValue;
}
@@ -336,7 +336,7 @@ class CONTENT_EXPORT WebContentsDelegate {
// directory.
virtual void EnumerateDirectory(WebContents* web_contents,
int request_id,
- const FilePath& path) {}
+ const base::FilePath& path) {}
// Called when the renderer puts a tab into or out of fullscreen mode.
virtual void ToggleFullscreenModeForTab(WebContents* web_contents,
@@ -429,7 +429,7 @@ class CONTENT_EXPORT WebContentsDelegate {
virtual bool RequestPpapiBrokerPermission(
WebContents* web_contents,
const GURL& url,
- const FilePath& plugin_path,
+ const base::FilePath& plugin_path,
const base::Callback<void(bool)>& callback);
protected:
diff --git a/content/public/common/child_process_host.h b/content/public/common/child_process_host.h
index 9ded297..bccbd67 100644
--- a/content/public/common/child_process_host.h
+++ b/content/public/common/child_process_host.h
@@ -9,7 +9,9 @@
#include "content/common/content_export.h"
#include "ipc/ipc_channel_proxy.h"
+namespace base {
class FilePath;
+}
namespace content {
@@ -71,7 +73,7 @@ class CONTENT_EXPORT ChildProcessHost : public IPC::Sender {
// if none of these special behaviors are required.
//
// On failure, returns an empty FilePath.
- static FilePath GetChildPath(int flags);
+ static base::FilePath GetChildPath(int flags);
// Send the shutdown message to the child process.
// Does not check with the delegate's CanShutdown.
diff --git a/content/public/common/sandbox_init.h b/content/public/common/sandbox_init.h
index 38224a2..de58f46 100644
--- a/content/public/common/sandbox_init.h
+++ b/content/public/common/sandbox_init.h
@@ -11,7 +11,10 @@
#include "ipc/ipc_platform_file.h"
class CommandLine;
+
+namespace base {
class FilePath;
+}
namespace sandbox {
struct SandboxInterfaceInfo;
@@ -54,7 +57,7 @@ CONTENT_EXPORT bool BrokerAddTargetPeer(HANDLE peer_process);
// and returns a handle to it.
CONTENT_EXPORT base::ProcessHandle StartProcessWithAccess(
CommandLine* cmd_line,
- const FilePath& exposed_dir);
+ const base::FilePath& exposed_dir);
#elif defined(OS_MACOSX)
@@ -73,7 +76,7 @@ CONTENT_EXPORT base::ProcessHandle StartProcessWithAccess(
// occurred. If process_type isn't one that needs sandboxing, no action is
// taken and true is always returned.
CONTENT_EXPORT bool InitializeSandbox(int sandbox_type,
- const FilePath& allowed_path);
+ const base::FilePath& allowed_path);
#elif defined(OS_LINUX)
diff --git a/content/public/renderer/content_renderer_client.cc b/content/public/renderer/content_renderer_client.cc
index 84ea42c..595cad2 100644
--- a/content/public/renderer/content_renderer_client.cc
+++ b/content/public/renderer/content_renderer_client.cc
@@ -28,7 +28,7 @@ bool ContentRendererClient::OverrideCreatePlugin(
WebKit::WebPlugin* ContentRendererClient::CreatePluginReplacement(
RenderView* render_view,
- const FilePath& plugin_path) {
+ const base::FilePath& plugin_path) {
return NULL;
}
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
index 80f215c..52dd68c 100644
--- a/content/public/renderer/content_renderer_client.h
+++ b/content/public/renderer/content_renderer_client.h
@@ -17,10 +17,13 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPageVisibilityState.h"
#include "v8/include/v8.h"
-class FilePath;
class GURL;
class SkBitmap;
+namespace base {
+class FilePath;
+}
+
namespace WebKit {
class WebFrame;
class WebMediaPlayerClient;
@@ -84,7 +87,7 @@ class CONTENT_EXPORT ContentRendererClient {
// couldn't be loaded. This allows the embedder to show a custom placeholder.
virtual WebKit::WebPlugin* CreatePluginReplacement(
RenderView* render_view,
- const FilePath& plugin_path);
+ const base::FilePath& plugin_path);
// Returns true if the embedder has an error page to show for the given http
// status code. If so |error_domain| should be set to according to WebURLError
diff --git a/content/public/renderer/renderer_ppapi_host.h b/content/public/renderer/renderer_ppapi_host.h
index da4a9b5..51a5e1f 100644
--- a/content/public/renderer/renderer_ppapi_host.h
+++ b/content/public/renderer/renderer_ppapi_host.h
@@ -13,7 +13,9 @@
#include "ppapi/c/pp_instance.h"
#include "webkit/plugins/ppapi/plugin_delegate.h"
+namespace base {
class FilePath;
+}
namespace gfx {
class Point;
@@ -65,7 +67,7 @@ class RendererPpapiHost {
CONTENT_EXPORT static RendererPpapiHost* CreateExternalPluginModule(
scoped_refptr<webkit::ppapi::PluginModule> plugin_module,
webkit::ppapi::PluginInstance* plugin_instance,
- const FilePath& file_path,
+ const base::FilePath& file_path,
ppapi::PpapiPermissions permissions,
const IPC::ChannelHandle& channel_handle,
base::ProcessId plugin_pid,
diff --git a/content/public/test/browser_test_base.h b/content/public/test/browser_test_base.h
index 121b429..026bf32 100644
--- a/content/public/test/browser_test_base.h
+++ b/content/public/test/browser_test_base.h
@@ -10,7 +10,10 @@
#include "net/test/test_server.h"
class CommandLine;
+
+namespace base {
class FilePath;
+}
namespace content {
@@ -77,7 +80,7 @@ class BrowserTestBase : public testing::Test {
// this.
// |test_server_base| is the path, relative to src, to give to the test HTTP
// server.
- void CreateTestServer(const FilePath& test_server_base);
+ void CreateTestServer(const base::FilePath& test_server_base);
private:
void ProxyRunTestOnMainThreadLoop();
diff --git a/content/public/test/test_launcher.h b/content/public/test/test_launcher.h
index 6a5e2a6..d3404e5 100644
--- a/content/public/test/test_launcher.h
+++ b/content/public/test/test_launcher.h
@@ -11,9 +11,9 @@
#include "base/compiler_specific.h"
class CommandLine;
-class FilePath;
namespace base {
+class FilePath;
class RunLoop;
}
@@ -39,8 +39,9 @@ class TestLauncherDelegate {
public:
virtual std::string GetEmptyTestName() = 0;
virtual int RunTestSuite(int argc, char** argv) = 0;
- virtual bool AdjustChildProcessCommandLine(CommandLine* command_line,
- const FilePath& temp_data_dir) = 0;
+ virtual bool AdjustChildProcessCommandLine(
+ CommandLine* command_line,
+ const base::FilePath& temp_data_dir) = 0;
virtual void PreRunMessageLoop(base::RunLoop* run_loop) {}
virtual void PostRunMessageLoop() {}
virtual ContentMainDelegate* CreateContentMainDelegate() = 0;
diff --git a/content/renderer/pepper/pepper_plugin_delegate_impl.h b/content/renderer/pepper/pepper_plugin_delegate_impl.h
index 8ced3eb..709b30b 100644
--- a/content/renderer/pepper/pepper_plugin_delegate_impl.h
+++ b/content/renderer/pepper/pepper_plugin_delegate_impl.h
@@ -26,7 +26,9 @@
#include "ui/base/ime/text_input_type.h"
#include "webkit/plugins/ppapi/plugin_delegate.h"
+namespace base {
class FilePath;
+}
namespace IPC {
struct ChannelHandle;
@@ -73,7 +75,7 @@ class PepperPluginDelegateImpl
// module. Returns the renderer host, or NULL if it couldn't be created.
RendererPpapiHost* CreateExternalPluginModule(
scoped_refptr<webkit::ppapi::PluginModule> module,
- const FilePath& path,
+ const base::FilePath& path,
ppapi::PpapiPermissions permissions,
const IPC::ChannelHandle& channel_handle,
base::ProcessId plugin_pid,
@@ -167,7 +169,7 @@ class PepperPluginDelegateImpl
webkit::ppapi::PluginInstance* instance) OVERRIDE;
virtual SkBitmap* GetSadPluginBitmap() OVERRIDE;
virtual WebKit::WebPlugin* CreatePluginReplacement(
- const FilePath& file_path) OVERRIDE;
+ const base::FilePath& file_path) OVERRIDE;
virtual uint32_t GetAudioHardwareOutputSampleRate() OVERRIDE;
virtual uint32_t GetAudioHardwareOutputBufferSize() OVERRIDE;
virtual PlatformAudioOutput* CreateAudioOutput(
@@ -197,7 +199,7 @@ class PepperPluginDelegateImpl
int total,
bool final_result) OVERRIDE;
virtual void SelectedFindResultChanged(int identifier, int index) OVERRIDE;
- virtual bool AsyncOpenFile(const FilePath& path,
+ virtual bool AsyncOpenFile(const base::FilePath& path,
int flags,
const AsyncOpenFileCallback& callback) OVERRIDE;
virtual bool AsyncOpenFileSystemURL(
@@ -243,7 +245,7 @@ class PepperPluginDelegateImpl
virtual void DidUpdateFile(const GURL& file_path, int64_t delta) OVERRIDE;
virtual void SyncGetFileSystemPlatformPath(
const GURL& url,
- FilePath* platform_path) OVERRIDE;
+ base::FilePath* platform_path) OVERRIDE;
virtual scoped_refptr<base::MessageLoopProxy>
GetFileThreadMessageLoopProxy() OVERRIDE;
virtual uint32 TCPSocketCreate() OVERRIDE;
@@ -381,7 +383,7 @@ class PepperPluginDelegateImpl
// and perform other common initialization.
RendererPpapiHost* CreateOutOfProcessModule(
webkit::ppapi::PluginModule* module,
- const FilePath& path,
+ const base::FilePath& path,
ppapi::PpapiPermissions permissions,
const IPC::ChannelHandle& channel_handle,
base::ProcessId plugin_pid,
diff --git a/content/shell/shell_network_delegate.h b/content/shell/shell_network_delegate.h
index e1fb991..1271961 100644
--- a/content/shell/shell_network_delegate.h
+++ b/content/shell/shell_network_delegate.h
@@ -52,7 +52,7 @@ class ShellNetworkDelegate : public net::NetworkDelegate {
const std::string& cookie_line,
net::CookieOptions* options) OVERRIDE;
virtual bool OnCanAccessFile(const net::URLRequest& request,
- const FilePath& path) const OVERRIDE;
+ const base::FilePath& path) const OVERRIDE;
virtual bool OnCanThrottleRequest(
const net::URLRequest& request) const OVERRIDE;
virtual int OnBeforeSocketStreamConnect(
diff --git a/content/test/content_browser_test_utils.h b/content/test/content_browser_test_utils.h
index 9ea40a5..599c254 100644
--- a/content/test/content_browser_test_utils.h
+++ b/content/test/content_browser_test_utils.h
@@ -9,7 +9,9 @@
#include "googleurl/src/gurl.h"
#include "ui/gfx/native_widget_types.h"
+namespace base {
class FilePath;
+}
namespace gfx {
class Rect;
@@ -28,7 +30,7 @@ class Shell;
// The file for the tests is all located in
// content/test/data/dir/<file>
// The returned path is FilePath format.
-FilePath GetTestFilePath(const char* dir, const char* file);
+base::FilePath GetTestFilePath(const char* dir, const char* file);
// Generate the URL for testing a particular test.
// HTML for the tests is all located in
diff --git a/content/test/net/url_request_mock_http_job.h b/content/test/net/url_request_mock_http_job.h
index 9beb63a..53e69b5 100644
--- a/content/test/net/url_request_mock_http_job.h
+++ b/content/test/net/url_request_mock_http_job.h
@@ -12,7 +12,9 @@
#include "net/url_request/url_request_file_job.h"
#include "net/url_request/url_request_job_factory.h"
+namespace base {
class FilePath;
+}
namespace content {
@@ -20,7 +22,7 @@ class URLRequestMockHTTPJob : public net::URLRequestFileJob {
public:
URLRequestMockHTTPJob(net::URLRequest* request,
net::NetworkDelegate* network_delegate,
- const FilePath& file_path);
+ const base::FilePath& file_path);
virtual bool GetMimeType(std::string* mime_type) const OVERRIDE;
virtual int GetResponseCode() const OVERRIDE;
@@ -30,27 +32,27 @@ class URLRequestMockHTTPJob : public net::URLRequestFileJob {
int* http_status_code) OVERRIDE;
// Adds the testing URLs to the net::URLRequestFilter.
- static void AddUrlHandler(const FilePath& base_path);
+ static void AddUrlHandler(const base::FilePath& base_path);
// Respond to all HTTP requests of |hostname| with contents of the file
// located at |file_path|.
static void AddHostnameToFileHandler(const std::string& hostname,
- const FilePath& file_path);
+ const base::FilePath& file_path);
// Given the path to a file relative to the path passed to AddUrlHandler(),
// construct a mock URL.
- static GURL GetMockUrl(const FilePath& path);
+ static GURL GetMockUrl(const base::FilePath& path);
// Given the path to a file relative to the path passed to AddUrlHandler(),
// construct a mock URL for view source.
- static GURL GetMockViewSourceUrl(const FilePath& path);
+ static GURL GetMockViewSourceUrl(const base::FilePath& path);
// Returns a net::URLRequestJobFactory::ProtocolHandler that serves
// URLRequestMockHTTPJob's responding like an HTTP server. |base_path| is the
// file path leading to the root of the directory to use as the root of the
// HTTP server.
static scoped_ptr<net::URLRequestJobFactory::ProtocolHandler>
- CreateProtocolHandler(const FilePath& base_path);
+ CreateProtocolHandler(const base::FilePath& base_path);
private:
virtual ~URLRequestMockHTTPJob();
diff --git a/content/test/net/url_request_prepackaged_interceptor.h b/content/test/net/url_request_prepackaged_interceptor.h
index 88b2291..edb65c5 100644
--- a/content/test/net/url_request_prepackaged_interceptor.h
+++ b/content/test/net/url_request_prepackaged_interceptor.h
@@ -7,9 +7,12 @@
#include "base/basictypes.h"
-class FilePath;
class GURL;
+namespace base {
+class FilePath;
+}
+
namespace content {
// Intercepts HTTP requests and gives pre-defined responses to specified URLs.
@@ -23,11 +26,11 @@ class URLRequestPrepackagedInterceptor {
// When requests for |url| arrive, respond with the contents of |path|. The
// hostname of |url| must be "localhost" to avoid DNS lookups, and the scheme
// must be "http".
- void SetResponse(const GURL& url, const FilePath& path);
+ void SetResponse(const GURL& url, const base::FilePath& path);
// Identical to SetResponse except that query parameters are ignored on
// incoming URLs when comparing against |url|.
- void SetResponseIgnoreQuery(const GURL& url, const FilePath& path);
+ void SetResponseIgnoreQuery(const GURL& url, const base::FilePath& path);
// Returns how many requests have been issued that have a stored reply.
int GetHitCount();
diff --git a/content/utility/utility_thread_impl.h b/content/utility/utility_thread_impl.h
index 12c76de..da2ffbd 100644
--- a/content/utility/utility_thread_impl.h
+++ b/content/utility/utility_thread_impl.h
@@ -14,7 +14,9 @@
#include "content/common/content_export.h"
#include "content/public/utility/utility_thread.h"
+namespace base {
class FilePath;
+}
namespace content {
class WebKitPlatformSupportImpl;
@@ -42,7 +44,7 @@ class UtilityThreadImpl : public UtilityThread,
void OnBatchModeFinished();
#if defined(OS_POSIX)
- void OnLoadPlugins(const std::vector<FilePath>& plugin_paths);
+ void OnLoadPlugins(const std::vector<base::FilePath>& plugin_paths);
#endif // OS_POSIX
// True when we're running in batch mode.
diff --git a/crypto/nss_util.h b/crypto/nss_util.h
index 7b50781..60b7778 100644
--- a/crypto/nss_util.h
+++ b/crypto/nss_util.h
@@ -9,11 +9,8 @@
#include "base/basictypes.h"
#include "crypto/crypto_export.h"
-#if defined(USE_NSS)
-class FilePath;
-#endif // defined(USE_NSS)
-
namespace base {
+class FilePath;
class Lock;
class Time;
} // namespace base
diff --git a/gpu/tools/compositor_model_bench/render_tree.h b/gpu/tools/compositor_model_bench/render_tree.h
index 5ac01e5..adee4b8 100644
--- a/gpu/tools/compositor_model_bench/render_tree.h
+++ b/gpu/tools/compositor_model_bench/render_tree.h
@@ -205,7 +205,7 @@ class RenderNodeVisitor {
virtual void EndVisitCCNode(CCNode* v);
};
-RenderNode* BuildRenderTreeFromFile(const FilePath& path);
+RenderNode* BuildRenderTreeFromFile(const base::FilePath& path);
#endif // GPU_TOOLS_COMPOSITOR_MODEL_BENCH_RENDER_TREE_H_
diff --git a/ipc/ipc_message_utils.h b/ipc/ipc_message_utils.h
index 7300659..fc72210 100644
--- a/ipc/ipc_message_utils.h
+++ b/ipc/ipc_message_utils.h
@@ -45,11 +45,11 @@
#error "Please add the noinline property for your new compiler here."
#endif
-class FilePath;
class NullableString16;
namespace base {
class DictionaryValue;
+class FilePath;
class ListValue;
class Time;
class TimeDelta;
@@ -438,8 +438,8 @@ struct IPC_EXPORT ParamTraits<base::FileDescriptor> {
#endif // defined(OS_POSIX)
template <>
-struct IPC_EXPORT ParamTraits<FilePath> {
- typedef FilePath param_type;
+struct IPC_EXPORT ParamTraits<base::FilePath> {
+ typedef base::FilePath param_type;
static void Write(Message* m, const param_type& p);
static bool Read(const Message* m, PickleIterator* iter, param_type* r);
static void Log(const param_type& p, std::string* l);
diff --git a/media/base/media.h b/media/base/media.h
index 277c740..5518961 100644
--- a/media/base/media.h
+++ b/media/base/media.h
@@ -10,7 +10,9 @@
#include "media/base/media_export.h"
+namespace base {
class FilePath;
+}
namespace media {
@@ -25,7 +27,7 @@ namespace media {
// of the process.
//
// Returns true if everything was successfully initialized, false otherwise.
-MEDIA_EXPORT bool InitializeMediaLibrary(const FilePath& module_dir);
+MEDIA_EXPORT bool InitializeMediaLibrary(const base::FilePath& module_dir);
// Helper function for unit tests to avoid boiler plate code everywhere. This
// function will crash if it fails to load the media library. This ensures tests
diff --git a/media/base/media_stub.cc b/media/base/media_stub.cc
index a42bbf9..27bdc15 100644
--- a/media/base/media_stub.cc
+++ b/media/base/media_stub.cc
@@ -10,7 +10,7 @@
// libraries (e.g., Android and iOS).
namespace media {
-bool InitializeMediaLibrary(const FilePath& module_dir) {
+bool InitializeMediaLibrary(const base::FilePath& module_dir) {
return true;
}
diff --git a/media/filters/pipeline_integration_test_base.h b/media/filters/pipeline_integration_test_base.h
index dedbb70..19bdda0 100644
--- a/media/filters/pipeline_integration_test_base.h
+++ b/media/filters/pipeline_integration_test_base.h
@@ -14,7 +14,9 @@
#include "media/filters/video_renderer_base.h"
#include "testing/gmock/include/gmock/gmock.h"
+namespace base {
class FilePath;
+}
namespace media {
@@ -39,14 +41,14 @@ class PipelineIntegrationTestBase {
bool WaitUntilOnEnded();
PipelineStatus WaitUntilEndedOrError();
- bool Start(const FilePath& file_path, PipelineStatus expected_status);
+ bool Start(const base::FilePath& file_path, PipelineStatus expected_status);
// Enable playback with audio and video hashing enabled. Frame dropping and
// audio underflow will be disabled to ensure consistent hashes.
- bool Start(const FilePath& file_path, PipelineStatus expected_status,
+ bool Start(const base::FilePath& file_path, PipelineStatus expected_status,
bool hashing_enabled);
// Initialize the pipeline and ignore any status updates. Useful for testing
// invalid audio/video clips which don't have deterministic results.
- bool Start(const FilePath& file_path);
+ bool Start(const base::FilePath& file_path);
void Play();
void Pause();
@@ -54,7 +56,7 @@ class PipelineIntegrationTestBase {
void Stop();
bool WaitUntilCurrentTimeIsAfter(const base::TimeDelta& wait_time);
scoped_ptr<FilterCollection> CreateFilterCollection(
- const FilePath& file_path);
+ const base::FilePath& file_path);
// Returns the MD5 hash of all video frames seen. Should only be called once
// after playback completes. First time hashes should be generated with
diff --git a/media/webm/chromeos/webm_encoder.h b/media/webm/chromeos/webm_encoder.h
index d0e7414..cced732 100644
--- a/media/webm/chromeos/webm_encoder.h
+++ b/media/webm/chromeos/webm_encoder.h
@@ -18,9 +18,12 @@ extern "C" {
#include "third_party/libvpx/source/libvpx/vpx/vp8cx.h"
}
-class FilePath;
class SkBitmap;
+namespace base {
+class FilePath;
+}
+
namespace media {
namespace chromeos {
@@ -33,7 +36,7 @@ class MEDIA_EXPORT WebmEncoder {
public:
// Create new instance for writing to |output_path|. If |realtime| is |true|,
// uses realtime deadline, otherwise - "good quality" deadline.
- WebmEncoder(const FilePath& output_path, int bitrate, bool realtime);
+ WebmEncoder(const base::FilePath& output_path, int bitrate, bool realtime);
~WebmEncoder();
// Encodes video from a Nx(N*M) sprite, having M frames of size NxN with FPS
@@ -87,7 +90,7 @@ class MEDIA_EXPORT WebmEncoder {
// Stack with start offsets of currently open sub-elements.
std::stack<long int> ebml_sub_elements_;
- FilePath output_path_;
+ base::FilePath output_path_;
FILE* output_;
// True if an error occured while encoding/writing to file.
diff --git a/net/base/cert_test_util.h b/net/base/cert_test_util.h
index 9f23b7d..db49e87 100644
--- a/net/base/cert_test_util.h
+++ b/net/base/cert_test_util.h
@@ -11,13 +11,15 @@
#include "net/base/x509_cert_types.h"
#include "net/base/x509_certificate.h"
+namespace base {
class FilePath;
+}
namespace net {
class EVRootCAMetadata;
-CertificateList CreateCertificateListFromFile(const FilePath& certs_dir,
+CertificateList CreateCertificateListFromFile(const base::FilePath& certs_dir,
const std::string& cert_file,
int format);
@@ -26,7 +28,7 @@ CertificateList CreateCertificateListFromFile(const FilePath& certs_dir,
// |certs_dir| represents the test certificates directory. |cert_file| is the
// name of the certificate file. If cert_file contains multiple certificates,
// the first certificate found will be returned.
-scoped_refptr<X509Certificate> ImportCertFromFile(const FilePath& certs_dir,
+scoped_refptr<X509Certificate> ImportCertFromFile(const base::FilePath& certs_dir,
const std::string& cert_file);
// ScopedTestEVPolicy causes certificates marked with |policy|, issued from a
diff --git a/net/base/file_stream.h b/net/base/file_stream.h
index 5c64792..763a03c 100644
--- a/net/base/file_stream.h
+++ b/net/base/file_stream.h
@@ -16,7 +16,9 @@
#include "net/base/net_export.h"
#include "net/base/net_log.h"
+namespace base {
class FilePath;
+}
namespace net {
@@ -54,7 +56,7 @@ class NET_EXPORT FileStream {
// automatically closed when FileStream is destructed in an asynchronous
// manner (i.e. the file stream is closed in the background but you don't
// know when).
- virtual int Open(const FilePath& path, int open_flags,
+ virtual int Open(const base::FilePath& path, int open_flags,
const CompletionCallback& callback);
// Call this method to open the FileStream synchronously.
@@ -64,7 +66,7 @@ class NET_EXPORT FileStream {
//
// If the file stream is not closed manually, the underlying file will be
// automatically closed when FileStream is destructed.
- virtual int OpenSync(const FilePath& path, int open_flags);
+ virtual int OpenSync(const base::FilePath& path, int open_flags);
// Returns true if Open succeeded and Close has not been called.
virtual bool IsOpen() const;
diff --git a/net/base/file_stream_context.h b/net/base/file_stream_context.h
index 244c25f..42fc0eb 100644
--- a/net/base/file_stream_context.h
+++ b/net/base/file_stream_context.h
@@ -39,7 +39,9 @@
#include <errno.h>
#endif
+namespace base {
class FilePath;
+}
namespace net {
@@ -97,10 +99,10 @@ class FileStream::Context {
// not closed yet.
void Orphan();
- void OpenAsync(const FilePath& path,
+ void OpenAsync(const base::FilePath& path,
int open_flags,
const CompletionCallback& callback);
- int OpenSync(const FilePath& path, int open_flags);
+ int OpenSync(const base::FilePath& path, int open_flags);
void CloseSync();
@@ -137,9 +139,9 @@ class FileStream::Context {
// Map system error into network error code and log it with |bound_net_log_|.
int RecordAndMapError(int error, FileErrorSource source) const;
- void BeginOpenEvent(const FilePath& path);
+ void BeginOpenEvent(const base::FilePath& path);
- OpenResult OpenFileImpl(const FilePath& path, int open_flags);
+ OpenResult OpenFileImpl(const base::FilePath& path, int open_flags);
int ProcessOpenError(int error_code);
void OnOpenCompleted(const CompletionCallback& callback, OpenResult result);
diff --git a/net/base/net_util.h b/net/base/net_util.h
index 874f3e2..f21c1ed 100644
--- a/net/base/net_util.h
+++ b/net/base/net_util.h
@@ -26,10 +26,10 @@
#include "net/base/net_export.h"
#include "net/base/net_log.h"
-class FilePath;
class GURL;
namespace base {
+class FilePath;
class Time;
}
@@ -79,13 +79,13 @@ NET_EXPORT_PRIVATE extern size_t GetCountOfExplicitlyAllowedPorts();
// Given the full path to a file name, creates a file: URL. The returned URL
// may not be valid if the input is malformed.
-NET_EXPORT GURL FilePathToFileURL(const FilePath& path);
+NET_EXPORT GURL FilePathToFileURL(const base::FilePath& path);
// Converts a file: URL back to a filename that can be passed to the OS. The
// file URL must be well-formed (GURL::is_valid() must return true); we don't
// handle degenerate cases here. Returns true on success, false if it isn't a
// valid file URL. On failure, *file_path will be empty.
-NET_EXPORT bool FileURLToFilePath(const GURL& url, FilePath* file_path);
+NET_EXPORT bool FileURLToFilePath(const GURL& url, base::FilePath* file_path);
// Splits an input of the form <host>[":"<port>] into its consitituent parts.
// Saves the result into |*host| and |*port|. If the input did not have
@@ -278,12 +278,13 @@ NET_EXPORT string16 GetSuggestedFilename(const GURL& url,
const std::string& default_name);
// Similar to GetSuggestedFilename(), but returns a FilePath.
-NET_EXPORT FilePath GenerateFileName(const GURL& url,
- const std::string& content_disposition,
- const std::string& referrer_charset,
- const std::string& suggested_name,
- const std::string& mime_type,
- const std::string& default_name);
+NET_EXPORT base::FilePath GenerateFileName(
+ const GURL& url,
+ const std::string& content_disposition,
+ const std::string& referrer_charset,
+ const std::string& suggested_name,
+ const std::string& mime_type,
+ const std::string& default_name);
// Ensures that the filename and extension is safe to use in the filesystem.
//
@@ -304,7 +305,7 @@ NET_EXPORT FilePath GenerateFileName(const GURL& url,
// thread that allows IO.
NET_EXPORT void GenerateSafeFileName(const std::string& mime_type,
bool ignore_extension,
- FilePath* file_path);
+ base::FilePath* file_path);
// Checks |port| against a list of ports which are restricted by default.
// Returns true if |port| is allowed, false if it is restricted.
diff --git a/net/base/network_delegate.cc b/net/base/network_delegate.cc
index 539d987..59953a8 100644
--- a/net/base/network_delegate.cc
+++ b/net/base/network_delegate.cc
@@ -108,7 +108,7 @@ bool NetworkDelegate::CanGetCookies(const URLRequest& request,
}
bool NetworkDelegate::CanAccessFile(const URLRequest& request,
- const FilePath& path) const {
+ const base::FilePath& path) const {
DCHECK(CalledOnValidThread());
return OnCanAccessFile(request, path);
}
diff --git a/net/base/network_delegate.h b/net/base/network_delegate.h
index 5475754..f219854 100644
--- a/net/base/network_delegate.h
+++ b/net/base/network_delegate.h
@@ -14,9 +14,12 @@
#include "net/base/completion_callback.h"
#include "net/cookies/canonical_cookie.h"
-class FilePath;
class GURL;
+namespace base {
+class FilePath;
+}
+
namespace net {
// NOTE: Layering violations!
@@ -92,7 +95,7 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
const std::string& cookie_line,
CookieOptions* options);
bool CanAccessFile(const URLRequest& request,
- const FilePath& path) const;
+ const base::FilePath& path) const;
bool CanThrottleRequest(const URLRequest& request) const;
int NotifyBeforeSocketStreamConnect(SocketStream* socket,
@@ -215,7 +218,7 @@ class NET_EXPORT NetworkDelegate : public base::NonThreadSafe {
// allow or block access to the given file path. Returns true if access is
// allowed.
virtual bool OnCanAccessFile(const URLRequest& request,
- const FilePath& path) const = 0;
+ const base::FilePath& path) const = 0;
// Returns true if the given request may be rejected when the
// URLRequestThrottlerManager believes the server servicing the
diff --git a/net/base/test_root_certs.h b/net/base/test_root_certs.h
index 4d52dbc..a7c7cde 100644
--- a/net/base/test_root_certs.h
+++ b/net/base/test_root_certs.h
@@ -21,7 +21,9 @@
#include "base/mac/scoped_cftyperef.h"
#endif
+namespace base {
class FilePath;
+}
namespace net {
@@ -45,7 +47,7 @@ class NET_EXPORT_PRIVATE TestRootCerts {
// Reads a single certificate from |file| and marks it as trusted. Returns
// false if an error is encountered, such as being unable to read |file|
// or more than one certificate existing in |file|.
- bool AddFromFile(const FilePath& file);
+ bool AddFromFile(const base::FilePath& file);
// Clears the trusted status of any certificates that were previously
// marked trusted via Add().
diff --git a/net/base/upload_data.h b/net/base/upload_data.h
index 4e6c6ca..b782ab4 100644
--- a/net/base/upload_data.h
+++ b/net/base/upload_data.h
@@ -12,9 +12,8 @@
#include "net/base/net_export.h"
#include "net/base/upload_element.h"
-class FilePath;
-
namespace base {
+class FilePath;
class Time;
} // namespace base
@@ -35,7 +34,7 @@ class NET_EXPORT UploadData
void AppendBytes(const char* bytes, int bytes_len);
- void AppendFileRange(const FilePath& file_path,
+ void AppendFileRange(const base::FilePath& file_path,
uint64 offset, uint64 length,
const base::Time& expected_modification_time);
diff --git a/net/disk_cache/cache_util.h b/net/disk_cache/cache_util.h
index 6987dc3..0b3ee6e 100644
--- a/net/disk_cache/cache_util.h
+++ b/net/disk_cache/cache_util.h
@@ -8,7 +8,9 @@
#include "base/basictypes.h"
#include "net/base/net_export.h"
+namespace base {
class FilePath;
+}
namespace disk_cache {
@@ -18,15 +20,16 @@ namespace disk_cache {
// for the cache directory. Returns true if successful. On ChromeOS,
// this moves the cache contents, and leaves the empty cache
// directory.
-NET_EXPORT_PRIVATE bool MoveCache(const FilePath& from_path,
- const FilePath& to_path);
+NET_EXPORT_PRIVATE bool MoveCache(const base::FilePath& from_path,
+ const base::FilePath& to_path);
// Deletes the cache files stored on |path|, and optionally also attempts to
// delete the folder itself.
-NET_EXPORT_PRIVATE void DeleteCache(const FilePath& path, bool remove_folder);
+NET_EXPORT_PRIVATE void DeleteCache(const base::FilePath& path,
+ bool remove_folder);
// Deletes a cache file.
-NET_EXPORT_PRIVATE bool DeleteCacheFile(const FilePath& name);
+NET_EXPORT_PRIVATE bool DeleteCacheFile(const base::FilePath& name);
} // namespace disk_cache
diff --git a/net/disk_cache/disk_cache.h b/net/disk_cache/disk_cache.h
index d2e01a0..e27d24c 100644
--- a/net/disk_cache/disk_cache.h
+++ b/net/disk_cache/disk_cache.h
@@ -17,9 +17,8 @@
#include "net/base/completion_callback.h"
#include "net/base/net_export.h"
-class FilePath;
-
namespace base {
+class FilePath;
class MessageLoopProxy;
}
@@ -48,7 +47,8 @@ class Backend;
// be invoked when a backend is available or a fatal error condition is reached.
// The pointer to receive the |backend| must remain valid until the operation
// completes (the callback is notified).
-NET_EXPORT int CreateCacheBackend(net::CacheType type, const FilePath& path,
+NET_EXPORT int CreateCacheBackend(net::CacheType type,
+ const base::FilePath& path,
int max_bytes, bool force,
base::MessageLoopProxy* thread,
net::NetLog* net_log, Backend** backend,
diff --git a/net/disk_cache/file.h b/net/disk_cache/file.h
index 0124090..3f17ea0 100644
--- a/net/disk_cache/file.h
+++ b/net/disk_cache/file.h
@@ -11,7 +11,9 @@
#include "base/platform_file.h"
#include "net/base/net_export.h"
+namespace base {
class FilePath;
+}
namespace disk_cache {
diff --git a/net/disk_cache/mapped_file.h b/net/disk_cache/mapped_file.h
index c5960d0..6190997 100644
--- a/net/disk_cache/mapped_file.h
+++ b/net/disk_cache/mapped_file.h
@@ -12,7 +12,9 @@
#include "net/disk_cache/file.h"
#include "net/disk_cache/file_block.h"
+namespace base {
class FilePath;
+}
namespace disk_cache {
@@ -27,7 +29,7 @@ class NET_EXPORT_PRIVATE MappedFile : public File {
// Performs object initialization. name is the file to use, and size is the
// amount of data to memory map from the file. If size is 0, the whole file
// will be mapped in memory.
- void* Init(const FilePath& name, size_t size);
+ void* Init(const base::FilePath& name, size_t size);
void* buffer() const {
return buffer_;
diff --git a/net/http/infinite_cache.h b/net/http/infinite_cache.h
index 30d9025..a93d4c1 100644
--- a/net/http/infinite_cache.h
+++ b/net/http/infinite_cache.h
@@ -18,9 +18,8 @@
#include "net/base/completion_callback.h"
#include "net/base/net_export.h"
-class FilePath;
-
namespace base {
+class FilePath;
class SequencedTaskRunner;
class SequencedWorkerPool;
}
@@ -80,7 +79,7 @@ class NET_EXPORT_PRIVATE InfiniteCache
// Initializes this object to start tracking requests. |path| is the location
// of the file to use to store data; it can be empty, in which case the data
// will not be persisted to disk.
- void Init(const FilePath& path);
+ void Init(const base::FilePath& path);
InfiniteCacheTransaction* CreateInfiniteCacheTransaction();
diff --git a/net/test/python_utils.h b/net/test/python_utils.h
index c7cf289..3077645 100644
--- a/net/test/python_utils.h
+++ b/net/test/python_utils.h
@@ -8,16 +8,19 @@
#include "base/compiler_specific.h"
class CommandLine;
+
+namespace base {
class FilePath;
+}
// This is the python path variable name.
extern const char kPythonPathEnv[];
// Appends the dir to python path environment variable.
-void AppendToPythonPath(const FilePath& dir);
+void AppendToPythonPath(const base::FilePath& dir);
// Return the location of the compiler-generated python protobuf.
-bool GetPyProtoPath(FilePath* dir);
+bool GetPyProtoPath(base::FilePath* dir);
// Returns the command that should be used to launch Python.
bool GetPythonCommand(CommandLine* python_cmd) WARN_UNUSED_RESULT;
diff --git a/net/url_request/url_fetcher.h b/net/url_request/url_fetcher.h
index 815dac0..fdd4367 100644
--- a/net/url_request/url_fetcher.h
+++ b/net/url_request/url_fetcher.h
@@ -16,10 +16,10 @@
#include "base/task_runner.h"
#include "net/base/net_export.h"
-class FilePath;
class GURL;
namespace base {
+class FilePath;
class MessageLoopProxy;
class TimeDelta;
}
@@ -220,7 +220,7 @@ class NET_EXPORT URLFetcher {
// The created file is removed when the URLFetcher is deleted unless you
// take ownership by calling GetResponseAsFilePath().
virtual void SaveResponseToFileAtPath(
- const FilePath& file_path,
+ const base::FilePath& file_path,
scoped_refptr<base::TaskRunner> file_task_runner) = 0;
// By default, the response is saved in a string. Call this method to save the
@@ -284,7 +284,7 @@ class NET_EXPORT URLFetcher {
// be removed once the URLFetcher is destroyed. User should not take
// ownership more than once, or call this method after taking ownership.
virtual bool GetResponseAsFilePath(bool take_ownership,
- FilePath* out_response_path) const = 0;
+ base::FilePath* out_response_path) const = 0;
};
} // namespace net
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index a0ed0b2..3c1c2d52 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -30,7 +30,6 @@
#include "net/http/http_response_info.h"
#include "net/url_request/url_request_status.h"
-class FilePath;
// Temporary layering violation to allow existing users of a deprecated
// interface.
class ChildProcessSecurityPolicyTest;
diff --git a/net/url_request/url_request_context_builder.h b/net/url_request/url_request_context_builder.h
index fd21f8a6..f1ce570 100644
--- a/net/url_request/url_request_context_builder.h
+++ b/net/url_request/url_request_context_builder.h
@@ -49,7 +49,7 @@ class NET_EXPORT URLRequestContextBuilder {
int max_size;
// The cache path (when type is DISK).
- FilePath path;
+ base::FilePath path;
};
struct NET_EXPORT HttpNetworkSessionParams {
diff --git a/printing/emf_win.h b/printing/emf_win.h
index 2f0772f..3516f4e 100644
--- a/printing/emf_win.h
+++ b/printing/emf_win.h
@@ -14,7 +14,9 @@
#include "base/gtest_prod_util.h"
#include "printing/metafile.h"
+namespace base {
class FilePath;
+}
namespace gfx {
class Rect;
@@ -42,10 +44,10 @@ class PRINTING_EXPORT Emf : public Metafile {
// Generates a new metafile that will record every GDI command, and will
// be saved to |metafile_path|.
- virtual bool InitToFile(const FilePath& metafile_path);
+ virtual bool InitToFile(const base::FilePath& metafile_path);
// Initializes the Emf with the data in |metafile_path|.
- virtual bool InitFromFile(const FilePath& metafile_path);
+ virtual bool InitFromFile(const base::FilePath& metafile_path);
// Metafile methods.
virtual bool Init() OVERRIDE;
@@ -71,7 +73,7 @@ class PRINTING_EXPORT Emf : public Metafile {
// Saves the EMF data to a file as-is. It is recommended to use the .emf file
// extension but it is not enforced. This function synchronously writes to the
// file. For testing only.
- virtual bool SaveTo(const FilePath& file_path) const OVERRIDE;
+ virtual bool SaveTo(const base::FilePath& file_path) const OVERRIDE;
// Should be passed to Playback to keep the exact same size.
virtual gfx::Rect GetPageBounds(unsigned int page_number) const OVERRIDE;
diff --git a/printing/image.h b/printing/image.h
index e34c2c24..b40657a 100644
--- a/printing/image.h
+++ b/printing/image.h
@@ -13,7 +13,9 @@
#include "printing/printing_export.h"
#include "ui/gfx/size.h"
+namespace base {
class FilePath;
+}
namespace printing {
@@ -26,7 +28,7 @@ class PRINTING_EXPORT Image {
// Creates the image from the given file on disk. Uses extension to
// defer file type. PNG and EMF (on Windows) currently supported.
// If image loading fails size().IsEmpty() will be true.
- explicit Image(const FilePath& path);
+ explicit Image(const base::FilePath& path);
// Creates the image from the metafile. Deduces bounds based on bounds in
// metafile. If loading fails size().IsEmpty() will be true.
@@ -45,7 +47,7 @@ class PRINTING_EXPORT Image {
std::string checksum() const;
// Save image as PNG.
- bool SaveToPng(const FilePath& filepath) const;
+ bool SaveToPng(const base::FilePath& filepath) const;
// Returns % of pixels different
double PercentageDifferent(const Image& rhs) const;
diff --git a/printing/metafile.h b/printing/metafile.h
index a73c850..ca0901b 100644
--- a/printing/metafile.h
+++ b/printing/metafile.h
@@ -18,7 +18,9 @@
#include "base/mac/scoped_cftyperef.h"
#endif
+namespace base {
class FilePath;
+}
namespace gfx {
class Rect;
@@ -117,7 +119,7 @@ class PRINTING_EXPORT Metafile {
// Saves the underlying data to the given file. This function should ONLY be
// called after the metafile is closed. Returns true if writing succeeded.
- virtual bool SaveTo(const FilePath& file_path) const = 0;
+ virtual bool SaveTo(const base::FilePath& file_path) const = 0;
// Returns the bounds of the given page. Pages use a 1-based index.
virtual gfx::Rect GetPageBounds(unsigned int page_number) const = 0;
diff --git a/printing/pdf_metafile_cg_mac.h b/printing/pdf_metafile_cg_mac.h
index 09fad56..f4dd81a 100644
--- a/printing/pdf_metafile_cg_mac.h
+++ b/printing/pdf_metafile_cg_mac.h
@@ -14,7 +14,9 @@
#include "base/threading/thread_checker.h"
#include "printing/metafile.h"
+namespace base {
class FilePath;
+}
namespace gfx {
class Rect;
@@ -48,7 +50,7 @@ class PRINTING_EXPORT PdfMetafileCg : public Metafile {
virtual bool GetData(void* dst_buffer, uint32 dst_buffer_size) const OVERRIDE;
// For testing purposes only.
- virtual bool SaveTo(const FilePath& file_path) const OVERRIDE;
+ virtual bool SaveTo(const base::FilePath& file_path) const OVERRIDE;
virtual gfx::Rect GetPageBounds(unsigned int page_number) const OVERRIDE;
virtual unsigned int GetPageCount() const OVERRIDE;
diff --git a/printing/pdf_metafile_skia.h b/printing/pdf_metafile_skia.h
index 7a1a9da..33be6d2 100644
--- a/printing/pdf_metafile_skia.h
+++ b/printing/pdf_metafile_skia.h
@@ -44,7 +44,7 @@ class PRINTING_EXPORT PdfMetafileSkia : public Metafile {
virtual uint32 GetDataSize() const OVERRIDE;
virtual bool GetData(void* dst_buffer, uint32 dst_buffer_size) const OVERRIDE;
- virtual bool SaveTo(const FilePath& file_path) const OVERRIDE;
+ virtual bool SaveTo(const base::FilePath& file_path) const OVERRIDE;
virtual gfx::Rect GetPageBounds(unsigned int page_number) const OVERRIDE;
virtual unsigned int GetPageCount() const OVERRIDE;
diff --git a/printing/printed_document.h b/printing/printed_document.h
index bdb092f..3992386 100644
--- a/printing/printed_document.h
+++ b/printing/printed_document.h
@@ -13,9 +13,12 @@
#include "printing/print_settings.h"
#include "ui/gfx/native_widget_types.h"
-class FilePath;
class MessageLoop;
+namespace base {
+class FilePath;
+}
+
namespace printing {
class Metafile;
@@ -93,9 +96,9 @@ class PRINTING_EXPORT PrintedDocument
// Sets a path where to dump printing output files for debugging. If never set
// no files are generated.
- static void set_debug_dump_path(const FilePath& debug_dump_path);
+ static void set_debug_dump_path(const base::FilePath& debug_dump_path);
- static const FilePath& debug_dump_path();
+ static const base::FilePath& debug_dump_path();
private:
friend class base::RefCountedThreadSafe<PrintedDocument>;
diff --git a/remoting/host/audio_capturer_linux.cc b/remoting/host/audio_capturer_linux.cc
index 59e30e4..3dd6d68 100644
--- a/remoting/host/audio_capturer_linux.cc
+++ b/remoting/host/audio_capturer_linux.cc
@@ -27,7 +27,7 @@ base::LazyInstance<scoped_refptr<AudioPipeReader> >::Leaky
// See crbug.com/161373 and crbug.com/104544.
void AudioCapturerLinux::InitializePipeReader(
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
- const FilePath& pipe_name) {
+ const base::FilePath& pipe_name) {
scoped_refptr<AudioPipeReader> pipe_reader;
if (!pipe_name.empty())
pipe_reader = AudioPipeReader::Create(task_runner, pipe_name);
diff --git a/remoting/host/audio_capturer_linux.h b/remoting/host/audio_capturer_linux.h
index b52f1ff..466ccf6 100644
--- a/remoting/host/audio_capturer_linux.h
+++ b/remoting/host/audio_capturer_linux.h
@@ -10,7 +10,9 @@
#include "remoting/host/audio_silence_detector.h"
#include "remoting/host/linux/audio_pipe_reader.h"
+namespace base {
class FilePath;
+}
namespace remoting {
@@ -24,7 +26,7 @@ class AudioCapturerLinux : public AudioCapturer,
// to read from the pipe.
static void InitializePipeReader(
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
- const FilePath& pipe_name);
+ const base::FilePath& pipe_name);
explicit AudioCapturerLinux(
scoped_refptr<AudioPipeReader> pipe_reader);
diff --git a/remoting/host/branding.cc b/remoting/host/branding.cc
index c049854..908d9bc 100644
--- a/remoting/host/branding.cc
+++ b/remoting/host/branding.cc
@@ -16,17 +16,17 @@ namespace {
// command-line switches are absent.
#if defined(OS_WIN)
#ifdef OFFICIAL_BUILD
-const FilePath::CharType kConfigDir[] =
+const base::FilePath::CharType kConfigDir[] =
FILE_PATH_LITERAL("Google\\Chrome Remote Desktop");
#else
-const FilePath::CharType kConfigDir[] =
+const base::FilePath::CharType kConfigDir[] =
FILE_PATH_LITERAL("Chromoting");
#endif
#elif defined(OS_MACOSX)
-const FilePath::CharType kConfigDir[] =
+const base::FilePath::CharType kConfigDir[] =
FILE_PATH_LITERAL("Chrome Remote Desktop");
#else
-const FilePath::CharType kConfigDir[] =
+const base::FilePath::CharType kConfigDir[] =
FILE_PATH_LITERAL(".config/chrome-remote-desktop");
#endif
@@ -38,8 +38,8 @@ namespace remoting {
const wchar_t kWindowsServiceName[] = L"chromoting";
#endif
-FilePath GetConfigDir() {
- FilePath app_data_dir;
+base::FilePath GetConfigDir() {
+ base::FilePath app_data_dir;
#if defined(OS_WIN)
PathService::Get(base::DIR_COMMON_APP_DATA, &app_data_dir);
diff --git a/remoting/host/branding.h b/remoting/host/branding.h
index c139fb4..a076bda 100644
--- a/remoting/host/branding.h
+++ b/remoting/host/branding.h
@@ -15,7 +15,7 @@ extern const wchar_t kWindowsServiceName[];
#endif
// Returns the location of the host configuration directory.
-FilePath GetConfigDir();
+base::FilePath GetConfigDir();
} // namespace remoting
diff --git a/remoting/host/config_file_watcher.cc b/remoting/host/config_file_watcher.cc
index 4e6b77a..0850460 100644
--- a/remoting/host/config_file_watcher.cc
+++ b/remoting/host/config_file_watcher.cc
@@ -21,7 +21,7 @@ namespace remoting {
// file to use.
const char kHostConfigSwitchName[] = "host-config";
-const FilePath::CharType kDefaultHostConfigFile[] =
+const base::FilePath::CharType kDefaultHostConfigFile[] =
FILE_PATH_LITERAL("host.json");
class ConfigFileWatcherImpl
@@ -35,7 +35,7 @@ class ConfigFileWatcherImpl
ConfigFileWatcher::Delegate* delegate);
// Starts watching |config_path|.
- void Watch(const FilePath& config_path);
+ void Watch(const base::FilePath& config_path);
// Stops watching the configuration file.
void StopWatching();
@@ -47,13 +47,13 @@ class ConfigFileWatcherImpl
void FinishStopping();
// Called every time the host configuration file is updated.
- void OnConfigUpdated(const FilePath& path, bool error);
+ void OnConfigUpdated(const base::FilePath& path, bool error);
// Reads the configuration file and passes it to the delegate.
void ReloadConfig();
std::string config_;
- FilePath config_path_;
+ base::FilePath config_path_;
scoped_ptr<base::DelayTimer<ConfigFileWatcherImpl> > config_updated_timer_;
@@ -85,7 +85,7 @@ ConfigFileWatcher::~ConfigFileWatcher() {
impl_ = NULL;
}
-void ConfigFileWatcher::Watch(const FilePath& config_path) {
+void ConfigFileWatcher::Watch(const base::FilePath& config_path) {
impl_->Watch(config_path);
}
@@ -100,7 +100,7 @@ ConfigFileWatcherImpl::ConfigFileWatcherImpl(
DCHECK(main_task_runner_->BelongsToCurrentThread());
}
-void ConfigFileWatcherImpl::Watch(const FilePath& config_path) {
+void ConfigFileWatcherImpl::Watch(const base::FilePath& config_path) {
if (!io_task_runner_->BelongsToCurrentThread()) {
io_task_runner_->PostTask(
FROM_HERE,
@@ -156,7 +156,8 @@ void ConfigFileWatcherImpl::FinishStopping() {
config_watcher_.reset(NULL);
}
-void ConfigFileWatcherImpl::OnConfigUpdated(const FilePath& path, bool error) {
+void ConfigFileWatcherImpl::OnConfigUpdated(const base::FilePath& path,
+ bool error) {
DCHECK(io_task_runner_->BelongsToCurrentThread());
// Call ReloadConfig() after a short delay, so that we will not try to read
diff --git a/remoting/host/config_file_watcher.h b/remoting/host/config_file_watcher.h
index 83e971a..9762296 100644
--- a/remoting/host/config_file_watcher.h
+++ b/remoting/host/config_file_watcher.h
@@ -17,7 +17,7 @@ class SingleThreadTaskRunner;
namespace remoting {
extern const char kHostConfigSwitchName[];
-extern const FilePath::CharType kDefaultHostConfigFile[];
+extern const base::FilePath::CharType kDefaultHostConfigFile[];
class ConfigFileWatcherImpl;
@@ -44,7 +44,7 @@ class ConfigFileWatcher {
virtual ~ConfigFileWatcher();
// Starts watching |config_path|.
- void Watch(const FilePath& config_path);
+ void Watch(const base::FilePath& config_path);
private:
scoped_refptr<ConfigFileWatcherImpl> impl_;
diff --git a/remoting/host/daemon_process.cc b/remoting/host/daemon_process.cc
index e97341b..84f5b916 100644
--- a/remoting/host/daemon_process.cc
+++ b/remoting/host/daemon_process.cc
@@ -151,8 +151,8 @@ void DaemonProcess::Initialize() {
DCHECK(caller_task_runner()->BelongsToCurrentThread());
// Get the name of the host configuration file.
- FilePath default_config_dir = remoting::GetConfigDir();
- FilePath config_path = default_config_dir.Append(kDefaultHostConfigFile);
+ base::FilePath default_config_dir = remoting::GetConfigDir();
+ base::FilePath config_path = default_config_dir.Append(kDefaultHostConfigFile);
const CommandLine* command_line = CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(kHostConfigSwitchName)) {
config_path = command_line->GetSwitchValuePath(kHostConfigSwitchName);
diff --git a/remoting/host/daemon_process.h b/remoting/host/daemon_process.h
index 801e271..45952bb 100644
--- a/remoting/host/daemon_process.h
+++ b/remoting/host/daemon_process.h
@@ -20,8 +20,6 @@
#include "remoting/host/config_file_watcher.h"
#include "remoting/host/worker_process_ipc_delegate.h"
-class FilePath;
-
namespace remoting {
class AutoThreadTaskRunner;
diff --git a/remoting/host/daemon_process_win.cc b/remoting/host/daemon_process_win.cc
index 378eb52..51ee12a 100644
--- a/remoting/host/daemon_process_win.cc
+++ b/remoting/host/daemon_process_win.cc
@@ -143,7 +143,7 @@ void DaemonProcessWin::LaunchNetworkProcess() {
DCHECK(!network_launcher_);
// Construct the host binary name.
- FilePath host_binary;
+ base::FilePath host_binary;
if (!GetInstalledBinaryPath(kHostBinaryName, &host_binary)) {
Stop();
return;
diff --git a/remoting/host/desktop_process_main.cc b/remoting/host/desktop_process_main.cc
index fa678de..5801c8d 100644
--- a/remoting/host/desktop_process_main.cc
+++ b/remoting/host/desktop_process_main.cc
@@ -47,7 +47,7 @@ const char kUsageMessage[] =
"Options:\n"
" --help, --? - Print this message.\n";
-void Usage(const FilePath& program_name) {
+void Usage(const base::FilePath& program_name) {
std::string display_name = UTF16ToUTF8(program_name.LossyDisplayName());
LOG(INFO) << StringPrintf(kUsageMessage, display_name.c_str());
}
@@ -125,7 +125,7 @@ int CALLBACK WinMain(HINSTANCE instance,
// Mark the process as DPI-aware, so Windows won't scale coordinates in APIs.
// N.B. This API exists on Vista and above.
if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
- FilePath path(base::GetNativeLibraryName(UTF8ToUTF16("user32")));
+ base::FilePath path(base::GetNativeLibraryName(UTF8ToUTF16("user32")));
base::ScopedNativeLibrary user32(path);
CHECK(user32.is_valid());
diff --git a/remoting/host/desktop_session_win.cc b/remoting/host/desktop_session_win.cc
index ac28764..288aba5 100644
--- a/remoting/host/desktop_session_win.cc
+++ b/remoting/host/desktop_session_win.cc
@@ -18,7 +18,7 @@ using base::win::ScopedHandle;
namespace {
-const FilePath::CharType kDesktopBinaryName[] =
+const base::FilePath::CharType kDesktopBinaryName[] =
FILE_PATH_LITERAL("remoting_desktop.exe");
// The security descriptor of the daemon IPC endpoint. It gives full access
@@ -95,7 +95,7 @@ void DesktopSessionWin::OnSessionAttached(uint32 session_id) {
// Construct the host binary name.
if (desktop_binary_.empty()) {
- FilePath dir_path;
+ base::FilePath dir_path;
if (!PathService::Get(base::DIR_EXE, &dir_path)) {
LOG(ERROR) << "Failed to get the executable file name.";
OnPermanentError();
diff --git a/remoting/host/desktop_session_win.h b/remoting/host/desktop_session_win.h
index 89343c9..53b2fef 100644
--- a/remoting/host/desktop_session_win.h
+++ b/remoting/host/desktop_session_win.h
@@ -74,7 +74,7 @@ class DesktopSessionWin
scoped_refptr<AutoThreadTaskRunner> io_task_runner_;
// Contains the full path to the desktop binary.
- FilePath desktop_binary_;
+ base::FilePath desktop_binary_;
// Handle of the desktop process.
base::win::ScopedHandle desktop_process_;
diff --git a/remoting/host/host_key_pair_unittest.cc b/remoting/host/host_key_pair_unittest.cc
index f19674f..2aa921c 100644
--- a/remoting/host/host_key_pair_unittest.cc
+++ b/remoting/host/host_key_pair_unittest.cc
@@ -33,7 +33,7 @@ class HostKeyPairTest : public testing::Test {
protected:
virtual void SetUp() {
ASSERT_TRUE(test_dir_.CreateUniqueTempDir());
- FilePath config_path = test_dir_.path().AppendASCII("test_config.json");
+ base::FilePath config_path = test_dir_.path().AppendASCII("test_config.json");
config_.reset(new JsonHostConfig(config_path));
}
diff --git a/remoting/host/ipc_constants.cc b/remoting/host/ipc_constants.cc
index 36d4bea..9aac903 100644
--- a/remoting/host/ipc_constants.cc
+++ b/remoting/host/ipc_constants.cc
@@ -12,20 +12,21 @@ namespace remoting {
const char kDaemonPipeSwitchName[] = "daemon-pipe";
-const FilePath::CharType kDaemonBinaryName[] =
+const base::FilePath::CharType kDaemonBinaryName[] =
FILE_PATH_LITERAL("remoting_daemon");
-const FilePath::CharType kHostBinaryName[] = FILE_PATH_LITERAL("remoting_host");
+const base::FilePath::CharType kHostBinaryName[] =
+ FILE_PATH_LITERAL("remoting_host");
-bool GetInstalledBinaryPath(const FilePath::StringType& binary,
- FilePath* full_path) {
- FilePath dir_path;
+bool GetInstalledBinaryPath(const base::FilePath::StringType& binary,
+ base::FilePath* full_path) {
+ base::FilePath dir_path;
if (!PathService::Get(base::DIR_EXE, &dir_path)) {
LOG(ERROR) << "Failed to get the executable file name.";
return false;
}
- FilePath path = dir_path.Append(binary);
+ base::FilePath path = dir_path.Append(binary);
#if defined(OS_WIN)
path = path.ReplaceExtension(FILE_PATH_LITERAL("exe"));
diff --git a/remoting/host/ipc_constants.h b/remoting/host/ipc_constants.h
index 0e6ddc6..d990206 100644
--- a/remoting/host/ipc_constants.h
+++ b/remoting/host/ipc_constants.h
@@ -13,14 +13,14 @@ namespace remoting {
extern const char kDaemonPipeSwitchName[];
// Name of the daemon process binary.
-extern const FilePath::CharType kDaemonBinaryName[];
+extern const base::FilePath::CharType kDaemonBinaryName[];
// Name of the host process binary.
-extern const FilePath::CharType kHostBinaryName[];
+extern const base::FilePath::CharType kHostBinaryName[];
// Returns the full path to an installed |binary| in |full_path|.
-bool GetInstalledBinaryPath(const FilePath::StringType& binary,
- FilePath* full_path);
+bool GetInstalledBinaryPath(const base::FilePath::StringType& binary,
+ base::FilePath* full_path);
} // namespace remoting
diff --git a/remoting/host/json_host_config.cc b/remoting/host/json_host_config.cc
index 82a9cf7..d25f4b5 100644
--- a/remoting/host/json_host_config.cc
+++ b/remoting/host/json_host_config.cc
@@ -15,7 +15,7 @@
namespace remoting {
-JsonHostConfig::JsonHostConfig(const FilePath& filename)
+JsonHostConfig::JsonHostConfig(const base::FilePath& filename)
: filename_(filename) {
}
diff --git a/remoting/host/json_host_config.h b/remoting/host/json_host_config.h
index c0148cc..c8a4aba 100644
--- a/remoting/host/json_host_config.h
+++ b/remoting/host/json_host_config.h
@@ -19,7 +19,7 @@ namespace remoting {
// JsonHostConfig implements MutableHostConfig for JSON file.
class JsonHostConfig : public InMemoryHostConfig {
public:
- JsonHostConfig(const FilePath& filename);
+ JsonHostConfig(const base::FilePath& filename);
virtual ~JsonHostConfig();
virtual bool Read();
@@ -34,7 +34,7 @@ class JsonHostConfig : public InMemoryHostConfig {
bool SetSerializedData(const std::string& config);
private:
- FilePath filename_;
+ base::FilePath filename_;
DISALLOW_COPY_AND_ASSIGN(JsonHostConfig);
};
diff --git a/remoting/host/json_host_config_unittest.cc b/remoting/host/json_host_config_unittest.cc
index 4aedf3d..76f2912 100644
--- a/remoting/host/json_host_config_unittest.cc
+++ b/remoting/host/json_host_config_unittest.cc
@@ -24,7 +24,7 @@ const char* kTestConfig =
class JsonHostConfigTest : public testing::Test {
protected:
- static void WriteTestFile(const FilePath& filename) {
+ static void WriteTestFile(const base::FilePath& filename) {
file_util::WriteFile(filename, kTestConfig, std::strlen(kTestConfig));
}
@@ -34,7 +34,7 @@ class JsonHostConfigTest : public testing::Test {
TEST_F(JsonHostConfigTest, InvalidFile) {
ASSERT_TRUE(test_dir_.CreateUniqueTempDir());
- FilePath non_existent_file =
+ base::FilePath non_existent_file =
test_dir_.path().AppendASCII("non_existent.json");
JsonHostConfig target(non_existent_file);
EXPECT_FALSE(target.Read());
@@ -42,7 +42,7 @@ TEST_F(JsonHostConfigTest, InvalidFile) {
TEST_F(JsonHostConfigTest, Read) {
ASSERT_TRUE(test_dir_.CreateUniqueTempDir());
- FilePath test_file = test_dir_.path().AppendASCII("read.json");
+ base::FilePath test_file = test_dir_.path().AppendASCII("read.json");
WriteTestFile(test_file);
JsonHostConfig target(test_file);
ASSERT_TRUE(target.Read());
@@ -65,7 +65,7 @@ TEST_F(JsonHostConfigTest, Read) {
TEST_F(JsonHostConfigTest, Write) {
ASSERT_TRUE(test_dir_.CreateUniqueTempDir());
- FilePath test_file = test_dir_.path().AppendASCII("write.json");
+ base::FilePath test_file = test_dir_.path().AppendASCII("write.json");
WriteTestFile(test_file);
JsonHostConfig target(test_file);
ASSERT_TRUE(target.Read());
diff --git a/remoting/host/linux/audio_pipe_reader.cc b/remoting/host/linux/audio_pipe_reader.cc
index d396e89..c66839b 100644
--- a/remoting/host/linux/audio_pipe_reader.cc
+++ b/remoting/host/linux/audio_pipe_reader.cc
@@ -47,7 +47,7 @@ const int kPipeBufferSizeBytes = kPipeBufferSizeMs * kSampleBytesPerSecond /
// static
scoped_refptr<AudioPipeReader> AudioPipeReader::Create(
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
- const FilePath& pipe_name) {
+ const base::FilePath& pipe_name) {
// Create a reference to the new AudioPipeReader before posting the
// StartOnAudioThread task, otherwise it may be deleted on the audio
// thread before we return.
@@ -58,7 +58,7 @@ scoped_refptr<AudioPipeReader> AudioPipeReader::Create(
return pipe_reader;
}
-void AudioPipeReader::StartOnAudioThread(const FilePath& pipe_name) {
+void AudioPipeReader::StartOnAudioThread(const base::FilePath& pipe_name) {
DCHECK(task_runner_->BelongsToCurrentThread());
pipe_fd_ = HANDLE_EINTR(open(
diff --git a/remoting/host/linux/audio_pipe_reader.h b/remoting/host/linux/audio_pipe_reader.h
index b0c56e7..a373ac3 100644
--- a/remoting/host/linux/audio_pipe_reader.h
+++ b/remoting/host/linux/audio_pipe_reader.h
@@ -12,7 +12,9 @@
#include "base/time.h"
#include "base/timer.h"
+namespace base {
class FilePath;
+}
namespace remoting {
@@ -33,7 +35,7 @@ class AudioPipeReader
// |task_runner| specifies the IO thread to use to read data from the pipe.
static scoped_refptr<AudioPipeReader> Create(
scoped_refptr<base::SingleThreadTaskRunner> task_runner,
- const FilePath& pipe_name);
+ const base::FilePath& pipe_name);
// Register or unregister an observer. Each observer receives data on the
// thread on which it was registered and guaranteed not to be called after
@@ -53,7 +55,7 @@ class AudioPipeReader
AudioPipeReader(scoped_refptr<base::SingleThreadTaskRunner> task_runner);
virtual ~AudioPipeReader();
- void StartOnAudioThread(const FilePath& pipe_name);
+ void StartOnAudioThread(const base::FilePath& pipe_name);
void StartTimer();
void DoCapture();
void WaitForPipeReadable();
diff --git a/remoting/host/policy_hack/policy_watcher_linux.cc b/remoting/host/policy_hack/policy_watcher_linux.cc
index 0df6120..1dc7b21 100644
--- a/remoting/host/policy_hack/policy_watcher_linux.cc
+++ b/remoting/host/policy_hack/policy_watcher_linux.cc
@@ -32,7 +32,7 @@ namespace policy_hack {
namespace {
-const FilePath::CharType kPolicyDir[] =
+const base::FilePath::CharType kPolicyDir[] =
// Always read the Chrome policies (even on Chromium) so that policy
// enforcement can't be bypassed by running Chromium.
FILE_PATH_LITERAL("/etc/opt/chrome/policies/managed");
@@ -47,7 +47,7 @@ const int kSettleIntervalSeconds = 5;
class PolicyWatcherLinux : public PolicyWatcher {
public:
PolicyWatcherLinux(scoped_refptr<base::SingleThreadTaskRunner> task_runner,
- const FilePath& config_dir)
+ const base::FilePath& config_dir)
: PolicyWatcher(task_runner),
config_dir_(config_dir),
ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
@@ -89,7 +89,7 @@ class PolicyWatcherLinux : public PolicyWatcher {
}
private:
- void OnFilePathChanged(const FilePath& path, bool error) {
+ void OnFilePathChanged(const base::FilePath& path, bool error) {
DCHECK(OnPolicyWatcherThread());
if (!error)
@@ -113,7 +113,7 @@ class PolicyWatcherLinux : public PolicyWatcher {
file_util::FileEnumerator file_enumerator(config_dir_,
false,
file_util::FileEnumerator::FILES);
- for (FilePath config_file = file_enumerator.Next();
+ for (base::FilePath config_file = file_enumerator.Next();
!config_file.empty();
config_file = file_enumerator.Next()) {
if (file_util::GetFileInfo(config_file, &file_info) &&
@@ -130,16 +130,16 @@ class PolicyWatcherLinux : public PolicyWatcher {
scoped_ptr<DictionaryValue> Load() {
DCHECK(OnPolicyWatcherThread());
// Enumerate the files and sort them lexicographically.
- std::set<FilePath> files;
+ std::set<base::FilePath> files;
file_util::FileEnumerator file_enumerator(config_dir_, false,
file_util::FileEnumerator::FILES);
- for (FilePath config_file_path = file_enumerator.Next();
+ for (base::FilePath config_file_path = file_enumerator.Next();
!config_file_path.empty(); config_file_path = file_enumerator.Next())
files.insert(config_file_path);
// Start with an empty dictionary and merge the files' contents.
scoped_ptr<DictionaryValue> policy(new DictionaryValue());
- for (std::set<FilePath>::iterator config_file_iter = files.begin();
+ for (std::set<base::FilePath>::iterator config_file_iter = files.begin();
config_file_iter != files.end(); ++config_file_iter) {
JSONFileValueSerializer deserializer(*config_file_iter);
deserializer.set_allow_trailing_comma(true);
@@ -239,7 +239,7 @@ class PolicyWatcherLinux : public PolicyWatcher {
// non-local filesystem involved.
base::Time last_modification_clock_;
- const FilePath config_dir_;
+ const base::FilePath config_dir_;
// Allows us to cancel any inflight FileWatcher events or scheduled reloads.
base::WeakPtrFactory<PolicyWatcherLinux> weak_factory_;
@@ -247,7 +247,7 @@ class PolicyWatcherLinux : public PolicyWatcher {
PolicyWatcher* PolicyWatcher::Create(
scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
- FilePath policy_dir(kPolicyDir);
+ base::FilePath policy_dir(kPolicyDir);
return new PolicyWatcherLinux(task_runner, policy_dir);
}
diff --git a/remoting/host/remoting_me2me_host.cc b/remoting/host/remoting_me2me_host.cc
index 0e3d948..995b52d 100644
--- a/remoting/host/remoting_me2me_host.cc
+++ b/remoting/host/remoting_me2me_host.cc
@@ -273,7 +273,7 @@ class HostProcess
scoped_ptr<IPC::ChannelProxy> daemon_channel_;
// Created on the UI thread but used from the network thread.
- FilePath host_config_path_;
+ base::FilePath host_config_path_;
scoped_ptr<DesktopEnvironmentFactory> desktop_environment_factory_;
// Accessed on the network thread.
@@ -402,7 +402,7 @@ bool HostProcess::InitWithCommandLine(const CommandLine* cmd_line) {
context_->network_task_runner()));
}
- FilePath default_config_dir = remoting::GetConfigDir();
+ base::FilePath default_config_dir = remoting::GetConfigDir();
host_config_path_ = default_config_dir.Append(kDefaultHostConfigFile);
if (cmd_line->HasSwitch(kHostConfigSwitchName)) {
host_config_path_ = cmd_line->GetSwitchValuePath(kHostConfigSwitchName);
@@ -427,7 +427,7 @@ void HostProcess::OnConfigUpdated(
LOG(INFO) << "Processing new host configuration.";
serialized_config_ = serialized_config;
- scoped_ptr<JsonHostConfig> config(new JsonHostConfig(FilePath()));
+ scoped_ptr<JsonHostConfig> config(new JsonHostConfig(base::FilePath()));
if (!config->SetSerializedData(serialized_config)) {
LOG(ERROR) << "Invalid configuration.";
ShutdownHost(kInvalidHostConfigurationExitCode);
@@ -558,7 +558,7 @@ void HostProcess::StartOnUiThread() {
#if defined(OS_LINUX)
// If an audio pipe is specific on the command-line then initialize
// AudioCapturerLinux to capture from it.
- FilePath audio_pipe_name = CommandLine::ForCurrentProcess()->
+ base::FilePath audio_pipe_name = CommandLine::ForCurrentProcess()->
GetSwitchValuePath(kAudioPipeSwitchName);
if (!audio_pipe_name.empty()) {
remoting::AudioCapturerLinux::InitializePipeReader(
@@ -641,7 +641,7 @@ void HostProcess::ShutdownOnUiThread() {
// thread will remain in-use and prevent the process from exiting.
// TODO(wez): DesktopEnvironmentFactory should own the pipe reader.
// See crbug.com/161373 and crbug.com/104544.
- AudioCapturerLinux::InitializePipeReader(NULL, FilePath());
+ AudioCapturerLinux::InitializePipeReader(NULL, base::FilePath());
#endif
}
@@ -1135,7 +1135,7 @@ int CALLBACK WinMain(HINSTANCE instance,
// Mark the process as DPI-aware, so Windows won't scale coordinates in APIs.
// N.B. This API exists on Vista and above.
if (base::win::GetVersion() >= base::win::VERSION_VISTA) {
- FilePath path(base::GetNativeLibraryName(UTF8ToUTF16("user32")));
+ base::FilePath path(base::GetNativeLibraryName(UTF8ToUTF16("user32")));
base::ScopedNativeLibrary user32(path);
CHECK(user32.is_valid());
diff --git a/remoting/host/sas_injector_win.cc b/remoting/host/sas_injector_win.cc
index efab8e6..a9bb80b 100644
--- a/remoting/host/sas_injector_win.cc
+++ b/remoting/host/sas_injector_win.cc
@@ -22,7 +22,7 @@ namespace remoting {
namespace {
// Names of the API and library implementing software SAS generation.
-const FilePath::CharType kSasDllFileName[] = FILE_PATH_LITERAL("sas.dll");
+const base::FilePath::CharType kSasDllFileName[] = FILE_PATH_LITERAL("sas.dll");
const char kSendSasName[] = "SendSAS";
// The prototype of SendSAS().
@@ -144,7 +144,7 @@ bool SasInjectorWin::InjectSas() {
// Load sas.dll. The library is expected to be in the same folder as this
// binary.
if (!sas_dll_.is_valid()) {
- FilePath dir_path;
+ base::FilePath dir_path;
if (!PathService::Get(base::DIR_EXE, &dir_path)) {
LOG(ERROR) << "Failed to get the executable file name.";
return false;
diff --git a/remoting/host/setup/daemon_controller_linux.cc b/remoting/host/setup/daemon_controller_linux.cc
index 121d77a..598b1db 100644
--- a/remoting/host/setup/daemon_controller_linux.cc
+++ b/remoting/host/setup/daemon_controller_linux.cc
@@ -68,7 +68,7 @@ class DaemonControllerLinux : public remoting::DaemonController {
const GetUsageStatsConsentCallback& done) OVERRIDE;
private:
- FilePath GetConfigPath();
+ base::FilePath GetConfigPath();
void DoGetConfig(const GetConfigCallback& callback);
void DoSetConfigAndStart(scoped_ptr<base::DictionaryValue> config,
@@ -88,8 +88,8 @@ DaemonControllerLinux::DaemonControllerLinux()
file_io_thread_.Start();
}
-static bool GetScriptPath(FilePath* result) {
- FilePath candidate_exe(kDaemonScript);
+static bool GetScriptPath(base::FilePath* result) {
+ base::FilePath candidate_exe(kDaemonScript);
if (access(candidate_exe.value().c_str(), X_OK) == 0) {
*result = candidate_exe;
return true;
@@ -106,7 +106,7 @@ static bool RunHostScriptWithTimeout(
if (getuid() == 0) {
return false;
}
- FilePath script_path;
+ base::FilePath script_path;
if (!GetScriptPath(&script_path)) {
return false;
}
@@ -200,7 +200,7 @@ void DaemonControllerLinux::GetVersion(
done_callback));
}
-FilePath DaemonControllerLinux::GetConfigPath() {
+base::FilePath DaemonControllerLinux::GetConfigPath() {
std::string filename = "host#" + GetMd5(net::GetHostName()) + ".json";
return file_util::GetHomeDir().
Append(".config/chrome-remote-desktop").Append(filename);
@@ -245,7 +245,7 @@ void DaemonControllerLinux::DoSetConfigAndStart(
}
// Ensure the configuration directory exists.
- FilePath config_dir = GetConfigPath().DirName();
+ base::FilePath config_dir = GetConfigPath().DirName();
if (!file_util::DirectoryExists(config_dir) &&
!file_util::CreateDirectory(config_dir)) {
LOG(ERROR) << "Failed to create config directory " << config_dir.value();
@@ -314,7 +314,7 @@ void DaemonControllerLinux::DoStop(const CompletionCallback& done_callback) {
void DaemonControllerLinux::DoGetVersion(
const GetVersionCallback& done_callback) {
- FilePath script_path;
+ base::FilePath script_path;
if (!GetScriptPath(&script_path)) {
done_callback.Run("");
return;
diff --git a/remoting/host/setup/daemon_controller_mac.cc b/remoting/host/setup/daemon_controller_mac.cc
index 430077cd..95e1b1f 100644
--- a/remoting/host/setup/daemon_controller_mac.cc
+++ b/remoting/host/setup/daemon_controller_mac.cc
@@ -174,7 +174,7 @@ void DaemonControllerMac::GetUsageStatsConsent(
}
void DaemonControllerMac::DoGetConfig(const GetConfigCallback& callback) {
- FilePath config_path(kHostConfigFilePath);
+ base::FilePath config_path(kHostConfigFilePath);
JsonHostConfig host_config(config_path);
scoped_ptr<base::DictionaryValue> config;
@@ -227,7 +227,7 @@ void DaemonControllerMac::DoSetConfigAndStart(
void DaemonControllerMac::DoUpdateConfig(
scoped_ptr<base::DictionaryValue> config,
const CompletionCallback& done_callback) {
- FilePath config_file_path(kHostConfigFilePath);
+ base::FilePath config_file_path(kHostConfigFilePath);
JsonHostConfig config_file(config_file_path);
if (!config_file.Read()) {
done_callback.Run(RESULT_FAILED);
@@ -246,7 +246,7 @@ void DaemonControllerMac::DoUpdateConfig(
void DaemonControllerMac::DoGetUsageStatsConsent(
const GetUsageStatsConsentCallback& callback) {
bool allowed = false;
- FilePath config_file_path(kHostConfigFilePath);
+ base::FilePath config_file_path(kHostConfigFilePath);
JsonHostConfig host_config(config_file_path);
if (host_config.Read()) {
host_config.GetBoolean(kUsageStatsConsentConfigPath, &allowed);
@@ -266,7 +266,7 @@ void DaemonControllerMac::ShowPreferencePane(
bool DaemonControllerMac::DoShowPreferencePane(const std::string& config_data) {
if (!config_data.empty()) {
- FilePath config_path;
+ base::FilePath config_path;
if (!file_util::GetTempDir(&config_path)) {
LOG(ERROR) << "Failed to get filename for saving configuration data.";
return false;
@@ -282,7 +282,7 @@ bool DaemonControllerMac::DoShowPreferencePane(const std::string& config_data) {
}
}
- FilePath pane_path;
+ base::FilePath pane_path;
// TODO(lambroslambrou): Use NSPreferencePanesDirectory once we start
// building against SDK 10.6.
if (!base::mac::GetLocalDirectory(NSLibraryDirectory, &pane_path)) {
diff --git a/remoting/host/usage_stats_consent_mac.cc b/remoting/host/usage_stats_consent_mac.cc
index 00655a4..db82d92 100644
--- a/remoting/host/usage_stats_consent_mac.cc
+++ b/remoting/host/usage_stats_consent_mac.cc
@@ -23,7 +23,7 @@ bool GetUsageStatsConsent(bool* allowed, bool* set_by_policy) {
// which itself should happen as early as possible during startup.
CommandLine* command_line = CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(kHostConfigSwitchName)) {
- FilePath config_file_path =
+ base::FilePath config_file_path =
command_line->GetSwitchValuePath(kHostConfigSwitchName);
JsonHostConfig host_config(config_file_path);
if (host_config.Read()) {
diff --git a/remoting/host/win/elevated_controller.cc b/remoting/host/win/elevated_controller.cc
index a43203d..024ca34 100644
--- a/remoting/host/win/elevated_controller.cc
+++ b/remoting/host/win/elevated_controller.cc
@@ -32,14 +32,14 @@ namespace {
const size_t kMaxConfigFileSize = 1024 * 1024;
// The host configuration file name.
-const FilePath::CharType kConfigFileName[] = FILE_PATH_LITERAL("host.json");
+const base::FilePath::CharType kConfigFileName[] = FILE_PATH_LITERAL("host.json");
// The unprivileged configuration file name.
-const FilePath::CharType kUnprivilegedConfigFileName[] =
+const base::FilePath::CharType kUnprivilegedConfigFileName[] =
FILE_PATH_LITERAL("host_unprivileged.json");
// The extension for the temporary file.
-const FilePath::CharType kTempFileExtension[] = FILE_PATH_LITERAL("json~");
+const base::FilePath::CharType kTempFileExtension[] = FILE_PATH_LITERAL("json~");
// The host configuration file security descriptor that enables full access to
// Local System and built-in administrators only.
@@ -92,7 +92,7 @@ bool IsClientAdmin() {
// Reads and parses the configuration file up to |kMaxConfigFileSize| in
// size.
-HRESULT ReadConfig(const FilePath& filename,
+HRESULT ReadConfig(const base::FilePath& filename,
scoped_ptr<base::DictionaryValue>* config_out) {
// Read raw data from the configuration file.
@@ -137,12 +137,12 @@ HRESULT ReadConfig(const FilePath& filename,
return S_OK;
}
-FilePath GetTempLocationFor(const FilePath& filename) {
+base::FilePath GetTempLocationFor(const base::FilePath& filename) {
return filename.ReplaceExtension(kTempFileExtension);
}
// Writes a config file to a temporary location.
-HRESULT WriteConfigFileToTemp(const FilePath& filename,
+HRESULT WriteConfigFileToTemp(const base::FilePath& filename,
const char* security_descriptor,
const char* content,
size_t length) {
@@ -161,7 +161,7 @@ HRESULT WriteConfigFileToTemp(const FilePath& filename,
security_attributes.bInheritHandle = FALSE;
// Create a temporary file and write configuration to it.
- FilePath tempname = GetTempLocationFor(filename);
+ base::FilePath tempname = GetTempLocationFor(filename);
base::win::ScopedHandle file(
CreateFileW(tempname.value().c_str(),
GENERIC_WRITE,
@@ -190,10 +190,10 @@ HRESULT WriteConfigFileToTemp(const FilePath& filename,
}
// Moves a config file from its temporary location to its permanent location.
-HRESULT MoveConfigFileFromTemp(const FilePath& filename) {
+HRESULT MoveConfigFileFromTemp(const base::FilePath& filename) {
// Now that the configuration is stored successfully replace the actual
// configuration file.
- FilePath tempname = GetTempLocationFor(filename);
+ base::FilePath tempname = GetTempLocationFor(filename);
if (!MoveFileExW(tempname.value().c_str(),
filename.value().c_str(),
MOVEFILE_REPLACE_EXISTING)) {
@@ -253,7 +253,7 @@ HRESULT WriteConfig(const char* content, size_t length, HWND owner_window) {
base::JSONWriter::Write(&unprivileged_config_dict, &unprivileged_config_str);
// Write the full configuration file to a temporary location.
- FilePath full_config_file_path =
+ base::FilePath full_config_file_path =
remoting::GetConfigDir().Append(kConfigFileName);
HRESULT hr = WriteConfigFileToTemp(full_config_file_path,
kConfigFileSecurityDescriptor,
@@ -264,7 +264,7 @@ HRESULT WriteConfig(const char* content, size_t length, HWND owner_window) {
}
// Write the unprivileged configuration file to a temporary location.
- FilePath unprivileged_config_file_path =
+ base::FilePath unprivileged_config_file_path =
remoting::GetConfigDir().Append(kUnprivilegedConfigFileName);
hr = WriteConfigFileToTemp(unprivileged_config_file_path,
kUnprivilegedConfigFileSecurityDescriptor,
@@ -302,7 +302,7 @@ void ElevatedController::FinalRelease() {
}
STDMETHODIMP ElevatedController::GetConfig(BSTR* config_out) {
- FilePath config_dir = remoting::GetConfigDir();
+ base::FilePath config_dir = remoting::GetConfigDir();
// Read the unprivileged part of host configuration.
scoped_ptr<base::DictionaryValue> config;
@@ -347,7 +347,7 @@ STDMETHODIMP ElevatedController::GetVersion(BSTR* version_out) {
STDMETHODIMP ElevatedController::SetConfig(BSTR config) {
// Determine the config directory path and create it if necessary.
- FilePath config_dir = remoting::GetConfigDir();
+ base::FilePath config_dir = remoting::GetConfigDir();
if (!file_util::CreateDirectory(config_dir)) {
return HRESULT_FROM_WIN32(ERROR_ACCESS_DENIED);
}
@@ -462,7 +462,7 @@ STDMETHODIMP ElevatedController::UpdateConfig(BSTR config) {
}
}
// Get the old config.
- FilePath config_dir = remoting::GetConfigDir();
+ base::FilePath config_dir = remoting::GetConfigDir();
scoped_ptr<base::DictionaryValue> config_old;
HRESULT hr = ReadConfig(config_dir.Append(kConfigFileName), &config_old);
if (FAILED(hr)) {
diff --git a/remoting/host/win/host_service.cc b/remoting/host/win/host_service.cc
index 84c7f7c..51f4464 100644
--- a/remoting/host/win/host_service.cc
+++ b/remoting/host/win/host_service.cc
@@ -84,7 +84,7 @@ const wchar_t kUsageMessage[] =
const char* kCopiedSwitchNames[] = {
"host-config", "daemon-pipe", switches::kV, switches::kVModule };
-void usage(const FilePath& program_name) {
+void usage(const base::FilePath& program_name) {
LOG(INFO) << StringPrintf(kUsageMessage,
UTF16ToWide(program_name.value()).c_str());
}
@@ -231,7 +231,7 @@ void HostService::CreateLauncher(
int HostService::Elevate() {
// Get the name of the binary to launch.
- FilePath binary =
+ base::FilePath binary =
CommandLine::ForCurrentProcess()->GetSwitchValuePath(kElevateSwitchName);
// Create the child process command line by copying known switches from our
diff --git a/remoting/host/win/launch_process_with_token.cc b/remoting/host/win/launch_process_with_token.cc
index 51b3900..fffa983 100644
--- a/remoting/host/win/launch_process_with_token.cc
+++ b/remoting/host/win/launch_process_with_token.cc
@@ -64,7 +64,7 @@ bool ConnectToExecutionServer(uint32 session_id,
// Use winsta!WinStationQueryInformationW() to determine the process creation
// pipe name for the session.
- FilePath winsta_path(base::GetNativeLibraryName(UTF8ToUTF16("winsta")));
+ base::FilePath winsta_path(base::GetNativeLibraryName(UTF8ToUTF16("winsta")));
base::ScopedNativeLibrary winsta(winsta_path);
if (winsta.is_valid()) {
PWINSTATIONQUERYINFORMATIONW win_station_query_information =
@@ -293,7 +293,7 @@ bool ReceiveCreateProcessResponse(
// Sends a remote process create request to the execution server.
bool SendCreateProcessRequest(
HANDLE pipe,
- const FilePath::StringType& application_name,
+ const base::FilePath::StringType& application_name,
const CommandLine::StringType& command_line,
DWORD creation_flags,
const char16* desktop_name) {
@@ -376,7 +376,7 @@ bool SendCreateProcessRequest(
// OS functionality and will likely not work on anything but XP or W2K3.
bool CreateRemoteSessionProcess(
uint32 session_id,
- const FilePath::StringType& application_name,
+ const base::FilePath::StringType& application_name,
const CommandLine::StringType& command_line,
DWORD creation_flags,
const char16* desktop_name,
@@ -552,7 +552,7 @@ bool CreateSessionToken(uint32 session_id, ScopedHandle* token_out) {
return true;
}
-bool LaunchProcessWithToken(const FilePath& binary,
+bool LaunchProcessWithToken(const base::FilePath& binary,
const CommandLine::StringType& command_line,
HANDLE user_token,
SECURITY_ATTRIBUTES* process_attributes,
@@ -562,7 +562,7 @@ bool LaunchProcessWithToken(const FilePath& binary,
const char16* desktop_name,
ScopedHandle* process_out,
ScopedHandle* thread_out) {
- FilePath::StringType application_name = binary.value();
+ base::FilePath::StringType application_name = binary.value();
STARTUPINFOW startup_info;
memset(&startup_info, 0, sizeof(startup_info));
diff --git a/remoting/host/win/launch_process_with_token.h b/remoting/host/win/launch_process_with_token.h
index 678ade2..bc8157a 100644
--- a/remoting/host/win/launch_process_with_token.h
+++ b/remoting/host/win/launch_process_with_token.h
@@ -65,7 +65,7 @@ bool CreateSessionToken(uint32 session_id, base::win::ScopedHandle* token_out);
// The other parameters are passed directly to CreateProcessAsUser().
// If |inherit_handles| is true |g_inherit_handles_lock| should be taken while
// any inheritable handles are open.
-bool LaunchProcessWithToken(const FilePath& binary,
+bool LaunchProcessWithToken(const base::FilePath& binary,
const CommandLine::StringType& command_line,
HANDLE user_token,
SECURITY_ATTRIBUTES* process_attributes,
diff --git a/remoting/host/win/unprivileged_process_delegate.cc b/remoting/host/win/unprivileged_process_delegate.cc
index 6c2b740..f5c1e76 100644
--- a/remoting/host/win/unprivileged_process_delegate.cc
+++ b/remoting/host/win/unprivileged_process_delegate.cc
@@ -222,7 +222,7 @@ bool CreateWindowStationAndDesktop(ScopedSid logon_sid,
UnprivilegedProcessDelegate::UnprivilegedProcessDelegate(
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
- const FilePath& binary_path)
+ const base::FilePath& binary_path)
: main_task_runner_(main_task_runner),
io_task_runner_(io_task_runner),
binary_path_(binary_path) {
diff --git a/remoting/host/win/unprivileged_process_delegate.h b/remoting/host/win/unprivileged_process_delegate.h
index 06f6f9d..d1da1d0 100644
--- a/remoting/host/win/unprivileged_process_delegate.h
+++ b/remoting/host/win/unprivileged_process_delegate.h
@@ -31,7 +31,7 @@ class UnprivilegedProcessDelegate : public WorkerProcessLauncher::Delegate {
UnprivilegedProcessDelegate(
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
- const FilePath& binary_path);
+ const base::FilePath& binary_path);
virtual ~UnprivilegedProcessDelegate();
// IPC::Sender implementation.
@@ -53,7 +53,7 @@ class UnprivilegedProcessDelegate : public WorkerProcessLauncher::Delegate {
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
// Path to the worker process binary.
- FilePath binary_path_;
+ base::FilePath binary_path_;
// The server end of the IPC channel used to communicate to the worker
// process.
diff --git a/remoting/host/win/wts_console_session_process_driver.cc b/remoting/host/win/wts_console_session_process_driver.cc
index 1280ae8..d321e13 100644
--- a/remoting/host/win/wts_console_session_process_driver.cc
+++ b/remoting/host/win/wts_console_session_process_driver.cc
@@ -82,7 +82,7 @@ void WtsConsoleSessionProcessDriver::OnSessionAttached(uint32 session_id) {
DCHECK(launcher_.get() == NULL);
// Construct the host binary name.
- FilePath host_binary;
+ base::FilePath host_binary;
if (!GetInstalledBinaryPath(kHostBinaryName, &host_binary)) {
Stop();
return;
diff --git a/remoting/host/win/wts_session_process_delegate.cc b/remoting/host/win/wts_session_process_delegate.cc
index 88ff519..8c7d552 100644
--- a/remoting/host/win/wts_session_process_delegate.cc
+++ b/remoting/host/win/wts_session_process_delegate.cc
@@ -56,7 +56,7 @@ class WtsSessionProcessDelegate::Core
// Stop() method has been called.
Core(scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
- const FilePath& binary_path,
+ const base::FilePath& binary_path,
bool launch_elevated,
const std::string& channel_security);
@@ -110,7 +110,7 @@ class WtsSessionProcessDelegate::Core
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
// Path to the worker process binary.
- FilePath binary_path_;
+ base::FilePath binary_path_;
// The server end of the IPC channel used to communicate to the worker
// process.
@@ -151,7 +151,7 @@ class WtsSessionProcessDelegate::Core
WtsSessionProcessDelegate::Core::Core(
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
- const FilePath& binary_path,
+ const base::FilePath& binary_path,
bool launch_elevated,
const std::string& channel_security)
: main_task_runner_(main_task_runner),
@@ -249,7 +249,7 @@ bool WtsSessionProcessDelegate::Core::LaunchProcess(
}
// Construct the helper binary name.
- FilePath daemon_binary;
+ base::FilePath daemon_binary;
if (!GetInstalledBinaryPath(kDaemonBinaryName, &daemon_binary))
return false;
@@ -485,7 +485,7 @@ void WtsSessionProcessDelegate::Core::OnJobNotification(DWORD message,
WtsSessionProcessDelegate::WtsSessionProcessDelegate(
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
- const FilePath& binary_path,
+ const base::FilePath& binary_path,
uint32 session_id,
bool launch_elevated,
const std::string& channel_security) {
diff --git a/remoting/host/win/wts_session_process_delegate.h b/remoting/host/win/wts_session_process_delegate.h
index 13a1212..5d55c98 100644
--- a/remoting/host/win/wts_session_process_delegate.h
+++ b/remoting/host/win/wts_session_process_delegate.h
@@ -10,9 +10,8 @@
#include "base/memory/ref_counted.h"
#include "remoting/host/win/worker_process_launcher.h"
-class FilePath;
-
namespace base {
+class FilePath;
class SingleThreadTaskRunner;
} // namespace base
@@ -31,7 +30,7 @@ class WtsSessionProcessDelegate
WtsSessionProcessDelegate(
scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
- const FilePath& binary_path,
+ const base::FilePath& binary_path,
uint32 session_id,
bool launch_elevated,
const std::string& channel_security);
diff --git a/rlz/lib/recursive_cross_process_lock_posix.h b/rlz/lib/recursive_cross_process_lock_posix.h
index a39d473..69a2c7a 100644
--- a/rlz/lib/recursive_cross_process_lock_posix.h
+++ b/rlz/lib/recursive_cross_process_lock_posix.h
@@ -7,7 +7,9 @@
#include <pthread.h>
+namespace base {
class FilePath;
+}
namespace rlz_lib {
@@ -20,7 +22,7 @@ struct RecursiveCrossProcessLock {
// Tries to acquire a recursive cross-process lock. Note that this _always_
// acquires the in-process lock (if it wasn't already acquired). The parent
// directory of |lock_file| must exist.
- bool TryGetCrossProcessLock(const FilePath& lock_filename);
+ bool TryGetCrossProcessLock(const base::FilePath& lock_filename);
// Releases the lock. Should always be called, even if
// TryGetCrossProcessLock() returned |false|.
diff --git a/rlz/lib/rlz_value_store.h b/rlz/lib/rlz_value_store.h
index 46e87df..4bd1f09 100644
--- a/rlz/lib/rlz_value_store.h
+++ b/rlz/lib/rlz_value_store.h
@@ -21,7 +21,9 @@
#include <string>
#include <vector>
+namespace base {
class FilePath;
+}
namespace rlz_lib {
@@ -106,7 +108,7 @@ class ScopedRlzValueStoreLock {
#if defined(OS_POSIX)
namespace testing {
// Prefix |directory| to the path where the RLZ data file lives, for tests.
-void SetRlzStoreDirectory(const FilePath& directory);
+void SetRlzStoreDirectory(const base::FilePath& directory);
// Returns the path of the file used as data store.
std::string RlzStoreFilenameStr();
diff --git a/sql/connection.cc b/sql/connection.cc
index aefac60..5c0c15d 100644
--- a/sql/connection.cc
+++ b/sql/connection.cc
@@ -128,7 +128,7 @@ Connection::~Connection() {
Close();
}
-bool Connection::Open(const FilePath& path) {
+bool Connection::Open(const base::FilePath& path) {
#if defined(OS_WIN)
return OpenInternal(WideToUTF8(path.value()));
#elif defined(OS_POSIX)
diff --git a/sql/connection.h b/sql/connection.h
index 2722ffd..fa7c99d 100644
--- a/sql/connection.h
+++ b/sql/connection.h
@@ -17,10 +17,13 @@
#include "base/time.h"
#include "sql/sql_export.h"
-class FilePath;
struct sqlite3;
struct sqlite3_stmt;
+namespace base {
+class FilePath;
+}
+
namespace sql {
class Statement;
@@ -154,7 +157,7 @@ class SQL_EXPORT Connection {
// Initializes the SQL connection for the given file, returning true if the
// file could be opened. You can call this or OpenInMemory.
- bool Open(const FilePath& path) WARN_UNUSED_RESULT;
+ bool Open(const base::FilePath& path) WARN_UNUSED_RESULT;
// Initializes the SQL connection for a temporary in-memory database. There
// will be no associated file on disk, and the initial database will be
diff --git a/sql/connection_unittest.cc b/sql/connection_unittest.cc
index e8f454f..3ed2093 100644
--- a/sql/connection_unittest.cc
+++ b/sql/connection_unittest.cc
@@ -25,7 +25,7 @@ class SQLConnectionTest : public testing::Test {
sql::Connection& db() { return db_; }
- FilePath db_path() {
+ base::FilePath db_path() {
return temp_dir_.path().AppendASCII("SQLConnectionTest.db");
}
diff --git a/ui/aura/remote_root_window_host_win.h b/ui/aura/remote_root_window_host_win.h
index de69eb2..05959a9 100644
--- a/ui/aura/remote_root_window_host_win.h
+++ b/ui/aura/remote_root_window_host_win.h
@@ -14,7 +14,9 @@
#include "ui/base/events/event_constants.h"
#include "ui/gfx/native_widget_types.h"
+namespace base {
class FilePath;
+}
namespace ui {
class ViewProp;
@@ -27,20 +29,20 @@ class Sender;
namespace aura {
-typedef base::Callback<void(const FilePath&, int, void*)>
+typedef base::Callback<void(const base::FilePath&, int, void*)>
OpenFileCompletion;
-typedef base::Callback<void(const std::vector<FilePath>&, void*)>
+typedef base::Callback<void(const std::vector<base::FilePath>&, void*)>
OpenMultipleFilesCompletion;
-typedef base::Callback<void(const FilePath&, int, void*)>
+typedef base::Callback<void(const base::FilePath&, int, void*)>
SaveFileCompletion;
// Handles the open file operation for Metro Chrome Ash. The callback passed in
// is invoked when we receive the opened file name from the metro viewer.
AURA_EXPORT void HandleOpenFile(
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const string16& filter,
const OpenFileCompletion& callback);
@@ -49,7 +51,7 @@ AURA_EXPORT void HandleOpenFile(
// viewer.
AURA_EXPORT void HandleOpenMultipleFiles(
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const string16& filter,
const OpenMultipleFilesCompletion& callback);
@@ -57,7 +59,7 @@ AURA_EXPORT void HandleOpenMultipleFiles(
// is invoked when we receive the saved file name from the metro viewer.
AURA_EXPORT void HandleSaveFile(
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const string16& filter,
int filter_index,
const string16& default_extension,
@@ -83,19 +85,19 @@ class AURA_EXPORT RemoteRootWindowHostWin : public RootWindowHost {
void HandleOpenFile(
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const string16& filter,
const OpenFileCompletion& callback);
void HandleOpenMultipleFiles(
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const string16& filter,
const OpenMultipleFilesCompletion& callback);
void HandleSaveFile(
const string16& title,
- const FilePath& default_path,
+ const base::FilePath& default_path,
const string16& filter,
int filter_index,
const string16& default_extension,
@@ -133,7 +135,7 @@ class AURA_EXPORT RemoteRootWindowHostWin : public RootWindowHost {
int filter_index);
void OnFileOpenDone(bool success, string16 filename);
void OnMultiFileOpenDone(bool success,
- const std::vector<FilePath>& files);
+ const std::vector<base::FilePath>& files);
// RootWindowHost overrides:
virtual void SetDelegate(RootWindowHostDelegate* delegate) OVERRIDE;
diff --git a/ui/base/clipboard/clipboard.h b/ui/base/clipboard/clipboard.h
index 94d78712..c85b90a 100644
--- a/ui/base/clipboard/clipboard.h
+++ b/ui/base/clipboard/clipboard.h
@@ -33,11 +33,14 @@
#include "base/memory/scoped_ptr.h"
#endif
+namespace base {
+class FilePath;
+}
+
namespace gfx {
class Size;
}
-class FilePath;
class SkBitmap;
#if defined(TOOLKIT_GTK)
diff --git a/ui/base/dragdrop/download_file_interface.h b/ui/base/dragdrop/download_file_interface.h
index 62d4df0..a3bed25 100644
--- a/ui/base/dragdrop/download_file_interface.h
+++ b/ui/base/dragdrop/download_file_interface.h
@@ -16,7 +16,9 @@
#include <objidl.h>
#endif
+namespace base {
class FilePath;
+}
namespace ui {
diff --git a/ui/base/resource/data_pack.h b/ui/base/resource/data_pack.h
index 08947af..40913cb 100644
--- a/ui/base/resource/data_pack.h
+++ b/ui/base/resource/data_pack.h
@@ -19,9 +19,8 @@
#include "ui/base/resource/resource_handle.h"
#include "ui/base/ui_export.h"
-class FilePath;
-
namespace base {
+class FilePath;
class RefCountedStaticMemory;
}
@@ -37,7 +36,7 @@ class UI_EXPORT DataPack : public ResourceHandle {
virtual ~DataPack();
// Load a pack file from |path|, returning false on error.
- bool LoadFromPath(const FilePath& path);
+ bool LoadFromPath(const base::FilePath& path);
// Loads a pack file from |file|, returning false on error.
bool LoadFromFile(base::PlatformFile file);
@@ -46,7 +45,7 @@ class UI_EXPORT DataPack : public ResourceHandle {
// text resources to be written, their encoding must already agree to the
// |textEncodingType| specified. If no text resources are present, please
// indicate BINARY.
- static bool WritePack(const FilePath& path,
+ static bool WritePack(const base::FilePath& path,
const std::map<uint16, base::StringPiece>& resources,
TextEncodingType textEncodingType);
diff --git a/ui/base/text/text_elider.h b/ui/base/text/text_elider.h
index a311caf..a66845b 100644
--- a/ui/base/text/text_elider.h
+++ b/ui/base/text/text_elider.h
@@ -17,9 +17,12 @@
#include "ui/base/ui_export.h"
#include "ui/gfx/font.h"
-class FilePath;
class GURL;
+namespace base {
+class FilePath;
+}
+
namespace ui {
UI_EXPORT extern const char kEllipsis[];
@@ -79,7 +82,7 @@ UI_EXPORT string16 ElideText(const string16& text,
// filename is forced to have LTR directionality, which means that in RTL UI
// the elided filename is wrapped with LRE (Left-To-Right Embedding) mark and
// PDF (Pop Directional Formatting) mark.
-UI_EXPORT string16 ElideFilename(const FilePath& filename,
+UI_EXPORT string16 ElideFilename(const base::FilePath& filename,
const gfx::Font& font,
int available_pixel_width);
diff --git a/ui/base/win/shell.h b/ui/base/win/shell.h
index ada23de..3fd0dad 100644
--- a/ui/base/win/shell.h
+++ b/ui/base/win/shell.h
@@ -10,7 +10,9 @@
#include "base/string16.h"
#include "ui/base/ui_export.h"
+namespace base {
class FilePath;
+}
namespace ui {
namespace win {
@@ -18,12 +20,12 @@ namespace win {
// default application registered for the file specified by 'full_path',
// ask the user, via the Windows "Open With" dialog.
// Returns 'true' on successful open, 'false' otherwise.
-UI_EXPORT bool OpenItemViaShell(const FilePath& full_path);
+UI_EXPORT bool OpenItemViaShell(const base::FilePath& full_path);
// The download manager now writes the alternate data stream with the
// zone on all downloads. This function is equivalent to OpenItemViaShell
// without showing the zone warning dialog.
-UI_EXPORT bool OpenItemViaShellNoZoneCheck(const FilePath& full_path);
+UI_EXPORT bool OpenItemViaShellNoZoneCheck(const base::FilePath& full_path);
// Lower level function that allows opening of non-files like urls or GUIDs
// don't use it if one of the above will do. |mask| is a valid combination
diff --git a/ui/gfx/icon_util.h b/ui/gfx/icon_util.h
index 4aa2676..b48c0a5 100644
--- a/ui/gfx/icon_util.h
+++ b/ui/gfx/icon_util.h
@@ -16,10 +16,13 @@
#include "ui/gfx/point.h"
#include "ui/gfx/size.h"
+namespace base {
+class FilePath;
+}
+
namespace gfx {
class Size;
}
-class FilePath;
class SkBitmap;
///////////////////////////////////////////////////////////////////////////////
@@ -107,7 +110,7 @@ class UI_EXPORT IconUtil {
// The function returns true on success and false otherwise.
static bool CreateIconFileFromSkBitmap(const SkBitmap& bitmap,
const SkBitmap& large_bitmap,
- const FilePath& icon_path);
+ const base::FilePath& icon_path);
// Creates a cursor of the specified size from the DIB passed in.
// Returns the cursor on success or NULL on failure.
diff --git a/webkit/appcache/appcache_database.cc b/webkit/appcache/appcache_database.cc
index e8f4b0b..95b4309 100644
--- a/webkit/appcache/appcache_database.cc
+++ b/webkit/appcache/appcache_database.cc
@@ -177,7 +177,7 @@ AppCacheDatabase::NamespaceRecord::~NamespaceRecord() {
}
-AppCacheDatabase::AppCacheDatabase(const FilePath& path)
+AppCacheDatabase::AppCacheDatabase(const base::FilePath& path)
: db_file_path_(path), is_disabled_(false), is_recreating_(false) {
}
@@ -1103,7 +1103,7 @@ bool AppCacheDatabase::DeleteExistingAndCreateNewDatabase() {
ResetConnectionAndTables();
// This also deletes the disk cache data.
- FilePath directory = db_file_path_.DirName();
+ base::FilePath directory = db_file_path_.DirName();
if (!file_util::Delete(directory, true) ||
!file_util::CreateDirectory(directory)) {
return false;
diff --git a/webkit/appcache/appcache_database.h b/webkit/appcache/appcache_database.h
index 5fe74a4..b110ba1 100644
--- a/webkit/appcache/appcache_database.h
+++ b/webkit/appcache/appcache_database.h
@@ -81,7 +81,7 @@ class WEBKIT_STORAGE_EXPORT AppCacheDatabase {
GURL namespace_url;
};
- explicit AppCacheDatabase(const FilePath& path);
+ explicit AppCacheDatabase(const base::FilePath& path);
~AppCacheDatabase();
void CloseConnection();
@@ -200,7 +200,7 @@ class WEBKIT_STORAGE_EXPORT AppCacheDatabase {
// and bodies are stored, and then creates a new database file.
bool DeleteExistingAndCreateNewDatabase();
- FilePath db_file_path_;
+ base::FilePath db_file_path_;
scoped_ptr<sql::Connection> db_;
scoped_ptr<sql::MetaTable> meta_table_;
bool is_disabled_;
diff --git a/webkit/appcache/appcache_database_unittest.cc b/webkit/appcache/appcache_database_unittest.cc
index d84d451..4c7affb 100644
--- a/webkit/appcache/appcache_database_unittest.cc
+++ b/webkit/appcache/appcache_database_unittest.cc
@@ -41,7 +41,7 @@ class AppCacheDatabaseTest {};
TEST(AppCacheDatabaseTest, LazyOpen) {
// Use an empty file path to use an in-memory sqlite database.
- const FilePath kEmptyPath;
+ const base::FilePath kEmptyPath;
AppCacheDatabase db(kEmptyPath);
EXPECT_FALSE(db.LazyOpen(false));
@@ -65,9 +65,9 @@ TEST(AppCacheDatabaseTest, ReCreate) {
// Real files on disk for this test.
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- const FilePath kDbFile = temp_dir.path().AppendASCII("appcache.db");
- const FilePath kNestedDir = temp_dir.path().AppendASCII("nested");
- const FilePath kOtherFile = kNestedDir.AppendASCII("other_file");
+ const base::FilePath kDbFile = temp_dir.path().AppendASCII("appcache.db");
+ const base::FilePath kNestedDir = temp_dir.path().AppendASCII("nested");
+ const base::FilePath kOtherFile = kNestedDir.AppendASCII("other_file");
EXPECT_TRUE(file_util::CreateDirectory(kNestedDir));
EXPECT_EQ(3, file_util::WriteFile(kOtherFile, "foo", 3));
@@ -87,7 +87,7 @@ TEST(AppCacheDatabaseTest, ReCreate) {
}
TEST(AppCacheDatabaseTest, EntryRecords) {
- const FilePath kEmptyPath;
+ const base::FilePath kEmptyPath;
AppCacheDatabase db(kEmptyPath);
EXPECT_TRUE(db.LazyOpen(true));
@@ -161,7 +161,7 @@ TEST(AppCacheDatabaseTest, EntryRecords) {
}
TEST(AppCacheDatabaseTest, CacheRecords) {
- const FilePath kEmptyPath;
+ const base::FilePath kEmptyPath;
AppCacheDatabase db(kEmptyPath);
EXPECT_TRUE(db.LazyOpen(true));
@@ -203,7 +203,7 @@ TEST(AppCacheDatabaseTest, CacheRecords) {
}
TEST(AppCacheDatabaseTest, GroupRecords) {
- const FilePath kEmptyPath;
+ const base::FilePath kEmptyPath;
AppCacheDatabase db(kEmptyPath);
EXPECT_TRUE(db.LazyOpen(true));
@@ -330,7 +330,7 @@ TEST(AppCacheDatabaseTest, GroupRecords) {
}
TEST(AppCacheDatabaseTest, NamespaceRecords) {
- const FilePath kEmptyPath;
+ const base::FilePath kEmptyPath;
AppCacheDatabase db(kEmptyPath);
EXPECT_TRUE(db.LazyOpen(true));
@@ -430,7 +430,7 @@ TEST(AppCacheDatabaseTest, NamespaceRecords) {
}
TEST(AppCacheDatabaseTest, OnlineWhiteListRecords) {
- const FilePath kEmptyPath;
+ const base::FilePath kEmptyPath;
AppCacheDatabase db(kEmptyPath);
EXPECT_TRUE(db.LazyOpen(true));
@@ -476,7 +476,7 @@ TEST(AppCacheDatabaseTest, OnlineWhiteListRecords) {
}
TEST(AppCacheDatabaseTest, DeletableResponseIds) {
- const FilePath kEmptyPath;
+ const base::FilePath kEmptyPath;
AppCacheDatabase db(kEmptyPath);
EXPECT_TRUE(db.LazyOpen(true));
@@ -552,7 +552,7 @@ TEST(AppCacheDatabaseTest, OriginUsage) {
const GURL kOtherOriginManifestUrl("http://other/manifest");
const GURL kOtherOrigin(kOtherOriginManifestUrl.GetOrigin());
- const FilePath kEmptyPath;
+ const base::FilePath kEmptyPath;
AppCacheDatabase db(kEmptyPath);
EXPECT_TRUE(db.LazyOpen(true));
@@ -621,7 +621,7 @@ TEST(AppCacheDatabaseTest, UpgradeSchema3to4) {
// Real file on disk for this test.
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- const FilePath kDbFile = temp_dir.path().AppendASCII("upgrade.db");
+ const base::FilePath kDbFile = temp_dir.path().AppendASCII("upgrade.db");
const GURL kMockOrigin("http://mockorigin/");
const char kNamespaceUrlFormat[] = "namespace%d";
diff --git a/webkit/appcache/appcache_disk_cache.cc b/webkit/appcache/appcache_disk_cache.cc
index 88bea87..7b8e699 100644
--- a/webkit/appcache/appcache_disk_cache.cc
+++ b/webkit/appcache/appcache_disk_cache.cc
@@ -164,7 +164,7 @@ AppCacheDiskCache::~AppCacheDiskCache() {
}
int AppCacheDiskCache::InitWithDiskBackend(
- const FilePath& disk_cache_directory, int disk_cache_size, bool force,
+ const base::FilePath& disk_cache_directory, int disk_cache_size, bool force,
base::MessageLoopProxy* cache_thread,
const net::CompletionCallback& callback) {
return Init(net::APP_CACHE, disk_cache_directory,
@@ -173,7 +173,7 @@ int AppCacheDiskCache::InitWithDiskBackend(
int AppCacheDiskCache::InitWithMemBackend(
int mem_cache_size, const net::CompletionCallback& callback) {
- return Init(net::MEMORY_CACHE, FilePath(), mem_cache_size, false, NULL,
+ return Init(net::MEMORY_CACHE, base::FilePath(), mem_cache_size, false, NULL,
callback);
}
@@ -262,7 +262,7 @@ AppCacheDiskCache::PendingCall::PendingCall(PendingCallType call_type,
AppCacheDiskCache::PendingCall::~PendingCall() {}
int AppCacheDiskCache::Init(net::CacheType cache_type,
- const FilePath& cache_directory,
+ const base::FilePath& cache_directory,
int cache_size, bool force,
base::MessageLoopProxy* cache_thread,
const net::CompletionCallback& callback) {
diff --git a/webkit/appcache/appcache_disk_cache.h b/webkit/appcache/appcache_disk_cache.h
index 529db97..aafc846 100644
--- a/webkit/appcache/appcache_disk_cache.h
+++ b/webkit/appcache/appcache_disk_cache.h
@@ -24,7 +24,7 @@ class WEBKIT_STORAGE_EXPORT AppCacheDiskCache
virtual ~AppCacheDiskCache();
// Initializes the object to use disk backed storage.
- int InitWithDiskBackend(const FilePath& disk_cache_directory,
+ int InitWithDiskBackend(const base::FilePath& disk_cache_directory,
int disk_cache_size, bool force,
base::MessageLoopProxy* cache_thread,
const net::CompletionCallback& callback);
@@ -80,7 +80,7 @@ class WEBKIT_STORAGE_EXPORT AppCacheDiskCache
return create_backend_callback_.get() != NULL;
}
disk_cache::Backend* disk_cache() { return disk_cache_.get(); }
- int Init(net::CacheType cache_type, const FilePath& directory,
+ int Init(net::CacheType cache_type, const base::FilePath& directory,
int cache_size, bool force, base::MessageLoopProxy* cache_thread,
const net::CompletionCallback& callback);
void OnCreateBackendComplete(int rv);
diff --git a/webkit/appcache/appcache_interfaces.cc b/webkit/appcache/appcache_interfaces.cc
index 70de5ff..3f3d1d7 100644
--- a/webkit/appcache/appcache_interfaces.cc
+++ b/webkit/appcache/appcache_interfaces.cc
@@ -19,7 +19,8 @@ const char kHttpsScheme[] = "https";
const char kHttpGETMethod[] = "GET";
const char kHttpHEADMethod[] = "HEAD";
-const FilePath::CharType kAppCacheDatabaseName[] = FILE_PATH_LITERAL("Index");
+const base::FilePath::CharType kAppCacheDatabaseName[] =
+ FILE_PATH_LITERAL("Index");
AppCacheInfo::AppCacheInfo()
: cache_id(kNoCacheId),
diff --git a/webkit/appcache/appcache_interfaces.h b/webkit/appcache/appcache_interfaces.h
index ed1dee7..78752b1 100644
--- a/webkit/appcache/appcache_interfaces.h
+++ b/webkit/appcache/appcache_interfaces.h
@@ -169,7 +169,8 @@ bool IsSchemeSupported(const GURL& url);
bool IsMethodSupported(const std::string& method);
bool IsSchemeAndMethodSupported(const net::URLRequest* request);
-WEBKIT_STORAGE_EXPORT extern const FilePath::CharType kAppCacheDatabaseName[];
+WEBKIT_STORAGE_EXPORT extern const base::FilePath::CharType
+ kAppCacheDatabaseName[];
} // namespace
diff --git a/webkit/appcache/appcache_service.cc b/webkit/appcache/appcache_service.cc
index 0149e62..c455436 100644
--- a/webkit/appcache/appcache_service.cc
+++ b/webkit/appcache/appcache_service.cc
@@ -449,7 +449,7 @@ AppCacheService::~AppCacheService() {
storage_.reset();
}
-void AppCacheService::Initialize(const FilePath& cache_directory,
+void AppCacheService::Initialize(const base::FilePath& cache_directory,
base::MessageLoopProxy* db_thread,
base::MessageLoopProxy* cache_thread) {
DCHECK(!storage_.get());
diff --git a/webkit/appcache/appcache_service.h b/webkit/appcache/appcache_service.h
index dfc7302..3a4003d 100644
--- a/webkit/appcache/appcache_service.h
+++ b/webkit/appcache/appcache_service.h
@@ -17,13 +17,12 @@
#include "webkit/appcache/appcache_storage.h"
#include "webkit/storage/webkit_storage_export.h"
-class FilePath;
-
namespace net {
class URLRequestContext;
} // namespace net
namespace base {
+class FilePath;
class MessageLoopProxy;
}
@@ -59,7 +58,7 @@ class WEBKIT_STORAGE_EXPORT AppCacheService {
explicit AppCacheService(quota::QuotaManagerProxy* quota_manager_proxy);
virtual ~AppCacheService();
- void Initialize(const FilePath& cache_directory,
+ void Initialize(const base::FilePath& cache_directory,
base::MessageLoopProxy* db_thread,
base::MessageLoopProxy* cache_thread);
diff --git a/webkit/appcache/appcache_storage_impl.cc b/webkit/appcache/appcache_storage_impl.cc
index 89b196b..5c33209 100644
--- a/webkit/appcache/appcache_storage_impl.cc
+++ b/webkit/appcache/appcache_storage_impl.cc
@@ -39,7 +39,7 @@ static const int kDefaultQuota = 5 * 1024 * 1024;
static const int kMaxDiskCacheSize = 250 * 1024 * 1024;
static const int kMaxMemDiskCacheSize = 10 * 1024 * 1024;
-static const FilePath::CharType kDiskCacheDirectoryName[] =
+static const base::FilePath::CharType kDiskCacheDirectoryName[] =
FILE_PATH_LITERAL("Cache");
namespace {
@@ -1312,7 +1312,7 @@ AppCacheStorageImpl::~AppCacheStorageImpl() {
}
}
-void AppCacheStorageImpl::Initialize(const FilePath& cache_directory,
+void AppCacheStorageImpl::Initialize(const base::FilePath& cache_directory,
base::MessageLoopProxy* db_thread,
base::MessageLoopProxy* cache_thread) {
DCHECK(db_thread);
@@ -1320,7 +1320,7 @@ void AppCacheStorageImpl::Initialize(const FilePath& cache_directory,
cache_directory_ = cache_directory;
is_incognito_ = cache_directory_.empty();
- FilePath db_file_path;
+ base::FilePath db_file_path;
if (!is_incognito_)
db_file_path = cache_directory_.Append(kAppCacheDatabaseName);
database_ = new AppCacheDatabase(db_file_path);
diff --git a/webkit/appcache/appcache_storage_impl.h b/webkit/appcache/appcache_storage_impl.h
index 7441f4f..4211e62 100644
--- a/webkit/appcache/appcache_storage_impl.h
+++ b/webkit/appcache/appcache_storage_impl.h
@@ -31,7 +31,7 @@ class AppCacheStorageImpl : public AppCacheStorage {
explicit AppCacheStorageImpl(AppCacheService* service);
virtual ~AppCacheStorageImpl();
- void Initialize(const FilePath& cache_directory,
+ void Initialize(const base::FilePath& cache_directory,
base::MessageLoopProxy* db_thread,
base::MessageLoopProxy* cache_thread);
void Disable();
@@ -134,7 +134,7 @@ class AppCacheStorageImpl : public AppCacheStorage {
WEBKIT_STORAGE_EXPORT AppCacheDiskCache* disk_cache();
// The directory in which we place files in the file system.
- FilePath cache_directory_;
+ base::FilePath cache_directory_;
bool is_incognito_;
// This class operates primarily on the IO thread, but schedules
diff --git a/webkit/appcache/appcache_storage_impl_unittest.cc b/webkit/appcache/appcache_storage_impl_unittest.cc
index c8b86e5..37ed315 100644
--- a/webkit/appcache/appcache_storage_impl_unittest.cc
+++ b/webkit/appcache/appcache_storage_impl_unittest.cc
@@ -132,7 +132,7 @@ class AppCacheStorageImplTest : public testing::Test {
class MockQuotaManager : public quota::QuotaManager {
public:
MockQuotaManager()
- : QuotaManager(true /* is_incognito */, FilePath(),
+ : QuotaManager(true /* is_incognito */, base::FilePath(),
io_thread->message_loop_proxy(),
db_thread->message_loop_proxy(),
NULL),
@@ -261,7 +261,7 @@ class AppCacheStorageImplTest : public testing::Test {
void SetUpTest() {
DCHECK(MessageLoop::current() == io_thread->message_loop());
service_.reset(new AppCacheService(NULL));
- service_->Initialize(FilePath(), db_thread->message_loop_proxy(), NULL);
+ service_->Initialize(base::FilePath(), db_thread->message_loop_proxy(), NULL);
mock_quota_manager_proxy_ = new MockQuotaManagerProxy();
service_->quota_manager_proxy_ = mock_quota_manager_proxy_;
delegate_.reset(new MockStorageDelegate(this));
diff --git a/webkit/base/data_element.cc b/webkit/base/data_element.cc
index a514ac5..472a88b 100644
--- a/webkit/base/data_element.cc
+++ b/webkit/base/data_element.cc
@@ -16,7 +16,7 @@ DataElement::DataElement()
DataElement::~DataElement() {}
void DataElement::SetToFilePathRange(
- const FilePath& path,
+ const base::FilePath& path,
uint64 offset, uint64 length,
const base::Time& expected_modification_time) {
type_ = TYPE_FILE;
diff --git a/webkit/base/data_element.h b/webkit/base/data_element.h
index 4a5c726..3e286ba 100644
--- a/webkit/base/data_element.h
+++ b/webkit/base/data_element.h
@@ -33,7 +33,7 @@ class WEBKIT_BASE_EXPORT DataElement {
Type type() const { return type_; }
const char* bytes() const { return bytes_ ? bytes_ : &buf_[0]; }
- const FilePath& path() const { return path_; }
+ const base::FilePath& path() const { return path_; }
const GURL& url() const { return url_; }
uint64 offset() const { return offset_; }
uint64 length() const { return length_; }
@@ -57,7 +57,7 @@ class WEBKIT_BASE_EXPORT DataElement {
}
// Sets TYPE_FILE data.
- void SetToFilePath(const FilePath& path) {
+ void SetToFilePath(const base::FilePath& path) {
SetToFilePathRange(path, 0, kuint64max, base::Time());
}
@@ -67,7 +67,7 @@ class WEBKIT_BASE_EXPORT DataElement {
}
// Sets TYPE_FILE data with range.
- void SetToFilePathRange(const FilePath& path,
+ void SetToFilePathRange(const base::FilePath& path,
uint64 offset, uint64 length,
const base::Time& expected_modification_time);
@@ -84,7 +84,7 @@ class WEBKIT_BASE_EXPORT DataElement {
Type type_;
std::vector<char> buf_; // For TYPE_BYTES.
const char* bytes_; // For TYPE_BYTES.
- FilePath path_; // For TYPE_FILE.
+ base::FilePath path_; // For TYPE_FILE.
GURL url_; // For TYPE_BLOB or TYPE_FILE_FILESYSTEM.
uint64 offset_;
uint64 length_;
diff --git a/webkit/base/file_path_string_conversions.cc b/webkit/base/file_path_string_conversions.cc
index 3ff7557..566c8bb 100644
--- a/webkit/base/file_path_string_conversions.cc
+++ b/webkit/base/file_path_string_conversions.cc
@@ -10,7 +10,8 @@
namespace webkit_base {
-FilePath::StringType WebStringToFilePathString(const WebKit::WebString& str) {
+base::FilePath::StringType WebStringToFilePathString(
+ const WebKit::WebString& str) {
#if defined(OS_POSIX)
return base::SysWideToNativeMB(UTF16ToWideHack(str));
#elif defined(OS_WIN)
@@ -18,7 +19,8 @@ FilePath::StringType WebStringToFilePathString(const WebKit::WebString& str) {
#endif
}
-WebKit::WebString FilePathStringToWebString(const FilePath::StringType& str) {
+WebKit::WebString FilePathStringToWebString(
+ const base::FilePath::StringType& str) {
#if defined(OS_POSIX)
return WideToUTF16Hack(base::SysNativeMBToWide(str));
#elif defined(OS_WIN)
@@ -26,11 +28,11 @@ WebKit::WebString FilePathStringToWebString(const FilePath::StringType& str) {
#endif
}
-FilePath WebStringToFilePath(const WebKit::WebString& str) {
- return FilePath(WebStringToFilePathString(str));
+base::FilePath WebStringToFilePath(const WebKit::WebString& str) {
+ return base::FilePath(WebStringToFilePathString(str));
}
-WebKit::WebString FilePathToWebString(const FilePath& file_path) {
+WebKit::WebString FilePathToWebString(const base::FilePath& file_path) {
return FilePathStringToWebString(file_path.value());
}
diff --git a/webkit/base/file_path_string_conversions.h b/webkit/base/file_path_string_conversions.h
index 902a881..951c466 100644
--- a/webkit/base/file_path_string_conversions.h
+++ b/webkit/base/file_path_string_conversions.h
@@ -14,13 +14,13 @@ class WebString;
namespace webkit_base {
-WEBKIT_BASE_EXPORT FilePath::StringType WebStringToFilePathString(
+WEBKIT_BASE_EXPORT base::FilePath::StringType WebStringToFilePathString(
const WebKit::WebString& str);
WEBKIT_BASE_EXPORT WebKit::WebString FilePathStringToWebString(
- const FilePath::StringType& str);
-WEBKIT_BASE_EXPORT FilePath WebStringToFilePath(const WebKit::WebString& str);
+ const base::FilePath::StringType& str);
+WEBKIT_BASE_EXPORT base::FilePath WebStringToFilePath(const WebKit::WebString& str);
WEBKIT_BASE_EXPORT WebKit::WebString FilePathToWebString(
- const FilePath& file_path);
+ const base::FilePath& file_path);
} // namespace webkit_base
diff --git a/webkit/blob/blob_data.cc b/webkit/blob/blob_data.cc
index 2f62e32..4a2ab86 100644
--- a/webkit/blob/blob_data.cc
+++ b/webkit/blob/blob_data.cc
@@ -21,7 +21,7 @@ void BlobData::AppendData(const char* data, size_t length) {
items_.back().SetToBytes(data, length);
}
-void BlobData::AppendFile(const FilePath& file_path,
+void BlobData::AppendFile(const base::FilePath& file_path,
uint64 offset, uint64 length,
const base::Time& expected_modification_time) {
DCHECK(length > 0);
diff --git a/webkit/blob/blob_data.h b/webkit/blob/blob_data.h
index 45c75ca..08c47f4 100644
--- a/webkit/blob/blob_data.h
+++ b/webkit/blob/blob_data.h
@@ -30,7 +30,7 @@ class WEBKIT_STORAGE_EXPORT BlobData : public base::RefCounted<BlobData> {
void AppendData(const char* data, size_t length);
- void AppendFile(const FilePath& file_path, uint64 offset, uint64 length,
+ void AppendFile(const base::FilePath& file_path, uint64 offset, uint64 length,
const base::Time& expected_modification_time);
void AppendBlob(const GURL& blob_url, uint64 offset, uint64 length);
diff --git a/webkit/blob/blob_storage_controller.cc b/webkit/blob/blob_storage_controller.cc
index 503c47e..8649d98 100644
--- a/webkit/blob/blob_storage_controller.cc
+++ b/webkit/blob/blob_storage_controller.cc
@@ -215,7 +215,7 @@ void BlobStorageController::AppendStorageItems(
void BlobStorageController::AppendFileItem(
BlobData* target_blob_data,
- const FilePath& file_path, uint64 offset, uint64 length,
+ const base::FilePath& file_path, uint64 offset, uint64 length,
const base::Time& expected_modification_time) {
target_blob_data->AppendFile(file_path, offset, length,
expected_modification_time);
diff --git a/webkit/blob/blob_storage_controller.h b/webkit/blob/blob_storage_controller.h
index c7e7631..a0c72b2 100644
--- a/webkit/blob/blob_storage_controller.h
+++ b/webkit/blob/blob_storage_controller.h
@@ -15,9 +15,9 @@
#include "webkit/storage/webkit_storage_export.h"
class GURL;
-class FilePath;
namespace base {
+class FilePath;
class Time;
}
@@ -48,7 +48,8 @@ class WEBKIT_STORAGE_EXPORT BlobStorageController {
uint64 offset,
uint64 length);
void AppendFileItem(BlobData* target_blob_data,
- const FilePath& file_path, uint64 offset, uint64 length,
+ const base::FilePath& file_path, uint64 offset,
+ uint64 length,
const base::Time& expected_modification_time);
void AppendFileSystemFileItem(
BlobData* target_blob_data,
diff --git a/webkit/blob/blob_url_request_job_unittest.cc b/webkit/blob/blob_url_request_job_unittest.cc
index 007d936..8b07a4f 100644
--- a/webkit/blob/blob_url_request_job_unittest.cc
+++ b/webkit/blob/blob_url_request_job_unittest.cc
@@ -209,7 +209,7 @@ class BlobURLRequestJobTest : public testing::Test {
file_system_context_->CreateCrackedFileSystemURL(
GURL(kFileSystemURLOrigin),
kFileSystemType,
- FilePath().AppendASCII(filename));
+ base::FilePath().AppendASCII(filename));
fileapi::FileSystemFileUtil* file_util =
file_system_context_->GetFileUtil(kFileSystemType);
@@ -232,7 +232,7 @@ class BlobURLRequestJobTest : public testing::Test {
base::ClosePlatformFile(handle);
base::PlatformFileInfo file_info;
- FilePath platform_path;
+ base::FilePath platform_path;
ASSERT_EQ(base::PLATFORM_FILE_OK,
file_util->GetFileInfo(&context, url, &file_info,
&platform_path));
@@ -297,8 +297,8 @@ class BlobURLRequestJobTest : public testing::Test {
protected:
base::ScopedTempDir temp_dir_;
- FilePath temp_file1_;
- FilePath temp_file2_;
+ base::FilePath temp_file1_;
+ base::FilePath temp_file2_;
base::Time temp_file_modification_time1_;
base::Time temp_file_modification_time2_;
GURL file_system_root_url_;
@@ -330,7 +330,7 @@ TEST_F(BlobURLRequestJobTest, TestGetSimpleFileRequest) {
}
TEST_F(BlobURLRequestJobTest, TestGetLargeFileRequest) {
- FilePath large_temp_file = temp_dir_.path().AppendASCII("LargeBlob.dat");
+ base::FilePath large_temp_file = temp_dir_.path().AppendASCII("LargeBlob.dat");
std::string large_data;
large_data.reserve(kBufferSize * 5);
for (int i = 0; i < kBufferSize * 5; ++i)
@@ -343,7 +343,7 @@ TEST_F(BlobURLRequestJobTest, TestGetLargeFileRequest) {
}
TEST_F(BlobURLRequestJobTest, TestGetNonExistentFileRequest) {
- FilePath non_existent_file =
+ base::FilePath non_existent_file =
temp_file1_.InsertBeforeExtension(FILE_PATH_LITERAL("-na"));
blob_data_->AppendFile(non_existent_file, 0, -1, base::Time());
TestErrorRequest(404);
diff --git a/webkit/blob/local_file_stream_reader.cc b/webkit/blob/local_file_stream_reader.cc
index aa077ef..dab8aa5 100644
--- a/webkit/blob/local_file_stream_reader.cc
+++ b/webkit/blob/local_file_stream_reader.cc
@@ -34,7 +34,7 @@ bool VerifySnapshotTime(const base::Time& expected_modification_time,
LocalFileStreamReader::LocalFileStreamReader(
base::TaskRunner* task_runner,
- const FilePath& file_path,
+ const base::FilePath& file_path,
int64 initial_offset,
const base::Time& expected_modification_time)
: task_runner_(task_runner),
diff --git a/webkit/blob/local_file_stream_reader.h b/webkit/blob/local_file_stream_reader.h
index 55b70bf..de1f64e 100644
--- a/webkit/blob/local_file_stream_reader.h
+++ b/webkit/blob/local_file_stream_reader.h
@@ -39,7 +39,7 @@ class WEBKIT_STORAGE_EXPORT LocalFileStreamReader : public FileStreamReader {
// it does any succeeding read operations should fail with
// ERR_UPLOAD_FILE_CHANGED error.
LocalFileStreamReader(base::TaskRunner* task_runner,
- const FilePath& file_path,
+ const base::FilePath& file_path,
int64 initial_offset,
const base::Time& expected_modification_time);
virtual ~LocalFileStreamReader();
@@ -71,7 +71,7 @@ class WEBKIT_STORAGE_EXPORT LocalFileStreamReader : public FileStreamReader {
scoped_refptr<base::TaskRunner> task_runner_;
scoped_ptr<net::FileStream> stream_impl_;
- const FilePath file_path_;
+ const base::FilePath file_path_;
const int64 initial_offset_;
const base::Time expected_modification_time_;
bool has_pending_open_;
diff --git a/webkit/blob/local_file_stream_reader_unittest.cc b/webkit/blob/local_file_stream_reader_unittest.cc
index 3aaf005..fa959b3 100644
--- a/webkit/blob/local_file_stream_reader_unittest.cc
+++ b/webkit/blob/local_file_stream_reader_unittest.cc
@@ -81,7 +81,7 @@ class LocalFileStreamReaderTest : public testing::Test {
protected:
LocalFileStreamReader* CreateFileReader(
- const FilePath& path,
+ const base::FilePath& path,
int64 initial_offset,
const base::Time& expected_modification_time) {
return new LocalFileStreamReader(
@@ -103,8 +103,8 @@ class LocalFileStreamReaderTest : public testing::Test {
return file_thread_.message_loop_proxy().get();
}
- FilePath test_dir() const { return dir_.path(); }
- FilePath test_path() const { return dir_.path().AppendASCII("test"); }
+ base::FilePath test_dir() const { return dir_.path(); }
+ base::FilePath test_path() const { return dir_.path().AppendASCII("test"); }
base::Time test_file_modification_time() const {
return test_file_modification_time_;
}
@@ -123,7 +123,7 @@ class LocalFileStreamReaderTest : public testing::Test {
};
TEST_F(LocalFileStreamReaderTest, NonExistent) {
- FilePath nonexistent_path = test_dir().AppendASCII("nonexistent");
+ base::FilePath nonexistent_path = test_dir().AppendASCII("nonexistent");
scoped_ptr<LocalFileStreamReader> reader(
CreateFileReader(nonexistent_path, 0, base::Time()));
int result = 0;
@@ -134,7 +134,7 @@ TEST_F(LocalFileStreamReaderTest, NonExistent) {
}
TEST_F(LocalFileStreamReaderTest, Empty) {
- FilePath empty_path = test_dir().AppendASCII("empty");
+ base::FilePath empty_path = test_dir().AppendASCII("empty");
base::PlatformFileError error = base::PLATFORM_FILE_OK;
base::PlatformFile file = base::CreatePlatformFile(
empty_path,
diff --git a/webkit/blob/shareable_file_reference.cc b/webkit/blob/shareable_file_reference.cc
index f85b97e..07acac3 100644
--- a/webkit/blob/shareable_file_reference.cc
+++ b/webkit/blob/shareable_file_reference.cc
@@ -23,7 +23,7 @@ namespace {
// check thread in the dtor.
class ShareableFileMap {
public:
- typedef std::map<FilePath, ShareableFileReference*> FileMap;
+ typedef std::map<base::FilePath, ShareableFileReference*> FileMap;
typedef FileMap::iterator iterator;
typedef FileMap::key_type key_type;
typedef FileMap::value_type value_type;
@@ -66,7 +66,7 @@ base::LazyInstance<ShareableFileMap> g_file_map = LAZY_INSTANCE_INITIALIZER;
// static
scoped_refptr<ShareableFileReference> ShareableFileReference::Get(
- const FilePath& path) {
+ const base::FilePath& path) {
ShareableFileMap::iterator found = g_file_map.Get().Find(path);
ShareableFileReference* reference =
(found == g_file_map.Get().End()) ? NULL : found->second;
@@ -75,7 +75,7 @@ scoped_refptr<ShareableFileReference> ShareableFileReference::Get(
// static
scoped_refptr<ShareableFileReference> ShareableFileReference::GetOrCreate(
- const FilePath& path, FinalReleasePolicy policy,
+ const base::FilePath& path, FinalReleasePolicy policy,
base::TaskRunner* file_task_runner) {
DCHECK(file_task_runner);
typedef std::pair<ShareableFileMap::iterator, bool> InsertResult;
@@ -101,7 +101,7 @@ void ShareableFileReference::AddFinalReleaseCallback(
}
ShareableFileReference::ShareableFileReference(
- const FilePath& path, FinalReleasePolicy policy,
+ const base::FilePath& path, FinalReleasePolicy policy,
base::TaskRunner* file_task_runner)
: path_(path),
final_release_policy_(policy),
diff --git a/webkit/blob/shareable_file_reference.h b/webkit/blob/shareable_file_reference.h
index 1440586..5323cfa 100644
--- a/webkit/blob/shareable_file_reference.h
+++ b/webkit/blob/shareable_file_reference.h
@@ -25,7 +25,7 @@ namespace webkit_blob {
class WEBKIT_STORAGE_EXPORT ShareableFileReference
: public base::RefCounted<ShareableFileReference> {
public:
- typedef base::Callback<void(const FilePath&)> FinalReleaseCallback;
+ typedef base::Callback<void(const base::FilePath&)> FinalReleaseCallback;
enum FinalReleasePolicy {
DELETE_ON_FINAL_RELEASE,
@@ -34,18 +34,18 @@ class WEBKIT_STORAGE_EXPORT ShareableFileReference
// Returns a ShareableFileReference for the given path, if no reference
// for this path exists returns NULL.
- static scoped_refptr<ShareableFileReference> Get(const FilePath& path);
+ static scoped_refptr<ShareableFileReference> Get(const base::FilePath& path);
// Returns a ShareableFileReference for the given path, creating a new
// reference if none yet exists. If there's a pre-existing reference for
// the path, the deletable parameter of this method is ignored.
static scoped_refptr<ShareableFileReference> GetOrCreate(
- const FilePath& path,
+ const base::FilePath& path,
FinalReleasePolicy policy,
base::TaskRunner* file_task_runner);
// The full file path.
- const FilePath& path() const { return path_; }
+ const base::FilePath& path() const { return path_; }
// Whether it's to be deleted on final release.
FinalReleasePolicy final_release_policy() const {
@@ -58,12 +58,12 @@ class WEBKIT_STORAGE_EXPORT ShareableFileReference
friend class base::RefCounted<ShareableFileReference>;
ShareableFileReference(
- const FilePath& path,
+ const base::FilePath& path,
FinalReleasePolicy policy,
base::TaskRunner* file_task_runner);
~ShareableFileReference();
- const FilePath path_;
+ const base::FilePath path_;
const FinalReleasePolicy final_release_policy_;
const scoped_refptr<base::TaskRunner> file_task_runner_;
std::vector<FinalReleaseCallback> final_release_callbacks_;
diff --git a/webkit/blob/shareable_file_reference_unittest.cc b/webkit/blob/shareable_file_reference_unittest.cc
index d75a1be..15b6eb1 100644
--- a/webkit/blob/shareable_file_reference_unittest.cc
+++ b/webkit/blob/shareable_file_reference_unittest.cc
@@ -20,7 +20,7 @@ TEST(ShareableFileReferenceTest, TestReferences) {
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
// Create a file.
- FilePath file;
+ base::FilePath file;
file_util::CreateTemporaryFileInDir(temp_dir.path(), &file);
EXPECT_TRUE(file_util::PathExists(file));
diff --git a/webkit/chromeos/fileapi/cros_mount_point_provider.cc b/webkit/chromeos/fileapi/cros_mount_point_provider.cc
index 5c80148..a90fcfa 100644
--- a/webkit/chromeos/fileapi/cros_mount_point_provider.cc
+++ b/webkit/chromeos/fileapi/cros_mount_point_provider.cc
@@ -72,18 +72,18 @@ void CrosMountPointProvider::ValidateFileSystemRoot(
callback.Run(base::PLATFORM_FILE_OK);
}
-FilePath CrosMountPointProvider::GetFileSystemRootPathOnFileThread(
+base::FilePath CrosMountPointProvider::GetFileSystemRootPathOnFileThread(
const fileapi::FileSystemURL& url,
bool create) {
DCHECK(fileapi::IsolatedContext::IsIsolatedType(url.mount_type()));
if (!url.is_valid())
- return FilePath();
+ return base::FilePath();
- FilePath root_path;
+ base::FilePath root_path;
std::string mount_name = url.filesystem_id();
if (!mount_points_->GetRegisteredPath(mount_name, &root_path) &&
!system_mount_points_->GetRegisteredPath(mount_name, &root_path)) {
- return FilePath();
+ return base::FilePath();
}
return root_path.DirName();
@@ -116,7 +116,8 @@ bool CrosMountPointProvider::IsAccessAllowed(
}
// TODO(zelidrag): Share this code with SandboxMountPointProvider impl.
-bool CrosMountPointProvider::IsRestrictedFileName(const FilePath& path) const {
+bool CrosMountPointProvider::IsRestrictedFileName(
+ const base::FilePath& path) const {
return false;
}
@@ -147,12 +148,12 @@ void CrosMountPointProvider::GrantFullAccessToExtension(
for (size_t i = 0; i < files.size(); ++i) {
file_access_permissions_->GrantAccessPermission(
extension_id,
- FilePath::FromUTF8Unsafe(files[i].name));
+ base::FilePath::FromUTF8Unsafe(files[i].name));
}
}
void CrosMountPointProvider::GrantFileAccessToExtension(
- const std::string& extension_id, const FilePath& virtual_path) {
+ const std::string& extension_id, const base::FilePath& virtual_path) {
// All we care about here is access from extensions for now.
DCHECK(special_storage_policy_->IsFileHandler(extension_id));
if (!special_storage_policy_->IsFileHandler(extension_id))
@@ -160,7 +161,7 @@ void CrosMountPointProvider::GrantFileAccessToExtension(
std::string id;
fileapi::FileSystemType type;
- FilePath path;
+ base::FilePath path;
if (!mount_points_->CrackVirtualPath(virtual_path, &id, &type, &path) &&
!system_mount_points_->CrackVirtualPath(virtual_path,
&id, &type, &path)) {
@@ -180,12 +181,12 @@ void CrosMountPointProvider::RevokeAccessForExtension(
file_access_permissions_->RevokePermissions(extension_id);
}
-std::vector<FilePath> CrosMountPointProvider::GetRootDirectories() const {
+std::vector<base::FilePath> CrosMountPointProvider::GetRootDirectories() const {
std::vector<fileapi::MountPoints::MountPointInfo> mount_points;
mount_points_->AddMountPointInfosTo(&mount_points);
system_mount_points_->AddMountPointInfosTo(&mount_points);
- std::vector<FilePath> root_dirs;
+ std::vector<base::FilePath> root_dirs;
for (size_t i = 0; i < mount_points.size(); ++i)
root_dirs.push_back(mount_points[i].path);
return root_dirs;
@@ -272,8 +273,8 @@ fileapi::FileStreamWriter* CrosMountPointProvider::CreateFileStreamWriter(
return new fileapi::LocalFileStreamWriter(url.path(), offset);
}
-bool CrosMountPointProvider::GetVirtualPath(const FilePath& filesystem_path,
- FilePath* virtual_path) {
+bool CrosMountPointProvider::GetVirtualPath(const base::FilePath& filesystem_path,
+ base::FilePath* virtual_path) {
return mount_points_->GetVirtualPath(filesystem_path, virtual_path) ||
system_mount_points_->GetVirtualPath(filesystem_path, virtual_path);
}
diff --git a/webkit/chromeos/fileapi/cros_mount_point_provider.h b/webkit/chromeos/fileapi/cros_mount_point_provider.h
index 8da1f54..9c97238 100644
--- a/webkit/chromeos/fileapi/cros_mount_point_provider.h
+++ b/webkit/chromeos/fileapi/cros_mount_point_provider.h
@@ -56,11 +56,11 @@ class WEBKIT_STORAGE_EXPORT CrosMountPointProvider
fileapi::FileSystemType type,
bool create,
const ValidateFileSystemCallback& callback) OVERRIDE;
- virtual FilePath GetFileSystemRootPathOnFileThread(
+ virtual base::FilePath GetFileSystemRootPathOnFileThread(
const fileapi::FileSystemURL& url,
bool create) OVERRIDE;
virtual bool IsAccessAllowed(const fileapi::FileSystemURL& url) OVERRIDE;
- virtual bool IsRestrictedFileName(const FilePath& filename) const OVERRIDE;
+ virtual bool IsRestrictedFileName(const base::FilePath& filename) const OVERRIDE;
virtual fileapi::FileSystemFileUtil* GetFileUtil(
fileapi::FileSystemType type) OVERRIDE;
virtual fileapi::AsyncFileUtil* GetAsyncFileUtil(
@@ -89,15 +89,15 @@ class WEBKIT_STORAGE_EXPORT CrosMountPointProvider
const DeleteFileSystemCallback& callback) OVERRIDE;
// fileapi::ExternalFileSystemMountPointProvider overrides.
- virtual std::vector<FilePath> GetRootDirectories() const OVERRIDE;
+ virtual std::vector<base::FilePath> GetRootDirectories() const OVERRIDE;
virtual void GrantFullAccessToExtension(
const std::string& extension_id) OVERRIDE;
virtual void GrantFileAccessToExtension(
- const std::string& extension_id, const FilePath& virtual_path) OVERRIDE;
+ const std::string& extension_id, const base::FilePath& virtual_path) OVERRIDE;
virtual void RevokeAccessForExtension(
const std::string& extension_id) OVERRIDE;
- virtual bool GetVirtualPath(const FilePath& filesystem_path,
- FilePath* virtual_path) OVERRIDE;
+ virtual bool GetVirtualPath(const base::FilePath& filesystem_path,
+ base::FilePath* virtual_path) OVERRIDE;
private:
fileapi::RemoteFileSystemProxyInterface* GetRemoteProxy(
diff --git a/webkit/chromeos/fileapi/cros_mount_point_provider_unittest.cc b/webkit/chromeos/fileapi/cros_mount_point_provider_unittest.cc
index eb338e3..df4e3b2 100644
--- a/webkit/chromeos/fileapi/cros_mount_point_provider_unittest.cc
+++ b/webkit/chromeos/fileapi/cros_mount_point_provider_unittest.cc
@@ -27,7 +27,7 @@ FileSystemURL CreateFileSystemURL(const std::string& extension,
return mount_points->CreateCrackedFileSystemURL(
GURL("chrome-extension://" + extension + "/"),
fileapi::kFileSystemTypeExternal,
- FilePath::FromUTF8Unsafe(path));
+ base::FilePath::FromUTF8Unsafe(path));
}
TEST(CrosMountPointProviderTest, DefaultMountPoints) {
@@ -39,14 +39,14 @@ TEST(CrosMountPointProviderTest, DefaultMountPoints) {
storage_policy,
mount_points.get(),
fileapi::ExternalMountPoints::GetSystemInstance());
- std::vector<FilePath> root_dirs = provider.GetRootDirectories();
- std::set<FilePath> root_dirs_set(root_dirs.begin(), root_dirs.end());
+ std::vector<base::FilePath> root_dirs = provider.GetRootDirectories();
+ std::set<base::FilePath> root_dirs_set(root_dirs.begin(), root_dirs.end());
// By default there should be 3 mount points (in system mount points):
EXPECT_EQ(3u, root_dirs.size());
- EXPECT_TRUE(root_dirs_set.count(FilePath(FPL("/media/removable"))));
- EXPECT_TRUE(root_dirs_set.count(FilePath(FPL("/media/archive"))));
- EXPECT_TRUE(root_dirs_set.count(FilePath(FPL("/usr/share/oem"))));
+ EXPECT_TRUE(root_dirs_set.count(base::FilePath(FPL("/media/removable"))));
+ EXPECT_TRUE(root_dirs_set.count(base::FilePath(FPL("/media/archive"))));
+ EXPECT_TRUE(root_dirs_set.count(base::FilePath(FPL("/usr/share/oem"))));
}
TEST(CrosMountPointProviderTest, GetRootDirectories) {
@@ -66,26 +66,26 @@ TEST(CrosMountPointProviderTest, GetRootDirectories) {
// Register 'local' test mount points.
mount_points->RegisterFileSystem("c",
fileapi::kFileSystemTypeNativeLocal,
- FilePath(FPL("/a/b/c")));
+ base::FilePath(FPL("/a/b/c")));
mount_points->RegisterFileSystem("d",
fileapi::kFileSystemTypeNativeLocal,
- FilePath(FPL("/b/c/d")));
+ base::FilePath(FPL("/b/c/d")));
// Register system test mount points.
system_mount_points->RegisterFileSystem("d",
fileapi::kFileSystemTypeNativeLocal,
- FilePath(FPL("/g/c/d")));
+ base::FilePath(FPL("/g/c/d")));
system_mount_points->RegisterFileSystem("e",
fileapi::kFileSystemTypeNativeLocal,
- FilePath(FPL("/g/d/e")));
+ base::FilePath(FPL("/g/d/e")));
- std::vector<FilePath> root_dirs = provider.GetRootDirectories();
- std::set<FilePath> root_dirs_set(root_dirs.begin(), root_dirs.end());
+ std::vector<base::FilePath> root_dirs = provider.GetRootDirectories();
+ std::set<base::FilePath> root_dirs_set(root_dirs.begin(), root_dirs.end());
EXPECT_EQ(4u, root_dirs.size());
- EXPECT_TRUE(root_dirs_set.count(FilePath(FPL("/a/b/c"))));
- EXPECT_TRUE(root_dirs_set.count(FilePath(FPL("/b/c/d"))));
- EXPECT_TRUE(root_dirs_set.count(FilePath(FPL("/g/c/d"))));
- EXPECT_TRUE(root_dirs_set.count(FilePath(FPL("/g/d/e"))));
+ EXPECT_TRUE(root_dirs_set.count(base::FilePath(FPL("/a/b/c"))));
+ EXPECT_TRUE(root_dirs_set.count(base::FilePath(FPL("/b/c/d"))));
+ EXPECT_TRUE(root_dirs_set.count(base::FilePath(FPL("/g/c/d"))));
+ EXPECT_TRUE(root_dirs_set.count(base::FilePath(FPL("/g/d/e"))));
}
TEST(CrosMountPointProviderTest, AccessPermissions) {
@@ -110,22 +110,22 @@ TEST(CrosMountPointProviderTest, AccessPermissions) {
ASSERT_TRUE(system_mount_points->RegisterFileSystem(
"system",
fileapi::kFileSystemTypeNativeLocal,
- FilePath(FPL("/g/system"))));
+ base::FilePath(FPL("/g/system"))));
ASSERT_TRUE(mount_points->RegisterFileSystem(
"removable",
fileapi::kFileSystemTypeNativeLocal,
- FilePath(FPL("/media/removable"))));
+ base::FilePath(FPL("/media/removable"))));
ASSERT_TRUE(mount_points->RegisterFileSystem(
"oem",
fileapi::kFileSystemTypeRestrictedNativeLocal,
- FilePath(FPL("/usr/share/oem"))));
+ base::FilePath(FPL("/usr/share/oem"))));
// Provider specific mount point access.
EXPECT_FALSE(provider.IsAccessAllowed(
CreateFileSystemURL(extension, "removable/foo", mount_points.get())));
provider.GrantFileAccessToExtension(extension,
- FilePath(FPL("removable/foo")));
+ base::FilePath(FPL("removable/foo")));
EXPECT_TRUE(provider.IsAccessAllowed(
CreateFileSystemURL(extension, "removable/foo", mount_points.get())));
EXPECT_FALSE(provider.IsAccessAllowed(
@@ -135,14 +135,14 @@ TEST(CrosMountPointProviderTest, AccessPermissions) {
EXPECT_FALSE(provider.IsAccessAllowed(
CreateFileSystemURL(extension, "system/foo", system_mount_points.get())));
- provider.GrantFileAccessToExtension(extension, FilePath(FPL("system/foo")));
+ provider.GrantFileAccessToExtension(extension, base::FilePath(FPL("system/foo")));
EXPECT_TRUE(provider.IsAccessAllowed(
CreateFileSystemURL(extension, "system/foo", system_mount_points.get())));
EXPECT_FALSE(provider.IsAccessAllowed(CreateFileSystemURL(
extension, "system/foo1", system_mount_points.get())));
// oem is restricted file system.
- provider.GrantFileAccessToExtension(extension, FilePath(FPL("oem/foo")));
+ provider.GrantFileAccessToExtension(extension, base::FilePath(FPL("oem/foo")));
// The extension should not be able to access the file even if
// GrantFileAccessToExtension was called.
EXPECT_FALSE(provider.IsAccessAllowed(
@@ -165,7 +165,7 @@ TEST(CrosMountPointProviderTest, AccessPermissions) {
ASSERT_TRUE(mount_points->RegisterFileSystem(
"test",
fileapi::kFileSystemTypeNativeLocal,
- FilePath(FPL("/foo/test"))));
+ base::FilePath(FPL("/foo/test"))));
EXPECT_FALSE(provider.IsAccessAllowed(
CreateFileSystemURL(extension, "test_/foo", mount_points.get())));
@@ -176,7 +176,7 @@ TEST(CrosMountPointProviderTest, AccessPermissions) {
fileapi::FileSystemURL internal_url = FileSystemURL::CreateForTest(
GURL("chrome://foo"),
fileapi::kFileSystemTypeExternal,
- FilePath(FPL("removable/")));
+ base::FilePath(FPL("removable/")));
// Internal WebUI should have full access.
EXPECT_TRUE(provider.IsAccessAllowed(internal_url));
}
@@ -196,24 +196,24 @@ TEST(CrosMountPointProvider, GetVirtualPathConflictWithSystemPoints) {
// Provider specific mount points.
ASSERT_TRUE(
- mount_points->RegisterFileSystem("b", type, FilePath(FPL("/a/b"))));
+ mount_points->RegisterFileSystem("b", type, base::FilePath(FPL("/a/b"))));
ASSERT_TRUE(
- mount_points->RegisterFileSystem("y", type, FilePath(FPL("/z/y"))));
+ mount_points->RegisterFileSystem("y", type, base::FilePath(FPL("/z/y"))));
ASSERT_TRUE(
- mount_points->RegisterFileSystem("n", type, FilePath(FPL("/m/n"))));
+ mount_points->RegisterFileSystem("n", type, base::FilePath(FPL("/m/n"))));
// System mount points
ASSERT_TRUE(system_mount_points->RegisterFileSystem(
- "gb", type, FilePath(FPL("/a/b"))));
+ "gb", type, base::FilePath(FPL("/a/b"))));
ASSERT_TRUE(
- system_mount_points->RegisterFileSystem("gz", type, FilePath(FPL("/z"))));
+ system_mount_points->RegisterFileSystem("gz", type, base::FilePath(FPL("/z"))));
ASSERT_TRUE(system_mount_points->RegisterFileSystem(
- "gp", type, FilePath(FPL("/m/n/o/p"))));
+ "gp", type, base::FilePath(FPL("/m/n/o/p"))));
struct TestCase {
- const FilePath::CharType* const local_path;
+ const base::FilePath::CharType* const local_path;
bool success;
- const FilePath::CharType* const virtual_path;
+ const base::FilePath::CharType* const virtual_path;
};
const TestCase kTestCases[] = {
@@ -231,8 +231,8 @@ TEST(CrosMountPointProvider, GetVirtualPathConflictWithSystemPoints) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); ++i) {
// Initialize virtual path with a value.
- FilePath virtual_path(FPL("/mount"));
- FilePath local_path(kTestCases[i].local_path);
+ base::FilePath virtual_path(FPL("/mount"));
+ base::FilePath local_path(kTestCases[i].local_path);
EXPECT_EQ(kTestCases[i].success,
provider.GetVirtualPath(local_path, &virtual_path))
<< "Resolving " << kTestCases[i].local_path;
@@ -242,7 +242,7 @@ TEST(CrosMountPointProvider, GetVirtualPathConflictWithSystemPoints) {
if (!kTestCases[i].success)
continue;
- FilePath expected_virtual_path(kTestCases[i].virtual_path);
+ base::FilePath expected_virtual_path(kTestCases[i].virtual_path);
EXPECT_EQ(expected_virtual_path, virtual_path)
<< "Resolving " << kTestCases[i].local_path;
}
diff --git a/webkit/chromeos/fileapi/file_access_permissions.cc b/webkit/chromeos/fileapi/file_access_permissions.cc
index 6ab5a04..a435a55 100644
--- a/webkit/chromeos/fileapi/file_access_permissions.cc
+++ b/webkit/chromeos/fileapi/file_access_permissions.cc
@@ -15,7 +15,7 @@ FileAccessPermissions::~FileAccessPermissions() {}
void FileAccessPermissions::GrantAccessPermission(
- const std::string& extension_id, const FilePath& path) {
+ const std::string& extension_id, const base::FilePath& path) {
base::AutoLock locker(lock_);
PathAccessMap::iterator path_map_iter = path_map_.find(extension_id);
if (path_map_iter == path_map_.end()) {
@@ -30,7 +30,7 @@ void FileAccessPermissions::GrantAccessPermission(
}
bool FileAccessPermissions::HasAccessPermission(
- const std::string& extension_id, const FilePath& path) {
+ const std::string& extension_id, const base::FilePath& path) {
base::AutoLock locker(lock_);
PathAccessMap::const_iterator path_map_iter = path_map_.find(extension_id);
if (path_map_iter == path_map_.end())
@@ -38,8 +38,8 @@ bool FileAccessPermissions::HasAccessPermission(
// Check this file and walk up its directory tree to find if this extension
// has access to it.
- FilePath current_path = path.StripTrailingSeparators();
- FilePath last_path;
+ base::FilePath current_path = path.StripTrailingSeparators();
+ base::FilePath last_path;
while (current_path != last_path) {
if (path_map_iter->second.find(current_path) != path_map_iter->second.end())
return true;
diff --git a/webkit/chromeos/fileapi/file_access_permissions.h b/webkit/chromeos/fileapi/file_access_permissions.h
index 9aa0d8b..ba20b44 100644
--- a/webkit/chromeos/fileapi/file_access_permissions.h
+++ b/webkit/chromeos/fileapi/file_access_permissions.h
@@ -21,15 +21,15 @@ class FileAccessPermissions {
// Grants |extension_id| access to |path|.
void GrantAccessPermission(const std::string& extension_id,
- const FilePath& path);
+ const base::FilePath& path);
// Checks id |extension_id| has permission to access to |path|.
bool HasAccessPermission(const std::string& extension_id,
- const FilePath& path);
+ const base::FilePath& path);
// Revokes all file permissions for |extension_id|.
void RevokePermissions(const std::string& extension_id);
private:
- typedef std::set<FilePath> PathSet;
+ typedef std::set<base::FilePath> PathSet;
typedef std::map<std::string, PathSet> PathAccessMap;
base::Lock lock_; // Synchronize all access to path_map_.
diff --git a/webkit/chromeos/fileapi/file_access_permissions_unittest.cc b/webkit/chromeos/fileapi/file_access_permissions_unittest.cc
index b3efbfe..e6cc9ed 100644
--- a/webkit/chromeos/fileapi/file_access_permissions_unittest.cc
+++ b/webkit/chromeos/fileapi/file_access_permissions_unittest.cc
@@ -11,15 +11,15 @@ class FileAccessPermissionsTest : public testing::Test {
TEST_F(FileAccessPermissionsTest, FileAccessChecks) {
#if defined(OS_WIN)
- FilePath good_dir(FILE_PATH_LITERAL("c:\\root\\dir"));
- FilePath bad_dir(FILE_PATH_LITERAL("c:\\root"));
- FilePath good_file(FILE_PATH_LITERAL("c:\\root\\dir\\good_file.txt"));
- FilePath bad_file(FILE_PATH_LITERAL("c:\\root\\dir\\bad_file.txt"));
+ base::FilePath good_dir(FILE_PATH_LITERAL("c:\\root\\dir"));
+ base::FilePath bad_dir(FILE_PATH_LITERAL("c:\\root"));
+ base::FilePath good_file(FILE_PATH_LITERAL("c:\\root\\dir\\good_file.txt"));
+ base::FilePath bad_file(FILE_PATH_LITERAL("c:\\root\\dir\\bad_file.txt"));
#elif defined(OS_POSIX)
- FilePath good_dir(FILE_PATH_LITERAL("/root/dir"));
- FilePath bad_dir(FILE_PATH_LITERAL("/root"));
- FilePath good_file(FILE_PATH_LITERAL("/root/dir/good_file.txt"));
- FilePath bad_file(FILE_PATH_LITERAL("/root/dir/bad_file.txt"));
+ base::FilePath good_dir(FILE_PATH_LITERAL("/root/dir"));
+ base::FilePath bad_dir(FILE_PATH_LITERAL("/root"));
+ base::FilePath good_file(FILE_PATH_LITERAL("/root/dir/good_file.txt"));
+ base::FilePath bad_file(FILE_PATH_LITERAL("/root/dir/bad_file.txt"));
#endif
std::string extension1("ddammdhioacbehjngdmkjcjbnfginlla");
std::string extension2("jkhdjkhkhsdkfhsdkhrterwmtermeter");
diff --git a/webkit/chromeos/fileapi/file_util_async.h b/webkit/chromeos/fileapi/file_util_async.h
index 3cec09d..6d3cca6 100644
--- a/webkit/chromeos/fileapi/file_util_async.h
+++ b/webkit/chromeos/fileapi/file_util_async.h
@@ -51,33 +51,33 @@ class FileUtilAsync {
// PLATFORM_FILE_OK is passed to |callback| with a pointer to newly
// created AsyncFileStream object. The caller should delete the
// stream. On failure, an error code is passed instead.
- virtual void Open(const FilePath& file_path,
+ virtual void Open(const base::FilePath& file_path,
int file_flags, // PlatformFileFlags
const OpenCallback& callback) = 0;
// Gets file info of the given |file_path|. On success,
// PLATFORM_FILE_OK is passed to |callback| with the the obtained file
// info. On failure, an error code is passed instead.
- virtual void GetFileInfo(const FilePath& file_path,
+ virtual void GetFileInfo(const base::FilePath& file_path,
const GetFileInfoCallback& callback) = 0;
// Creates a file of the given |file_path|. On success,
// PLATFORM_FILE_OK is passed to |callback|. On failure, an error code
// is passed instead.
- virtual void Create(const FilePath& file_path,
+ virtual void Create(const base::FilePath& file_path,
const StatusCallback& callback) = 0;
// Truncates a file of the given |file_path| to |length|. On success,
// PLATFORM_FILE_OK is passed to |callback|. On failure, an error code
// is passed instead.
- virtual void Truncate(const FilePath& file_path,
+ virtual void Truncate(const base::FilePath& file_path,
int64 length,
const StatusCallback& callback) = 0;
// Modifies the timestamps of a file of the given |file_path|. On
// success, PLATFORM_FILE_OK is passed to |callback|. On failure, an
// error code is passed instead.
- virtual void Touch(const FilePath& file_path,
+ virtual void Touch(const base::FilePath& file_path,
const base::Time& last_access_time,
const base::Time& last_modified_time,
const StatusCallback& callback) = 0;
@@ -86,14 +86,14 @@ class FileUtilAsync {
// is true, removes the contents of the given directory recursively. On
// success, PLATFORM_FILE_OK is passed to |callback|. On failure, an
// error code is passed instead.
- virtual void Remove(const FilePath& file_path,
+ virtual void Remove(const base::FilePath& file_path,
bool recursive,
const StatusCallback& callback) = 0;
// Creates a directory of the given |dir_path|. On success,
// PLATFORM_FILE_OK is passed to |callback|. On failure, an error code
// is passed instead.
- virtual void CreateDirectory(const FilePath& dir_path,
+ virtual void CreateDirectory(const base::FilePath& dir_path,
const StatusCallback& callback) = 0;
// Reads a directory of the given |dir_path|. On success,
@@ -112,7 +112,7 @@ class FileUtilAsync {
// before callback is actually called.
//
// TODO(olege): Maybe make it possible to read only a part of the directory.
- virtual void ReadDirectory(const FilePath& dir_path,
+ virtual void ReadDirectory(const base::FilePath& dir_path,
const ReadDirectoryCallback& callback) = 0;
// TODO(olege): Add LocalCopy and LocalMove.
diff --git a/webkit/chromeos/fileapi/memory_file_util.cc b/webkit/chromeos/fileapi/memory_file_util.cc
index dcedf5a..6d79687 100644
--- a/webkit/chromeos/fileapi/memory_file_util.cc
+++ b/webkit/chromeos/fileapi/memory_file_util.cc
@@ -134,7 +134,7 @@ MemoryFileUtil::FileEntry::FileEntry()
MemoryFileUtil::FileEntry::~FileEntry() {
}
-MemoryFileUtil::MemoryFileUtil(const FilePath& root_path)
+MemoryFileUtil::MemoryFileUtil(const base::FilePath& root_path)
: read_directory_buffer_size_(kDefaultReadDirectoryBufferSize) {
FileEntry root;
root.is_directory = true;
@@ -179,7 +179,7 @@ MemoryFileUtil::~MemoryFileUtil() {
// - OpenVerifiedFile
//
void MemoryFileUtil::Open(
- const FilePath& file_path,
+ const base::FilePath& file_path,
int flags,
const OpenCallback& callback) {
int create_flag = flags & (base::PLATFORM_FILE_OPEN |
@@ -230,7 +230,7 @@ void MemoryFileUtil::Open(
}
void MemoryFileUtil::GetFileInfo(
- const FilePath& file_path,
+ const base::FilePath& file_path,
const GetFileInfoCallback& callback) {
MessageLoop::current()->PostTask(
FROM_HERE,
@@ -239,7 +239,7 @@ void MemoryFileUtil::GetFileInfo(
}
void MemoryFileUtil::Create(
- const FilePath& file_path,
+ const base::FilePath& file_path,
const StatusCallback& callback) {
MessageLoop::current()->PostTask(
FROM_HERE,
@@ -248,7 +248,7 @@ void MemoryFileUtil::Create(
}
void MemoryFileUtil::Truncate(
- const FilePath& file_path,
+ const base::FilePath& file_path,
int64 length,
const StatusCallback& callback) {
MessageLoop::current()->PostTask(
@@ -258,7 +258,7 @@ void MemoryFileUtil::Truncate(
}
void MemoryFileUtil::Touch(
- const FilePath& file_path,
+ const base::FilePath& file_path,
const base::Time& last_access_time,
const base::Time& last_modified_time,
const StatusCallback& callback) {
@@ -270,7 +270,7 @@ void MemoryFileUtil::Touch(
}
void MemoryFileUtil::Remove(
- const FilePath& file_path,
+ const base::FilePath& file_path,
bool recursive,
const StatusCallback& callback) {
if (recursive) {
@@ -289,7 +289,7 @@ void MemoryFileUtil::Remove(
}
void MemoryFileUtil::CreateDirectory(
- const FilePath& dir_path,
+ const base::FilePath& dir_path,
const StatusCallback& callback) {
MessageLoop::current()->PostTask(
FROM_HERE,
@@ -299,16 +299,16 @@ void MemoryFileUtil::CreateDirectory(
}
void MemoryFileUtil::ReadDirectory(
- const FilePath& dir_path,
+ const base::FilePath& dir_path,
const ReadDirectoryCallback& callback) {
MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&MemoryFileUtil::DoReadDirectory,
base::Unretained(this), dir_path.StripTrailingSeparators(),
- FilePath(), callback));
+ base::FilePath(), callback));
}
-void MemoryFileUtil::DoGetFileInfo(const FilePath& file_path,
+void MemoryFileUtil::DoGetFileInfo(const base::FilePath& file_path,
const GetFileInfoCallback& callback) {
base::PlatformFileInfo file_info;
@@ -334,7 +334,7 @@ void MemoryFileUtil::DoGetFileInfo(const FilePath& file_path,
}
void MemoryFileUtil::DoCreate(
- const FilePath& file_path,
+ const base::FilePath& file_path,
bool is_directory,
const StatusCallback& callback) {
if (FileExists(file_path)) {
@@ -356,7 +356,7 @@ void MemoryFileUtil::DoCreate(
}
void MemoryFileUtil::DoTruncate(
- const FilePath& file_path,
+ const base::FilePath& file_path,
int64 length,
const StatusCallback& callback) {
FileIterator file_it = files_.find(file_path);
@@ -374,7 +374,7 @@ void MemoryFileUtil::DoTruncate(
}
void MemoryFileUtil::DoTouch(
- const FilePath& file_path,
+ const base::FilePath& file_path,
const base::Time& last_modified_time,
const StatusCallback& callback) {
FileIterator file_it = files_.find(file_path);
@@ -390,7 +390,7 @@ void MemoryFileUtil::DoTouch(
}
void MemoryFileUtil::DoRemoveSingleFile(
- const FilePath& file_path,
+ const base::FilePath& file_path,
const StatusCallback& callback) {
FileIterator file_it = files_.find(file_path);
if (file_it == files_.end()) {
@@ -416,7 +416,7 @@ void MemoryFileUtil::DoRemoveSingleFile(
}
void MemoryFileUtil::DoRemoveRecursive(
- const FilePath& file_path,
+ const base::FilePath& file_path,
const StatusCallback& callback) {
FileIterator file_it = files_.find(file_path);
if (file_it == files_.end()) {
@@ -445,10 +445,10 @@ void MemoryFileUtil::DoRemoveRecursive(
}
void MemoryFileUtil::DoReadDirectory(
- const FilePath& dir_path,
- const FilePath& in_from,
+ const base::FilePath& dir_path,
+ const base::FilePath& in_from,
const ReadDirectoryCallback& callback) {
- FilePath from = in_from;
+ base::FilePath from = in_from;
read_directory_buffer_.clear();
if (!FileExists(dir_path)) {
@@ -510,7 +510,7 @@ void MemoryFileUtil::DoReadDirectory(
}
void MemoryFileUtil::OpenVerifiedFile(
- const FilePath& file_path,
+ const base::FilePath& file_path,
int flags,
const OpenCallback& callback) {
FileIterator file_it = files_.find(file_path);
@@ -523,7 +523,7 @@ void MemoryFileUtil::OpenVerifiedFile(
}
void MemoryFileUtil::DidGetFileInfoForOpen(
- const FilePath& file_path,
+ const base::FilePath& file_path,
int flags,
const OpenCallback& callback,
PlatformFileError get_info_result,
@@ -550,7 +550,7 @@ void MemoryFileUtil::DidGetFileInfoForOpen(
}
void MemoryFileUtil::OpenTruncatedFileOrCreate(
- const FilePath& file_path,
+ const base::FilePath& file_path,
int flags,
const OpenCallback& callback,
PlatformFileError result) {
@@ -571,7 +571,7 @@ void MemoryFileUtil::OpenTruncatedFileOrCreate(
}
void MemoryFileUtil::DidCreateOrTruncateForOpen(
- const FilePath& file_path,
+ const base::FilePath& file_path,
int flags,
int64 size,
const OpenCallback& callback,
diff --git a/webkit/chromeos/fileapi/memory_file_util.h b/webkit/chromeos/fileapi/memory_file_util.h
index 723bada..adbdce6 100644
--- a/webkit/chromeos/fileapi/memory_file_util.h
+++ b/webkit/chromeos/fileapi/memory_file_util.h
@@ -28,104 +28,104 @@ class MemoryFileUtil : public FileUtilAsync {
base::Time last_modified;
};
- MemoryFileUtil(const FilePath& root_path);
+ MemoryFileUtil(const base::FilePath& root_path);
virtual ~MemoryFileUtil();
// FileUtilAsync overrides.
- virtual void Open(const FilePath& file_path,
+ virtual void Open(const base::FilePath& file_path,
int file_flags, // PlatformFileFlags
const OpenCallback& callback) OVERRIDE;
- virtual void GetFileInfo(const FilePath& file_path,
+ virtual void GetFileInfo(const base::FilePath& file_path,
const GetFileInfoCallback& callback) OVERRIDE;
- virtual void Create(const FilePath& file_path,
+ virtual void Create(const base::FilePath& file_path,
const StatusCallback& callback) OVERRIDE;
- virtual void Truncate(const FilePath& file_path,
+ virtual void Truncate(const base::FilePath& file_path,
int64 length,
const StatusCallback& callback) OVERRIDE;
// This FS ignores last_access_time.
- virtual void Touch(const FilePath& file_path,
+ virtual void Touch(const base::FilePath& file_path,
const base::Time& last_access_time,
const base::Time& last_modified_time,
const StatusCallback& callback) OVERRIDE;
- virtual void Remove(const FilePath& file_path,
+ virtual void Remove(const base::FilePath& file_path,
bool recursive,
const StatusCallback& callback) OVERRIDE;
- virtual void CreateDirectory(const FilePath& dir_path,
+ virtual void CreateDirectory(const base::FilePath& dir_path,
const StatusCallback& callback) OVERRIDE;
- virtual void ReadDirectory(const FilePath& dir_path,
+ virtual void ReadDirectory(const base::FilePath& dir_path,
const ReadDirectoryCallback& callback) OVERRIDE;
private:
friend class MemoryFileUtilTest;
- typedef std::map<FilePath, FileEntry>::iterator FileIterator;
- typedef std::map<FilePath, FileEntry>::const_iterator ConstFileIterator;
+ typedef std::map<base::FilePath, FileEntry>::iterator FileIterator;
+ typedef std::map<base::FilePath, FileEntry>::const_iterator ConstFileIterator;
// Returns true if the given |file_path| is present in the file system.
- bool FileExists(const FilePath& file_path) const {
+ bool FileExists(const base::FilePath& file_path) const {
return files_.find(file_path) != files_.end();
}
// Returns true if the given |file_path| is present and a directory.
- bool IsDirectory(const FilePath& file_path) const {
+ bool IsDirectory(const base::FilePath& file_path) const {
ConstFileIterator it = files_.find(file_path);
return it != files_.end() && it->second.is_directory;
}
// Callback function used to implement GetFileInfo().
- void DoGetFileInfo(const FilePath& file_path,
+ void DoGetFileInfo(const base::FilePath& file_path,
const GetFileInfoCallback& callback);
// Callback function used to implement Create().
- void DoCreate(const FilePath& file_path,
+ void DoCreate(const base::FilePath& file_path,
bool is_directory,
const StatusCallback& callback);
// Callback function used to implement Truncate().
- void DoTruncate(const FilePath& file_path,
+ void DoTruncate(const base::FilePath& file_path,
int64 length,
const StatusCallback& callback);
// Callback function used to implement Touch().
- void DoTouch(const FilePath& file_path,
+ void DoTouch(const base::FilePath& file_path,
const base::Time& last_modified_time,
const StatusCallback& callback);
// Callback function used to implement Remove().
- void DoRemoveSingleFile(const FilePath& file_path,
+ void DoRemoveSingleFile(const base::FilePath& file_path,
const StatusCallback& callback);
// Callback function used to implement Remove().
- void DoRemoveRecursive(const FilePath& file_path,
+ void DoRemoveRecursive(const base::FilePath& file_path,
const StatusCallback& callback);
// Will start enumerating with file path |from|. If |from| path is
// empty, will start from the beginning.
- void DoReadDirectory(const FilePath& dir_path,
- const FilePath& from,
+ void DoReadDirectory(const base::FilePath& dir_path,
+ const base::FilePath& from,
const ReadDirectoryCallback& callback);
// Opens a file of the given |file_path| with |flags|. A file is
// guaranteed to be present at |file_path|.
- void OpenVerifiedFile(const FilePath& file_path,
+ void OpenVerifiedFile(const base::FilePath& file_path,
int flags,
const OpenCallback& callback);
// Callback function used to implement Open().
- void DidGetFileInfoForOpen(const FilePath& file_path,
+ void DidGetFileInfoForOpen(const base::FilePath& file_path,
int flags,
const OpenCallback& callback,
PlatformFileError get_info_result,
const base::PlatformFileInfo& file_info);
// Callback function used to implement Open().
- void OpenTruncatedFileOrCreate(const FilePath& file_path,
+ void OpenTruncatedFileOrCreate(const base::FilePath& file_path,
int flags,
const OpenCallback& callback,
PlatformFileError result);
// Callback function used to implement Open().
- void DidCreateOrTruncateForOpen(const FilePath& file_path,
+ void DidCreateOrTruncateForOpen(const base::FilePath& file_path,
int flags,
int64 size,
const OpenCallback& callback,
@@ -138,7 +138,7 @@ class MemoryFileUtil : public FileUtilAsync {
}
// The files in the file system.
- std::map<FilePath, FileEntry> files_;
+ std::map<base::FilePath, FileEntry> files_;
size_t read_directory_buffer_size_;
std::vector<DirectoryEntry> read_directory_buffer_;
diff --git a/webkit/chromeos/fileapi/memory_file_util_unittest.cc b/webkit/chromeos/fileapi/memory_file_util_unittest.cc
index 024e849..b2a0c09 100644
--- a/webkit/chromeos/fileapi/memory_file_util_unittest.cc
+++ b/webkit/chromeos/fileapi/memory_file_util_unittest.cc
@@ -10,7 +10,7 @@
#include "webkit/chromeos/fileapi/memory_file_util.h"
namespace {
-const FilePath::CharType kRootPath[] = "/mnt/memory";
+const base::FilePath::CharType kRootPath[] = "/mnt/memory";
const char kTestString[] = "A test string. A test string.";
const char kTestStringLength = arraysize(kTestString) - 1;
} // namespace
@@ -33,7 +33,7 @@ class MemoryFileUtilTest : public testing::Test {
}
void SetUp() {
- file_util_.reset(new MemoryFileUtil(FilePath(kRootPath)));
+ file_util_.reset(new MemoryFileUtil(base::FilePath(kRootPath)));
}
MemoryFileUtil* file_util() {
@@ -105,13 +105,13 @@ class MemoryFileUtilTest : public testing::Test {
request_id);
}
- int CreateEmptyFile(const FilePath& file_path) {
+ int CreateEmptyFile(const base::FilePath& file_path) {
int request_id = GetNextRequestId();
file_util_->Create(file_path, GetStatusCallback(request_id));
return request_id;
}
- int CreateNonEmptyFile(const FilePath& file_path,
+ int CreateNonEmptyFile(const base::FilePath& file_path,
const char* data,
int length) {
int request_id = GetNextRequestId();
@@ -234,7 +234,7 @@ class MemoryFileUtilTest : public testing::Test {
TEST_F(MemoryFileUtilTest, TestCreateGetFileInfo) {
const int request_id1 = GetNextRequestId();
- file_util()->GetFileInfo(FilePath("/mnt/memory/test.txt"),
+ file_util()->GetFileInfo(base::FilePath("/mnt/memory/test.txt"),
GetGetFileInfoCallback(request_id1));
// In case the file system is truely asynchronous, RunAllPending is not
@@ -250,7 +250,7 @@ TEST_F(MemoryFileUtilTest, TestCreateGetFileInfo) {
base::Time start_create = base::Time::Now();
const int request_id2 = GetNextRequestId();
- file_util()->Create(FilePath("/mnt/memory/test.txt"),
+ file_util()->Create(base::FilePath("/mnt/memory/test.txt"),
GetStatusCallback(request_id2));
MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(CALLBACK_TYPE_STATUS, GetStatusType(request_id2));
@@ -258,7 +258,7 @@ TEST_F(MemoryFileUtilTest, TestCreateGetFileInfo) {
ASSERT_EQ(base::PLATFORM_FILE_OK, status.result);
const int request_id3 = GetNextRequestId();
- file_util()->GetFileInfo(FilePath("/mnt/memory/test.txt"),
+ file_util()->GetFileInfo(base::FilePath("/mnt/memory/test.txt"),
GetGetFileInfoCallback(request_id3));
MessageLoop::current()->RunUntilIdle();
@@ -280,7 +280,7 @@ TEST_F(MemoryFileUtilTest, TestReadWrite) {
// Check that the file does not exist.
const int request_id1 = GetNextRequestId();
- file_util()->GetFileInfo(FilePath("/mnt/memory/test1.txt"),
+ file_util()->GetFileInfo(base::FilePath("/mnt/memory/test1.txt"),
GetGetFileInfoCallback(request_id1));
MessageLoop::current()->RunUntilIdle();
@@ -293,7 +293,7 @@ TEST_F(MemoryFileUtilTest, TestReadWrite) {
base::Time start_create = base::Time::Now();
const int request_id2 = GetNextRequestId();
- file_util()->Open(FilePath("/mnt/memory/test1.txt"),
+ file_util()->Open(base::FilePath("/mnt/memory/test1.txt"),
base::PLATFORM_FILE_CREATE_ALWAYS |
base::PLATFORM_FILE_WRITE,
GetOpenCallback(request_id2));
@@ -310,7 +310,7 @@ TEST_F(MemoryFileUtilTest, TestReadWrite) {
// Check that file was created and has 0 size.
const int request_id3 = GetNextRequestId();
- file_util()->GetFileInfo(FilePath("/mnt/memory/test1.txt"),
+ file_util()->GetFileInfo(base::FilePath("/mnt/memory/test1.txt"),
GetGetFileInfoCallback(request_id3));
MessageLoop::current()->RunUntilIdle();
@@ -340,7 +340,7 @@ TEST_F(MemoryFileUtilTest, TestReadWrite) {
// Check that the file has now size 10 and correct modification time.
const int request_id5 = GetNextRequestId();
- file_util()->GetFileInfo(FilePath("/mnt/memory/test1.txt"),
+ file_util()->GetFileInfo(base::FilePath("/mnt/memory/test1.txt"),
GetGetFileInfoCallback(request_id5));
MessageLoop::current()->RunUntilIdle();
@@ -369,7 +369,7 @@ TEST_F(MemoryFileUtilTest, TestReadWrite) {
// Check the file size & modification time.
const int request_id7 = GetNextRequestId();
- file_util()->GetFileInfo(FilePath("/mnt/memory/test1.txt"),
+ file_util()->GetFileInfo(base::FilePath("/mnt/memory/test1.txt"),
GetGetFileInfoCallback(request_id7));
MessageLoop::current()->RunUntilIdle();
@@ -383,7 +383,7 @@ TEST_F(MemoryFileUtilTest, TestReadWrite) {
// Open file for reading.
const int request_id8 = GetNextRequestId();
- file_util()->Open(FilePath("/mnt/memory/test1.txt"),
+ file_util()->Open(base::FilePath("/mnt/memory/test1.txt"),
base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ,
GetOpenCallback(request_id8));
MessageLoop::current()->RunUntilIdle();
@@ -413,7 +413,7 @@ TEST_F(MemoryFileUtilTest, TestReadWrite) {
// Check that size & modification time have not changed.
const int request_id10 = GetNextRequestId();
- file_util()->GetFileInfo(FilePath("/mnt/memory/test1.txt"),
+ file_util()->GetFileInfo(base::FilePath("/mnt/memory/test1.txt"),
GetGetFileInfoCallback(request_id10));
MessageLoop::current()->RunUntilIdle();
@@ -427,7 +427,7 @@ TEST_F(MemoryFileUtilTest, TestReadWrite) {
// Open once more for writing.
const int request_id11 = GetNextRequestId();
- file_util()->Open(FilePath("/mnt/memory/test1.txt"),
+ file_util()->Open(base::FilePath("/mnt/memory/test1.txt"),
base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_WRITE,
GetOpenCallback(request_id11));
MessageLoop::current()->RunUntilIdle();
@@ -441,7 +441,7 @@ TEST_F(MemoryFileUtilTest, TestReadWrite) {
// Check that the size has not changed.
const int request_id12 = GetNextRequestId();
- file_util()->GetFileInfo(FilePath("/mnt/memory/test1.txt"),
+ file_util()->GetFileInfo(base::FilePath("/mnt/memory/test1.txt"),
GetGetFileInfoCallback(request_id12));
MessageLoop::current()->RunUntilIdle();
@@ -489,7 +489,7 @@ TEST_F(MemoryFileUtilTest, TestReadWrite) {
// Check size.
const int request_id17 = GetNextRequestId();
- file_util()->GetFileInfo(FilePath("/mnt/memory/test1.txt"),
+ file_util()->GetFileInfo(base::FilePath("/mnt/memory/test1.txt"),
GetGetFileInfoCallback(request_id17));
MessageLoop::current()->RunUntilIdle();
status = GetStatus(request_id17);
@@ -531,7 +531,7 @@ TEST_F(MemoryFileUtilTest, TestReadWrite) {
TEST_F(MemoryFileUtilTest, TestDirectoryOperations) {
// Check the directory is empty.
const int request_id0 = GetNextRequestId();
- file_util()->ReadDirectory(FilePath("/mnt/memory/"),
+ file_util()->ReadDirectory(base::FilePath("/mnt/memory/"),
GetReadDirectoryCallback(request_id0));
MessageLoop::current()->RunUntilIdle();
@@ -548,18 +548,18 @@ TEST_F(MemoryFileUtilTest, TestDirectoryOperations) {
// complete before starting the next one.
base::Time start_create = base::Time::Now();
- CreateEmptyFile(FilePath("/mnt/memory/a"));
+ CreateEmptyFile(base::FilePath("/mnt/memory/a"));
int request_id1 = GetNextRequestId();
- file_util()->CreateDirectory(FilePath("/mnt/memory/b"),
+ file_util()->CreateDirectory(base::FilePath("/mnt/memory/b"),
GetStatusCallback(request_id1));
- CreateNonEmptyFile(FilePath("/mnt/memory/longer_file_name.txt"),
+ CreateNonEmptyFile(base::FilePath("/mnt/memory/longer_file_name.txt"),
kTestString,
kTestStringLength);
int request_id2 = GetNextRequestId();
- file_util()->CreateDirectory(FilePath("/mnt/memory/c"),
+ file_util()->CreateDirectory(base::FilePath("/mnt/memory/c"),
GetStatusCallback(request_id2));
MessageLoop::current()->RunUntilIdle();
@@ -574,16 +574,16 @@ TEST_F(MemoryFileUtilTest, TestDirectoryOperations) {
set_read_directory_buffer_size(5); // Should complete in one go.
request_id1 = GetNextRequestId();
- file_util()->ReadDirectory(FilePath("/mnt/memory"),
+ file_util()->ReadDirectory(base::FilePath("/mnt/memory"),
GetReadDirectoryCallback(request_id1));
request_id2 = GetNextRequestId();
- file_util()->ReadDirectory(FilePath("/mnt/memory/a"),
+ file_util()->ReadDirectory(base::FilePath("/mnt/memory/a"),
GetReadDirectoryCallback(request_id2));
const int request_id3 = GetNextRequestId();
- file_util()->ReadDirectory(FilePath("/mnt/memory/b/"),
+ file_util()->ReadDirectory(base::FilePath("/mnt/memory/b/"),
GetReadDirectoryCallback(request_id3));
const int request_id4 = GetNextRequestId();
- file_util()->ReadDirectory(FilePath("/mnt/memory/d/"),
+ file_util()->ReadDirectory(base::FilePath("/mnt/memory/d/"),
GetReadDirectoryCallback(request_id4));
MessageLoop::current()->RunUntilIdle();
@@ -595,7 +595,7 @@ TEST_F(MemoryFileUtilTest, TestDirectoryOperations) {
ASSERT_EQ(1, status.called); // Because the number of entries < 5.
ASSERT_EQ(4u, status.entries.size());
- std::set<FilePath::StringType> seen;
+ std::set<base::FilePath::StringType> seen;
for (FileUtilAsync::FileList::const_iterator it = status.entries.begin();
it != status.entries.end();
@@ -644,26 +644,26 @@ TEST_F(MemoryFileUtilTest, TestDirectoryOperations) {
// /mnt/memory/b/g/h 0
start_create = base::Time::Now();
- CreateNonEmptyFile(FilePath("/mnt/memory/b/c"),
+ CreateNonEmptyFile(base::FilePath("/mnt/memory/b/c"),
kTestString,
kTestStringLength);
request_id1 = GetNextRequestId();
- file_util()->CreateDirectory(FilePath("/mnt/memory/b/d"),
+ file_util()->CreateDirectory(base::FilePath("/mnt/memory/b/d"),
GetStatusCallback(request_id1));
- CreateEmptyFile(FilePath("/mnt/memory/b/e"));
- CreateNonEmptyFile(FilePath("/mnt/memory/b/f"),
+ CreateEmptyFile(base::FilePath("/mnt/memory/b/e"));
+ CreateNonEmptyFile(base::FilePath("/mnt/memory/b/f"),
kTestString,
kTestStringLength);
request_id2 = GetNextRequestId();
- file_util()->CreateDirectory(FilePath("/mnt/memory/b/g"),
+ file_util()->CreateDirectory(base::FilePath("/mnt/memory/b/g"),
GetStatusCallback(request_id1));
- CreateNonEmptyFile(FilePath("/mnt/memory/b/i"),
+ CreateNonEmptyFile(base::FilePath("/mnt/memory/b/i"),
kTestString,
kTestStringLength);
MessageLoop::current()->RunUntilIdle();
- CreateEmptyFile(FilePath("/mnt/memory/b/g/h"));
+ CreateEmptyFile(base::FilePath("/mnt/memory/b/g/h"));
MessageLoop::current()->RunUntilIdle();
end_create = base::Time::Now();
@@ -671,7 +671,7 @@ TEST_F(MemoryFileUtilTest, TestDirectoryOperations) {
// Read /mnt/memory and check that the number of entries is unchanged.
request_id1 = GetNextRequestId();
- file_util()->ReadDirectory(FilePath("/mnt/memory"),
+ file_util()->ReadDirectory(base::FilePath("/mnt/memory"),
GetReadDirectoryCallback(request_id1));
MessageLoop::current()->RunUntilIdle();
@@ -686,7 +686,7 @@ TEST_F(MemoryFileUtilTest, TestDirectoryOperations) {
// Read /mnt/memory/b
request_id1 = GetNextRequestId();
- file_util()->ReadDirectory(FilePath("/mnt/memory/b"),
+ file_util()->ReadDirectory(base::FilePath("/mnt/memory/b"),
GetReadDirectoryCallback(request_id1));
MessageLoop::current()->RunUntilIdle();
@@ -741,7 +741,7 @@ TEST_F(MemoryFileUtilTest, TestDirectoryOperations) {
// Remove single file: /mnt/memory/b/f
request_id1 = GetNextRequestId();
- file_util()->Remove(FilePath("/mnt/memory/b/f"), false /* recursive */,
+ file_util()->Remove(base::FilePath("/mnt/memory/b/f"), false /* recursive */,
GetStatusCallback(request_id1));
MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(base::PLATFORM_FILE_OK, GetStatus(request_id1).result);
@@ -749,7 +749,7 @@ TEST_F(MemoryFileUtilTest, TestDirectoryOperations) {
// Check the number of files in b/
request_id1 = GetNextRequestId();
- file_util()->ReadDirectory(FilePath("/mnt/memory/b"),
+ file_util()->ReadDirectory(base::FilePath("/mnt/memory/b"),
GetReadDirectoryCallback(request_id1));
MessageLoop::current()->RunUntilIdle();
@@ -763,7 +763,7 @@ TEST_F(MemoryFileUtilTest, TestDirectoryOperations) {
// Try remove /mnt/memory/b non-recursively (error)
request_id1 = GetNextRequestId();
- file_util()->Remove(FilePath("/mnt/memory/b"), false /* recursive */,
+ file_util()->Remove(base::FilePath("/mnt/memory/b"), false /* recursive */,
GetStatusCallback(request_id1));
MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(base::PLATFORM_FILE_ERROR_NOT_A_FILE,
@@ -772,13 +772,13 @@ TEST_F(MemoryFileUtilTest, TestDirectoryOperations) {
// Non-recursively remove empty directory.
request_id1 = GetNextRequestId();
- file_util()->Remove(FilePath("/mnt/memory/b/d"), false /* recursive */,
+ file_util()->Remove(base::FilePath("/mnt/memory/b/d"), false /* recursive */,
GetStatusCallback(request_id1));
MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(base::PLATFORM_FILE_OK, GetStatus(request_id1).result);
request_id1 = GetNextRequestId();
- file_util()->GetFileInfo(FilePath("/mnt/memory/b/d"),
+ file_util()->GetFileInfo(base::FilePath("/mnt/memory/b/d"),
GetGetFileInfoCallback(request_id1));
MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND, GetStatus(request_id1).result);
@@ -786,7 +786,7 @@ TEST_F(MemoryFileUtilTest, TestDirectoryOperations) {
// Remove /mnt/memory/b recursively.
request_id1 = GetNextRequestId();
- file_util()->Remove(FilePath("/mnt/memory/b"), true /* recursive */,
+ file_util()->Remove(base::FilePath("/mnt/memory/b"), true /* recursive */,
GetStatusCallback(request_id1));
MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(base::PLATFORM_FILE_OK, GetStatus(request_id1).result);
@@ -794,7 +794,7 @@ TEST_F(MemoryFileUtilTest, TestDirectoryOperations) {
// ReadDirectory /mnt/memory/b -> not found
request_id1 = GetNextRequestId();
- file_util()->ReadDirectory(FilePath("/mnt/memory/b"),
+ file_util()->ReadDirectory(base::FilePath("/mnt/memory/b"),
GetReadDirectoryCallback(request_id1));
MessageLoop::current()->RunUntilIdle();
ASSERT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND, GetStatus(request_id1).result);
@@ -802,7 +802,7 @@ TEST_F(MemoryFileUtilTest, TestDirectoryOperations) {
// ReadDirectory /mnt/memory
request_id1 = GetNextRequestId();
- file_util()->ReadDirectory(FilePath("/mnt/memory"),
+ file_util()->ReadDirectory(base::FilePath("/mnt/memory"),
GetReadDirectoryCallback(request_id1));
MessageLoop::current()->RunUntilIdle();
diff --git a/webkit/chromeos/fileapi/remote_file_stream_writer.cc b/webkit/chromeos/fileapi/remote_file_stream_writer.cc
index 6fcbd65..d51df11 100644
--- a/webkit/chromeos/fileapi/remote_file_stream_writer.cc
+++ b/webkit/chromeos/fileapi/remote_file_stream_writer.cc
@@ -56,7 +56,7 @@ void RemoteFileStreamWriter::OnFileOpened(
int buf_len,
const net::CompletionCallback& callback,
base::PlatformFileError open_result,
- const FilePath& local_path,
+ const base::FilePath& local_path,
const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) {
has_pending_create_snapshot_ = false;
if (!pending_cancel_callback_.is_null()) {
diff --git a/webkit/chromeos/fileapi/remote_file_stream_writer.h b/webkit/chromeos/fileapi/remote_file_stream_writer.h
index cf341bd3..c68e9db 100644
--- a/webkit/chromeos/fileapi/remote_file_stream_writer.h
+++ b/webkit/chromeos/fileapi/remote_file_stream_writer.h
@@ -52,7 +52,7 @@ class RemoteFileStreamWriter : public fileapi::FileStreamWriter {
int buf_len,
const net::CompletionCallback& callback,
base::PlatformFileError open_result,
- const FilePath& local_path,
+ const base::FilePath& local_path,
const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref);
// Calls |pending_cancel_callback_|, assuming it is non-null.
void InvokePendingCancelCallback(int result);
diff --git a/webkit/chromeos/fileapi/remote_file_system_operation.cc b/webkit/chromeos/fileapi/remote_file_system_operation.cc
index 218b5b7..5f0843e 100644
--- a/webkit/chromeos/fileapi/remote_file_system_operation.cc
+++ b/webkit/chromeos/fileapi/remote_file_system_operation.cc
@@ -236,7 +236,7 @@ void RemoteFileSystemOperation::DidDirectoryExists(
const StatusCallback& callback,
base::PlatformFileError rv,
const base::PlatformFileInfo& file_info,
- const FilePath& unused) {
+ const base::FilePath& unused) {
if (rv == base::PLATFORM_FILE_OK && !file_info.is_directory)
rv = base::PLATFORM_FILE_ERROR_NOT_A_DIRECTORY;
callback.Run(rv);
@@ -246,7 +246,7 @@ void RemoteFileSystemOperation::DidFileExists(
const StatusCallback& callback,
base::PlatformFileError rv,
const base::PlatformFileInfo& file_info,
- const FilePath& unused) {
+ const base::FilePath& unused) {
if (rv == base::PLATFORM_FILE_OK && file_info.is_directory)
rv = base::PLATFORM_FILE_ERROR_NOT_A_FILE;
callback.Run(rv);
@@ -256,7 +256,7 @@ void RemoteFileSystemOperation::DidGetMetadata(
const GetMetadataCallback& callback,
base::PlatformFileError rv,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path) {
+ const base::FilePath& platform_path) {
callback.Run(rv, file_info, platform_path);
}
@@ -310,7 +310,7 @@ void RemoteFileSystemOperation::DidCreateSnapshotFile(
const SnapshotFileCallback& callback,
base::PlatformFileError result,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path,
+ const base::FilePath& platform_path,
const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) {
callback.Run(result, file_info, platform_path, file_ref);
}
diff --git a/webkit/chromeos/fileapi/remote_file_system_operation.h b/webkit/chromeos/fileapi/remote_file_system_operation.h
index 84a6f7d..ba429c1 100644
--- a/webkit/chromeos/fileapi/remote_file_system_operation.h
+++ b/webkit/chromeos/fileapi/remote_file_system_operation.h
@@ -88,15 +88,15 @@ class RemoteFileSystemOperation : public fileapi::FileSystemOperation {
void DidDirectoryExists(const StatusCallback& callback,
base::PlatformFileError rv,
const base::PlatformFileInfo& file_info,
- const FilePath& unused);
+ const base::FilePath& unused);
void DidFileExists(const StatusCallback& callback,
base::PlatformFileError rv,
const base::PlatformFileInfo& file_info,
- const FilePath& unused);
+ const base::FilePath& unused);
void DidGetMetadata(const GetMetadataCallback& callback,
base::PlatformFileError rv,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path);
+ const base::FilePath& platform_path);
void DidReadDirectory(
const ReadDirectoryCallback& callback,
base::PlatformFileError rv,
@@ -111,7 +111,7 @@ class RemoteFileSystemOperation : public fileapi::FileSystemOperation {
const SnapshotFileCallback& callback,
base::PlatformFileError result,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path,
+ const base::FilePath& platform_path,
const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref);
void DidOpenFile(
const OpenFileCallback& callback,
diff --git a/webkit/database/database_tracker.cc b/webkit/database/database_tracker.cc
index 824c8a2..2cdcfe8 100644
--- a/webkit/database/database_tracker.cc
+++ b/webkit/database/database_tracker.cc
@@ -27,18 +27,18 @@
namespace webkit_database {
-const FilePath::CharType kDatabaseDirectoryName[] =
+const base::FilePath::CharType kDatabaseDirectoryName[] =
FILE_PATH_LITERAL("databases");
-const FilePath::CharType kIncognitoDatabaseDirectoryName[] =
+const base::FilePath::CharType kIncognitoDatabaseDirectoryName[] =
FILE_PATH_LITERAL("databases-incognito");
-const FilePath::CharType kTrackerDatabaseFileName[] =
+const base::FilePath::CharType kTrackerDatabaseFileName[] =
FILE_PATH_LITERAL("Databases.db");
static const int kCurrentVersion = 2;
static const int kCompatibleVersion = 1;
-const FilePath::CharType kTemporaryDirectoryPrefix[] =
+const base::FilePath::CharType kTemporaryDirectoryPrefix[] =
FILE_PATH_LITERAL("DeleteMe");
-const FilePath::CharType kTemporaryDirectoryPattern[] =
+const base::FilePath::CharType kTemporaryDirectoryPattern[] =
FILE_PATH_LITERAL("DeleteMe*");
OriginInfo::OriginInfo()
@@ -77,7 +77,7 @@ OriginInfo::OriginInfo(const string16& origin, int64 total_size)
: origin_(origin), total_size_(total_size) {}
DatabaseTracker::DatabaseTracker(
- const FilePath& profile_path,
+ const base::FilePath& profile_path,
bool is_incognito,
quota::SpecialStoragePolicy* special_storage_policy,
quota::QuotaManagerProxy* quota_manager_proxy,
@@ -280,21 +280,21 @@ string16 DatabaseTracker::GetOriginDirectory(
return origin_directory;
}
-FilePath DatabaseTracker::GetFullDBFilePath(
+base::FilePath DatabaseTracker::GetFullDBFilePath(
const string16& origin_identifier,
const string16& database_name) {
DCHECK(!origin_identifier.empty());
if (!LazyInit())
- return FilePath();
+ return base::FilePath();
int64 id = databases_table_->GetDatabaseID(
origin_identifier, database_name);
if (id < 0)
- return FilePath();
+ return base::FilePath();
- FilePath file_name = FilePath::FromWStringHack(
+ base::FilePath file_name = base::FilePath::FromWStringHack(
UTF8ToWide(base::Int64ToString(id)));
- return db_dir_.Append(FilePath::FromWStringHack(
+ return db_dir_.Append(base::FilePath::FromWStringHack(
UTF16ToWide(GetOriginDirectory(origin_identifier)))).Append(file_name);
}
@@ -352,7 +352,7 @@ bool DatabaseTracker::DeleteClosedDatabase(const string16& origin_identifier,
GetDBFileSize(origin_identifier, database_name) : 0;
// Try to delete the file on the hard drive.
- FilePath db_file = GetFullDBFilePath(origin_identifier, database_name);
+ base::FilePath db_file = GetFullDBFilePath(origin_identifier, database_name);
if (file_util::PathExists(db_file) && !file_util::Delete(db_file, false))
return false;
@@ -398,13 +398,13 @@ bool DatabaseTracker::DeleteOrigin(const string16& origin_identifier,
}
origins_info_map_.erase(origin_identifier);
- FilePath origin_dir = db_dir_.Append(FilePath::FromWStringHack(
+ base::FilePath origin_dir = db_dir_.Append(base::FilePath::FromWStringHack(
UTF16ToWide(origin_identifier)));
// Create a temporary directory to move possibly still existing databases to,
// as we can't delete the origin directory on windows if it contains opened
// files.
- FilePath new_origin_dir;
+ base::FilePath new_origin_dir;
file_util::CreateTemporaryDirInDir(db_dir_,
kTemporaryDirectoryPrefix,
&new_origin_dir);
@@ -412,9 +412,9 @@ bool DatabaseTracker::DeleteOrigin(const string16& origin_identifier,
origin_dir,
false,
file_util::FileEnumerator::FILES);
- for (FilePath database = databases.Next(); !database.empty();
+ for (base::FilePath database = databases.Next(); !database.empty();
database = databases.Next()) {
- FilePath new_file = new_origin_dir.Append(database.BaseName());
+ base::FilePath new_file = new_origin_dir.Append(database.BaseName());
file_util::Move(database, new_file);
}
file_util::Delete(origin_dir, true);
@@ -458,7 +458,7 @@ bool DatabaseTracker::LazyInit() {
false,
file_util::FileEnumerator::DIRECTORIES,
kTemporaryDirectoryPattern);
- for (FilePath directory = directories.Next(); !directory.empty();
+ for (base::FilePath directory = directories.Next(); !directory.empty();
directory = directories.Next()) {
file_util::Delete(directory, true);
}
@@ -466,8 +466,8 @@ bool DatabaseTracker::LazyInit() {
// If the tracker database exists, but it's corrupt or doesn't
// have a meta table, delete the database directory.
- const FilePath kTrackerDatabaseFullPath =
- db_dir_.Append(FilePath(kTrackerDatabaseFileName));
+ const base::FilePath kTrackerDatabaseFullPath =
+ db_dir_.Append(base::FilePath(kTrackerDatabaseFileName));
if (file_util::DirectoryExists(db_dir_) &&
file_util::PathExists(kTrackerDatabaseFullPath) &&
(!db_->Open(kTrackerDatabaseFullPath) ||
@@ -574,7 +574,8 @@ DatabaseTracker::CachedOriginInfo* DatabaseTracker::MaybeGetCachedOriginInfo(
int64 DatabaseTracker::GetDBFileSize(const string16& origin_identifier,
const string16& database_name) {
- FilePath db_file_name = GetFullDBFilePath(origin_identifier, database_name);
+ base::FilePath db_file_name = GetFullDBFilePath(origin_identifier,
+ database_name);
int64 db_file_size = 0;
if (!file_util::GetFileSize(db_file_name, &db_file_size))
db_file_size = 0;
@@ -690,7 +691,7 @@ int DatabaseTracker::DeleteDataModifiedSince(
rv = net::ERR_FAILED;
for (std::vector<DatabaseDetails>::const_iterator db = details.begin();
db != details.end(); ++db) {
- FilePath db_file = GetFullDBFilePath(*ori, db->database_name);
+ base::FilePath db_file = GetFullDBFilePath(*ori, db->database_name);
base::PlatformFileInfo file_info;
file_util::GetFileInfo(db_file, &file_info);
if (file_info.last_modified < cutoff)
@@ -789,7 +790,7 @@ void DatabaseTracker::DeleteIncognitoDBDirectory() {
it != incognito_file_handles_.end(); it++)
base::ClosePlatformFile(it->second);
- FilePath incognito_db_dir =
+ base::FilePath incognito_db_dir =
profile_path_.Append(kIncognitoDatabaseDirectoryName);
if (file_util::DirectoryExists(incognito_db_dir))
file_util::Delete(incognito_db_dir, true);
diff --git a/webkit/database/database_tracker.h b/webkit/database/database_tracker.h
index df3079a..956a72e 100644
--- a/webkit/database/database_tracker.h
+++ b/webkit/database/database_tracker.h
@@ -38,8 +38,9 @@ class SpecialStoragePolicy;
namespace webkit_database {
-WEBKIT_STORAGE_EXPORT extern const FilePath::CharType kDatabaseDirectoryName[];
-WEBKIT_STORAGE_EXPORT extern const FilePath::CharType
+WEBKIT_STORAGE_EXPORT extern const base::FilePath::CharType
+ kDatabaseDirectoryName[];
+WEBKIT_STORAGE_EXPORT extern const base::FilePath::CharType
kTrackerDatabaseFileName[];
class DatabasesTable;
@@ -93,7 +94,7 @@ class WEBKIT_STORAGE_EXPORT DatabaseTracker
virtual ~Observer() {}
};
- DatabaseTracker(const FilePath& profile_path,
+ DatabaseTracker(const base::FilePath& profile_path,
bool is_incognito,
quota::SpecialStoragePolicy* special_storage_policy,
quota::QuotaManagerProxy* quota_manager_proxy,
@@ -119,8 +120,8 @@ class WEBKIT_STORAGE_EXPORT DatabaseTracker
void CloseTrackerDatabaseAndClearCaches();
- const FilePath& DatabaseDirectory() const { return db_dir_; }
- FilePath GetFullDBFilePath(const string16& origin_identifier,
+ const base::FilePath& DatabaseDirectory() const { return db_dir_; }
+ base::FilePath GetFullDBFilePath(const string16& origin_identifier,
const string16& database_name);
// virtual for unit-testing only
@@ -264,8 +265,8 @@ class WEBKIT_STORAGE_EXPORT DatabaseTracker
const bool is_incognito_;
bool force_keep_session_state_;
bool shutting_down_;
- const FilePath profile_path_;
- const FilePath db_dir_;
+ const base::FilePath profile_path_;
+ const base::FilePath db_dir_;
scoped_ptr<sql::Connection> db_;
scoped_ptr<DatabasesTable> databases_table_;
scoped_ptr<sql::MetaTable> meta_table_;
diff --git a/webkit/database/database_tracker_unittest.cc b/webkit/database/database_tracker_unittest.cc
index ef95d8f..e3e3738 100644
--- a/webkit/database/database_tracker_unittest.cc
+++ b/webkit/database/database_tracker_unittest.cc
@@ -158,7 +158,7 @@ class TestQuotaManagerProxy : public quota::QuotaManagerProxy {
};
-bool EnsureFileOfSize(const FilePath& file_path, int64 length) {
+bool EnsureFileOfSize(const base::FilePath& file_path, int64 length) {
base::PlatformFileError error_code(base::PLATFORM_FILE_ERROR_FAILED);
base::PlatformFile file =
base::CreatePlatformFile(
@@ -215,10 +215,10 @@ class DatabaseTracker_TestHelper_Test {
&database_size);
EXPECT_TRUE(file_util::CreateDirectory(tracker->DatabaseDirectory().Append(
- FilePath::FromWStringHack(UTF16ToWide(
+ base::FilePath::FromWStringHack(UTF16ToWide(
tracker->GetOriginDirectory(kOrigin1))))));
EXPECT_TRUE(file_util::CreateDirectory(tracker->DatabaseDirectory().Append(
- FilePath::FromWStringHack(UTF16ToWide(
+ base::FilePath::FromWStringHack(UTF16ToWide(
tracker->GetOriginDirectory(kOrigin2))))));
EXPECT_EQ(1, file_util::WriteFile(
tracker->GetFullDBFilePath(kOrigin1, kDB1), "a", 1));
@@ -244,13 +244,13 @@ class DatabaseTracker_TestHelper_Test {
result = callback.GetResult(result);
EXPECT_EQ(net::OK, result);
EXPECT_FALSE(file_util::PathExists(tracker->DatabaseDirectory().Append(
- FilePath::FromWStringHack(UTF16ToWide(kOrigin1)))));
+ base::FilePath::FromWStringHack(UTF16ToWide(kOrigin1)))));
// Recreate db1.
tracker->DatabaseOpened(kOrigin1, kDB1, kDescription, 0,
&database_size);
EXPECT_TRUE(file_util::CreateDirectory(tracker->DatabaseDirectory().Append(
- FilePath::FromWStringHack(UTF16ToWide(
+ base::FilePath::FromWStringHack(UTF16ToWide(
tracker->GetOriginDirectory(kOrigin1))))));
EXPECT_EQ(1, file_util::WriteFile(
tracker->GetFullDBFilePath(kOrigin1, kDB1), "a", 1));
@@ -280,7 +280,7 @@ class DatabaseTracker_TestHelper_Test {
result = callback.GetResult(result);
EXPECT_EQ(net::OK, result);
EXPECT_FALSE(file_util::PathExists(tracker->DatabaseDirectory().Append(
- FilePath::FromWStringHack(UTF16ToWide(kOrigin1)))));
+ base::FilePath::FromWStringHack(UTF16ToWide(kOrigin1)))));
EXPECT_TRUE(
file_util::PathExists(tracker->GetFullDBFilePath(kOrigin2, kDB2)));
EXPECT_TRUE(
@@ -340,10 +340,10 @@ class DatabaseTracker_TestHelper_Test {
// Write some data to each file and check that the listeners are
// called with the appropriate values.
EXPECT_TRUE(file_util::CreateDirectory(tracker->DatabaseDirectory().Append(
- FilePath::FromWStringHack(UTF16ToWide(
+ base::FilePath::FromWStringHack(UTF16ToWide(
tracker->GetOriginDirectory(kOrigin1))))));
EXPECT_TRUE(file_util::CreateDirectory(tracker->DatabaseDirectory().Append(
- FilePath::FromWStringHack(UTF16ToWide(
+ base::FilePath::FromWStringHack(UTF16ToWide(
tracker->GetOriginDirectory(kOrigin2))))));
EXPECT_EQ(1, file_util::WriteFile(
tracker->GetFullDBFilePath(kOrigin1, kDB1), "a", 1));
@@ -461,7 +461,7 @@ class DatabaseTracker_TestHelper_Test {
EXPECT_TRUE(test_quota_proxy->WasAccessNotified(kOrigin));
test_quota_proxy->reset();
- FilePath db_file(tracker->GetFullDBFilePath(kOriginId, kName));
+ base::FilePath db_file(tracker->GetFullDBFilePath(kOriginId, kName));
EXPECT_TRUE(file_util::CreateDirectory(db_file.DirName()));
EXPECT_TRUE(EnsureFileOfSize(db_file, 10));
tracker->DatabaseModified(kOriginId, kName);
@@ -543,8 +543,8 @@ class DatabaseTracker_TestHelper_Test {
MessageLoop message_loop;
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- FilePath origin1_db_dir;
- FilePath origin2_db_dir;
+ base::FilePath origin1_db_dir;
+ base::FilePath origin2_db_dir;
{
scoped_refptr<quota::MockSpecialStoragePolicy> special_storage_policy =
new quota::MockSpecialStoragePolicy;
@@ -563,7 +563,7 @@ class DatabaseTracker_TestHelper_Test {
EXPECT_EQ(0, database_size);
// Write some data to each file.
- FilePath db_file;
+ base::FilePath db_file;
db_file = tracker->GetFullDBFilePath(kOrigin1, kDB1);
EXPECT_TRUE(file_util::CreateDirectory(db_file.DirName()));
EXPECT_TRUE(EnsureFileOfSize(db_file, 1));
@@ -599,7 +599,7 @@ class DatabaseTracker_TestHelper_Test {
EXPECT_EQ(kOrigin1, origins_info[0].GetOrigin());
EXPECT_TRUE(
file_util::PathExists(tracker->GetFullDBFilePath(kOrigin1, kDB1)));
- EXPECT_EQ(FilePath(), tracker->GetFullDBFilePath(kOrigin2, kDB2));
+ EXPECT_EQ(base::FilePath(), tracker->GetFullDBFilePath(kOrigin2, kDB2));
// The origin directory of kOrigin1 remains, but the origin directory of
// kOrigin2 is deleted.
@@ -621,8 +621,8 @@ class DatabaseTracker_TestHelper_Test {
MessageLoop message_loop;
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- FilePath origin1_db_dir;
- FilePath origin2_db_dir;
+ base::FilePath origin1_db_dir;
+ base::FilePath origin2_db_dir;
{
scoped_refptr<quota::MockSpecialStoragePolicy> special_storage_policy =
new quota::MockSpecialStoragePolicy;
@@ -642,7 +642,7 @@ class DatabaseTracker_TestHelper_Test {
EXPECT_EQ(0, database_size);
// Write some data to each file.
- FilePath db_file;
+ base::FilePath db_file;
db_file = tracker->GetFullDBFilePath(kOrigin1, kDB1);
EXPECT_TRUE(file_util::CreateDirectory(db_file.DirName()));
EXPECT_TRUE(EnsureFileOfSize(db_file, 1));
@@ -759,7 +759,7 @@ class DatabaseTracker_TestHelper_Test {
int64 database_size = 0;
tracker->DatabaseOpened(kOriginId, kName, kDescription, 0,
&database_size);
- FilePath spoof_db_file = tracker->GetFullDBFilePath(kOriginId, kName);
+ base::FilePath spoof_db_file = tracker->GetFullDBFilePath(kOriginId, kName);
EXPECT_FALSE(tracker->GetFullDBFilePath(kOriginId, kName).empty());
EXPECT_TRUE(file_util::CreateDirectory(spoof_db_file.DirName()));
EXPECT_TRUE(EnsureFileOfSize(spoof_db_file, 1));
@@ -787,7 +787,7 @@ class DatabaseTracker_TestHelper_Test {
// a spoof_db_file on disk in the expected location.
tracker->DatabaseOpened(kOriginId, kName, kDescription, 0,
&database_size);
- FilePath spoof_db_file2 = tracker->GetFullDBFilePath(kOriginId, kName);
+ base::FilePath spoof_db_file2 = tracker->GetFullDBFilePath(kOriginId, kName);
EXPECT_FALSE(tracker->GetFullDBFilePath(kOriginId, kName).empty());
EXPECT_NE(spoof_db_file, spoof_db_file2);
EXPECT_TRUE(file_util::CreateDirectory(spoof_db_file2.DirName()));
diff --git a/webkit/database/database_util.cc b/webkit/database/database_util.cc
index be56a4b..6d5ff95 100644
--- a/webkit/database/database_util.cc
+++ b/webkit/database/database_util.cc
@@ -45,17 +45,17 @@ bool DatabaseUtil::CrackVfsFileName(const string16& vfs_file_name,
return true;
}
-FilePath DatabaseUtil::GetFullFilePathForVfsFile(
+base::FilePath DatabaseUtil::GetFullFilePathForVfsFile(
DatabaseTracker* db_tracker, const string16& vfs_file_name) {
string16 origin_identifier;
string16 database_name;
string16 sqlite_suffix;
if (!CrackVfsFileName(vfs_file_name, &origin_identifier,
&database_name, &sqlite_suffix)) {
- return FilePath(); // invalid vfs_file_name
+ return base::FilePath(); // invalid vfs_file_name
}
- FilePath full_path = db_tracker->GetFullDBFilePath(
+ base::FilePath full_path = db_tracker->GetFullDBFilePath(
origin_identifier, database_name);
if (!full_path.empty() && !sqlite_suffix.empty()) {
DCHECK(full_path.Extension().empty());
@@ -64,8 +64,8 @@ FilePath DatabaseUtil::GetFullFilePathForVfsFile(
}
// Watch out for directory traversal attempts from a compromised renderer.
if (full_path.value().find(FILE_PATH_LITERAL("..")) !=
- FilePath::StringType::npos)
- return FilePath();
+ base::FilePath::StringType::npos)
+ return base::FilePath();
return full_path;
}
diff --git a/webkit/database/database_util.h b/webkit/database/database_util.h
index 67296b3..8158f39 100644
--- a/webkit/database/database_util.h
+++ b/webkit/database/database_util.h
@@ -9,7 +9,9 @@
#include "googleurl/src/gurl.h"
#include "webkit/storage/webkit_storage_export.h"
+namespace base {
class FilePath;
+}
namespace webkit_database {
@@ -25,8 +27,8 @@ class WEBKIT_STORAGE_EXPORT DatabaseUtil {
string16* origin_identifier,
string16* database_name,
string16* sqlite_suffix);
- static FilePath GetFullFilePathForVfsFile(DatabaseTracker* db_tracker,
- const string16& vfs_file_name);
+ static base::FilePath GetFullFilePathForVfsFile(DatabaseTracker* db_tracker,
+ const string16& vfs_file_name);
static string16 GetOriginIdentifier(const GURL& url);
static GURL GetOriginFromIdentifier(const string16& origin_identifier);
};
diff --git a/webkit/database/vfs_backend.cc b/webkit/database/vfs_backend.cc
index a73035d..8d046e2 100644
--- a/webkit/database/vfs_backend.cc
+++ b/webkit/database/vfs_backend.cc
@@ -55,7 +55,7 @@ bool VfsBackend::OpenFileFlagsAreConsistent(int desired_flags) {
}
// static
-void VfsBackend::OpenFile(const FilePath& file_path,
+void VfsBackend::OpenFile(const base::FilePath& file_path,
int desired_flags,
base::PlatformFile* file_handle) {
DCHECK(!file_path.empty());
@@ -100,7 +100,7 @@ void VfsBackend::OpenFile(const FilePath& file_path,
// static
void VfsBackend::OpenTempFileInDirectory(
- const FilePath& dir_path,
+ const base::FilePath& dir_path,
int desired_flags,
base::PlatformFile* file_handle) {
// We should be able to delete temp files when they're closed
@@ -111,7 +111,7 @@ void VfsBackend::OpenTempFileInDirectory(
}
// Get a unique temp file name in the database directory.
- FilePath temp_file_path;
+ base::FilePath temp_file_path;
if (!file_util::CreateTemporaryFileInDir(dir_path, &temp_file_path))
return;
@@ -119,7 +119,7 @@ void VfsBackend::OpenTempFileInDirectory(
}
// static
-int VfsBackend::DeleteFile(const FilePath& file_path, bool sync_dir) {
+int VfsBackend::DeleteFile(const base::FilePath& file_path, bool sync_dir) {
if (!file_util::PathExists(file_path))
return SQLITE_OK;
if (!file_util::Delete(file_path, false))
@@ -143,7 +143,7 @@ int VfsBackend::DeleteFile(const FilePath& file_path, bool sync_dir) {
}
// static
-uint32 VfsBackend::GetFileAttributes(const FilePath& file_path) {
+uint32 VfsBackend::GetFileAttributes(const base::FilePath& file_path) {
#if defined(OS_WIN)
uint32 attributes = ::GetFileAttributes(file_path.value().c_str());
#elif defined(OS_POSIX)
@@ -159,7 +159,7 @@ uint32 VfsBackend::GetFileAttributes(const FilePath& file_path) {
}
// static
-int64 VfsBackend::GetFileSize(const FilePath& file_path) {
+int64 VfsBackend::GetFileSize(const base::FilePath& file_path) {
int64 size = 0;
return (file_util::GetFileSize(file_path, &size) ? size : 0);
}
diff --git a/webkit/database/vfs_backend.h b/webkit/database/vfs_backend.h
index 8fba3fa..0459958 100644
--- a/webkit/database/vfs_backend.h
+++ b/webkit/database/vfs_backend.h
@@ -10,25 +10,27 @@
#include "base/string16.h"
#include "webkit/storage/webkit_storage_export.h"
+namespace base {
class FilePath;
+}
namespace webkit_database {
class WEBKIT_STORAGE_EXPORT VfsBackend {
public:
- static void OpenFile(const FilePath& file_path,
+ static void OpenFile(const base::FilePath& file_path,
int desired_flags,
base::PlatformFile* file_handle);
- static void OpenTempFileInDirectory(const FilePath& dir_path,
+ static void OpenTempFileInDirectory(const base::FilePath& dir_path,
int desired_flags,
base::PlatformFile* file_handle);
- static int DeleteFile(const FilePath& file_path, bool sync_dir);
+ static int DeleteFile(const base::FilePath& file_path, bool sync_dir);
- static uint32 GetFileAttributes(const FilePath& file_path);
+ static uint32 GetFileAttributes(const base::FilePath& file_path);
- static int64 GetFileSize(const FilePath& file_path);
+ static int64 GetFileSize(const base::FilePath& file_path);
// Used to make decisions in the DatabaseDispatcherHost.
static bool OpenTypeIsReadWrite(int desired_flags);
diff --git a/webkit/dom_storage/dom_storage_area.cc b/webkit/dom_storage/dom_storage_area.cc
index a0c8308..d707a3a 100644
--- a/webkit/dom_storage/dom_storage_area.cc
+++ b/webkit/dom_storage/dom_storage_area.cc
@@ -33,28 +33,28 @@ DomStorageArea::CommitBatch::~CommitBatch() {}
// static
-const FilePath::CharType DomStorageArea::kDatabaseFileExtension[] =
+const base::FilePath::CharType DomStorageArea::kDatabaseFileExtension[] =
FILE_PATH_LITERAL(".localstorage");
// static
-FilePath DomStorageArea::DatabaseFileNameFromOrigin(const GURL& origin) {
+base::FilePath DomStorageArea::DatabaseFileNameFromOrigin(const GURL& origin) {
std::string filename = fileapi::GetOriginIdentifierFromURL(origin);
- // There is no FilePath.AppendExtension() method, so start with just the
+ // There is no base::FilePath.AppendExtension() method, so start with just the
// extension as the filename, and then InsertBeforeExtension the desired
// name.
- return FilePath().Append(kDatabaseFileExtension).
+ return base::FilePath().Append(kDatabaseFileExtension).
InsertBeforeExtensionASCII(filename);
}
// static
-GURL DomStorageArea::OriginFromDatabaseFileName(const FilePath& name) {
+GURL DomStorageArea::OriginFromDatabaseFileName(const base::FilePath& name) {
DCHECK(name.MatchesExtension(kDatabaseFileExtension));
WebKit::WebString origin_id = webkit_base::FilePathToWebString(
name.BaseName().RemoveExtension());
return DatabaseUtil::GetOriginFromIdentifier(origin_id);
}
-DomStorageArea::DomStorageArea(const GURL& origin, const FilePath& directory,
+DomStorageArea::DomStorageArea(const GURL& origin, const base::FilePath& directory,
DomStorageTaskRunner* task_runner)
: namespace_id_(kLocalStorageNamespaceId), origin_(origin),
directory_(directory),
@@ -64,7 +64,7 @@ DomStorageArea::DomStorageArea(const GURL& origin, const FilePath& directory,
is_shutdown_(false),
commit_batches_in_flight_(0) {
if (!directory.empty()) {
- FilePath path = directory.Append(DatabaseFileNameFromOrigin(origin_));
+ base::FilePath path = directory.Append(DatabaseFileNameFromOrigin(origin_));
backing_.reset(new LocalStorageDatabaseAdapter(path));
is_initial_import_done_ = false;
}
diff --git a/webkit/dom_storage/dom_storage_area.h b/webkit/dom_storage/dom_storage_area.h
index 9a08acf..d9fbcae 100644
--- a/webkit/dom_storage/dom_storage_area.h
+++ b/webkit/dom_storage/dom_storage_area.h
@@ -29,13 +29,13 @@ class WEBKIT_STORAGE_EXPORT DomStorageArea
: public base::RefCountedThreadSafe<DomStorageArea> {
public:
- static const FilePath::CharType kDatabaseFileExtension[];
- static FilePath DatabaseFileNameFromOrigin(const GURL& origin);
- static GURL OriginFromDatabaseFileName(const FilePath& file_name);
+ static const base::FilePath::CharType kDatabaseFileExtension[];
+ static base::FilePath DatabaseFileNameFromOrigin(const GURL& origin);
+ static GURL OriginFromDatabaseFileName(const base::FilePath& file_name);
// Local storage. Backed on disk if directory is nonempty.
DomStorageArea(const GURL& origin,
- const FilePath& directory,
+ const base::FilePath& directory,
DomStorageTaskRunner* task_runner);
// Session storage. Backed on disk if |session_storage_backing| is not NULL.
@@ -119,7 +119,7 @@ class WEBKIT_STORAGE_EXPORT DomStorageArea
int64 namespace_id_;
std::string persistent_namespace_id_;
GURL origin_;
- FilePath directory_;
+ base::FilePath directory_;
scoped_refptr<DomStorageTaskRunner> task_runner_;
scoped_refptr<DomStorageMap> map_;
scoped_ptr<DomStorageDatabaseAdapter> backing_;
diff --git a/webkit/dom_storage/dom_storage_area_unittest.cc b/webkit/dom_storage/dom_storage_area_unittest.cc
index 4513ea3..6667312 100644
--- a/webkit/dom_storage/dom_storage_area_unittest.cc
+++ b/webkit/dom_storage/dom_storage_area_unittest.cc
@@ -126,13 +126,13 @@ TEST_F(DomStorageAreaTest, BackingDatabaseOpened) {
const int64 kSessionStorageNamespaceId = kLocalStorageNamespaceId + 1;
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- const FilePath kExpectedOriginFilePath = temp_dir.path().Append(
+ const base::FilePath kExpectedOriginFilePath = temp_dir.path().Append(
DomStorageArea::DatabaseFileNameFromOrigin(kOrigin));
// No directory, backing should be null.
{
scoped_refptr<DomStorageArea> area(
- new DomStorageArea(kOrigin, FilePath(), NULL));
+ new DomStorageArea(kOrigin, base::FilePath(), NULL));
EXPECT_EQ(NULL, area->backing_.get());
EXPECT_TRUE(area->is_initial_import_done_);
EXPECT_FALSE(file_util::PathExists(kExpectedOriginFilePath));
@@ -315,9 +315,9 @@ TEST_F(DomStorageAreaTest, DeleteOrigin) {
new MockDomStorageTaskRunner(base::MessageLoopProxy::current())));
// This test puts files on disk.
- FilePath db_file_path = static_cast<LocalStorageDatabaseAdapter*>(
+ base::FilePath db_file_path = static_cast<LocalStorageDatabaseAdapter*>(
area->backing_.get())->db_->file_path();
- FilePath db_journal_file_path =
+ base::FilePath db_journal_file_path =
DomStorageDatabase::GetJournalFilePath(db_file_path);
// Nothing bad should happen when invoked w/o any files on disk.
@@ -443,9 +443,9 @@ TEST_F(DomStorageAreaTest, DatabaseFileNames) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kCases); ++i) {
GURL origin = GURL(kCases[i].origin).GetOrigin();
- FilePath file_name = FilePath().AppendASCII(kCases[i].file_name);
- FilePath journal_file_name =
- FilePath().AppendASCII(kCases[i].journal_file_name);
+ base::FilePath file_name = base::FilePath().AppendASCII(kCases[i].file_name);
+ base::FilePath journal_file_name =
+ base::FilePath().AppendASCII(kCases[i].journal_file_name);
EXPECT_EQ(file_name,
DomStorageArea::DatabaseFileNameFromOrigin(origin));
@@ -456,17 +456,17 @@ TEST_F(DomStorageAreaTest, DatabaseFileNames) {
}
// Also test some DomStorageDatabase::GetJournalFilePath cases here.
- FilePath parent = FilePath().AppendASCII("a").AppendASCII("b");
+ base::FilePath parent = base::FilePath().AppendASCII("a").AppendASCII("b");
EXPECT_EQ(
parent.AppendASCII("file-journal"),
DomStorageDatabase::GetJournalFilePath(parent.AppendASCII("file")));
EXPECT_EQ(
- FilePath().AppendASCII("-journal"),
- DomStorageDatabase::GetJournalFilePath(FilePath()));
+ base::FilePath().AppendASCII("-journal"),
+ DomStorageDatabase::GetJournalFilePath(base::FilePath()));
EXPECT_EQ(
- FilePath().AppendASCII(".extensiononly-journal"),
+ base::FilePath().AppendASCII(".extensiononly-journal"),
DomStorageDatabase::GetJournalFilePath(
- FilePath().AppendASCII(".extensiononly")));
+ base::FilePath().AppendASCII(".extensiononly")));
}
} // namespace dom_storage
diff --git a/webkit/dom_storage/dom_storage_context.cc b/webkit/dom_storage/dom_storage_context.cc
index 3d32243..45aae74 100644
--- a/webkit/dom_storage/dom_storage_context.cc
+++ b/webkit/dom_storage/dom_storage_context.cc
@@ -25,8 +25,8 @@ namespace dom_storage {
static const int kSessionStoraceScavengingSeconds = 60;
DomStorageContext::DomStorageContext(
- const FilePath& localstorage_directory,
- const FilePath& sessionstorage_directory,
+ const base::FilePath& localstorage_directory,
+ const base::FilePath& sessionstorage_directory,
quota::SpecialStoragePolicy* special_storage_policy,
DomStorageTaskRunner* task_runner)
: localstorage_directory_(localstorage_directory),
@@ -69,7 +69,7 @@ DomStorageNamespace* DomStorageContext::GetStorageNamespace(
if (!file_util::CreateDirectory(localstorage_directory_)) {
LOG(ERROR) << "Failed to create 'Local Storage' directory,"
" falling back to in-memory only.";
- localstorage_directory_ = FilePath();
+ localstorage_directory_ = base::FilePath();
}
}
DomStorageNamespace* local =
@@ -89,7 +89,7 @@ void DomStorageContext::GetLocalStorageUsage(
return;
FileEnumerator enumerator(localstorage_directory_, false,
FileEnumerator::FILES);
- for (FilePath path = enumerator.Next(); !path.empty();
+ for (base::FilePath path = enumerator.Next(); !path.empty();
path = enumerator.Next()) {
if (path.MatchesExtension(DomStorageArea::kDatabaseFileExtension)) {
LocalStorageUsageInfo info;
@@ -313,7 +313,7 @@ void DomStorageContext::ClearSessionOnlyOrigins() {
continue;
const bool kNotRecursive = false;
- FilePath database_file_path = localstorage_directory_.Append(
+ base::FilePath database_file_path = localstorage_directory_.Append(
DomStorageArea::DatabaseFileNameFromOrigin(origin));
file_util::Delete(database_file_path, kNotRecursive);
file_util::Delete(
diff --git a/webkit/dom_storage/dom_storage_context.h b/webkit/dom_storage/dom_storage_context.h
index 3b48833f..76a92b0 100644
--- a/webkit/dom_storage/dom_storage_context.h
+++ b/webkit/dom_storage/dom_storage_context.h
@@ -19,10 +19,10 @@
#include "googleurl/src/gurl.h"
#include "webkit/storage/webkit_storage_export.h"
-class FilePath;
class NullableString16;
namespace base {
+class FilePath;
class Time;
}
@@ -86,18 +86,18 @@ class WEBKIT_STORAGE_EXPORT DomStorageContext
};
DomStorageContext(
- const FilePath& localstorage_directory, // empty for incognito profiles
- const FilePath& sessionstorage_directory, // empty for incognito profiles
+ const base::FilePath& localstorage_directory, // empty for incognito profiles
+ const base::FilePath& sessionstorage_directory, // empty for incognito profiles
quota::SpecialStoragePolicy* special_storage_policy,
DomStorageTaskRunner* task_runner);
// Returns the directory path for localStorage, or an empty directory, if
// there is no backing on disk.
- const FilePath& localstorage_directory() { return localstorage_directory_; }
+ const base::FilePath& localstorage_directory() { return localstorage_directory_; }
// Returns the directory path for sessionStorage, or an empty directory, if
// there is no backing on disk.
- const FilePath& sessionstorage_directory() {
+ const base::FilePath& sessionstorage_directory() {
return sessionstorage_directory_;
}
@@ -190,12 +190,12 @@ class WEBKIT_STORAGE_EXPORT DomStorageContext
StorageNamespaceMap namespaces_;
// Where localstorage data is stored, maybe empty for the incognito use case.
- FilePath localstorage_directory_;
+ base::FilePath localstorage_directory_;
// Where sessionstorage data is stored, maybe empty for the incognito use
// case. Always empty until the file-backed session storage feature is
// implemented.
- FilePath sessionstorage_directory_;
+ base::FilePath sessionstorage_directory_;
// Used to schedule sequenced background tasks.
scoped_refptr<DomStorageTaskRunner> task_runner_;
diff --git a/webkit/dom_storage/dom_storage_context_unittest.cc b/webkit/dom_storage/dom_storage_context_unittest.cc
index 39e8252..f2bebc1 100644
--- a/webkit/dom_storage/dom_storage_context_unittest.cc
+++ b/webkit/dom_storage/dom_storage_context_unittest.cc
@@ -42,7 +42,7 @@ class DomStorageContextTest : public testing::Test {
task_runner_ = new MockDomStorageTaskRunner(
base::MessageLoopProxy::current());
context_ = new DomStorageContext(temp_dir_.path(),
- FilePath(),
+ base::FilePath(),
storage_policy_,
task_runner_);
}
@@ -54,7 +54,7 @@ class DomStorageContextTest : public testing::Test {
void VerifySingleOriginRemains(const GURL& origin) {
// Use a new instance to examine the contexts of temp_dir_.
scoped_refptr<DomStorageContext> context =
- new DomStorageContext(temp_dir_.path(), FilePath(), NULL, NULL);
+ new DomStorageContext(temp_dir_.path(), base::FilePath(), NULL, NULL);
std::vector<LocalStorageUsageInfo> infos;
context->GetLocalStorageUsage(&infos, kDontIncludeFileInfo);
ASSERT_EQ(1u, infos.size());
@@ -75,7 +75,7 @@ TEST_F(DomStorageContextTest, Basics) {
// initializes members properly and that invoking methods
// on a newly created object w/o any data on disk do no harm.
EXPECT_EQ(temp_dir_.path(), context_->localstorage_directory());
- EXPECT_EQ(FilePath(), context_->sessionstorage_directory());
+ EXPECT_EQ(base::FilePath(), context_->sessionstorage_directory());
EXPECT_EQ(storage_policy_.get(), context_->special_storage_policy_.get());
context_->PurgeMemory();
context_->DeleteLocalStorage(GURL("http://chromium.org/"));
@@ -108,7 +108,7 @@ TEST_F(DomStorageContextTest, UsageInfo) {
// Create a new context that points to the same directory, see that
// it knows about the origin that we stored data for.
- context_ = new DomStorageContext(temp_dir_.path(), FilePath(), NULL, NULL);
+ context_ = new DomStorageContext(temp_dir_.path(), base::FilePath(), NULL, NULL);
context_->GetLocalStorageUsage(&infos, kDontIncludeFileInfo);
EXPECT_EQ(1u, infos.size());
EXPECT_EQ(kOrigin, infos[0].origin);
diff --git a/webkit/dom_storage/dom_storage_database.cc b/webkit/dom_storage/dom_storage_database.cc
index 97fd3da..a49e93b 100644
--- a/webkit/dom_storage/dom_storage_database.cc
+++ b/webkit/dom_storage/dom_storage_database.cc
@@ -13,7 +13,7 @@
namespace {
-const FilePath::CharType kJournal[] = FILE_PATH_LITERAL("-journal");
+const base::FilePath::CharType kJournal[] = FILE_PATH_LITERAL("-journal");
class HistogramUniquifier {
public:
@@ -29,14 +29,14 @@ sql::ErrorDelegate* GetErrorHandlerForDomStorageDatabase() {
namespace dom_storage {
// static
-FilePath DomStorageDatabase::GetJournalFilePath(
- const FilePath& database_path) {
- FilePath::StringType journal_file_name =
+base::FilePath DomStorageDatabase::GetJournalFilePath(
+ const base::FilePath& database_path) {
+ base::FilePath::StringType journal_file_name =
database_path.BaseName().value() + kJournal;
return database_path.DirName().Append(journal_file_name);
}
-DomStorageDatabase::DomStorageDatabase(const FilePath& file_path)
+DomStorageDatabase::DomStorageDatabase(const base::FilePath& file_path)
: file_path_(file_path) {
// Note: in normal use we should never get an empty backing path here.
// However, the unit test for this class can contruct an instance
diff --git a/webkit/dom_storage/dom_storage_database.h b/webkit/dom_storage/dom_storage_database.h
index e6fd0db..e11a507 100644
--- a/webkit/dom_storage/dom_storage_database.h
+++ b/webkit/dom_storage/dom_storage_database.h
@@ -22,9 +22,9 @@ namespace dom_storage {
// class is designed to be used on a single thread.
class WEBKIT_STORAGE_EXPORT DomStorageDatabase {
public:
- static FilePath GetJournalFilePath(const FilePath& database_path);
+ static base::FilePath GetJournalFilePath(const base::FilePath& database_path);
- explicit DomStorageDatabase(const FilePath& file_path);
+ explicit DomStorageDatabase(const base::FilePath& file_path);
virtual ~DomStorageDatabase(); // virtual for unit testing
// Reads all the key, value pairs stored in the database and returns
@@ -41,7 +41,7 @@ class WEBKIT_STORAGE_EXPORT DomStorageDatabase {
bool CommitChanges(bool clear_all_first, const ValuesMap& changes);
// Simple getter for the path we were constructed with.
- const FilePath& file_path() const { return file_path_; }
+ const base::FilePath& file_path() const { return file_path_; }
protected:
// Constructor that uses an in-memory sqlite database, for testing.
@@ -107,7 +107,7 @@ class WEBKIT_STORAGE_EXPORT DomStorageDatabase {
void Init();
// Path to the database on disk.
- const FilePath file_path_;
+ const base::FilePath file_path_;
scoped_ptr<sql::Connection> db_;
bool failed_to_open_;
bool tried_to_recreate_;
diff --git a/webkit/dom_storage/dom_storage_database_unittest.cc b/webkit/dom_storage/dom_storage_database_unittest.cc
index 3e9bfbd..79f8afbf 100644
--- a/webkit/dom_storage/dom_storage_database_unittest.cc
+++ b/webkit/dom_storage/dom_storage_database_unittest.cc
@@ -110,7 +110,7 @@ TEST(DomStorageDatabaseTest, SimpleOpenAndClose) {
TEST(DomStorageDatabaseTest, CloseEmptyDatabaseDeletesFile) {
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- FilePath file_name = temp_dir.path().AppendASCII("TestDomStorageDatabase.db");
+ base::FilePath file_name = temp_dir.path().AppendASCII("TestDomStorageDatabase.db");
ValuesMap storage;
CreateMapWithValues(&storage);
@@ -167,7 +167,7 @@ TEST(DomStorageDatabaseTest, TestLazyOpenIsLazy) {
// open a file that already exists when only invoking ReadAllValues.
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- FilePath file_name = temp_dir.path().AppendASCII("TestDomStorageDatabase.db");
+ base::FilePath file_name = temp_dir.path().AppendASCII("TestDomStorageDatabase.db");
DomStorageDatabase db(file_name);
EXPECT_FALSE(db.IsOpen());
@@ -214,7 +214,7 @@ TEST(DomStorageDatabaseTest, TestLazyOpenUpgradesDatabase) {
// early if the database is already open).
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- FilePath file_name = temp_dir.path().AppendASCII("TestDomStorageDatabase.db");
+ base::FilePath file_name = temp_dir.path().AppendASCII("TestDomStorageDatabase.db");
DomStorageDatabase db(file_name);
db.db_.reset(new sql::Connection());
@@ -301,7 +301,7 @@ TEST(DomStorageDatabaseTest, TestSimpleRemoveOneValue) {
}
TEST(DomStorageDatabaseTest, TestCanOpenAndReadWebCoreDatabase) {
- FilePath webcore_database;
+ base::FilePath webcore_database;
PathService::Get(base::DIR_SOURCE_ROOT, &webcore_database);
webcore_database = webcore_database.AppendASCII("webkit");
webcore_database = webcore_database.AppendASCII("data");
@@ -334,7 +334,7 @@ TEST(DomStorageDatabaseTest, TestCanOpenFileThatIsNotADatabase) {
// Write into the temporary file first.
base::ScopedTempDir temp_dir;
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
- FilePath file_name = temp_dir.path().AppendASCII("TestDomStorageDatabase.db");
+ base::FilePath file_name = temp_dir.path().AppendASCII("TestDomStorageDatabase.db");
const char kData[] = "I am not a database.";
file_util::WriteFile(file_name, kData, strlen(kData));
diff --git a/webkit/dom_storage/dom_storage_namespace.cc b/webkit/dom_storage/dom_storage_namespace.cc
index ee91ca2..4c1cbd7 100644
--- a/webkit/dom_storage/dom_storage_namespace.cc
+++ b/webkit/dom_storage/dom_storage_namespace.cc
@@ -16,7 +16,7 @@
namespace dom_storage {
DomStorageNamespace::DomStorageNamespace(
- const FilePath& directory,
+ const base::FilePath& directory,
DomStorageTaskRunner* task_runner)
: namespace_id_(kLocalStorageNamespaceId),
directory_(directory),
diff --git a/webkit/dom_storage/dom_storage_namespace.h b/webkit/dom_storage/dom_storage_namespace.h
index e1c72f0..00439c0 100644
--- a/webkit/dom_storage/dom_storage_namespace.h
+++ b/webkit/dom_storage/dom_storage_namespace.h
@@ -27,7 +27,7 @@ class WEBKIT_STORAGE_EXPORT DomStorageNamespace
public:
// Constructor for a LocalStorage namespace with id of 0
// and an optional backing directory on disk.
- DomStorageNamespace(const FilePath& directory, // may be empty
+ DomStorageNamespace(const base::FilePath& directory, // may be empty
DomStorageTaskRunner* task_runner);
// Constructor for a SessionStorage namespace with a non-zero id and an
@@ -83,7 +83,7 @@ class WEBKIT_STORAGE_EXPORT DomStorageNamespace
int64 namespace_id_;
std::string persistent_namespace_id_;
- FilePath directory_;
+ base::FilePath directory_;
AreaMap areas_;
scoped_refptr<DomStorageTaskRunner> task_runner_;
scoped_refptr<SessionStorageDatabase> session_storage_database_;
diff --git a/webkit/dom_storage/local_storage_database_adapter.cc b/webkit/dom_storage/local_storage_database_adapter.cc
index 6e715d7..32f724f 100644
--- a/webkit/dom_storage/local_storage_database_adapter.cc
+++ b/webkit/dom_storage/local_storage_database_adapter.cc
@@ -10,7 +10,7 @@
namespace dom_storage {
LocalStorageDatabaseAdapter::LocalStorageDatabaseAdapter(
- const FilePath& path)
+ const base::FilePath& path)
: db_(new DomStorageDatabase(path)) {
}
diff --git a/webkit/dom_storage/local_storage_database_adapter.h b/webkit/dom_storage/local_storage_database_adapter.h
index f69e87b..e9e646b 100644
--- a/webkit/dom_storage/local_storage_database_adapter.h
+++ b/webkit/dom_storage/local_storage_database_adapter.h
@@ -10,7 +10,9 @@
#include "webkit/dom_storage/dom_storage_database_adapter.h"
#include "webkit/storage/webkit_storage_export.h"
+namespace base {
class FilePath;
+}
namespace dom_storage {
@@ -19,7 +21,7 @@ class DomStorageDatabase;
class WEBKIT_STORAGE_EXPORT LocalStorageDatabaseAdapter :
public DomStorageDatabaseAdapter {
public:
- explicit LocalStorageDatabaseAdapter(const FilePath& path);
+ explicit LocalStorageDatabaseAdapter(const base::FilePath& path);
virtual ~LocalStorageDatabaseAdapter();
virtual void ReadAllValues(ValuesMap* result) OVERRIDE;
virtual bool CommitChanges(bool clear_all_first,
diff --git a/webkit/dom_storage/session_storage_database.cc b/webkit/dom_storage/session_storage_database.cc
index 0f26f56..7944738 100644
--- a/webkit/dom_storage/session_storage_database.cc
+++ b/webkit/dom_storage/session_storage_database.cc
@@ -36,7 +36,7 @@
namespace dom_storage {
-SessionStorageDatabase::SessionStorageDatabase(const FilePath& file_path)
+SessionStorageDatabase::SessionStorageDatabase(const base::FilePath& file_path)
: file_path_(file_path),
db_error_(false),
is_inconsistent_(false) {
diff --git a/webkit/dom_storage/session_storage_database.h b/webkit/dom_storage/session_storage_database.h
index c9fc813..44ecb97 100644
--- a/webkit/dom_storage/session_storage_database.h
+++ b/webkit/dom_storage/session_storage_database.h
@@ -36,7 +36,7 @@ namespace dom_storage {
class WEBKIT_STORAGE_EXPORT SessionStorageDatabase :
public base::RefCountedThreadSafe<SessionStorageDatabase> {
public:
- explicit SessionStorageDatabase(const FilePath& file_path);
+ explicit SessionStorageDatabase(const base::FilePath& file_path);
// Reads the (key, value) pairs for |namespace_id| and |origin|. |result| is
// assumed to be empty and any duplicate keys will be overwritten. If the
@@ -187,7 +187,7 @@ class WEBKIT_STORAGE_EXPORT SessionStorageDatabase :
static const char* NextMapIdKey();
scoped_ptr<leveldb::DB> db_;
- FilePath file_path_;
+ base::FilePath file_path_;
// For protecting the database opening code.
base::Lock db_lock_;
diff --git a/webkit/fileapi/async_file_util.h b/webkit/fileapi/async_file_util.h
index 651d0a51..d00dc82 100644
--- a/webkit/fileapi/async_file_util.h
+++ b/webkit/fileapi/async_file_util.h
@@ -42,7 +42,7 @@ class WEBKIT_STORAGE_EXPORT AsyncFileUtil {
typedef base::Callback<
void(base::PlatformFileError result,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path)> GetFileInfoCallback;
+ const base::FilePath& platform_path)> GetFileInfoCallback;
typedef base::FileUtilProxy::Entry Entry;
typedef std::vector<base::FileUtilProxy::Entry> EntryList;
@@ -54,7 +54,7 @@ class WEBKIT_STORAGE_EXPORT AsyncFileUtil {
typedef base::Callback<
void(base::PlatformFileError result,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path,
+ const base::FilePath& platform_path,
SnapshotFilePolicy policy)> CreateSnapshotFileCallback;
AsyncFileUtil() {}
@@ -243,7 +243,7 @@ class WEBKIT_STORAGE_EXPORT AsyncFileUtil {
//
virtual bool CopyInForeignFile(
FileSystemOperationContext* context,
- const FilePath& src_file_path,
+ const base::FilePath& src_file_path,
const FileSystemURL& dest_url,
const StatusCallback& callback) = 0;
diff --git a/webkit/fileapi/async_file_util_adapter.cc b/webkit/fileapi/async_file_util_adapter.cc
index 4c6dca1..0b9f2c8 100644
--- a/webkit/fileapi/async_file_util_adapter.cc
+++ b/webkit/fileapi/async_file_util_adapter.cc
@@ -78,7 +78,7 @@ class GetFileInfoHelper {
private:
base::PlatformFileError error_;
base::PlatformFileInfo file_info_;
- FilePath platform_path_;
+ base::FilePath platform_path_;
SnapshotFilePolicy snapshot_policy_;
DISALLOW_COPY_AND_ASSIGN(GetFileInfoHelper);
};
@@ -91,7 +91,7 @@ class ReadDirectoryHelper {
FileSystemOperationContext* context,
const FileSystemURL& url) {
base::PlatformFileInfo file_info;
- FilePath platform_path;
+ base::FilePath platform_path;
PlatformFileError error = file_util->GetFileInfo(
context, url, &file_info, &platform_path);
if (error != base::PLATFORM_FILE_OK) {
@@ -106,7 +106,7 @@ class ReadDirectoryHelper {
scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator> file_enum(
file_util->CreateFileEnumerator(context, url, false /* recursive */));
- FilePath current;
+ base::FilePath current;
while (!(current = file_enum->Next()).empty()) {
AsyncFileUtil::Entry entry;
entry.is_directory = file_enum->IsDirectory();
@@ -257,7 +257,7 @@ bool AsyncFileUtilAdapter::MoveFileLocal(
bool AsyncFileUtilAdapter::CopyInForeignFile(
FileSystemOperationContext* context,
- const FilePath& src_file_path,
+ const base::FilePath& src_file_path,
const FileSystemURL& dest_url,
const StatusCallback& callback) {
return base::PostTaskAndReplyWithResult(
diff --git a/webkit/fileapi/async_file_util_adapter.h b/webkit/fileapi/async_file_util_adapter.h
index da8bb4c..065354d 100644
--- a/webkit/fileapi/async_file_util_adapter.h
+++ b/webkit/fileapi/async_file_util_adapter.h
@@ -82,7 +82,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE AsyncFileUtilAdapter
const StatusCallback& callback) OVERRIDE;
virtual bool CopyInForeignFile(
FileSystemOperationContext* context,
- const FilePath& src_file_path,
+ const base::FilePath& src_file_path,
const FileSystemURL& dest_url,
const StatusCallback& callback) OVERRIDE;
virtual bool DeleteFile(
diff --git a/webkit/fileapi/cross_operation_delegate.cc b/webkit/fileapi/cross_operation_delegate.cc
index 86868e2..28bd6da 100644
--- a/webkit/fileapi/cross_operation_delegate.cc
+++ b/webkit/fileapi/cross_operation_delegate.cc
@@ -169,7 +169,7 @@ void CrossOperationDelegate::DidCreateSnapshot(
const StatusCallback& callback,
base::PlatformFileError error,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path,
+ const base::FilePath& platform_path,
const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) {
if (error != base::PLATFORM_FILE_OK) {
callback.Run(error);
@@ -222,7 +222,7 @@ FileSystemURL CrossOperationDelegate::CreateDestURL(
DCHECK_EQ(src_root_.type(), src_url.type());
DCHECK_EQ(src_root_.origin(), src_url.origin());
- FilePath path = dest_root_.path();
+ base::FilePath path = dest_root_.path();
src_root_.path().AppendRelativePath(src_url.path(), &path);
return dest_root_.WithPath(path);
}
diff --git a/webkit/fileapi/cross_operation_delegate.h b/webkit/fileapi/cross_operation_delegate.h
index 1b169f7..3be003a 100644
--- a/webkit/fileapi/cross_operation_delegate.h
+++ b/webkit/fileapi/cross_operation_delegate.h
@@ -55,7 +55,7 @@ class CrossOperationDelegate
const StatusCallback& callback,
base::PlatformFileError error,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path,
+ const base::FilePath& platform_path,
const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref);
void DidFinishCopy(
const FileSystemURL& src,
diff --git a/webkit/fileapi/external_mount_points.cc b/webkit/fileapi/external_mount_points.cc
index bca5b2b..b129911 100644
--- a/webkit/fileapi/external_mount_points.cc
+++ b/webkit/fileapi/external_mount_points.cc
@@ -20,15 +20,15 @@ namespace {
// For example, /a/b/c(1)/d would be erroneously resolved as c/d if the
// following mount points were registered: "/a/b/c", "/a/b/c(1)". (Note:
// "/a/b/c" < "/a/b/c(1)" < "/a/b/c/").
-FilePath NormalizeFilePath(const FilePath& path) {
+base::FilePath NormalizeFilePath(const base::FilePath& path) {
if (path.empty())
return path;
- FilePath::StringType path_str = path.StripTrailingSeparators().value();
- if (!FilePath::IsSeparator(path_str[path_str.length() - 1]))
+ base::FilePath::StringType path_str = path.StripTrailingSeparators().value();
+ if (!base::FilePath::IsSeparator(path_str[path_str.length() - 1]))
path_str.append(FILE_PATH_LITERAL("/"));
- return FilePath(path_str).NormalizePathSeparators();
+ return base::FilePath(path_str).NormalizePathSeparators();
}
// Wrapper around ref-counted ExternalMountPoints that will be used to lazily
@@ -53,15 +53,15 @@ class SystemMountPointsLazyWrapper {
system_mount_points_->RegisterFileSystem(
"archive",
fileapi::kFileSystemTypeNativeLocal,
- FilePath(FILE_PATH_LITERAL("/media/archive")));
+ base::FilePath(FILE_PATH_LITERAL("/media/archive")));
system_mount_points_->RegisterFileSystem(
"removable",
fileapi::kFileSystemTypeNativeLocal,
- FilePath(FILE_PATH_LITERAL("/media/removable")));
+ base::FilePath(FILE_PATH_LITERAL("/media/removable")));
system_mount_points_->RegisterFileSystem(
"oem",
fileapi::kFileSystemTypeRestrictedNativeLocal,
- FilePath(FILE_PATH_LITERAL("/usr/share/oem")));
+ base::FilePath(FILE_PATH_LITERAL("/usr/share/oem")));
#endif // defined(OS_CHROMEOS)
}
@@ -78,20 +78,20 @@ namespace fileapi {
class ExternalMountPoints::Instance {
public:
Instance(FileSystemType type,
- const FilePath& path,
+ const base::FilePath& path,
RemoteFileSystemProxyInterface* remote_proxy);
~Instance();
FileSystemType type() const { return type_; }
- const FilePath& path() const { return path_; }
+ const base::FilePath& path() const { return path_; }
RemoteFileSystemProxyInterface* remote_proxy() const {
return remote_proxy_.get();
}
private:
const FileSystemType type_;
- const FilePath path_;
+ const base::FilePath path_;
// For file systems that have a remote file system proxy.
scoped_refptr<RemoteFileSystemProxyInterface> remote_proxy_;
@@ -100,7 +100,7 @@ class ExternalMountPoints::Instance {
};
ExternalMountPoints::Instance::Instance(FileSystemType type,
- const FilePath& path,
+ const base::FilePath& path,
RemoteFileSystemProxyInterface* proxy)
: type_(type),
path_(path.StripTrailingSeparators()),
@@ -125,7 +125,7 @@ scoped_refptr<ExternalMountPoints> ExternalMountPoints::CreateRefCounted() {
bool ExternalMountPoints::RegisterFileSystem(
const std::string& mount_name,
FileSystemType type,
- const FilePath& path) {
+ const base::FilePath& path) {
return RegisterRemoteFileSystem(mount_name, type, NULL, path);
}
@@ -133,10 +133,10 @@ bool ExternalMountPoints::RegisterRemoteFileSystem(
const std::string& mount_name,
FileSystemType type,
RemoteFileSystemProxyInterface* remote_proxy,
- const FilePath& path_in) {
+ const base::FilePath& path_in) {
base::AutoLock locker(lock_);
- FilePath path = NormalizeFilePath(path_in);
+ base::FilePath path = NormalizeFilePath(path_in);
if (!ValidateNewMountPoint(mount_name, path))
return false;
@@ -164,7 +164,7 @@ bool ExternalMountPoints::RevokeFileSystem(const std::string& mount_name) {
}
bool ExternalMountPoints::GetRegisteredPath(
- const std::string& filesystem_id, FilePath* path) const {
+ const std::string& filesystem_id, base::FilePath* path) const {
DCHECK(path);
base::AutoLock locker(lock_);
NameToInstance::const_iterator found = instance_map_.find(filesystem_id);
@@ -174,10 +174,10 @@ bool ExternalMountPoints::GetRegisteredPath(
return true;
}
-bool ExternalMountPoints::CrackVirtualPath(const FilePath& virtual_path,
+bool ExternalMountPoints::CrackVirtualPath(const base::FilePath& virtual_path,
std::string* mount_name,
FileSystemType* type,
- FilePath* path) const {
+ base::FilePath* path) const {
DCHECK(mount_name);
DCHECK(path);
@@ -186,18 +186,18 @@ bool ExternalMountPoints::CrackVirtualPath(const FilePath& virtual_path,
return false;
// The virtual_path should comprise of <mount_name> and <relative_path> parts.
- std::vector<FilePath::StringType> components;
+ std::vector<base::FilePath::StringType> components;
virtual_path.GetComponents(&components);
if (components.size() < 1)
return false;
- std::vector<FilePath::StringType>::iterator component_iter =
+ std::vector<base::FilePath::StringType>::iterator component_iter =
components.begin();
- std::string maybe_mount_name = FilePath(*component_iter++).MaybeAsASCII();
+ std::string maybe_mount_name = base::FilePath(*component_iter++).MaybeAsASCII();
if (maybe_mount_name.empty())
return false;
- FilePath cracked_path;
+ base::FilePath cracked_path;
{
base::AutoLock locker(lock_);
NameToInstance::const_iterator found_instance =
@@ -230,13 +230,13 @@ FileSystemURL ExternalMountPoints::CrackURL(const GURL& url) const {
FileSystemURL ExternalMountPoints::CreateCrackedFileSystemURL(
const GURL& origin,
FileSystemType type,
- const FilePath& path) const {
+ const base::FilePath& path) const {
if (!HandlesFileSystemMountType(type))
return FileSystemURL();
std::string mount_name;
FileSystemType cracked_type;
- FilePath cracked_path;
+ base::FilePath cracked_path;
if (!CrackVirtualPath(path, &mount_name, &cracked_type, &cracked_path))
return FileSystemURL();
@@ -263,14 +263,14 @@ void ExternalMountPoints::AddMountPointInfosTo(
}
}
-bool ExternalMountPoints::GetVirtualPath(const FilePath& path_in,
- FilePath* virtual_path) {
+bool ExternalMountPoints::GetVirtualPath(const base::FilePath& path_in,
+ base::FilePath* virtual_path) {
DCHECK(virtual_path);
base::AutoLock locker(lock_);
- FilePath path = NormalizeFilePath(path_in);
- std::map<FilePath, std::string>::reverse_iterator iter(
+ base::FilePath path = NormalizeFilePath(path_in);
+ std::map<base::FilePath, std::string>::reverse_iterator iter(
path_to_name_map_.upper_bound(path));
if (iter == path_to_name_map_.rend())
return false;
@@ -281,9 +281,9 @@ bool ExternalMountPoints::GetVirtualPath(const FilePath& path_in,
return iter->first.AppendRelativePath(path, virtual_path);
}
-FilePath ExternalMountPoints::CreateVirtualRootPath(
+base::FilePath ExternalMountPoints::CreateVirtualRootPath(
const std::string& mount_name) const {
- return FilePath().AppendASCII(mount_name);
+ return base::FilePath().AppendASCII(mount_name);
}
ExternalMountPoints::ExternalMountPoints() {}
@@ -294,7 +294,7 @@ ExternalMountPoints::~ExternalMountPoints() {
}
bool ExternalMountPoints::ValidateNewMountPoint(const std::string& mount_name,
- const FilePath& path) {
+ const base::FilePath& path) {
lock_.AssertAcquired();
// Mount name must not be empty.
@@ -315,7 +315,7 @@ bool ExternalMountPoints::ValidateNewMountPoint(const std::string& mount_name,
return false;
// Check there the new path does not overlap with one of the existing ones.
- std::map<FilePath, std::string>::reverse_iterator potential_parent(
+ std::map<base::FilePath, std::string>::reverse_iterator potential_parent(
path_to_name_map_.upper_bound(path));
if (potential_parent != path_to_name_map_.rend()) {
if (potential_parent->first == path ||
@@ -324,7 +324,7 @@ bool ExternalMountPoints::ValidateNewMountPoint(const std::string& mount_name,
}
}
- std::map<FilePath, std::string>::iterator potential_child =
+ std::map<base::FilePath, std::string>::iterator potential_child =
path_to_name_map_.upper_bound(path);
if (potential_child == path_to_name_map_.end())
return true;
@@ -335,13 +335,13 @@ bool ExternalMountPoints::ValidateNewMountPoint(const std::string& mount_name,
ScopedExternalFileSystem::ScopedExternalFileSystem(
const std::string& mount_name,
FileSystemType type,
- const FilePath& path)
+ const base::FilePath& path)
: mount_name_(mount_name) {
ExternalMountPoints::GetSystemInstance()->RegisterFileSystem(
mount_name, type, path);
}
-FilePath ScopedExternalFileSystem::GetVirtualRootPath() const {
+base::FilePath ScopedExternalFileSystem::GetVirtualRootPath() const {
return ExternalMountPoints::GetSystemInstance()->
CreateVirtualRootPath(mount_name_);
}
diff --git a/webkit/fileapi/external_mount_points.h b/webkit/fileapi/external_mount_points.h
index f2d8e29..a2660c2 100644
--- a/webkit/fileapi/external_mount_points.h
+++ b/webkit/fileapi/external_mount_points.h
@@ -15,7 +15,9 @@
#include "webkit/fileapi/mount_points.h"
#include "webkit/storage/webkit_storage_export.h"
+namespace base {
class FilePath;
+}
namespace fileapi {
class FileSystemURL;
@@ -60,29 +62,29 @@ class WEBKIT_STORAGE_EXPORT ExternalMountPoints
// by calling RevokeFileSystem with |mount_name|.
bool RegisterFileSystem(const std::string& mount_name,
FileSystemType type,
- const FilePath& path);
+ const base::FilePath& path);
// Same as |RegisterExternalFileSystem|, but also registers a remote file
// system proxy for the file system.
bool RegisterRemoteFileSystem(const std::string& mount_name,
FileSystemType type,
RemoteFileSystemProxyInterface* remote_proxy,
- const FilePath& path);
+ const base::FilePath& path);
// MountPoints overrides.
virtual bool HandlesFileSystemMountType(FileSystemType type) const OVERRIDE;
virtual bool RevokeFileSystem(const std::string& mount_name) OVERRIDE;
virtual bool GetRegisteredPath(const std::string& mount_name,
- FilePath* path) const OVERRIDE;
- virtual bool CrackVirtualPath(const FilePath& virtual_path,
+ base::FilePath* path) const OVERRIDE;
+ virtual bool CrackVirtualPath(const base::FilePath& virtual_path,
std::string* mount_name,
FileSystemType* type,
- FilePath* path) const OVERRIDE;
+ base::FilePath* path) const OVERRIDE;
virtual FileSystemURL CrackURL(const GURL& url) const OVERRIDE;
virtual FileSystemURL CreateCrackedFileSystemURL(
const GURL& origin,
FileSystemType type,
- const FilePath& path) const OVERRIDE;
+ const base::FilePath& path) const OVERRIDE;
// Retrieves the remote file system proxy for the registered file system.
// Returns NULL if there is no file system with the given name, or if the file
@@ -102,10 +104,11 @@ class WEBKIT_STORAGE_EXPORT ExternalMountPoints
// part of any registered filesystem).
//
// Returned virtual_path will have normalized path separators.
- bool GetVirtualPath(const FilePath& absolute_path, FilePath* virtual_path);
+ bool GetVirtualPath(const base::FilePath& absolute_path,
+ base::FilePath* virtual_path);
// Returns the virtual root path that looks like /<mount_name>.
- FilePath CreateVirtualRootPath(const std::string& mount_name) const;
+ base::FilePath CreateVirtualRootPath(const std::string& mount_name) const;
private:
friend class base::RefCountedThreadSafe<ExternalMountPoints>;
@@ -116,7 +119,7 @@ class WEBKIT_STORAGE_EXPORT ExternalMountPoints
typedef std::map<std::string, Instance*> NameToInstance;
// Reverse map from registered path to its corresponding mount name.
- typedef std::map<FilePath, std::string> PathToName;
+ typedef std::map<base::FilePath, std::string> PathToName;
// Use |GetSystemInstance| of |CreateRefCounted| to get an instance.
ExternalMountPoints();
@@ -131,7 +134,7 @@ class WEBKIT_STORAGE_EXPORT ExternalMountPoints
//
// |lock_| should be taken before calling this method.
bool ValidateNewMountPoint(const std::string& mount_name,
- const FilePath& path);
+ const base::FilePath& path);
// This lock needs to be obtained when accessing the instance_map_.
mutable base::Lock lock_;
@@ -147,10 +150,10 @@ class WEBKIT_STORAGE_EXPORT ScopedExternalFileSystem {
public:
ScopedExternalFileSystem(const std::string& mount_name,
FileSystemType type,
- const FilePath& path);
+ const base::FilePath& path);
~ScopedExternalFileSystem();
- FilePath GetVirtualRootPath() const;
+ base::FilePath GetVirtualRootPath() const;
private:
const std::string mount_name_;
diff --git a/webkit/fileapi/external_mount_points_unittest.cc b/webkit/fileapi/external_mount_points_unittest.cc
index 4668264..c8edbdd 100644
--- a/webkit/fileapi/external_mount_points_unittest.cc
+++ b/webkit/fileapi/external_mount_points_unittest.cc
@@ -30,12 +30,12 @@ TEST(ExternalMountPointsTest, AddMountPoint) {
// The mount point's name.
const char* const name;
// The mount point's path.
- const FilePath::CharType* const path;
+ const base::FilePath::CharType* const path;
// Whether the mount point registration should succeed.
bool success;
// Path returned by GetRegisteredPath. NULL if the method is expected to
// fail.
- const FilePath::CharType* const registered_path;
+ const base::FilePath::CharType* const registered_path;
};
const TestCase kTestCases[] = {
@@ -111,20 +111,20 @@ TEST(ExternalMountPointsTest, AddMountPoint) {
mount_points->RegisterFileSystem(
kTestCases[i].name,
fileapi::kFileSystemTypeNativeLocal,
- FilePath(kTestCases[i].path)))
+ base::FilePath(kTestCases[i].path)))
<< "Adding mount point: " << kTestCases[i].name << " with path "
<< kTestCases[i].path;
}
// Test that final mount point presence state is as expected.
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); ++i) {
- FilePath found_path;
+ base::FilePath found_path;
EXPECT_EQ(kTestCases[i].registered_path != NULL,
mount_points->GetRegisteredPath(kTestCases[i].name, &found_path))
<< "Test case: " << i;
if (kTestCases[i].registered_path) {
- FilePath expected_path(kTestCases[i].registered_path);
+ base::FilePath expected_path(kTestCases[i].registered_path);
EXPECT_EQ(expected_path.NormalizePathSeparators(), found_path);
}
}
@@ -136,30 +136,30 @@ TEST(ExternalMountPointsTest, GetVirtualPath) {
mount_points->RegisterFileSystem("c",
fileapi::kFileSystemTypeNativeLocal,
- FilePath(DRIVE FPL("/a/b/c")));
+ base::FilePath(DRIVE FPL("/a/b/c")));
// Note that "/a/b/c" < "/a/b/c(1)" < "/a/b/c/".
mount_points->RegisterFileSystem("c(1)",
fileapi::kFileSystemTypeNativeLocal,
- FilePath(DRIVE FPL("/a/b/c(1)")));
+ base::FilePath(DRIVE FPL("/a/b/c(1)")));
mount_points->RegisterFileSystem("x",
fileapi::kFileSystemTypeNativeLocal,
- FilePath(DRIVE FPL("/z/y/x")));
+ base::FilePath(DRIVE FPL("/z/y/x")));
mount_points->RegisterFileSystem("o",
fileapi::kFileSystemTypeNativeLocal,
- FilePath(DRIVE FPL("/m/n/o")));
+ base::FilePath(DRIVE FPL("/m/n/o")));
// A mount point whose name does not match its path base name.
mount_points->RegisterFileSystem("mount",
fileapi::kFileSystemTypeNativeLocal,
- FilePath(DRIVE FPL("/root/foo")));
+ base::FilePath(DRIVE FPL("/root/foo")));
// A mount point with an empty path.
mount_points->RegisterFileSystem("empty_path",
fileapi::kFileSystemTypeNativeLocal,
- FilePath(FPL("")));
+ base::FilePath(FPL("")));
struct TestCase {
- const FilePath::CharType* const local_path;
+ const base::FilePath::CharType* const local_path;
bool success;
- const FilePath::CharType* const virtual_path;
+ const base::FilePath::CharType* const virtual_path;
};
const TestCase kTestCases[] = {
@@ -209,8 +209,8 @@ TEST(ExternalMountPointsTest, GetVirtualPath) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); ++i) {
// Initialize virtual path with a value.
- FilePath virtual_path(DRIVE FPL("/mount"));
- FilePath local_path(kTestCases[i].local_path);
+ base::FilePath virtual_path(DRIVE FPL("/mount"));
+ base::FilePath local_path(kTestCases[i].local_path);
EXPECT_EQ(kTestCases[i].success,
mount_points->GetVirtualPath(local_path, &virtual_path))
<< "Resolving " << kTestCases[i].local_path;
@@ -220,7 +220,7 @@ TEST(ExternalMountPointsTest, GetVirtualPath) {
if (!kTestCases[i].success)
continue;
- FilePath expected_virtual_path(kTestCases[i].virtual_path);
+ base::FilePath expected_virtual_path(kTestCases[i].virtual_path);
EXPECT_EQ(expected_virtual_path.NormalizePathSeparators(), virtual_path)
<< "Resolving " << kTestCases[i].local_path;
}
@@ -231,7 +231,7 @@ TEST(ExternalMountPointsTest, HandlesFileSystemMountType) {
fileapi::ExternalMountPoints::CreateRefCounted());
const GURL test_origin("http://chromium.org");
- const FilePath test_path(FPL("/mount"));
+ const base::FilePath test_path(FPL("/mount"));
// Should handle External File System.
EXPECT_TRUE(mount_points->HandlesFileSystemMountType(
@@ -265,16 +265,16 @@ TEST(ExternalMountPointsTest, CreateCrackedFileSystemURL) {
mount_points->RegisterFileSystem("c",
fileapi::kFileSystemTypeNativeLocal,
- FilePath(DRIVE FPL("/a/b/c")));
+ base::FilePath(DRIVE FPL("/a/b/c")));
mount_points->RegisterFileSystem("c(1)",
fileapi::kFileSystemTypeDrive,
- FilePath(DRIVE FPL("/a/b/c(1)")));
+ base::FilePath(DRIVE FPL("/a/b/c(1)")));
mount_points->RegisterFileSystem("empty_path",
fileapi::kFileSystemTypeSyncable,
- FilePath(FPL("")));
+ base::FilePath(FPL("")));
mount_points->RegisterFileSystem("mount",
fileapi::kFileSystemTypeDrive,
- FilePath(DRIVE FPL("/root")));
+ base::FilePath(DRIVE FPL("/root")));
// Try cracking invalid GURL.
FileSystemURL invalid = mount_points->CrackURL(GURL("http://chromium.og"));
@@ -282,19 +282,19 @@ TEST(ExternalMountPointsTest, CreateCrackedFileSystemURL) {
// Try cracking isolated path.
FileSystemURL isolated = mount_points->CreateCrackedFileSystemURL(
- kTestOrigin, fileapi::kFileSystemTypeIsolated, FilePath(FPL("c")));
+ kTestOrigin, fileapi::kFileSystemTypeIsolated, base::FilePath(FPL("c")));
EXPECT_FALSE(isolated.is_valid());
// Try native local which is not cracked.
FileSystemURL native_local = mount_points->CreateCrackedFileSystemURL(
- kTestOrigin, fileapi::kFileSystemTypeNativeLocal, FilePath(FPL("c")));
+ kTestOrigin, fileapi::kFileSystemTypeNativeLocal, base::FilePath(FPL("c")));
EXPECT_FALSE(native_local.is_valid());
struct TestCase {
- const FilePath::CharType* const path;
+ const base::FilePath::CharType* const path;
bool expect_valid;
fileapi::FileSystemType expect_type;
- const FilePath::CharType* const expect_path;
+ const base::FilePath::CharType* const expect_path;
const char* const expect_fs_id;
};
@@ -343,7 +343,7 @@ TEST(ExternalMountPointsTest, CreateCrackedFileSystemURL) {
FileSystemURL cracked = mount_points->CreateCrackedFileSystemURL(
kTestOrigin,
fileapi::kFileSystemTypeExternal,
- FilePath(kTestCases[i].path));
+ base::FilePath(kTestCases[i].path));
EXPECT_EQ(kTestCases[i].expect_valid, cracked.is_valid())
<< "Test case index: " << i;
@@ -355,10 +355,10 @@ TEST(ExternalMountPointsTest, CreateCrackedFileSystemURL) {
<< "Test case index: " << i;
EXPECT_EQ(kTestCases[i].expect_type, cracked.type())
<< "Test case index: " << i;
- EXPECT_EQ(FilePath(kTestCases[i].expect_path).NormalizePathSeparators(),
+ EXPECT_EQ(base::FilePath(kTestCases[i].expect_path).NormalizePathSeparators(),
cracked.path())
<< "Test case index: " << i;
- EXPECT_EQ(FilePath(kTestCases[i].path).NormalizePathSeparators(),
+ EXPECT_EQ(base::FilePath(kTestCases[i].path).NormalizePathSeparators(),
cracked.virtual_path())
<< "Test case index: " << i;
EXPECT_EQ(kTestCases[i].expect_fs_id, cracked.filesystem_id())
@@ -376,22 +376,22 @@ TEST(ExternalMountPointsTest, CrackVirtualPath) {
mount_points->RegisterFileSystem("c",
fileapi::kFileSystemTypeNativeLocal,
- FilePath(DRIVE FPL("/a/b/c")));
+ base::FilePath(DRIVE FPL("/a/b/c")));
mount_points->RegisterFileSystem("c(1)",
fileapi::kFileSystemTypeDrive,
- FilePath(DRIVE FPL("/a/b/c(1)")));
+ base::FilePath(DRIVE FPL("/a/b/c(1)")));
mount_points->RegisterFileSystem("empty_path",
fileapi::kFileSystemTypeSyncable,
- FilePath(FPL("")));
+ base::FilePath(FPL("")));
mount_points->RegisterFileSystem("mount",
fileapi::kFileSystemTypeDrive,
- FilePath(DRIVE FPL("/root")));
+ base::FilePath(DRIVE FPL("/root")));
struct TestCase {
- const FilePath::CharType* const path;
+ const base::FilePath::CharType* const path;
bool expect_valid;
fileapi::FileSystemType expect_type;
- const FilePath::CharType* const expect_path;
+ const base::FilePath::CharType* const expect_path;
const char* const expect_name;
};
@@ -439,9 +439,9 @@ TEST(ExternalMountPointsTest, CrackVirtualPath) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); ++i) {
std::string cracked_name;
fileapi::FileSystemType cracked_type;
- FilePath cracked_path;
+ base::FilePath cracked_path;
EXPECT_EQ(kTestCases[i].expect_valid,
- mount_points->CrackVirtualPath(FilePath(kTestCases[i].path),
+ mount_points->CrackVirtualPath(base::FilePath(kTestCases[i].path),
&cracked_name, &cracked_type, &cracked_path))
<< "Test case index: " << i;
@@ -450,7 +450,7 @@ TEST(ExternalMountPointsTest, CrackVirtualPath) {
EXPECT_EQ(kTestCases[i].expect_type, cracked_type)
<< "Test case index: " << i;
- EXPECT_EQ(FilePath(kTestCases[i].expect_path).NormalizePathSeparators(),
+ EXPECT_EQ(base::FilePath(kTestCases[i].expect_path).NormalizePathSeparators(),
cracked_path)
<< "Test case index: " << i;
EXPECT_EQ(kTestCases[i].expect_name, cracked_name)
diff --git a/webkit/fileapi/file_system_callback_dispatcher.h b/webkit/fileapi/file_system_callback_dispatcher.h
index af0a757..990e633 100644
--- a/webkit/fileapi/file_system_callback_dispatcher.h
+++ b/webkit/fileapi/file_system_callback_dispatcher.h
@@ -30,7 +30,7 @@ class WEBKIT_STORAGE_EXPORT FileSystemCallbackDispatcher {
// Callback to report information for a file.
virtual void DidReadMetadata(
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path) = 0;
+ const base::FilePath& platform_path) = 0;
// Callback to report the contents of a directory. If the contents of
// the given directory are reported in one batch, then |entries| will have
diff --git a/webkit/fileapi/file_system_context.cc b/webkit/fileapi/file_system_context.cc
index 67cbc6d..ab8c929 100644
--- a/webkit/fileapi/file_system_context.cc
+++ b/webkit/fileapi/file_system_context.cc
@@ -58,7 +58,7 @@ FileSystemContext::FileSystemContext(
ExternalMountPoints* external_mount_points,
quota::SpecialStoragePolicy* special_storage_policy,
quota::QuotaManagerProxy* quota_manager_proxy,
- const FilePath& partition_path,
+ const base::FilePath& partition_path,
const FileSystemOptions& options)
: task_runners_(task_runners.Pass()),
quota_manager_proxy_(quota_manager_proxy),
@@ -322,7 +322,7 @@ FileSystemURL FileSystemContext::CrackURL(const GURL& url) const {
FileSystemURL FileSystemContext::CreateCrackedFileSystemURL(
const GURL& origin,
FileSystemType type,
- const FilePath& path) const {
+ const base::FilePath& path) const {
return CrackFileSystemURL(FileSystemURL(origin, type, path));
}
diff --git a/webkit/fileapi/file_system_context.h b/webkit/fileapi/file_system_context.h
index c5db158..ec9fc6e 100644
--- a/webkit/fileapi/file_system_context.h
+++ b/webkit/fileapi/file_system_context.h
@@ -19,7 +19,9 @@
#include "webkit/fileapi/task_runner_bound_observer_list.h"
#include "webkit/storage/webkit_storage_export.h"
+namespace base {
class FilePath;
+}
namespace quota {
class QuotaManagerProxy;
@@ -75,7 +77,7 @@ class WEBKIT_STORAGE_EXPORT FileSystemContext
ExternalMountPoints* external_mount_points,
quota::SpecialStoragePolicy* special_storage_policy,
quota::QuotaManagerProxy* quota_manager_proxy,
- const FilePath& partition_path,
+ const base::FilePath& partition_path,
const FileSystemOptions& options);
bool DeleteDataForOriginOnFileThread(const GURL& origin_url);
@@ -186,7 +188,7 @@ class WEBKIT_STORAGE_EXPORT FileSystemContext
LocalFileSyncContext* sync_context() { return sync_context_.get(); }
void set_sync_context(LocalFileSyncContext* sync_context);
- const FilePath& partition_path() const { return partition_path_; }
+ const base::FilePath& partition_path() const { return partition_path_; }
// Same as |CrackFileSystemURL|, but cracks FileSystemURL created from |url|.
FileSystemURL CrackURL(const GURL& url) const;
@@ -194,7 +196,7 @@ class WEBKIT_STORAGE_EXPORT FileSystemContext
// arguments.
FileSystemURL CreateCrackedFileSystemURL(const GURL& origin,
FileSystemType type,
- const FilePath& path) const;
+ const base::FilePath& path) const;
private:
// Friended for GetFileUtil.
@@ -257,7 +259,7 @@ class WEBKIT_STORAGE_EXPORT FileSystemContext
std::vector<MountPoints*> url_crackers_;
// The base path of the storage partition for this context.
- const FilePath partition_path_;
+ const base::FilePath partition_path_;
// For syncable file systems.
scoped_ptr<LocalFileChangeTracker> change_tracker_;
diff --git a/webkit/fileapi/file_system_context_unittest.cc b/webkit/fileapi/file_system_context_unittest.cc
index 5155636..0c13501 100644
--- a/webkit/fileapi/file_system_context_unittest.cc
+++ b/webkit/fileapi/file_system_context_unittest.cc
@@ -28,7 +28,7 @@ namespace fileapi {
namespace {
const char kTestOrigin[] = "http://chromium.org/";
-const FilePath::CharType kVirtualPathNoRoot[] = FPL("root/file");
+const base::FilePath::CharType kVirtualPathNoRoot[] = FPL("root/file");
GURL CreateRawFileSystemURL(const std::string& type_str,
const std::string& fs_id) {
@@ -73,8 +73,8 @@ class FileSystemContextTest : public testing::Test {
const GURL& expect_origin,
FileSystemType expect_mount_type,
FileSystemType expect_type,
- const FilePath& expect_path,
- const FilePath& expect_virtual_path,
+ const base::FilePath& expect_path,
+ const base::FilePath& expect_virtual_path,
const std::string& expect_filesystem_id) {
EXPECT_TRUE(url.is_valid());
@@ -105,13 +105,13 @@ TEST_F(FileSystemContextTest, NullExternalMountPoints) {
std::string isolated_id =
IsolatedContext::GetInstance()->RegisterFileSystemForPath(
kFileSystemTypeNativeLocal,
- FilePath(DRIVE FPL("/test/isolated/root")),
+ base::FilePath(DRIVE FPL("/test/isolated/root")),
&isolated_name);
// Register system external mount point.
ASSERT_TRUE(ExternalMountPoints::GetSystemInstance()->RegisterFileSystem(
"system",
kFileSystemTypeNativeLocal,
- FilePath(DRIVE FPL("/test/sys/"))));
+ base::FilePath(DRIVE FPL("/test/sys/"))));
FileSystemURL cracked_isolated = file_system_context->CrackURL(
CreateRawFileSystemURL("isolated", isolated_id));
@@ -121,8 +121,8 @@ TEST_F(FileSystemContextTest, NullExternalMountPoints) {
GURL(kTestOrigin),
kFileSystemTypeIsolated,
kFileSystemTypeNativeLocal,
- FilePath(DRIVE FPL("/test/isolated/root/file")).NormalizePathSeparators(),
- FilePath::FromUTF8Unsafe(isolated_id).Append(FPL("root/file")).
+ base::FilePath(DRIVE FPL("/test/isolated/root/file")).NormalizePathSeparators(),
+ base::FilePath::FromUTF8Unsafe(isolated_id).Append(FPL("root/file")).
NormalizePathSeparators(),
isolated_id);
@@ -134,8 +134,8 @@ TEST_F(FileSystemContextTest, NullExternalMountPoints) {
GURL(kTestOrigin),
kFileSystemTypeExternal,
kFileSystemTypeNativeLocal,
- FilePath(DRIVE FPL("/test/sys/root/file")).NormalizePathSeparators(),
- FilePath(FPL("system/root/file")).NormalizePathSeparators(),
+ base::FilePath(DRIVE FPL("/test/sys/root/file")).NormalizePathSeparators(),
+ base::FilePath(FPL("system/root/file")).NormalizePathSeparators(),
"system");
@@ -152,7 +152,7 @@ TEST_F(FileSystemContextTest, FileSystemContextKeepsMountPointsAlive) {
ASSERT_TRUE(mount_points->RegisterFileSystem(
"system",
kFileSystemTypeNativeLocal,
- FilePath(DRIVE FPL("/test/sys/"))));
+ base::FilePath(DRIVE FPL("/test/sys/"))));
scoped_refptr<FileSystemContext> file_system_context(
CreateFileSystemContextForTest(mount_points.get()));
@@ -170,8 +170,8 @@ TEST_F(FileSystemContextTest, FileSystemContextKeepsMountPointsAlive) {
GURL(kTestOrigin),
kFileSystemTypeExternal,
kFileSystemTypeNativeLocal,
- FilePath(DRIVE FPL("/test/sys/root/file")).NormalizePathSeparators(),
- FilePath(FPL("system/root/file")).NormalizePathSeparators(),
+ base::FilePath(DRIVE FPL("/test/sys/root/file")).NormalizePathSeparators(),
+ base::FilePath(FPL("system/root/file")).NormalizePathSeparators(),
"system");
// No need to revoke the registered filesystem since |mount_points| lifetime
@@ -189,32 +189,32 @@ TEST_F(FileSystemContextTest, CrackFileSystemURL) {
const std::string kIsolatedFileSystemID =
IsolatedContext::GetInstance()->RegisterFileSystemForPath(
kFileSystemTypeNativeLocal,
- FilePath(DRIVE FPL("/test/isolated/root")),
+ base::FilePath(DRIVE FPL("/test/isolated/root")),
&isolated_file_system_name);
// Register system external mount point.
ASSERT_TRUE(ExternalMountPoints::GetSystemInstance()->RegisterFileSystem(
"system",
kFileSystemTypeDrive,
- FilePath(DRIVE FPL("/test/sys/"))));
+ base::FilePath(DRIVE FPL("/test/sys/"))));
ASSERT_TRUE(ExternalMountPoints::GetSystemInstance()->RegisterFileSystem(
"ext",
kFileSystemTypeNativeLocal,
- FilePath(DRIVE FPL("/test/ext"))));
+ base::FilePath(DRIVE FPL("/test/ext"))));
// Register a system external mount point with the same name/id as the
// registered isolated mount point.
ASSERT_TRUE(ExternalMountPoints::GetSystemInstance()->RegisterFileSystem(
kIsolatedFileSystemID,
kFileSystemTypeRestrictedNativeLocal,
- FilePath(DRIVE FPL("/test/system/isolated"))));
+ base::FilePath(DRIVE FPL("/test/system/isolated"))));
// Add a mount points with the same name as a system mount point to
// FileSystemContext's external mount points.
ASSERT_TRUE(external_mount_points->RegisterFileSystem(
"ext",
kFileSystemTypeNativeLocal,
- FilePath(DRIVE FPL("/test/local/ext/"))));
+ base::FilePath(DRIVE FPL("/test/local/ext/"))));
const GURL kTestOrigin = GURL("http://chromium.org/");
- const FilePath kVirtualPathNoRoot = FilePath(FPL("root/file"));
+ const base::FilePath kVirtualPathNoRoot = base::FilePath(FPL("root/file"));
struct TestCase {
// Test case values.
@@ -225,7 +225,7 @@ TEST_F(FileSystemContextTest, CrackFileSystemURL) {
bool expect_is_valid;
FileSystemType expect_mount_type;
FileSystemType expect_type;
- const FilePath::CharType* expect_path;
+ const base::FilePath::CharType* expect_path;
bool expect_virtual_path_empty;
std::string expect_filesystem_id;
};
@@ -290,8 +290,8 @@ TEST_F(FileSystemContextTest, CrackFileSystemURL) {
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); ++i) {
- const FilePath virtual_path =
- FilePath::FromUTF8Unsafe(kTestCases[i].root).Append(kVirtualPathNoRoot);
+ const base::FilePath virtual_path =
+ base::FilePath::FromUTF8Unsafe(kTestCases[i].root).Append(kVirtualPathNoRoot);
GURL raw_url =
CreateRawFileSystemURL(kTestCases[i].type_str, kTestCases[i].root);
@@ -309,14 +309,14 @@ TEST_F(FileSystemContextTest, CrackFileSystemURL) {
GURL(kTestOrigin),
kTestCases[i].expect_mount_type,
kTestCases[i].expect_type,
- FilePath(kTestCases[i].expect_path).NormalizePathSeparators(),
+ base::FilePath(kTestCases[i].expect_path).NormalizePathSeparators(),
kTestCases[i].expect_virtual_path_empty ?
- FilePath() : virtual_path.NormalizePathSeparators(),
+ base::FilePath() : virtual_path.NormalizePathSeparators(),
kTestCases[i].expect_filesystem_id);
}
IsolatedContext::GetInstance()->RevokeFileSystemByPath(
- FilePath(DRIVE FPL("/test/isolated/root")));
+ base::FilePath(DRIVE FPL("/test/isolated/root")));
ExternalMountPoints::GetSystemInstance()->RevokeFileSystem("system");
ExternalMountPoints::GetSystemInstance()->RevokeFileSystem("ext");
ExternalMountPoints::GetSystemInstance()->RevokeFileSystem(
diff --git a/webkit/fileapi/file_system_database_test_helper.cc b/webkit/fileapi/file_system_database_test_helper.cc
index 838173a..da1a5e1 100644
--- a/webkit/fileapi/file_system_database_test_helper.cc
+++ b/webkit/fileapi/file_system_database_test_helper.cc
@@ -15,15 +15,15 @@
namespace fileapi {
-void CorruptDatabase(const FilePath& db_path,
+void CorruptDatabase(const base::FilePath& db_path,
leveldb::FileType type,
ptrdiff_t offset,
size_t size) {
file_util::FileEnumerator file_enum(db_path, false /* not recursive */,
file_util::FileEnumerator::DIRECTORIES |
file_util::FileEnumerator::FILES);
- FilePath file_path;
- FilePath picked_file_path;
+ base::FilePath file_path;
+ base::FilePath picked_file_path;
uint64 picked_file_number = kuint64max;
while (!(file_path = file_enum.Next()).empty()) {
diff --git a/webkit/fileapi/file_system_database_test_helper.h b/webkit/fileapi/file_system_database_test_helper.h
index 87e35e0..67689c1 100644
--- a/webkit/fileapi/file_system_database_test_helper.h
+++ b/webkit/fileapi/file_system_database_test_helper.h
@@ -9,11 +9,13 @@
#include "third_party/leveldatabase/src/db/filename.h"
+namespace base {
class FilePath;
+}
namespace fileapi {
-void CorruptDatabase(const FilePath& db_path,
+void CorruptDatabase(const base::FilePath& db_path,
leveldb::FileType type,
ptrdiff_t offset,
size_t size);
diff --git a/webkit/fileapi/file_system_dir_url_request_job.cc b/webkit/fileapi/file_system_dir_url_request_job.cc
index e1031df..5943bcd 100644
--- a/webkit/fileapi/file_system_dir_url_request_job.cc
+++ b/webkit/fileapi/file_system_dir_url_request_job.cc
@@ -108,9 +108,9 @@ void FileSystemDirURLRequestJob::DidReadDirectory(
return;
if (data_.empty()) {
- FilePath relative_path = url_.path();
+ base::FilePath relative_path = url_.path();
#if defined(OS_POSIX)
- relative_path = FilePath(FILE_PATH_LITERAL("/") + relative_path.value());
+ relative_path = base::FilePath(FILE_PATH_LITERAL("/") + relative_path.value());
#endif
const string16& title = relative_path.LossyDisplayName();
data_.append(net::GetDirectoryListingHeader(title));
@@ -118,7 +118,7 @@ void FileSystemDirURLRequestJob::DidReadDirectory(
typedef std::vector<base::FileUtilProxy::Entry>::const_iterator EntryIterator;
for (EntryIterator it = entries.begin(); it != entries.end(); ++it) {
- const string16& name = FilePath(it->name).LossyDisplayName();
+ const string16& name = base::FilePath(it->name).LossyDisplayName();
data_.append(net::GetDirectoryListingEntry(
name, std::string(), it->is_directory, it->size,
it->last_modified_time));
diff --git a/webkit/fileapi/file_system_dir_url_request_job_unittest.cc b/webkit/fileapi/file_system_dir_url_request_job_unittest.cc
index 0af56c4..b825c61 100644
--- a/webkit/fileapi/file_system_dir_url_request_job_unittest.cc
+++ b/webkit/fileapi/file_system_dir_url_request_job_unittest.cc
@@ -106,7 +106,7 @@ class FileSystemDirURLRequestJobTest : public testing::Test {
TestRequestHelper(url, false);
}
- FileSystemURL CreateURL(const FilePath& file_path) {
+ FileSystemURL CreateURL(const base::FilePath& file_path) {
return file_system_context_->CreateCrackedFileSystemURL(
GURL("http://remote"),
fileapi::kFileSystemTypeTemporary,
@@ -121,7 +121,7 @@ class FileSystemDirURLRequestJobTest : public testing::Test {
}
void CreateDirectory(const base::StringPiece& dir_name) {
- FilePath path = FilePath().AppendASCII(dir_name);
+ base::FilePath path = base::FilePath().AppendASCII(dir_name);
scoped_ptr<FileSystemOperationContext> context(NewOperationContext());
ASSERT_EQ(base::PLATFORM_FILE_OK, file_util()->CreateDirectory(
context.get(),
@@ -131,22 +131,22 @@ class FileSystemDirURLRequestJobTest : public testing::Test {
}
void EnsureFileExists(const base::StringPiece file_name) {
- FilePath path = FilePath().AppendASCII(file_name);
+ base::FilePath path = base::FilePath().AppendASCII(file_name);
scoped_ptr<FileSystemOperationContext> context(NewOperationContext());
ASSERT_EQ(base::PLATFORM_FILE_OK, file_util()->EnsureFileExists(
context.get(), CreateURL(path), NULL));
}
void TruncateFile(const base::StringPiece file_name, int64 length) {
- FilePath path = FilePath().AppendASCII(file_name);
+ base::FilePath path = base::FilePath().AppendASCII(file_name);
scoped_ptr<FileSystemOperationContext> context(NewOperationContext());
ASSERT_EQ(base::PLATFORM_FILE_OK, file_util()->Truncate(
context.get(), CreateURL(path), length));
}
- base::PlatformFileError GetFileInfo(const FilePath& path,
+ base::PlatformFileError GetFileInfo(const base::FilePath& path,
base::PlatformFileInfo* file_info,
- FilePath* platform_file_path) {
+ base::FilePath* platform_file_path) {
scoped_ptr<FileSystemOperationContext> context(NewOperationContext());
return file_util()->GetFileInfo(context.get(),
CreateURL(path),
diff --git a/webkit/fileapi/file_system_directory_database.cc b/webkit/fileapi/file_system_directory_database.cc
index 6dea063..900ef57 100644
--- a/webkit/fileapi/file_system_directory_database.cc
+++ b/webkit/fileapi/file_system_directory_database.cc
@@ -33,7 +33,7 @@ bool PickleFromFileInfo(
std::string name;
data_path = fileapi::FilePathToString(info.data_path);
- name = fileapi::FilePathToString(FilePath(info.name));
+ name = fileapi::FilePathToString(base::FilePath(info.name));
if (pickle->WriteInt64(info.parent_id) &&
pickle->WriteString(data_path) &&
@@ -66,7 +66,7 @@ bool FileInfoFromPickle(
return false;
}
-const FilePath::CharType kDirectoryDatabaseName[] = FILE_PATH_LITERAL("Paths");
+const base::FilePath::CharType kDirectoryDatabaseName[] = FILE_PATH_LITERAL("Paths");
const char kChildLookupPrefix[] = "CHILD_OF:";
const char kChildLookupSeparator[] = ":";
const char kLastFileIdKey[] = "LAST_FILE_ID";
@@ -84,9 +84,9 @@ enum InitStatus {
std::string GetChildLookupKey(
fileapi::FileSystemDirectoryDatabase::FileId parent_id,
- const FilePath::StringType& child_name) {
+ const base::FilePath::StringType& child_name) {
std::string name;
- name = fileapi::FilePathToString(FilePath(child_name));
+ name = fileapi::FilePathToString(base::FilePath(child_name));
return std::string(kChildLookupPrefix) + base::Int64ToString(parent_id) +
std::string(kChildLookupSeparator) + name;
}
@@ -129,7 +129,7 @@ class DatabaseCheckHelper {
DatabaseCheckHelper(fileapi::FileSystemDirectoryDatabase* dir_db,
leveldb::DB* db,
- const FilePath& path);
+ const base::FilePath& path);
bool IsFileSystemConsistent() {
return IsDatabaseEmpty() ||
@@ -147,9 +147,9 @@ class DatabaseCheckHelper {
fileapi::FileSystemDirectoryDatabase* dir_db_;
leveldb::DB* db_;
- FilePath path_;
+ base::FilePath path_;
- std::set<FilePath> files_in_db_;
+ std::set<base::FilePath> files_in_db_;
size_t num_directories_in_db_;
size_t num_files_in_db_;
@@ -162,7 +162,7 @@ class DatabaseCheckHelper {
DatabaseCheckHelper::DatabaseCheckHelper(
fileapi::FileSystemDirectoryDatabase* dir_db,
leveldb::DB* db,
- const FilePath& path)
+ const base::FilePath& path)
: dir_db_(dir_db), db_(db), path_(path),
num_directories_in_db_(0),
num_files_in_db_(0),
@@ -260,17 +260,17 @@ bool DatabaseCheckHelper::ScanDatabase() {
bool DatabaseCheckHelper::ScanDirectory() {
// TODO(kinuko): Scans all local file system entries to verify each of them
// has a database entry.
- const FilePath kExcludes[] = {
- FilePath(kDirectoryDatabaseName),
- FilePath(fileapi::FileSystemUsageCache::kUsageFileName),
+ const base::FilePath kExcludes[] = {
+ base::FilePath(kDirectoryDatabaseName),
+ base::FilePath(fileapi::FileSystemUsageCache::kUsageFileName),
};
// Any path in |pending_directories| is relative to |path_|.
- std::stack<FilePath> pending_directories;
- pending_directories.push(FilePath());
+ std::stack<base::FilePath> pending_directories;
+ pending_directories.push(base::FilePath());
while (!pending_directories.empty()) {
- FilePath dir_path = pending_directories.top();
+ base::FilePath dir_path = pending_directories.top();
pending_directories.pop();
file_util::FileEnumerator file_enum(
@@ -279,12 +279,12 @@ bool DatabaseCheckHelper::ScanDirectory() {
file_util::FileEnumerator::DIRECTORIES |
file_util::FileEnumerator::FILES);
- FilePath absolute_file_path;
+ base::FilePath absolute_file_path;
while (!(absolute_file_path = file_enum.Next()).empty()) {
file_util::FileEnumerator::FindInfo find_info;
file_enum.GetFindInfo(&find_info);
- FilePath relative_file_path;
+ base::FilePath relative_file_path;
if (!path_.AppendRelativePath(absolute_file_path, &relative_file_path))
return false;
@@ -298,7 +298,7 @@ bool DatabaseCheckHelper::ScanDirectory() {
}
// Check if the file has a database entry.
- std::set<FilePath>::iterator itr = files_in_db_.find(relative_file_path);
+ std::set<base::FilePath>::iterator itr = files_in_db_.find(relative_file_path);
if (itr == files_in_db_.end()) {
if (!file_util::Delete(absolute_file_path, false))
return false;
@@ -373,15 +373,15 @@ bool DatabaseCheckHelper::ScanHierarchy() {
// and does not refer to special system files.
// This is called in GetFileInfo, AddFileInfo and UpdateFileInfo to
// ensure we're only dealing with valid data paths.
-bool VerifyDataPath(const FilePath& data_path) {
+bool VerifyDataPath(const base::FilePath& data_path) {
// |data_path| should not contain any ".." and should be a relative path
// (to the filesystem_data_directory_).
if (data_path.ReferencesParent() || data_path.IsAbsolute())
return false;
// See if it's not pointing to the special system paths.
- const FilePath kExcludes[] = {
- FilePath(kDirectoryDatabaseName),
- FilePath(fileapi::FileSystemUsageCache::kUsageFileName),
+ const base::FilePath kExcludes[] = {
+ base::FilePath(kDirectoryDatabaseName),
+ base::FilePath(fileapi::FileSystemUsageCache::kUsageFileName),
};
for (size_t i = 0; i < arraysize(kExcludes); ++i) {
if (data_path == kExcludes[i] || kExcludes[i].IsParent(data_path))
@@ -401,7 +401,7 @@ FileSystemDirectoryDatabase::FileInfo::~FileInfo() {
}
FileSystemDirectoryDatabase::FileSystemDirectoryDatabase(
- const FilePath& filesystem_data_directory)
+ const base::FilePath& filesystem_data_directory)
: filesystem_data_directory_(filesystem_data_directory) {
}
@@ -409,7 +409,7 @@ FileSystemDirectoryDatabase::~FileSystemDirectoryDatabase() {
}
bool FileSystemDirectoryDatabase::GetChildWithName(
- FileId parent_id, const FilePath::StringType& name, FileId* child_id) {
+ FileId parent_id, const base::FilePath::StringType& name, FileId* child_id) {
if (!Init(REPAIR_ON_CORRUPTION))
return false;
DCHECK(child_id);
@@ -431,13 +431,13 @@ bool FileSystemDirectoryDatabase::GetChildWithName(
}
bool FileSystemDirectoryDatabase::GetFileWithPath(
- const FilePath& path, FileId* file_id) {
- std::vector<FilePath::StringType> components;
+ const base::FilePath& path, FileId* file_id) {
+ std::vector<base::FilePath::StringType> components;
VirtualPath::GetComponents(path, &components);
FileId local_id = 0;
- std::vector<FilePath::StringType>::iterator iter;
+ std::vector<base::FilePath::StringType>::iterator iter;
for (iter = components.begin(); iter != components.end(); ++iter) {
- FilePath::StringType name;
+ base::FilePath::StringType name;
name = *iter;
if (name == FILE_PATH_LITERAL("/"))
continue;
@@ -497,8 +497,8 @@ bool FileSystemDirectoryDatabase::GetFileInfo(FileId file_id, FileInfo* info) {
// Without this, a query for the root's file info, made before creating the
// first file in the database, will fail and confuse callers.
if (status.IsNotFound() && !file_id) {
- info->name = FilePath::StringType();
- info->data_path = FilePath();
+ info->name = base::FilePath::StringType();
+ info->data_path = base::FilePath();
info->modification_time = base::Time::Now();
info->parent_id = 0;
return true;
@@ -686,7 +686,7 @@ bool FileSystemDirectoryDatabase::GetNextInteger(int64* next) {
}
// static
-bool FileSystemDirectoryDatabase::DestroyDatabase(const FilePath& path) {
+bool FileSystemDirectoryDatabase::DestroyDatabase(const base::FilePath& path) {
std::string name = FilePathToString(path.Append(kDirectoryDatabaseName));
leveldb::Status status = leveldb::DestroyDB(name, leveldb::Options());
if (status.ok())
diff --git a/webkit/fileapi/file_system_directory_database.h b/webkit/fileapi/file_system_directory_database.h
index c411f49..5ab9ec1 100644
--- a/webkit/fileapi/file_system_directory_database.h
+++ b/webkit/fileapi/file_system_directory_database.h
@@ -47,8 +47,8 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE FileSystemDirectoryDatabase {
}
FileId parent_id;
- FilePath data_path;
- FilePath::StringType name;
+ base::FilePath data_path;
+ base::FilePath::StringType name;
// This modification time is valid only for directories, not files, as
// FileWriter will get the files out of sync.
// For files, look at the modification time of the underlying data_path.
@@ -56,12 +56,12 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE FileSystemDirectoryDatabase {
};
explicit FileSystemDirectoryDatabase(
- const FilePath& filesystem_data_directory);
+ const base::FilePath& filesystem_data_directory);
~FileSystemDirectoryDatabase();
bool GetChildWithName(
- FileId parent_id, const FilePath::StringType& name, FileId* child_id);
- bool GetFileWithPath(const FilePath& path, FileId* file_id);
+ FileId parent_id, const base::FilePath::StringType& name, FileId* child_id);
+ bool GetFileWithPath(const base::FilePath& path, FileId* file_id);
// ListChildren will succeed, returning 0 children, if parent_id doesn't
// exist.
bool ListChildren(FileId parent_id, std::vector<FileId>* children);
@@ -88,7 +88,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE FileSystemDirectoryDatabase {
// Returns true if the database looks consistent with local filesystem.
bool IsFileSystemConsistent();
- static bool DestroyDatabase(const FilePath& path);
+ static bool DestroyDatabase(const base::FilePath& path);
private:
enum RecoveryOption {
@@ -111,7 +111,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE FileSystemDirectoryDatabase {
void HandleError(const tracked_objects::Location& from_here,
const leveldb::Status& status);
- const FilePath filesystem_data_directory_;
+ const base::FilePath filesystem_data_directory_;
scoped_ptr<leveldb::DB> db_;
base::Time last_reported_time_;
DISALLOW_COPY_AND_ASSIGN(FileSystemDirectoryDatabase);
diff --git a/webkit/fileapi/file_system_directory_database_unittest.cc b/webkit/fileapi/file_system_directory_database_unittest.cc
index d5c31ae..3f15e7e 100644
--- a/webkit/fileapi/file_system_directory_database_unittest.cc
+++ b/webkit/fileapi/file_system_directory_database_unittest.cc
@@ -23,7 +23,7 @@
namespace fileapi {
namespace {
-const FilePath::CharType kDirectoryDatabaseName[] = FPL("Paths");
+const base::FilePath::CharType kDirectoryDatabaseName[] = FPL("Paths");
}
class FileSystemDirectoryDatabaseTest : public testing::Test {
@@ -51,7 +51,7 @@ class FileSystemDirectoryDatabaseTest : public testing::Test {
db_.reset();
}
- bool AddFileInfo(FileId parent_id, const FilePath::StringType& name) {
+ bool AddFileInfo(FileId parent_id, const base::FilePath::StringType& name) {
FileId file_id;
FileInfo info;
info.parent_id = parent_id;
@@ -60,7 +60,7 @@ class FileSystemDirectoryDatabaseTest : public testing::Test {
}
void CreateDirectory(FileId parent_id,
- const FilePath::StringType& name,
+ const base::FilePath::StringType& name,
FileId* file_id_out) {
FileInfo info;
info.parent_id = parent_id;
@@ -69,18 +69,18 @@ class FileSystemDirectoryDatabaseTest : public testing::Test {
}
void CreateFile(FileId parent_id,
- const FilePath::StringType& name,
- const FilePath::StringType& data_path,
+ const base::FilePath::StringType& name,
+ const base::FilePath::StringType& data_path,
FileId* file_id_out) {
FileId file_id;
FileInfo info;
info.parent_id = parent_id;
info.name = name;
- info.data_path = FilePath(data_path).NormalizePathSeparators();
+ info.data_path = base::FilePath(data_path).NormalizePathSeparators();
ASSERT_TRUE(db_->AddFileInfo(info, &file_id));
- FilePath local_path = path().Append(data_path);
+ base::FilePath local_path = path().Append(data_path);
if (!file_util::DirectoryExists(local_path.DirName()))
ASSERT_TRUE(file_util::CreateDirectory(local_path.DirName()));
@@ -110,18 +110,18 @@ class FileSystemDirectoryDatabaseTest : public testing::Test {
FilePathToString(path().Append(kDirectoryDatabaseName)));
}
- const FilePath& path() {
+ const base::FilePath& path() {
return base_.path();
}
// Makes link from |parent_id| to |child_id| with |name|.
void MakeHierarchyLink(FileId parent_id,
FileId child_id,
- const FilePath::StringType& name) {
+ const base::FilePath::StringType& name) {
ASSERT_TRUE(db()->db_->Put(
leveldb::WriteOptions(),
"CHILD_OF:" + base::Int64ToString(parent_id) + ":" +
- FilePathToString(FilePath(name)),
+ FilePathToString(base::FilePath(name)),
base::Int64ToString(child_id)).ok());
}
@@ -132,7 +132,7 @@ class FileSystemDirectoryDatabaseTest : public testing::Test {
ASSERT_TRUE(db()->db_->Delete(
leveldb::WriteOptions(),
"CHILD_OF:" + base::Int64ToString(file_info.parent_id) + ":" +
- FilePathToString(FilePath(file_info.name))).ok());
+ FilePathToString(base::FilePath(file_info.name))).ok());
}
protected:
@@ -171,7 +171,7 @@ TEST_F(FileSystemDirectoryDatabaseTest, TestAddNameClash) {
EXPECT_TRUE(db()->AddFileInfo(info, &file_id));
// Check for name clash in the root directory.
- FilePath::StringType name = info.name;
+ base::FilePath::StringType name = info.name;
EXPECT_FALSE(AddFileInfo(0, name));
name = FILE_PATH_LITERAL("dir 1");
EXPECT_TRUE(AddFileInfo(0, name));
@@ -188,9 +188,9 @@ TEST_F(FileSystemDirectoryDatabaseTest, TestAddNameClash) {
TEST_F(FileSystemDirectoryDatabaseTest, TestRenameNoMoveNameClash) {
FileInfo info;
FileId file_id0;
- FilePath::StringType name0 = FILE_PATH_LITERAL("foo");
- FilePath::StringType name1 = FILE_PATH_LITERAL("bar");
- FilePath::StringType name2 = FILE_PATH_LITERAL("bas");
+ base::FilePath::StringType name0 = FILE_PATH_LITERAL("foo");
+ base::FilePath::StringType name1 = FILE_PATH_LITERAL("bar");
+ base::FilePath::StringType name2 = FILE_PATH_LITERAL("bas");
info.parent_id = 0;
info.name = name0;
EXPECT_TRUE(db()->AddFileInfo(info, &file_id0));
@@ -205,8 +205,8 @@ TEST_F(FileSystemDirectoryDatabaseTest, TestMoveSameNameNameClash) {
FileInfo info;
FileId file_id0;
FileId file_id1;
- FilePath::StringType name0 = FILE_PATH_LITERAL("foo");
- FilePath::StringType name1 = FILE_PATH_LITERAL("bar");
+ base::FilePath::StringType name0 = FILE_PATH_LITERAL("foo");
+ base::FilePath::StringType name1 = FILE_PATH_LITERAL("bar");
info.parent_id = 0;
info.name = name0;
EXPECT_TRUE(db()->AddFileInfo(info, &file_id0));
@@ -222,9 +222,9 @@ TEST_F(FileSystemDirectoryDatabaseTest, TestMoveRenameNameClash) {
FileInfo info;
FileId file_id0;
FileId file_id1;
- FilePath::StringType name0 = FILE_PATH_LITERAL("foo");
- FilePath::StringType name1 = FILE_PATH_LITERAL("bar");
- FilePath::StringType name2 = FILE_PATH_LITERAL("bas");
+ base::FilePath::StringType name0 = FILE_PATH_LITERAL("foo");
+ base::FilePath::StringType name1 = FILE_PATH_LITERAL("bar");
+ base::FilePath::StringType name2 = FILE_PATH_LITERAL("bas");
info.parent_id = 0;
info.name = name0;
EXPECT_TRUE(db()->AddFileInfo(info, &file_id0));
@@ -260,8 +260,8 @@ TEST_F(FileSystemDirectoryDatabaseTest, TestGetChildWithName) {
FileInfo info;
FileId file_id0;
FileId file_id1;
- FilePath::StringType name0 = FILE_PATH_LITERAL("foo");
- FilePath::StringType name1 = FILE_PATH_LITERAL("bar");
+ base::FilePath::StringType name0 = FILE_PATH_LITERAL("foo");
+ base::FilePath::StringType name1 = FILE_PATH_LITERAL("bar");
info.parent_id = 0;
info.name = name0;
EXPECT_TRUE(db()->AddFileInfo(info, &file_id0));
@@ -284,9 +284,9 @@ TEST_F(FileSystemDirectoryDatabaseTest, TestGetFileWithPath) {
FileId file_id0;
FileId file_id1;
FileId file_id2;
- FilePath::StringType name0 = FILE_PATH_LITERAL("foo");
- FilePath::StringType name1 = FILE_PATH_LITERAL("bar");
- FilePath::StringType name2 = FILE_PATH_LITERAL("dog");
+ base::FilePath::StringType name0 = FILE_PATH_LITERAL("foo");
+ base::FilePath::StringType name1 = FILE_PATH_LITERAL("bar");
+ base::FilePath::StringType name2 = FILE_PATH_LITERAL("dog");
info.parent_id = 0;
info.name = name0;
@@ -302,7 +302,7 @@ TEST_F(FileSystemDirectoryDatabaseTest, TestGetFileWithPath) {
EXPECT_NE(file_id1, file_id2);
FileId check_file_id;
- FilePath path = FilePath(name0);
+ base::FilePath path = base::FilePath(name0);
EXPECT_TRUE(db()->GetFileWithPath(path, &check_file_id));
EXPECT_EQ(file_id0, check_file_id);
@@ -376,7 +376,7 @@ TEST_F(FileSystemDirectoryDatabaseTest, TestUpdateModificationTime) {
FileId file_id;
info0.parent_id = 0;
info0.name = FILE_PATH_LITERAL("name");
- info0.data_path = FilePath(FILE_PATH_LITERAL("fake path"));
+ info0.data_path = base::FilePath(FILE_PATH_LITERAL("fake path"));
info0.modification_time = base::Time::Now();
EXPECT_TRUE(db()->AddFileInfo(info0, &file_id));
FileInfo info1;
@@ -406,7 +406,7 @@ TEST_F(FileSystemDirectoryDatabaseTest, TestSimpleFileOperations) {
FileInfo info0;
EXPECT_FALSE(db()->GetFileInfo(file_id, &info0));
info0.parent_id = 0;
- info0.data_path = FilePath(FILE_PATH_LITERAL("foo"));
+ info0.data_path = base::FilePath(FILE_PATH_LITERAL("foo"));
info0.name = FILE_PATH_LITERAL("file name");
info0.modification_time = base::Time::Now();
EXPECT_TRUE(db()->AddFileInfo(info0, &file_id));
@@ -431,7 +431,7 @@ TEST_F(FileSystemDirectoryDatabaseTest, TestOverwritingMoveFileSrcDirectory) {
FileId file_id;
FileInfo info1;
info1.parent_id = 0;
- info1.data_path = FilePath(FILE_PATH_LITERAL("bar"));
+ info1.data_path = base::FilePath(FILE_PATH_LITERAL("bar"));
info1.name = FILE_PATH_LITERAL("file");
info1.modification_time = base::Time::UnixEpoch();
EXPECT_TRUE(db()->AddFileInfo(info1, &file_id));
@@ -444,7 +444,7 @@ TEST_F(FileSystemDirectoryDatabaseTest, TestOverwritingMoveFileDestDirectory) {
FileInfo info0;
info0.parent_id = 0;
info0.name = FILE_PATH_LITERAL("file");
- info0.data_path = FilePath(FILE_PATH_LITERAL("bar"));
+ info0.data_path = base::FilePath(FILE_PATH_LITERAL("bar"));
info0.modification_time = base::Time::Now();
EXPECT_TRUE(db()->AddFileInfo(info0, &file_id));
@@ -462,7 +462,7 @@ TEST_F(FileSystemDirectoryDatabaseTest, TestOverwritingMoveFileSuccess) {
FileId file_id0;
FileInfo info0;
info0.parent_id = 0;
- info0.data_path = FilePath(FILE_PATH_LITERAL("foo"));
+ info0.data_path = base::FilePath(FILE_PATH_LITERAL("foo"));
info0.name = FILE_PATH_LITERAL("file name 0");
info0.modification_time = base::Time::Now();
EXPECT_TRUE(db()->AddFileInfo(info0, &file_id0));
@@ -476,7 +476,7 @@ TEST_F(FileSystemDirectoryDatabaseTest, TestOverwritingMoveFileSuccess) {
FileId file_id1;
FileInfo info1;
info1.parent_id = dir_id;
- info1.data_path = FilePath(FILE_PATH_LITERAL("bar"));
+ info1.data_path = base::FilePath(FILE_PATH_LITERAL("bar"));
info1.name = FILE_PATH_LITERAL("file name 1");
info1.modification_time = base::Time::UnixEpoch();
EXPECT_TRUE(db()->AddFileInfo(info1, &file_id1));
@@ -486,9 +486,9 @@ TEST_F(FileSystemDirectoryDatabaseTest, TestOverwritingMoveFileSuccess) {
FileInfo check_info;
FileId check_id;
- EXPECT_FALSE(db()->GetFileWithPath(FilePath(info0.name), &check_id));
+ EXPECT_FALSE(db()->GetFileWithPath(base::FilePath(info0.name), &check_id));
EXPECT_TRUE(db()->GetFileWithPath(
- FilePath(dir_info.name).Append(info1.name), &check_id));
+ base::FilePath(dir_info.name).Append(info1.name), &check_id));
EXPECT_TRUE(db()->GetFileInfo(check_id, &check_info));
EXPECT_EQ(info0.data_path, check_info.data_path);
@@ -531,7 +531,7 @@ TEST_F(FileSystemDirectoryDatabaseTest, TestConsistencyCheck_Consistent) {
TEST_F(FileSystemDirectoryDatabaseTest,
TestConsistencyCheck_BackingMultiEntry) {
- const FilePath::CharType kBackingFileName[] = FPL("the celeb");
+ const base::FilePath::CharType kBackingFileName[] = FPL("the celeb");
CreateFile(0, FPL("foo"), kBackingFileName, NULL);
EXPECT_TRUE(db()->IsFileSystemConsistent());
@@ -541,7 +541,7 @@ TEST_F(FileSystemDirectoryDatabaseTest,
}
TEST_F(FileSystemDirectoryDatabaseTest, TestConsistencyCheck_FileLost) {
- const FilePath::CharType kBackingFileName[] = FPL("hoge");
+ const base::FilePath::CharType kBackingFileName[] = FPL("hoge");
CreateFile(0, FPL("foo"), kBackingFileName, NULL);
EXPECT_TRUE(db()->IsFileSystemConsistent());
@@ -576,7 +576,7 @@ TEST_F(FileSystemDirectoryDatabaseTest, TestConsistencyCheck_RootLoop) {
TEST_F(FileSystemDirectoryDatabaseTest, TestConsistencyCheck_DirectoryLoop) {
FileId dir1_id;
FileId dir2_id;
- FilePath::StringType dir1_name = FPL("foo");
+ base::FilePath::StringType dir1_name = FPL("foo");
CreateDirectory(0, dir1_name, &dir1_id);
CreateDirectory(dir1_id, FPL("bar"), &dir2_id);
@@ -610,13 +610,13 @@ TEST_F(FileSystemDirectoryDatabaseTest, TestConsistencyCheck_WreckedEntries) {
}
TEST_F(FileSystemDirectoryDatabaseTest, TestRepairDatabase_Success) {
- FilePath::StringType kFileName = FPL("bar");
+ base::FilePath::StringType kFileName = FPL("bar");
FileId file_id_prev;
CreateFile(0, FPL("foo"), FPL("hoge"), NULL);
CreateFile(0, kFileName, FPL("fuga"), &file_id_prev);
- const FilePath kDatabaseDirectory = path().Append(kDirectoryDatabaseName);
+ const base::FilePath kDatabaseDirectory = path().Append(kDirectoryDatabaseName);
CloseDatabase();
CorruptDatabase(kDatabaseDirectory, leveldb::kDescriptorFile,
0, std::numeric_limits<size_t>::max());
@@ -631,12 +631,12 @@ TEST_F(FileSystemDirectoryDatabaseTest, TestRepairDatabase_Success) {
}
TEST_F(FileSystemDirectoryDatabaseTest, TestRepairDatabase_Failure) {
- FilePath::StringType kFileName = FPL("bar");
+ base::FilePath::StringType kFileName = FPL("bar");
CreateFile(0, FPL("foo"), FPL("hoge"), NULL);
CreateFile(0, kFileName, FPL("fuga"), NULL);
- const FilePath kDatabaseDirectory = path().Append(kDirectoryDatabaseName);
+ const base::FilePath kDatabaseDirectory = path().Append(kDirectoryDatabaseName);
CloseDatabase();
CorruptDatabase(kDatabaseDirectory, leveldb::kDescriptorFile,
0, std::numeric_limits<size_t>::max());
diff --git a/webkit/fileapi/file_system_file_stream_reader.cc b/webkit/fileapi/file_system_file_stream_reader.cc
index cb5f5dd..e5e0299 100644
--- a/webkit/fileapi/file_system_file_stream_reader.cc
+++ b/webkit/fileapi/file_system_file_stream_reader.cc
@@ -107,7 +107,7 @@ void FileSystemFileStreamReader::DidCreateSnapshot(
const net::CompletionCallback& error_callback,
base::PlatformFileError file_error,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path,
+ const base::FilePath& platform_path,
const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) {
DCHECK(has_pending_create_snapshot_);
DCHECK(!local_file_reader_.get());
diff --git a/webkit/fileapi/file_system_file_stream_reader.h b/webkit/fileapi/file_system_file_stream_reader.h
index 5115f72..0a6e750 100644
--- a/webkit/fileapi/file_system_file_stream_reader.h
+++ b/webkit/fileapi/file_system_file_stream_reader.h
@@ -14,9 +14,8 @@
#include "webkit/fileapi/file_system_url.h"
#include "webkit/storage/webkit_storage_export.h"
-class FilePath;
-
namespace base {
+class FilePath;
class SequencedTaskRunner;
}
@@ -60,7 +59,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE FileSystemFileStreamReader
const net::CompletionCallback& error_callback,
base::PlatformFileError file_error,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path,
+ const base::FilePath& platform_path,
const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref);
scoped_refptr<FileSystemContext> file_system_context_;
diff --git a/webkit/fileapi/file_system_file_stream_reader_unittest.cc b/webkit/fileapi/file_system_file_stream_reader_unittest.cc
index 55d0b9fd..327cb64 100644
--- a/webkit/fileapi/file_system_file_stream_reader_unittest.cc
+++ b/webkit/fileapi/file_system_file_stream_reader_unittest.cc
@@ -133,7 +133,7 @@ class FileSystemFileStreamReaderTest : public testing::Test {
base::ClosePlatformFile(handle);
base::PlatformFileInfo file_info;
- FilePath platform_path;
+ base::FilePath platform_path;
ASSERT_EQ(base::PLATFORM_FILE_OK,
file_util->GetFileInfo(&context, url, &file_info,
&platform_path));
@@ -150,7 +150,7 @@ class FileSystemFileStreamReaderTest : public testing::Test {
return file_system_context_->CreateCrackedFileSystemURL(
GURL(kURLOrigin),
kFileSystemTypeTemporary,
- FilePath().AppendASCII(file_name));
+ base::FilePath().AppendASCII(file_name));
}
MessageLoop message_loop_;
diff --git a/webkit/fileapi/file_system_file_util.cc b/webkit/fileapi/file_system_file_util.cc
index 46b8b02..9d786ef 100644
--- a/webkit/fileapi/file_system_file_util.cc
+++ b/webkit/fileapi/file_system_file_util.cc
@@ -6,8 +6,8 @@
namespace fileapi {
-FilePath FileSystemFileUtil::EmptyFileEnumerator::Next() {
- return FilePath();
+base::FilePath FileSystemFileUtil::EmptyFileEnumerator::Next() {
+ return base::FilePath();
}
int64 FileSystemFileUtil::EmptyFileEnumerator::Size() {
diff --git a/webkit/fileapi/file_system_file_util.h b/webkit/fileapi/file_system_file_util.h
index 5d4b72c..e4e94be 100644
--- a/webkit/fileapi/file_system_file_util.h
+++ b/webkit/fileapi/file_system_file_util.h
@@ -33,7 +33,7 @@ class WEBKIT_STORAGE_EXPORT FileSystemFileUtil {
virtual ~AbstractFileEnumerator() {}
// Returns an empty string if there are no more results.
- virtual FilePath Next() = 0;
+ virtual base::FilePath Next() = 0;
// These methods return metadata for the file most recently returned by
// Next(). If Next() has never been called, or if Next() most recently
@@ -46,7 +46,7 @@ class WEBKIT_STORAGE_EXPORT FileSystemFileUtil {
class WEBKIT_STORAGE_EXPORT EmptyFileEnumerator
: public AbstractFileEnumerator {
- virtual FilePath Next() OVERRIDE;
+ virtual base::FilePath Next() OVERRIDE;
virtual int64 Size() OVERRIDE;
virtual base::Time LastModifiedTime() OVERRIDE;
virtual bool IsDirectory() OVERRIDE;
@@ -91,7 +91,7 @@ class WEBKIT_STORAGE_EXPORT FileSystemFileUtil {
FileSystemOperationContext* context,
const FileSystemURL& url,
base::PlatformFileInfo* file_info,
- FilePath* platform_path) = 0;
+ base::FilePath* platform_path) = 0;
// Returns a pointer to a new instance of AbstractFileEnumerator which is
// implemented for each FileSystemFileUtil subclass. The instance needs to be
@@ -114,7 +114,7 @@ class WEBKIT_STORAGE_EXPORT FileSystemFileUtil {
virtual base::PlatformFileError GetLocalFilePath(
FileSystemOperationContext* context,
const FileSystemURL& file_system_url,
- FilePath* local_file_path) = 0;
+ base::FilePath* local_file_path) = 0;
// Updates the file metadata information.
// See header comments for AsyncFileUtil::Touch() for more details.
@@ -154,7 +154,7 @@ class WEBKIT_STORAGE_EXPORT FileSystemFileUtil {
// more details.
virtual base::PlatformFileError CopyInForeignFile(
FileSystemOperationContext* context,
- const FilePath& src_file_path,
+ const base::FilePath& src_file_path,
const FileSystemURL& dest_url) = 0;
// Deletes a single file.
@@ -178,7 +178,7 @@ class WEBKIT_STORAGE_EXPORT FileSystemFileUtil {
FileSystemOperationContext* context,
const FileSystemURL& url,
base::PlatformFileInfo* file_info,
- FilePath* platform_path,
+ base::FilePath* platform_path,
SnapshotFilePolicy* policy) = 0;
protected:
diff --git a/webkit/fileapi/file_system_file_util_proxy.cc b/webkit/fileapi/file_system_file_util_proxy.cc
index 35c08bf..8ab1c4f 100644
--- a/webkit/fileapi/file_system_file_util_proxy.cc
+++ b/webkit/fileapi/file_system_file_util_proxy.cc
@@ -79,7 +79,7 @@ class GetFileInfoHelper {
private:
base::PlatformFileError error_;
base::PlatformFileInfo file_info_;
- FilePath platform_path_;
+ base::FilePath platform_path_;
FileSystemFileUtil::SnapshotFilePolicy snapshot_policy_;
DISALLOW_COPY_AND_ASSIGN(GetFileInfoHelper);
};
@@ -181,7 +181,7 @@ bool FileSystemFileUtilProxy::MoveFileLocal(
bool FileSystemFileUtilProxy::CopyInForeignFile(
FileSystemOperationContext* context,
FileSystemFileUtil* file_util,
- const FilePath& src_local_disk_file_path,
+ const base::FilePath& src_local_disk_file_path,
const FileSystemURL& dest_url,
const StatusCallback& callback) {
return base::PostTaskAndReplyWithResult(
diff --git a/webkit/fileapi/file_system_file_util_proxy.h b/webkit/fileapi/file_system_file_util_proxy.h
index 3c43e30..c20b8b5 100644
--- a/webkit/fileapi/file_system_file_util_proxy.h
+++ b/webkit/fileapi/file_system_file_util_proxy.h
@@ -37,7 +37,7 @@ class FileSystemFileUtilProxy {
typedef base::Callback<
void(base::PlatformFileError result,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path,
+ const base::FilePath& platform_path,
FileSystemFileUtil::SnapshotFilePolicy snapshot_policy)>
SnapshotFileCallback;
@@ -85,7 +85,7 @@ class FileSystemFileUtilProxy {
static bool CopyInForeignFile(
FileSystemOperationContext* context,
FileSystemFileUtil* file_util,
- const FilePath& src_local_disk_file_path,
+ const base::FilePath& src_local_disk_file_path,
const FileSystemURL& dest_url,
const StatusCallback& callback);
diff --git a/webkit/fileapi/file_system_file_util_unittest.cc b/webkit/fileapi/file_system_file_util_unittest.cc
index b33b32a..9e12299 100644
--- a/webkit/fileapi/file_system_file_util_unittest.cc
+++ b/webkit/fileapi/file_system_file_util_unittest.cc
@@ -116,7 +116,7 @@ class FileSystemFileUtilTest : public testing::Test {
dest_root.path().Append(test_case.path));
base::PlatformFileInfo dest_file_info;
- FilePath data_path;
+ base::FilePath data_path;
context.reset(NewContext(&dest_helper));
EXPECT_EQ(base::PLATFORM_FILE_OK,
file_util->GetFileInfo(
@@ -140,7 +140,7 @@ class FileSystemFileUtilTest : public testing::Test {
FileSystemURL url = src_root.WithPath(
src_root.path().Append(test_case.path));
base::PlatformFileInfo src_file_info;
- FilePath data_path;
+ base::FilePath data_path;
context.reset(NewContext(&src_helper));
base::PlatformFileError expected_result;
if (copy)
diff --git a/webkit/fileapi/file_system_mount_point_provider.h b/webkit/fileapi/file_system_mount_point_provider.h
index 585b3cd..2e19372 100644
--- a/webkit/fileapi/file_system_mount_point_provider.h
+++ b/webkit/fileapi/file_system_mount_point_provider.h
@@ -56,7 +56,7 @@ class WEBKIT_STORAGE_EXPORT FileSystemMountPointProvider {
// file system url on the file thread.
// If |create| is true this may also create the root directory for
// the filesystem if it doesn't exist.
- virtual FilePath GetFileSystemRootPathOnFileThread(
+ virtual base::FilePath GetFileSystemRootPathOnFileThread(
const FileSystemURL& url,
bool create) = 0;
@@ -65,7 +65,7 @@ class WEBKIT_STORAGE_EXPORT FileSystemMountPointProvider {
// Checks if a given |name| contains any restricted names/chars in it.
// Callable on any thread.
- virtual bool IsRestrictedFileName(const FilePath& filename) const = 0;
+ virtual bool IsRestrictedFileName(const base::FilePath& filename) const = 0;
// Returns the specialized FileSystemFileUtil for this mount point.
// It is ok to return NULL if the filesystem doesn't support synchronous
@@ -135,21 +135,21 @@ class ExternalFileSystemMountPointProvider
// Returns the list of top level directories that are exposed by this
// provider. This list is used to set appropriate child process file access
// permissions.
- virtual std::vector<FilePath> GetRootDirectories() const = 0;
+ virtual std::vector<base::FilePath> GetRootDirectories() const = 0;
// Grants access to all external file system from extension identified with
// |extension_id|.
virtual void GrantFullAccessToExtension(const std::string& extension_id) = 0;
// Grants access to |virtual_path| from |origin_url|.
virtual void GrantFileAccessToExtension(
const std::string& extension_id,
- const FilePath& virtual_path) = 0;
+ const base::FilePath& virtual_path) = 0;
// Revokes file access from extension identified with |extension_id|.
virtual void RevokeAccessForExtension(
const std::string& extension_id) = 0;
// Gets virtual path by known filesystem path. Returns false when filesystem
// path is not exposed by this provider.
- virtual bool GetVirtualPath(const FilePath& file_system_path,
- FilePath* virtual_path) = 0;
+ virtual bool GetVirtualPath(const base::FilePath& file_system_path,
+ base::FilePath* virtual_path) = 0;
};
} // namespace fileapi
diff --git a/webkit/fileapi/file_system_mount_point_provider_unittest.cc b/webkit/fileapi/file_system_mount_point_provider_unittest.cc
index c36aa9b..e3abb47 100644
--- a/webkit/fileapi/file_system_mount_point_provider_unittest.cc
+++ b/webkit/fileapi/file_system_mount_point_provider_unittest.cc
@@ -88,7 +88,7 @@ const struct RootPathFileURITest {
};
const struct CheckValidPathTest {
- FilePath::StringType path;
+ base::FilePath::StringType path;
bool expected_valid;
} kCheckValidPathTestCases[] = {
{ FILE_PATH_LITERAL("//tmp/foo.txt"), false, },
@@ -102,7 +102,7 @@ const struct CheckValidPathTest {
};
const struct IsRestrictedNameTest {
- FilePath::StringType name;
+ base::FilePath::StringType name;
bool expected_dangerous;
} kIsRestrictedNameTestCases[] = {
// Names that contain strings that used to be restricted, but are now allowed.
@@ -193,9 +193,9 @@ const struct IsRestrictedNameTest {
};
// For External filesystem.
-const FilePath::CharType kMountPoint[] = FILE_PATH_LITERAL("/tmp/testing");
-const FilePath::CharType kRootPath[] = FILE_PATH_LITERAL("/tmp");
-const FilePath::CharType kVirtualPath[] = FILE_PATH_LITERAL("testing");
+const base::FilePath::CharType kMountPoint[] = FILE_PATH_LITERAL("/tmp/testing");
+const base::FilePath::CharType kRootPath[] = FILE_PATH_LITERAL("/tmp");
+const base::FilePath::CharType kVirtualPath[] = FILE_PATH_LITERAL("testing");
} // namespace
@@ -222,7 +222,7 @@ class FileSystemMountPointProviderTest : public testing::Test {
data_dir_.path(),
options);
#if defined(OS_CHROMEOS)
- FilePath mount_point_path = FilePath(kMountPoint);
+ base::FilePath mount_point_path = base::FilePath(kMountPoint);
external_mount_points->RegisterFileSystem(
mount_point_path.BaseName().AsUTF8Unsafe(),
kFileSystemTypeNativeLocal,
@@ -238,21 +238,21 @@ class FileSystemMountPointProviderTest : public testing::Test {
bool GetRootPath(const GURL& origin_url,
fileapi::FileSystemType type,
bool create,
- FilePath* root_path) {
- FilePath virtual_path = FilePath();
+ base::FilePath* root_path) {
+ base::FilePath virtual_path = base::FilePath();
if (type == kFileSystemTypeExternal)
- virtual_path = FilePath(kVirtualPath);
+ virtual_path = base::FilePath(kVirtualPath);
FileSystemURL url = file_system_context_->CreateCrackedFileSystemURL(
origin_url, type, virtual_path);
- FilePath returned_root_path =
+ base::FilePath returned_root_path =
provider(type)->GetFileSystemRootPathOnFileThread(url, create);
if (root_path)
*root_path = returned_root_path;
return !returned_root_path.empty();
}
- FilePath data_path() const { return data_dir_.path(); }
- FilePath file_system_path() const {
+ base::FilePath data_path() const { return data_dir_.path(); }
+ base::FilePath file_system_path() const {
return data_dir_.path().Append(
SandboxMountPointProvider::kFileSystemDirectory);
}
@@ -272,7 +272,7 @@ class FileSystemMountPointProviderTest : public testing::Test {
};
TEST_F(FileSystemMountPointProviderTest, GetRootPathCreateAndExamine) {
- std::vector<FilePath> returned_root_path(
+ std::vector<base::FilePath> returned_root_path(
ARRAYSIZE_UNSAFE(kRootPathTestCases));
SetupNewContext(CreateAllowFileAccessOptions());
@@ -281,13 +281,13 @@ TEST_F(FileSystemMountPointProviderTest, GetRootPathCreateAndExamine) {
SCOPED_TRACE(testing::Message() << "RootPath (create) #" << i << " "
<< kRootPathTestCases[i].expected_path);
- FilePath root_path;
+ base::FilePath root_path;
EXPECT_TRUE(GetRootPath(GURL(kRootPathTestCases[i].origin_url),
kRootPathTestCases[i].type,
true /* create */, &root_path));
if (kRootPathTestCases[i].type != kFileSystemTypeExternal) {
- FilePath expected = file_system_path().AppendASCII(
+ base::FilePath expected = file_system_path().AppendASCII(
kRootPathTestCases[i].expected_path);
EXPECT_EQ(expected.value(), root_path.value());
EXPECT_TRUE(file_util::DirectoryExists(root_path));
@@ -306,7 +306,7 @@ TEST_F(FileSystemMountPointProviderTest, GetRootPathCreateAndExamine) {
SCOPED_TRACE(testing::Message() << "RootPath (get) #" << i << " "
<< kRootPathTestCases[i].expected_path);
- FilePath root_path;
+ base::FilePath root_path;
EXPECT_TRUE(GetRootPath(GURL(kRootPathTestCases[i].origin_url),
kRootPathTestCases[i].type,
false /* create */, &root_path));
@@ -317,18 +317,18 @@ TEST_F(FileSystemMountPointProviderTest, GetRootPathCreateAndExamine) {
TEST_F(FileSystemMountPointProviderTest,
GetRootPathCreateAndExamineWithNewProvider) {
- std::vector<FilePath> returned_root_path(
+ std::vector<base::FilePath> returned_root_path(
ARRAYSIZE_UNSAFE(kRootPathTestCases));
SetupNewContext(CreateAllowFileAccessOptions());
GURL origin_url("http://foo.com:1/");
- FilePath root_path1;
+ base::FilePath root_path1;
EXPECT_TRUE(GetRootPath(origin_url,
kFileSystemTypeTemporary, true, &root_path1));
SetupNewContext(CreateDisallowFileAccessOptions());
- FilePath root_path2;
+ base::FilePath root_path2;
EXPECT_TRUE(GetRootPath(origin_url,
kFileSystemTypeTemporary, false, &root_path2));
@@ -383,11 +383,11 @@ TEST_F(FileSystemMountPointProviderTest, GetRootPathFileURIWithAllowFlag) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kRootPathFileURITestCases); ++i) {
SCOPED_TRACE(testing::Message() << "RootPathFileURI (allow) #"
<< i << " " << kRootPathFileURITestCases[i].expected_path);
- FilePath root_path;
+ base::FilePath root_path;
EXPECT_TRUE(GetRootPath(GURL(kRootPathFileURITestCases[i].origin_url),
kRootPathFileURITestCases[i].type,
true /* create */, &root_path));
- FilePath expected = file_system_path().AppendASCII(
+ base::FilePath expected = file_system_path().AppendASCII(
kRootPathFileURITestCases[i].expected_path);
EXPECT_EQ(expected.value(), root_path.value());
EXPECT_TRUE(file_util::DirectoryExists(root_path));
@@ -399,7 +399,7 @@ TEST_F(FileSystemMountPointProviderTest, IsRestrictedName) {
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kIsRestrictedNameTestCases); ++i) {
SCOPED_TRACE(testing::Message() << "IsRestrictedName #" << i << " "
<< kIsRestrictedNameTestCases[i].name);
- FilePath name(kIsRestrictedNameTestCases[i].name);
+ base::FilePath name(kIsRestrictedNameTestCases[i].name);
EXPECT_EQ(kIsRestrictedNameTestCases[i].expected_dangerous,
provider(kFileSystemTypeTemporary)->IsRestrictedFileName(name));
}
diff --git a/webkit/fileapi/file_system_operation.h b/webkit/fileapi/file_system_operation.h
index 5b23194..21bdf40 100644
--- a/webkit/fileapi/file_system_operation.h
+++ b/webkit/fileapi/file_system_operation.h
@@ -64,7 +64,7 @@ class FileSystemOperation {
typedef base::Callback<
void(base::PlatformFileError result,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path)> GetMetadataCallback;
+ const base::FilePath& platform_path)> GetMetadataCallback;
// Used for OpenFile(). |result| is the return code of the operation.
typedef base::Callback<
@@ -107,7 +107,7 @@ class FileSystemOperation {
typedef base::Callback<
void(base::PlatformFileError result,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path,
+ const base::FilePath& platform_path,
const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref)>
SnapshotFileCallback;
diff --git a/webkit/fileapi/file_system_origin_database.cc b/webkit/fileapi/file_system_origin_database.cc
index 0c9207a..0300da2 100644
--- a/webkit/fileapi/file_system_origin_database.cc
+++ b/webkit/fileapi/file_system_origin_database.cc
@@ -20,7 +20,8 @@
namespace {
-const FilePath::CharType kOriginDatabaseName[] = FILE_PATH_LITERAL("Origins");
+const base::FilePath::CharType kOriginDatabaseName[] =
+ FILE_PATH_LITERAL("Origins");
const char kOriginKeyPrefix[] = "ORIGIN:";
const char kLastPathKey[] = "LAST_PATH";
const int64 kMinimumReportIntervalHours = 1;
@@ -51,7 +52,7 @@ FileSystemOriginDatabase::OriginRecord::OriginRecord() {
}
FileSystemOriginDatabase::OriginRecord::OriginRecord(
- const std::string& origin_in, const FilePath& path_in)
+ const std::string& origin_in, const base::FilePath& path_in)
: origin(origin_in), path(path_in) {
}
@@ -59,7 +60,7 @@ FileSystemOriginDatabase::OriginRecord::~OriginRecord() {
}
FileSystemOriginDatabase::FileSystemOriginDatabase(
- const FilePath& file_system_directory)
+ const base::FilePath& file_system_directory)
: file_system_directory_(file_system_directory) {
}
@@ -116,15 +117,15 @@ bool FileSystemOriginDatabase::RepairDatabase(const std::string& db_path) {
}
// See if the repaired entries match with what we have on disk.
- std::set<FilePath> directories;
+ std::set<base::FilePath> directories;
file_util::FileEnumerator file_enum(file_system_directory_,
false /* recursive */,
file_util::FileEnumerator::DIRECTORIES);
- FilePath path_each;
+ base::FilePath path_each;
while (!(path_each = file_enum.Next()).empty())
directories.insert(path_each.BaseName());
- std::set<FilePath>::iterator db_dir_itr =
- directories.find(FilePath(kOriginDatabaseName));
+ std::set<base::FilePath>::iterator db_dir_itr =
+ directories.find(base::FilePath(kOriginDatabaseName));
// Make sure we have the database file in its directory and therefore we are
// working on the correct path.
DCHECK(db_dir_itr != directories.end());
@@ -140,7 +141,7 @@ bool FileSystemOriginDatabase::RepairDatabase(const std::string& db_path) {
for (std::vector<OriginRecord>::iterator db_origin_itr = origins.begin();
db_origin_itr != origins.end();
++db_origin_itr) {
- std::set<FilePath>::iterator dir_itr =
+ std::set<base::FilePath>::iterator dir_itr =
directories.find(db_origin_itr->path);
if (dir_itr == directories.end()) {
if (!RemovePathForOrigin(db_origin_itr->origin)) {
@@ -153,7 +154,7 @@ bool FileSystemOriginDatabase::RepairDatabase(const std::string& db_path) {
}
// Delete any directories not listed in the origins database.
- for (std::set<FilePath>::iterator dir_itr = directories.begin();
+ for (std::set<base::FilePath>::iterator dir_itr = directories.begin();
dir_itr != directories.end();
++dir_itr) {
if (!file_util::Delete(file_system_directory_.Append(*dir_itr),
@@ -214,7 +215,7 @@ bool FileSystemOriginDatabase::HasOriginPath(const std::string& origin) {
}
bool FileSystemOriginDatabase::GetPathForOrigin(
- const std::string& origin, FilePath* directory) {
+ const std::string& origin, base::FilePath* directory) {
if (!Init(REPAIR_ON_CORRUPTION))
return false;
DCHECK(directory);
@@ -271,7 +272,7 @@ bool FileSystemOriginDatabase::ListAllOrigins(
StartsWithASCII(iter->key().ToString(), origin_key_prefix, true)) {
std::string origin =
iter->key().ToString().substr(origin_key_prefix.length());
- FilePath path = StringToFilePath(iter->value().ToString());
+ base::FilePath path = StringToFilePath(iter->value().ToString());
origins->push_back(OriginRecord(origin, path));
iter->Next();
}
diff --git a/webkit/fileapi/file_system_origin_database.h b/webkit/fileapi/file_system_origin_database.h
index ea71822..98eb212 100644
--- a/webkit/fileapi/file_system_origin_database.h
+++ b/webkit/fileapi/file_system_origin_database.h
@@ -31,23 +31,23 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE FileSystemOriginDatabase {
public:
struct WEBKIT_STORAGE_EXPORT_PRIVATE OriginRecord {
std::string origin;
- FilePath path;
+ base::FilePath path;
OriginRecord();
- OriginRecord(const std::string& origin, const FilePath& path);
+ OriginRecord(const std::string& origin, const base::FilePath& path);
~OriginRecord();
};
// Only one instance of FileSystemOriginDatabase should exist for a given path
// at a given time.
- explicit FileSystemOriginDatabase(const FilePath& file_system_directory);
+ explicit FileSystemOriginDatabase(const base::FilePath& file_system_directory);
~FileSystemOriginDatabase();
bool HasOriginPath(const std::string& origin);
// This will produce a unique path and add it to its database, if it's not
// already present.
- bool GetPathForOrigin(const std::string& origin, FilePath* directory);
+ bool GetPathForOrigin(const std::string& origin, base::FilePath* directory);
// Also returns success if the origin is not found.
bool RemovePathForOrigin(const std::string& origin);
@@ -71,7 +71,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE FileSystemOriginDatabase {
void ReportInitStatus(const leveldb::Status& status);
bool GetLastPathNumber(int* number);
- FilePath file_system_directory_;
+ base::FilePath file_system_directory_;
scoped_ptr<leveldb::DB> db_;
base::Time last_reported_time_;
DISALLOW_COPY_AND_ASSIGN(FileSystemOriginDatabase);
diff --git a/webkit/fileapi/file_system_origin_database_unittest.cc b/webkit/fileapi/file_system_origin_database_unittest.cc
index 695bea8..e3cc8fb 100644
--- a/webkit/fileapi/file_system_origin_database_unittest.cc
+++ b/webkit/fileapi/file_system_origin_database_unittest.cc
@@ -22,15 +22,15 @@
namespace fileapi {
namespace {
-const FilePath::CharType kFileSystemDirName[] =
+const base::FilePath::CharType kFileSystemDirName[] =
FILE_PATH_LITERAL("File System");
-const FilePath::CharType kOriginDatabaseName[] = FILE_PATH_LITERAL("Origins");
+const base::FilePath::CharType kOriginDatabaseName[] = FILE_PATH_LITERAL("Origins");
} // namespace
TEST(FileSystemOriginDatabaseTest, BasicTest) {
base::ScopedTempDir dir;
ASSERT_TRUE(dir.CreateUniqueTempDir());
- const FilePath kFSDir = dir.path().Append(kFileSystemDirName);
+ const base::FilePath kFSDir = dir.path().Append(kFileSystemDirName);
EXPECT_FALSE(file_util::PathExists(kFSDir));
EXPECT_TRUE(file_util::CreateDirectory(kFSDir));
@@ -41,8 +41,8 @@ TEST(FileSystemOriginDatabaseTest, BasicTest) {
// Double-check to make sure that had no side effects.
EXPECT_FALSE(database.HasOriginPath(origin));
- FilePath path0;
- FilePath path1;
+ base::FilePath path0;
+ base::FilePath path1;
// Empty strings aren't valid origins.
EXPECT_FALSE(database.GetPathForOrigin(std::string(), &path0));
@@ -60,7 +60,7 @@ TEST(FileSystemOriginDatabaseTest, BasicTest) {
TEST(FileSystemOriginDatabaseTest, TwoPathTest) {
base::ScopedTempDir dir;
ASSERT_TRUE(dir.CreateUniqueTempDir());
- const FilePath kFSDir = dir.path().Append(kFileSystemDirName);
+ const base::FilePath kFSDir = dir.path().Append(kFileSystemDirName);
EXPECT_FALSE(file_util::PathExists(kFSDir));
EXPECT_TRUE(file_util::CreateDirectory(kFSDir));
@@ -71,8 +71,8 @@ TEST(FileSystemOriginDatabaseTest, TwoPathTest) {
EXPECT_FALSE(database.HasOriginPath(origin0));
EXPECT_FALSE(database.HasOriginPath(origin1));
- FilePath path0;
- FilePath path1;
+ base::FilePath path0;
+ base::FilePath path1;
EXPECT_TRUE(database.GetPathForOrigin(origin0, &path0));
EXPECT_TRUE(database.HasOriginPath(origin0));
EXPECT_FALSE(database.HasOriginPath(origin1));
@@ -88,7 +88,7 @@ TEST(FileSystemOriginDatabaseTest, TwoPathTest) {
TEST(FileSystemOriginDatabaseTest, DropDatabaseTest) {
base::ScopedTempDir dir;
ASSERT_TRUE(dir.CreateUniqueTempDir());
- const FilePath kFSDir = dir.path().Append(kFileSystemDirName);
+ const base::FilePath kFSDir = dir.path().Append(kFileSystemDirName);
EXPECT_FALSE(file_util::PathExists(kFSDir));
EXPECT_TRUE(file_util::CreateDirectory(kFSDir));
@@ -97,7 +97,7 @@ TEST(FileSystemOriginDatabaseTest, DropDatabaseTest) {
EXPECT_FALSE(database.HasOriginPath(origin));
- FilePath path0;
+ base::FilePath path0;
EXPECT_TRUE(database.GetPathForOrigin(origin, &path0));
EXPECT_TRUE(database.HasOriginPath(origin));
EXPECT_FALSE(path0.empty());
@@ -106,7 +106,7 @@ TEST(FileSystemOriginDatabaseTest, DropDatabaseTest) {
database.DropDatabase();
- FilePath path1;
+ base::FilePath path1;
EXPECT_TRUE(database.HasOriginPath(origin));
EXPECT_TRUE(database.GetPathForOrigin(origin, &path1));
EXPECT_FALSE(path1.empty());
@@ -116,7 +116,7 @@ TEST(FileSystemOriginDatabaseTest, DropDatabaseTest) {
TEST(FileSystemOriginDatabaseTest, DeleteOriginTest) {
base::ScopedTempDir dir;
ASSERT_TRUE(dir.CreateUniqueTempDir());
- const FilePath kFSDir = dir.path().Append(kFileSystemDirName);
+ const base::FilePath kFSDir = dir.path().Append(kFileSystemDirName);
EXPECT_FALSE(file_util::PathExists(kFSDir));
EXPECT_TRUE(file_util::CreateDirectory(kFSDir));
@@ -126,7 +126,7 @@ TEST(FileSystemOriginDatabaseTest, DeleteOriginTest) {
EXPECT_FALSE(database.HasOriginPath(origin));
EXPECT_TRUE(database.RemovePathForOrigin(origin));
- FilePath path0;
+ base::FilePath path0;
EXPECT_TRUE(database.GetPathForOrigin(origin, &path0));
EXPECT_TRUE(database.HasOriginPath(origin));
EXPECT_FALSE(path0.empty());
@@ -134,7 +134,7 @@ TEST(FileSystemOriginDatabaseTest, DeleteOriginTest) {
EXPECT_TRUE(database.RemovePathForOrigin(origin));
EXPECT_FALSE(database.HasOriginPath(origin));
- FilePath path1;
+ base::FilePath path1;
EXPECT_TRUE(database.GetPathForOrigin(origin, &path1));
EXPECT_FALSE(path1.empty());
EXPECT_NE(path0, path1);
@@ -143,7 +143,7 @@ TEST(FileSystemOriginDatabaseTest, DeleteOriginTest) {
TEST(FileSystemOriginDatabaseTest, ListOriginsTest) {
base::ScopedTempDir dir;
ASSERT_TRUE(dir.CreateUniqueTempDir());
- const FilePath kFSDir = dir.path().Append(kFileSystemDirName);
+ const base::FilePath kFSDir = dir.path().Append(kFileSystemDirName);
EXPECT_FALSE(file_util::PathExists(kFSDir));
EXPECT_TRUE(file_util::CreateDirectory(kFSDir));
@@ -160,8 +160,8 @@ TEST(FileSystemOriginDatabaseTest, ListOriginsTest) {
EXPECT_FALSE(database.HasOriginPath(origin0));
EXPECT_FALSE(database.HasOriginPath(origin1));
- FilePath path0;
- FilePath path1;
+ base::FilePath path0;
+ base::FilePath path1;
EXPECT_TRUE(database.GetPathForOrigin(origin0, &path0));
EXPECT_TRUE(database.ListAllOrigins(&origins));
EXPECT_EQ(origins.size(), 1UL);
@@ -192,8 +192,8 @@ TEST(FileSystemOriginDatabaseTest, DatabaseRecoveryTest) {
base::ScopedTempDir dir;
ASSERT_TRUE(dir.CreateUniqueTempDir());
- const FilePath kFSDir = dir.path().Append(kFileSystemDirName);
- const FilePath kDBDir = kFSDir.Append(kOriginDatabaseName);
+ const base::FilePath kFSDir = dir.path().Append(kFileSystemDirName);
+ const base::FilePath kDBDir = kFSDir.Append(kOriginDatabaseName);
EXPECT_FALSE(file_util::PathExists(kFSDir));
EXPECT_TRUE(file_util::CreateDirectory(kFSDir));
@@ -208,7 +208,7 @@ TEST(FileSystemOriginDatabaseTest, DatabaseRecoveryTest) {
scoped_ptr<FileSystemOriginDatabase> database(
new FileSystemOriginDatabase(kFSDir));
for (size_t i = 0; i < arraysize(kOrigins); ++i) {
- FilePath path;
+ base::FilePath path;
EXPECT_FALSE(database->HasOriginPath(kOrigins[i]));
EXPECT_TRUE(database->GetPathForOrigin(kOrigins[i], &path));
EXPECT_FALSE(path.empty());
@@ -219,8 +219,8 @@ TEST(FileSystemOriginDatabaseTest, DatabaseRecoveryTest) {
}
database.reset();
- const FilePath kGarbageDir = kFSDir.AppendASCII("foo");
- const FilePath kGarbageFile = kGarbageDir.AppendASCII("bar");
+ const base::FilePath kGarbageDir = kFSDir.AppendASCII("foo");
+ const base::FilePath kGarbageFile = kGarbageDir.AppendASCII("bar");
EXPECT_TRUE(file_util::CreateDirectory(kGarbageDir));
bool created = false;
base::PlatformFileError error;
@@ -239,7 +239,7 @@ TEST(FileSystemOriginDatabaseTest, DatabaseRecoveryTest) {
0, std::numeric_limits<size_t>::max());
CorruptDatabase(kDBDir, leveldb::kLogFile, -1, 1);
- FilePath path;
+ base::FilePath path;
database.reset(new FileSystemOriginDatabase(kFSDir));
std::vector<FileSystemOriginDatabase::OriginRecord> origins_in_db;
EXPECT_TRUE(database->ListAllOrigins(&origins_in_db));
diff --git a/webkit/fileapi/file_system_quota_client_unittest.cc b/webkit/fileapi/file_system_quota_client_unittest.cc
index ae858e0..8859ddd 100644
--- a/webkit/fileapi/file_system_quota_client_unittest.cc
+++ b/webkit/fileapi/file_system_quota_client_unittest.cc
@@ -129,7 +129,7 @@ class FileSystemQuotaClientTest : public testing::Test {
return context;
}
- bool CreateFileSystemDirectory(const FilePath& file_path,
+ bool CreateFileSystemDirectory(const base::FilePath& file_path,
const std::string& origin_url,
quota::StorageType storage_type) {
FileSystemType type = QuotaStorageTypeToFileSystemType(storage_type);
@@ -147,7 +147,7 @@ class FileSystemQuotaClientTest : public testing::Test {
return true;
}
- bool CreateFileSystemFile(const FilePath& file_path,
+ bool CreateFileSystemFile(const base::FilePath& file_path,
int64 file_size,
const std::string& origin_url,
quota::StorageType storage_type) {
@@ -178,7 +178,7 @@ class FileSystemQuotaClientTest : public testing::Test {
const TestFile* files,
int num_files) {
for (int i = 0; i < num_files; i++) {
- FilePath path = FilePath().AppendASCII(files[i].name);
+ base::FilePath path = base::FilePath().AppendASCII(files[i].name);
if (files[i].isDirectory) {
ASSERT_TRUE(CreateFileSystemDirectory(
path, files[i].origin_url, files[i].type));
@@ -210,7 +210,7 @@ class FileSystemQuotaClientTest : public testing::Test {
for (int i = 0; i < num_files; i++) {
if (files[i].type == type &&
GURL(files[i].origin_url) == GURL(origin_url)) {
- FilePath path = FilePath().AppendASCII(files[i].name);
+ base::FilePath path = base::FilePath().AppendASCII(files[i].name);
if (!path.empty()) {
file_paths_cost += ObfuscatedFileUtil::ComputeFilePathCost(path);
}
diff --git a/webkit/fileapi/file_system_url.cc b/webkit/fileapi/file_system_url.cc
index 7d88f14..5f38e53 100644
--- a/webkit/fileapi/file_system_url.cc
+++ b/webkit/fileapi/file_system_url.cc
@@ -21,7 +21,7 @@ namespace {
bool ParseFileSystemURL(const GURL& url,
GURL* origin_url,
FileSystemType* type,
- FilePath* file_path) {
+ base::FilePath* file_path) {
GURL origin;
FileSystemType file_system_type = kFileSystemTypeUnknown;
@@ -60,7 +60,7 @@ bool ParseFileSystemURL(const GURL& url,
while (!path.empty() && path[0] == '/')
path.erase(0, 1);
- FilePath converted_path = FilePath::FromUTF8Unsafe(path);
+ base::FilePath converted_path = base::FilePath::FromUTF8Unsafe(path);
// All parent references should have been resolved in the renderer.
if (converted_path.ReferencesParent())
@@ -92,7 +92,7 @@ FileSystemURL FileSystemURL::CreateForTest(const GURL& url) {
FileSystemURL FileSystemURL::CreateForTest(const GURL& origin,
FileSystemType type,
- const FilePath& path) {
+ const base::FilePath& path) {
return FileSystemURL(origin, type, path);
}
@@ -105,7 +105,7 @@ FileSystemURL::FileSystemURL(const GURL& url)
FileSystemURL::FileSystemURL(const GURL& origin,
FileSystemType type,
- const FilePath& path)
+ const base::FilePath& path)
: is_valid_(true),
origin_(origin),
type_(type),
@@ -115,10 +115,10 @@ FileSystemURL::FileSystemURL(const GURL& origin,
FileSystemURL::FileSystemURL(const GURL& origin,
FileSystemType original_type,
- const FilePath& original_path,
+ const base::FilePath& original_path,
const std::string& filesystem_id,
FileSystemType cracked_type,
- const FilePath& cracked_path)
+ const base::FilePath& cracked_path)
: is_valid_(true),
origin_(origin),
type_(cracked_type),
@@ -149,7 +149,7 @@ std::string FileSystemURL::DebugString() const {
return ss.str();
}
-FileSystemURL FileSystemURL::WithPath(const FilePath& path) const {
+FileSystemURL FileSystemURL::WithPath(const base::FilePath& path) const {
FileSystemURL url = *this;
url.path_ = path;
url.virtual_path_.clear();
diff --git a/webkit/fileapi/file_system_url.h b/webkit/fileapi/file_system_url.h
index 0245d94..99b187b 100644
--- a/webkit/fileapi/file_system_url.h
+++ b/webkit/fileapi/file_system_url.h
@@ -62,11 +62,11 @@ namespace fileapi {
// one of the friended classes.
//
// TODO(ericu): Look into making path() [and all FileSystem API virtual
-// paths] just an std::string, to prevent platform-specific FilePath behavior
-// from getting invoked by accident. Currently the FilePath returned here needs
+// paths] just an std::string, to prevent platform-specific base::FilePath behavior
+// from getting invoked by accident. Currently the base::FilePath returned here needs
// special treatment, as it may contain paths that are illegal on the current
// platform. To avoid problems, use VirtualPath::BaseName and
-// VirtualPath::GetComponents instead of the FilePath methods.
+// VirtualPath::GetComponents instead of the base::FilePath methods.
class WEBKIT_STORAGE_EXPORT FileSystemURL {
public:
FileSystemURL();
@@ -77,7 +77,7 @@ class WEBKIT_STORAGE_EXPORT FileSystemURL {
static FileSystemURL CreateForTest(const GURL& url);
static FileSystemURL CreateForTest(const GURL& origin,
FileSystemType type,
- const FilePath& path);
+ const base::FilePath& path);
// Returns true if this instance represents a valid FileSystem URL.
bool is_valid() const { return is_valid_; }
@@ -90,12 +90,12 @@ class WEBKIT_STORAGE_EXPORT FileSystemURL {
// Returns the path part of this URL. See the class comment for details.
// TODO(kinuko): this must return std::string.
- const FilePath& path() const { return path_; }
+ const base::FilePath& path() const { return path_; }
// Returns the original path part of this URL.
// See the class comment for details.
// TODO(kinuko): this must return std::string.
- const FilePath& virtual_path() const { return virtual_path_; }
+ const base::FilePath& virtual_path() const { return virtual_path_; }
// Returns the filesystem ID/mount name for isolated/external filesystem URLs.
// See the class comment for details.
@@ -112,7 +112,7 @@ class WEBKIT_STORAGE_EXPORT FileSystemURL {
// Note that the resulting FileSystemURL loses original URL information
// if it was a cracked filesystem; i.e. virtual_path and mount_type will
// be set to empty values.
- FileSystemURL WithPath(const FilePath& path) const;
+ FileSystemURL WithPath(const base::FilePath& path) const;
// Returns true if this URL is a strict parent of the |child|.
bool IsParent(const FileSystemURL& child) const;
@@ -131,25 +131,25 @@ class WEBKIT_STORAGE_EXPORT FileSystemURL {
explicit FileSystemURL(const GURL& filesystem_url);
FileSystemURL(const GURL& origin,
FileSystemType type,
- const FilePath& internal_path);
+ const base::FilePath& internal_path);
// Creates a cracked FileSystemURL.
FileSystemURL(const GURL& origin,
FileSystemType original_type,
- const FilePath& original_path,
+ const base::FilePath& original_path,
const std::string& filesystem_id,
FileSystemType cracked_type,
- const FilePath& cracked_path);
+ const base::FilePath& cracked_path);
bool is_valid_;
GURL origin_;
FileSystemType type_;
FileSystemType mount_type_;
- FilePath path_;
+ base::FilePath path_;
// Values specific to cracked URLs.
std::string filesystem_id_;
- FilePath virtual_path_;
+ base::FilePath virtual_path_;
};
diff --git a/webkit/fileapi/file_system_url_request_job.cc b/webkit/fileapi/file_system_url_request_job.cc
index 18bf738..4db776a 100644
--- a/webkit/fileapi/file_system_url_request_job.cc
+++ b/webkit/fileapi/file_system_url_request_job.cc
@@ -117,7 +117,7 @@ bool FileSystemURLRequestJob::ReadRawData(net::IOBuffer* dest, int dest_size,
bool FileSystemURLRequestJob::GetMimeType(std::string* mime_type) const {
DCHECK(request_);
DCHECK(url_.is_valid());
- FilePath::StringType extension = url_.path().Extension();
+ base::FilePath::StringType extension = url_.path().Extension();
if (!extension.empty())
extension = extension.substr(1);
return net::GetWellKnownMimeTypeFromExtension(extension, mime_type);
@@ -174,7 +174,7 @@ void FileSystemURLRequestJob::StartAsync() {
void FileSystemURLRequestJob::DidGetMetadata(
base::PlatformFileError error_code,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path) {
+ const base::FilePath& platform_path) {
if (error_code != base::PLATFORM_FILE_OK) {
NotifyFailed(error_code == base::PLATFORM_FILE_ERROR_INVALID_URL ?
net::ERR_INVALID_URL : net::ERR_FILE_NOT_FOUND);
diff --git a/webkit/fileapi/file_system_url_request_job.h b/webkit/fileapi/file_system_url_request_job.h
index 5b6e42d..55f6e70 100644
--- a/webkit/fileapi/file_system_url_request_job.h
+++ b/webkit/fileapi/file_system_url_request_job.h
@@ -17,7 +17,10 @@
#include "webkit/storage/webkit_storage_export.h"
class GURL;
+
+namespace base {
class FilePath;
+}
namespace webkit_blob {
class FileStreamReader;
@@ -60,7 +63,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE FileSystemURLRequestJob
void DidGetMetadata(
base::PlatformFileError error_code,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path);
+ const base::FilePath& platform_path);
void DidRead(int result);
void NotifyFailed(int rv);
diff --git a/webkit/fileapi/file_system_url_request_job_unittest.cc b/webkit/fileapi/file_system_url_request_job_unittest.cc
index 5168886..b142d6c 100644
--- a/webkit/fileapi/file_system_url_request_job_unittest.cc
+++ b/webkit/fileapi/file_system_url_request_job_unittest.cc
@@ -138,7 +138,7 @@ class FileSystemURLRequestJobTest : public testing::Test {
FileSystemURL url = file_system_context_->CreateCrackedFileSystemURL(
GURL("http://remote"),
kFileSystemTypeTemporary,
- FilePath().AppendASCII(dir_name));
+ base::FilePath().AppendASCII(dir_name));
FileSystemOperationContext context(file_system_context_);
context.set_allowed_bytes_growth(1024);
@@ -157,7 +157,7 @@ class FileSystemURLRequestJobTest : public testing::Test {
FileSystemURL url = file_system_context_->CreateCrackedFileSystemURL(
GURL("http://remote"),
kFileSystemTypeTemporary,
- FilePath().AppendASCII(file_name));
+ base::FilePath().AppendASCII(file_name));
FileSystemOperationContext context(file_system_context_);
context.set_allowed_bytes_growth(1024);
@@ -353,8 +353,8 @@ TEST_F(FileSystemURLRequestJobTest, GetMimeType) {
const char kFilename[] = "hoge.html";
std::string mime_type_direct;
- FilePath::StringType extension =
- FilePath().AppendASCII(kFilename).Extension();
+ base::FilePath::StringType extension =
+ base::FilePath().AppendASCII(kFilename).Extension();
if (!extension.empty())
extension = extension.substr(1);
EXPECT_TRUE(net::GetWellKnownMimeTypeFromExtension(
diff --git a/webkit/fileapi/file_system_url_unittest.cc b/webkit/fileapi/file_system_url_unittest.cc
index 58a4b7a..158f768 100644
--- a/webkit/fileapi/file_system_url_unittest.cc
+++ b/webkit/fileapi/file_system_url_unittest.cc
@@ -41,12 +41,12 @@ FileSystemURL CreateFileSystemURL(const std::string& url_string) {
FileSystemURL CreateExternalFileSystemURL(const GURL& origin,
FileSystemType type,
- const FilePath& path) {
+ const base::FilePath& path) {
return ExternalMountPoints::GetSystemInstance()->CreateCrackedFileSystemURL(
origin, type, path);
}
-std::string NormalizedUTF8Path(const FilePath& path) {
+std::string NormalizedUTF8Path(const base::FilePath& path) {
return path.NormalizePathSeparators().AsUTF8Unsafe();
}
@@ -140,7 +140,7 @@ TEST(FileSystemURLTest, CompareURLs) {
TEST(FileSystemURLTest, WithPath) {
const GURL kURL("filesystem:http://chromium.org/temporary/dir");
- const FilePath::StringType paths[] = {
+ const base::FilePath::StringType paths[] = {
FPL("dir a"),
FPL("dir a/file 1"),
FPL("dir a/dir b"),
@@ -149,7 +149,7 @@ TEST(FileSystemURLTest, WithPath) {
const FileSystemURL base = FileSystemURL::CreateForTest(kURL);
for (size_t i = 0; i < arraysize(paths); ++i) {
- const FileSystemURL url = base.WithPath(FilePath(paths[i]));
+ const FileSystemURL url = base.WithPath(base::FilePath(paths[i]));
EXPECT_EQ(paths[i], url.path().value());
EXPECT_EQ(base.origin().spec(), url.origin().spec());
EXPECT_EQ(base.type(), url.type());
@@ -160,11 +160,11 @@ TEST(FileSystemURLTest, WithPath) {
TEST(FileSystemURLTest, WithPathForExternal) {
const std::string kId = "foo";
- ScopedExternalFileSystem scoped_fs(kId, kFileSystemTypeSyncable, FilePath());
- const FilePath kVirtualRoot = scoped_fs.GetVirtualRootPath();
+ ScopedExternalFileSystem scoped_fs(kId, kFileSystemTypeSyncable, base::FilePath());
+ const base::FilePath kVirtualRoot = scoped_fs.GetVirtualRootPath();
- const FilePath::CharType kBasePath[] = FPL("dir");
- const FilePath::StringType paths[] = {
+ const base::FilePath::CharType kBasePath[] = FPL("dir");
+ const base::FilePath::StringType paths[] = {
FPL("dir a"),
FPL("dir a/file 1"),
FPL("dir a/dir b"),
@@ -177,7 +177,7 @@ TEST(FileSystemURLTest, WithPathForExternal) {
kVirtualRoot.Append(kBasePath));
for (size_t i = 0; i < arraysize(paths); ++i) {
- const FileSystemURL url = base.WithPath(FilePath(paths[i]));
+ const FileSystemURL url = base.WithPath(base::FilePath(paths[i]));
EXPECT_EQ(paths[i], url.path().value());
EXPECT_EQ(base.origin().spec(), url.origin().spec());
EXPECT_EQ(base.type(), url.type());
@@ -187,8 +187,8 @@ TEST(FileSystemURLTest, WithPathForExternal) {
}
TEST(FileSystemURLTest, IsParent) {
- ScopedExternalFileSystem scoped1("foo", kFileSystemTypeSyncable, FilePath());
- ScopedExternalFileSystem scoped2("bar", kFileSystemTypeSyncable, FilePath());
+ ScopedExternalFileSystem scoped1("foo", kFileSystemTypeSyncable, base::FilePath());
+ ScopedExternalFileSystem scoped2("bar", kFileSystemTypeSyncable, base::FilePath());
const std::string root1 = GetFileSystemRootURI(
GURL("http://example.com"), kFileSystemTypeTemporary).spec();
@@ -232,7 +232,7 @@ TEST(FileSystemURLTest, IsParent) {
TEST(FileSystemURLTest, DebugString) {
const GURL kOrigin("http://example.com");
- const FilePath kPath(FPL("dir/file"));
+ const base::FilePath kPath(FPL("dir/file"));
const FileSystemURL kURL1 = FileSystemURL::CreateForTest(
kOrigin, kFileSystemTypeTemporary, kPath);
@@ -240,7 +240,7 @@ TEST(FileSystemURLTest, DebugString) {
NormalizedUTF8Path(kPath),
kURL1.DebugString());
- const FilePath kRoot(DRIVE FPL("/root"));
+ const base::FilePath kRoot(DRIVE FPL("/root"));
ScopedExternalFileSystem scoped_fs("foo",
kFileSystemTypeNativeLocal,
kRoot.NormalizePathSeparators());
diff --git a/webkit/fileapi/file_system_usage_cache.cc b/webkit/fileapi/file_system_usage_cache.cc
index 1c5e824..fedb79e 100644
--- a/webkit/fileapi/file_system_usage_cache.cc
+++ b/webkit/fileapi/file_system_usage_cache.cc
@@ -10,7 +10,7 @@
namespace fileapi {
-const FilePath::CharType FileSystemUsageCache::kUsageFileName[] =
+const base::FilePath::CharType FileSystemUsageCache::kUsageFileName[] =
FILE_PATH_LITERAL(".usage");
const char FileSystemUsageCache::kUsageFileHeader[] = "FSU5";
const int FileSystemUsageCache::kUsageFileHeaderSize = 4;
@@ -22,7 +22,7 @@ const int FileSystemUsageCache::kUsageFileSize =
sizeof(int) + sizeof(int32) + sizeof(int64);
// static
-int64 FileSystemUsageCache::GetUsage(const FilePath& usage_file_path) {
+int64 FileSystemUsageCache::GetUsage(const base::FilePath& usage_file_path) {
bool is_valid = true;
uint32 dirty = 0;
int64 fs_usage;
@@ -35,7 +35,7 @@ int64 FileSystemUsageCache::GetUsage(const FilePath& usage_file_path) {
}
// static
-int32 FileSystemUsageCache::GetDirty(const FilePath& usage_file_path) {
+int32 FileSystemUsageCache::GetDirty(const base::FilePath& usage_file_path) {
bool is_valid = true;
uint32 dirty = 0;
int64 fs_usage;
@@ -48,7 +48,7 @@ int32 FileSystemUsageCache::GetDirty(const FilePath& usage_file_path) {
}
// static
-bool FileSystemUsageCache::IncrementDirty(const FilePath& usage_file_path) {
+bool FileSystemUsageCache::IncrementDirty(const base::FilePath& usage_file_path) {
bool is_valid = true;
uint32 dirty = 0;
int64 fs_usage;
@@ -61,7 +61,7 @@ bool FileSystemUsageCache::IncrementDirty(const FilePath& usage_file_path) {
}
// static
-bool FileSystemUsageCache::DecrementDirty(const FilePath& usage_file_path) {
+bool FileSystemUsageCache::DecrementDirty(const base::FilePath& usage_file_path) {
bool is_valid = true;
uint32 dirty = 0;
int64 fs_usage;
@@ -74,7 +74,7 @@ bool FileSystemUsageCache::DecrementDirty(const FilePath& usage_file_path) {
}
// static
-bool FileSystemUsageCache::Invalidate(const FilePath& usage_file_path) {
+bool FileSystemUsageCache::Invalidate(const base::FilePath& usage_file_path) {
bool is_valid = true;
uint32 dirty = 0;
int64 fs_usage;
@@ -83,7 +83,7 @@ bool FileSystemUsageCache::Invalidate(const FilePath& usage_file_path) {
return fs_usage >= 0 && Write(usage_file_path, false, dirty, fs_usage);
}
-bool FileSystemUsageCache::IsValid(const FilePath& usage_file_path) {
+bool FileSystemUsageCache::IsValid(const base::FilePath& usage_file_path) {
bool is_valid = true;
uint32 dirty = 0;
int64 result = Read(usage_file_path, &is_valid, &dirty);
@@ -95,7 +95,7 @@ bool FileSystemUsageCache::IsValid(const FilePath& usage_file_path) {
// static
int FileSystemUsageCache::AtomicUpdateUsageByDelta(
- const FilePath& usage_file_path, int64 delta) {
+ const base::FilePath& usage_file_path, int64 delta) {
bool is_valid = true;
uint32 dirty = 0;
int64 fs_usage;
@@ -109,23 +109,23 @@ int FileSystemUsageCache::AtomicUpdateUsageByDelta(
}
// static
-int FileSystemUsageCache::UpdateUsage(const FilePath& usage_file_path,
+int FileSystemUsageCache::UpdateUsage(const base::FilePath& usage_file_path,
int64 fs_usage) {
return Write(usage_file_path, true, 0, fs_usage);
}
// static
-bool FileSystemUsageCache::Exists(const FilePath& usage_file_path) {
+bool FileSystemUsageCache::Exists(const base::FilePath& usage_file_path) {
return file_util::PathExists(usage_file_path);
}
// static
-bool FileSystemUsageCache::Delete(const FilePath& usage_file_path) {
+bool FileSystemUsageCache::Delete(const base::FilePath& usage_file_path) {
return file_util::Delete(usage_file_path, true);
}
// static
-int64 FileSystemUsageCache::Read(const FilePath& usage_file_path,
+int64 FileSystemUsageCache::Read(const base::FilePath& usage_file_path,
bool* is_valid,
uint32* dirty) {
char buffer[kUsageFileSize];
@@ -154,7 +154,7 @@ int64 FileSystemUsageCache::Read(const FilePath& usage_file_path,
}
// static
-int FileSystemUsageCache::Write(const FilePath& usage_file_path,
+int FileSystemUsageCache::Write(const base::FilePath& usage_file_path,
bool is_valid,
uint32 dirty,
int64 fs_usage) {
@@ -164,7 +164,7 @@ int FileSystemUsageCache::Write(const FilePath& usage_file_path,
write_pickle.WriteUInt32(dirty);
write_pickle.WriteInt64(fs_usage);
- FilePath temporary_usage_file_path;
+ base::FilePath temporary_usage_file_path;
if (usage_file_path.empty() ||
!file_util::CreateTemporaryFileInDir(usage_file_path.DirName(),
&temporary_usage_file_path)) {
diff --git a/webkit/fileapi/file_system_usage_cache.h b/webkit/fileapi/file_system_usage_cache.h
index 3d25120..428aa4b 100644
--- a/webkit/fileapi/file_system_usage_cache.h
+++ b/webkit/fileapi/file_system_usage_cache.h
@@ -16,34 +16,34 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE FileSystemUsageCache {
// Gets the size described in the .usage file even if dirty > 0 or
// is_valid == false. Returns less than zero if the .usage file is not
// available.
- static int64 GetUsage(const FilePath& usage_file_path);
+ static int64 GetUsage(const base::FilePath& usage_file_path);
// Gets the dirty count in the .usage file.
// Returns less than zero if the .usage file is not available.
- static int32 GetDirty(const FilePath& usage_file_path);
+ static int32 GetDirty(const base::FilePath& usage_file_path);
// Increments or decrements the "dirty" entry in the .usage file.
// Returns false if no .usage is available.
- static bool IncrementDirty(const FilePath& usage_file_path);
- static bool DecrementDirty(const FilePath& usage_file_path);
+ static bool IncrementDirty(const base::FilePath& usage_file_path);
+ static bool DecrementDirty(const base::FilePath& usage_file_path);
// Notifies quota system that it needs to recalculate the usage cache of the
// origin. Returns false if no .usage is available.
- static bool Invalidate(const FilePath& usage_file_path);
- static bool IsValid(const FilePath& usage_file_path);
+ static bool Invalidate(const base::FilePath& usage_file_path);
+ static bool IsValid(const base::FilePath& usage_file_path);
// Updates the size described in the .usage file.
- static int UpdateUsage(const FilePath& usage_file_path, int64 fs_usage);
+ static int UpdateUsage(const base::FilePath& usage_file_path, int64 fs_usage);
// Updates the size described in the .usage file by delta with keeping dirty
// even if dirty > 0.
static int AtomicUpdateUsageByDelta(
- const FilePath& usage_file_path, int64 delta);
+ const base::FilePath& usage_file_path, int64 delta);
- static bool Exists(const FilePath& usage_file_path);
- static bool Delete(const FilePath& usage_file_path);
+ static bool Exists(const base::FilePath& usage_file_path);
+ static bool Delete(const base::FilePath& usage_file_path);
- static const FilePath::CharType kUsageFileName[];
+ static const base::FilePath::CharType kUsageFileName[];
static const char kUsageFileHeader[];
static const int kUsageFileSize;
static const int kUsageFileHeaderSize;
@@ -51,11 +51,11 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE FileSystemUsageCache {
private:
// Read the size, validity and the "dirty" entry described in the .usage file.
// Returns less than zero if no .usage file is available.
- static int64 Read(const FilePath& usage_file_path,
+ static int64 Read(const base::FilePath& usage_file_path,
bool* is_valid,
uint32* dirty);
- static int Write(const FilePath& usage_file_path,
+ static int Write(const base::FilePath& usage_file_path,
bool is_valid,
uint32 dirty,
int64 fs_usage);
diff --git a/webkit/fileapi/file_system_usage_cache_unittest.cc b/webkit/fileapi/file_system_usage_cache_unittest.cc
index 8662dc8..edc4457 100644
--- a/webkit/fileapi/file_system_usage_cache_unittest.cc
+++ b/webkit/fileapi/file_system_usage_cache_unittest.cc
@@ -20,7 +20,7 @@ class FileSystemUsageCacheTest : public testing::Test {
}
protected:
- FilePath GetUsageFilePath() {
+ base::FilePath GetUsageFilePath() {
return data_dir_.path().Append(FileSystemUsageCache::kUsageFileName);
}
@@ -31,14 +31,14 @@ class FileSystemUsageCacheTest : public testing::Test {
};
TEST_F(FileSystemUsageCacheTest, CreateTest) {
- FilePath usage_file_path = GetUsageFilePath();
+ base::FilePath usage_file_path = GetUsageFilePath();
EXPECT_EQ(FileSystemUsageCache::kUsageFileSize,
FileSystemUsageCache::UpdateUsage(usage_file_path, 0));
}
TEST_F(FileSystemUsageCacheTest, SetSizeTest) {
static const int64 size = 240122;
- FilePath usage_file_path = GetUsageFilePath();
+ base::FilePath usage_file_path = GetUsageFilePath();
ASSERT_EQ(FileSystemUsageCache::kUsageFileSize,
FileSystemUsageCache::UpdateUsage(usage_file_path, size));
EXPECT_EQ(size, FileSystemUsageCache::GetUsage(usage_file_path));
@@ -46,14 +46,14 @@ TEST_F(FileSystemUsageCacheTest, SetSizeTest) {
TEST_F(FileSystemUsageCacheTest, SetLargeSizeTest) {
static const int64 size = kint64max;
- FilePath usage_file_path = GetUsageFilePath();
+ base::FilePath usage_file_path = GetUsageFilePath();
ASSERT_EQ(FileSystemUsageCache::kUsageFileSize,
FileSystemUsageCache::UpdateUsage(usage_file_path, size));
EXPECT_EQ(size, FileSystemUsageCache::GetUsage(usage_file_path));
}
TEST_F(FileSystemUsageCacheTest, IncAndGetSizeTest) {
- FilePath usage_file_path = GetUsageFilePath();
+ base::FilePath usage_file_path = GetUsageFilePath();
ASSERT_EQ(FileSystemUsageCache::kUsageFileSize,
FileSystemUsageCache::UpdateUsage(usage_file_path, 98214));
ASSERT_TRUE(FileSystemUsageCache::IncrementDirty(usage_file_path));
@@ -63,7 +63,7 @@ TEST_F(FileSystemUsageCacheTest, IncAndGetSizeTest) {
TEST_F(FileSystemUsageCacheTest, DecAndGetSizeTest) {
static const int64 size = 71839;
- FilePath usage_file_path = GetUsageFilePath();
+ base::FilePath usage_file_path = GetUsageFilePath();
ASSERT_EQ(FileSystemUsageCache::kUsageFileSize,
FileSystemUsageCache::UpdateUsage(usage_file_path, size));
// DecrementDirty for dirty = 0 is invalid. It returns false.
@@ -73,7 +73,7 @@ TEST_F(FileSystemUsageCacheTest, DecAndGetSizeTest) {
TEST_F(FileSystemUsageCacheTest, IncDecAndGetSizeTest) {
static const int64 size = 198491;
- FilePath usage_file_path = GetUsageFilePath();
+ base::FilePath usage_file_path = GetUsageFilePath();
ASSERT_EQ(FileSystemUsageCache::kUsageFileSize,
FileSystemUsageCache::UpdateUsage(usage_file_path, size));
ASSERT_TRUE(FileSystemUsageCache::IncrementDirty(usage_file_path));
@@ -82,7 +82,7 @@ TEST_F(FileSystemUsageCacheTest, IncDecAndGetSizeTest) {
}
TEST_F(FileSystemUsageCacheTest, DecIncAndGetSizeTest) {
- FilePath usage_file_path = GetUsageFilePath();
+ base::FilePath usage_file_path = GetUsageFilePath();
ASSERT_EQ(FileSystemUsageCache::kUsageFileSize,
FileSystemUsageCache::UpdateUsage(usage_file_path, 854238));
// DecrementDirty for dirty = 0 is invalid. It returns false.
@@ -96,7 +96,7 @@ TEST_F(FileSystemUsageCacheTest, DecIncAndGetSizeTest) {
TEST_F(FileSystemUsageCacheTest, ManyIncsSameDecsAndGetSizeTest) {
static const int64 size = 82412;
- FilePath usage_file_path = GetUsageFilePath();
+ base::FilePath usage_file_path = GetUsageFilePath();
ASSERT_EQ(FileSystemUsageCache::kUsageFileSize,
FileSystemUsageCache::UpdateUsage(usage_file_path, size));
for (int i = 0; i < 20; i++)
@@ -107,7 +107,7 @@ TEST_F(FileSystemUsageCacheTest, ManyIncsSameDecsAndGetSizeTest) {
}
TEST_F(FileSystemUsageCacheTest, ManyIncsLessDecsAndGetSizeTest) {
- FilePath usage_file_path = GetUsageFilePath();
+ base::FilePath usage_file_path = GetUsageFilePath();
ASSERT_EQ(FileSystemUsageCache::kUsageFileSize,
FileSystemUsageCache::UpdateUsage(usage_file_path, 19319));
for (int i = 0; i < 20; i++)
@@ -119,17 +119,17 @@ TEST_F(FileSystemUsageCacheTest, ManyIncsLessDecsAndGetSizeTest) {
}
TEST_F(FileSystemUsageCacheTest, GetSizeWithoutCacheFileTest) {
- FilePath usage_file_path = GetUsageFilePath();
+ base::FilePath usage_file_path = GetUsageFilePath();
EXPECT_EQ(-1, FileSystemUsageCache::GetUsage(usage_file_path));
}
TEST_F(FileSystemUsageCacheTest, IncrementDirtyWithoutCacheFileTest) {
- FilePath usage_file_path = GetUsageFilePath();
+ base::FilePath usage_file_path = GetUsageFilePath();
EXPECT_FALSE(FileSystemUsageCache::IncrementDirty(usage_file_path));
}
TEST_F(FileSystemUsageCacheTest, DecrementDirtyWithoutCacheFileTest) {
- FilePath usage_file_path = GetUsageFilePath();
+ base::FilePath usage_file_path = GetUsageFilePath();
EXPECT_FALSE(FileSystemUsageCache::IncrementDirty(usage_file_path));
}
diff --git a/webkit/fileapi/file_system_util.cc b/webkit/fileapi/file_system_util.cc
index 07db153..7e017f7 100644
--- a/webkit/fileapi/file_system_util.cc
+++ b/webkit/fileapi/file_system_util.cc
@@ -27,26 +27,26 @@ const char kTestDir[] = "/test";
// TODO(ericu): Consider removing support for '\', even on Windows, if possible.
// There's a lot of test code that will need reworking, and we may have trouble
-// with FilePath elsewhere [e.g. DirName and other methods may also need
+// with base::FilePath elsewhere [e.g. DirName and other methods may also need
// replacement].
-FilePath VirtualPath::BaseName(const FilePath& virtual_path) {
- FilePath::StringType path = virtual_path.value();
+base::FilePath VirtualPath::BaseName(const base::FilePath& virtual_path) {
+ base::FilePath::StringType path = virtual_path.value();
// Keep everything after the final separator, but if the pathname is only
// one character and it's a separator, leave it alone.
- while (path.size() > 1 && FilePath::IsSeparator(path[path.size() - 1]))
+ while (path.size() > 1 && base::FilePath::IsSeparator(path[path.size() - 1]))
path.resize(path.size() - 1);
- FilePath::StringType::size_type last_separator =
- path.find_last_of(FilePath::kSeparators);
- if (last_separator != FilePath::StringType::npos &&
+ base::FilePath::StringType::size_type last_separator =
+ path.find_last_of(base::FilePath::kSeparators);
+ if (last_separator != base::FilePath::StringType::npos &&
last_separator < path.size() - 1)
path.erase(0, last_separator + 1);
- return FilePath(path);
+ return base::FilePath(path);
}
void VirtualPath::GetComponents(
- const FilePath& path, std::vector<FilePath::StringType>* components) {
+ const base::FilePath& path, std::vector<base::FilePath::StringType>* components) {
DCHECK(components);
if (!components)
return;
@@ -54,12 +54,12 @@ void VirtualPath::GetComponents(
if (path.value().empty())
return;
- std::vector<FilePath::StringType> ret_val;
- FilePath current = path;
- FilePath base;
+ std::vector<base::FilePath::StringType> ret_val;
+ base::FilePath current = path;
+ base::FilePath base;
- // Due to the way things are implemented, FilePath::DirName works here,
- // whereas FilePath::BaseName doesn't.
+ // Due to the way things are implemented, base::FilePath::DirName works here,
+ // whereas base::FilePath::BaseName doesn't.
while (current != current.DirName()) {
base = BaseName(current);
ret_val.push_back(base.value());
@@ -67,7 +67,7 @@ void VirtualPath::GetComponents(
}
*components =
- std::vector<FilePath::StringType>(ret_val.rbegin(), ret_val.rend());
+ std::vector<base::FilePath::StringType>(ret_val.rbegin(), ret_val.rend());
}
GURL GetFileSystemRootURI(const GURL& origin_url, FileSystemType type) {
@@ -193,7 +193,7 @@ std::string GetFileSystemTypeString(FileSystemType type) {
return std::string();
}
-std::string FilePathToString(const FilePath& file_path) {
+std::string FilePathToString(const base::FilePath& file_path) {
#if defined(OS_WIN)
return UTF16ToUTF8(file_path.value());
#elif defined(OS_POSIX)
@@ -201,11 +201,11 @@ std::string FilePathToString(const FilePath& file_path) {
#endif
}
-FilePath StringToFilePath(const std::string& file_path_string) {
+base::FilePath StringToFilePath(const std::string& file_path_string) {
#if defined(OS_WIN)
- return FilePath(UTF8ToUTF16(file_path_string));
+ return base::FilePath(UTF8ToUTF16(file_path_string));
#elif defined(OS_POSIX)
- return FilePath(file_path_string);
+ return base::FilePath(file_path_string);
#endif
}
@@ -282,7 +282,7 @@ std::string GetIsolatedFileSystemRootURIString(
root.append(filesystem_id);
root.append("/");
if (!optional_root_name.empty()) {
- DCHECK(!FilePath::FromUTF8Unsafe(optional_root_name).ReferencesParent());
+ DCHECK(!base::FilePath::FromUTF8Unsafe(optional_root_name).ReferencesParent());
root.append(optional_root_name);
root.append("/");
}
diff --git a/webkit/fileapi/file_system_util.h b/webkit/fileapi/file_system_util.h
index b8bc41f..be863bf 100644
--- a/webkit/fileapi/file_system_util.h
+++ b/webkit/fileapi/file_system_util.h
@@ -27,17 +27,17 @@ extern const char kTestDir[];
class WEBKIT_STORAGE_EXPORT VirtualPath {
public:
- // Use this instead of FilePath::BaseName when operating on virtual paths.
- // FilePath::BaseName will get confused by ':' on Windows when it looks like a
+ // Use this instead of base::FilePath::BaseName when operating on virtual paths.
+ // base::FilePath::BaseName will get confused by ':' on Windows when it looks like a
// drive letter separator; this will treat it as just another character.
- static FilePath BaseName(const FilePath& virtual_path);
+ static base::FilePath BaseName(const base::FilePath& virtual_path);
- // Likewise, use this instead of FilePath::GetComponents when operating on
+ // Likewise, use this instead of base::FilePath::GetComponents when operating on
// virtual paths.
// Note that this assumes very clean input, with no leading slash, and it will
// not evaluate '.' or '..' components.
- static void GetComponents(const FilePath& path,
- std::vector<FilePath::StringType>* components);
+ static void GetComponents(const base::FilePath& path,
+ std::vector<base::FilePath::StringType>* components);
};
// Returns the root URI of the filesystem that can be specified by a pair of
@@ -99,10 +99,10 @@ WEBKIT_STORAGE_EXPORT std::string GetFileSystemTypeString(FileSystemType type);
//
// TODO(tzik): Replace CreateFilePath and FilePathToString in
// third_party/leveldatabase/env_chromium.cc with them.
-WEBKIT_STORAGE_EXPORT std::string FilePathToString(const FilePath& file_path);
+WEBKIT_STORAGE_EXPORT std::string FilePathToString(const base::FilePath& file_path);
// Decode a file path from |file_path_string|.
-WEBKIT_STORAGE_EXPORT FilePath StringToFilePath(
+WEBKIT_STORAGE_EXPORT base::FilePath StringToFilePath(
const std::string& file_path_string);
// File error conversion
diff --git a/webkit/fileapi/file_system_util_unittest.cc b/webkit/fileapi/file_system_util_unittest.cc
index 946e75f..0fd4f0a 100644
--- a/webkit/fileapi/file_system_util_unittest.cc
+++ b/webkit/fileapi/file_system_util_unittest.cc
@@ -30,8 +30,8 @@ TEST_F(FileSystemUtilTest, GetPersistentFileSystemRootURI) {
TEST_F(FileSystemUtilTest, VirtualPathBaseName) {
struct test_data {
- const FilePath::StringType path;
- const FilePath::StringType base_name;
+ const base::FilePath::StringType path;
+ const base::FilePath::StringType base_name;
} test_cases[] = {
{ FILE_PATH_LITERAL("foo/bar"), FILE_PATH_LITERAL("bar") },
{ FILE_PATH_LITERAL("foo/b:bar"), FILE_PATH_LITERAL("b:bar") },
@@ -48,17 +48,17 @@ TEST_F(FileSystemUtilTest, VirtualPathBaseName) {
{ FILE_PATH_LITERAL("bar"), FILE_PATH_LITERAL("bar") }
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); ++i) {
- FilePath input = FilePath(test_cases[i].path);
- FilePath base_name = VirtualPath::BaseName(input);
+ base::FilePath input = base::FilePath(test_cases[i].path);
+ base::FilePath base_name = VirtualPath::BaseName(input);
EXPECT_EQ(test_cases[i].base_name, base_name.value());
}
}
TEST_F(FileSystemUtilTest, VirtualPathGetComponents) {
struct test_data {
- const FilePath::StringType path;
+ const base::FilePath::StringType path;
size_t count;
- const FilePath::StringType components[3];
+ const base::FilePath::StringType components[3];
} test_cases[] = {
{ FILE_PATH_LITERAL("foo/bar"),
2,
@@ -83,8 +83,8 @@ TEST_F(FileSystemUtilTest, VirtualPathGetComponents) {
{ FILE_PATH_LITERAL("foo"), FILE_PATH_LITERAL("bar") } },
};
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); ++i) {
- FilePath input = FilePath(test_cases[i].path);
- std::vector<FilePath::StringType> components;
+ base::FilePath input = base::FilePath(test_cases[i].path);
+ std::vector<base::FilePath::StringType> components;
VirtualPath::GetComponents(input, &components);
EXPECT_EQ(test_cases[i].count, components.size());
for (size_t j = 0; j < components.size(); ++j)
diff --git a/webkit/fileapi/file_util_helper.cc b/webkit/fileapi/file_util_helper.cc
index 2582f8a..49ea72c 100644
--- a/webkit/fileapi/file_util_helper.cc
+++ b/webkit/fileapi/file_util_helper.cc
@@ -21,20 +21,20 @@ namespace {
// A helper class to delete a temporary file.
class ScopedFileDeleter {
public:
- explicit ScopedFileDeleter(const FilePath& path) : path_(path) {}
+ explicit ScopedFileDeleter(const base::FilePath& path) : path_(path) {}
~ScopedFileDeleter() {
file_util::Delete(path_, false /* recursive */);
}
private:
- FilePath path_;
+ base::FilePath path_;
};
bool IsInRoot(const FileSystemURL& url) {
// If path is in the root, path.DirName() will be ".",
// since we use paths with no leading '/'.
- FilePath parent = url.path().DirName();
- return parent.empty() || parent == FilePath(FILE_PATH_LITERAL("."));
+ base::FilePath parent = url.path().DirName();
+ return parent.empty() || parent == base::FilePath(FILE_PATH_LITERAL("."));
}
// A helper class for cross-FileUtil Copy/Move operations.
@@ -160,7 +160,7 @@ PlatformFileError CrossFileUtilHelper::CopyOrMoveDirectory(
// Store modified timestamp of the root directory.
if (operation_ == OPERATION_MOVE) {
base::PlatformFileInfo file_info;
- FilePath platform_file_path;
+ base::FilePath platform_file_path;
error = src_util_->GetFileInfo(
context_, src_url, &file_info, &platform_file_path);
if (error != base::PLATFORM_FILE_OK)
@@ -173,9 +173,9 @@ PlatformFileError CrossFileUtilHelper::CopyOrMoveDirectory(
src_util_->CreateFileEnumerator(context_,
src_url,
true /* recursive */));
- FilePath src_file_path_each;
+ base::FilePath src_file_path_each;
while (!(src_file_path_each = file_enum->Next()).empty()) {
- FilePath dest_file_path_each(dest_url.path());
+ base::FilePath dest_file_path_each(dest_url.path());
src_url.path().AppendRelativePath(
src_file_path_each, &dest_file_path_each);
@@ -229,7 +229,7 @@ PlatformFileError CrossFileUtilHelper::CopyOrMoveFile(
// Resolve the src_url's underlying file path.
base::PlatformFileInfo file_info;
- FilePath platform_file_path;
+ base::FilePath platform_file_path;
SnapshotFilePolicy snapshot_policy;
PlatformFileError error = src_util_->CreateSnapshotFile(
@@ -265,7 +265,7 @@ bool FileUtilHelper::DirectoryExists(FileSystemOperationContext* context,
return true;
base::PlatformFileInfo file_info;
- FilePath platform_path;
+ base::FilePath platform_path;
PlatformFileError error = file_util->GetFileInfo(
context, url, &file_info, &platform_path);
return error == base::PLATFORM_FILE_OK && file_info.is_directory;
@@ -320,7 +320,7 @@ base::PlatformFileError FileUtilHelper::ReadDirectory(
DCHECK(entries);
base::PlatformFileInfo file_info;
- FilePath platform_path;
+ base::FilePath platform_path;
PlatformFileError error = file_util->GetFileInfo(
context, url, &file_info, &platform_path);
if (error != base::PLATFORM_FILE_OK)
@@ -331,7 +331,7 @@ base::PlatformFileError FileUtilHelper::ReadDirectory(
scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator> file_enum(
file_util->CreateFileEnumerator(context, url, false /* recursive */));
- FilePath current;
+ base::FilePath current;
while (!(current = file_enum->Next()).empty()) {
base::FileUtilProxy::Entry entry;
entry.is_directory = file_enum->IsDirectory();
@@ -351,8 +351,8 @@ base::PlatformFileError FileUtilHelper::DeleteDirectoryRecursive(
scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator> file_enum(
file_util->CreateFileEnumerator(context, url, true /* recursive */));
- FilePath file_path_each;
- std::stack<FilePath> directories;
+ base::FilePath file_path_each;
+ std::stack<base::FilePath> directories;
while (!(file_path_each = file_enum->Next()).empty()) {
if (file_enum->IsDirectory()) {
directories.push(file_path_each);
diff --git a/webkit/fileapi/file_writer_delegate_unittest.cc b/webkit/fileapi/file_writer_delegate_unittest.cc
index 8a3fdf8..fa40da0 100644
--- a/webkit/fileapi/file_writer_delegate_unittest.cc
+++ b/webkit/fileapi/file_writer_delegate_unittest.cc
@@ -197,7 +197,7 @@ net::URLRequestJob* FileWriterDelegateTest::Factory(
void FileWriterDelegateTest::SetUp() {
ASSERT_TRUE(dir_.CreateUniqueTempDir());
- FilePath base_dir = dir_.path().AppendASCII("filesystem");
+ base::FilePath base_dir = dir_.path().AppendASCII("filesystem");
test_helper_.SetUp(base_dir);
scoped_ptr<FileSystemOperationContext> context(
diff --git a/webkit/fileapi/isolated_context.cc b/webkit/fileapi/isolated_context.cc
index fe1aec0..12232ce 100644
--- a/webkit/fileapi/isolated_context.cc
+++ b/webkit/fileapi/isolated_context.cc
@@ -18,15 +18,15 @@ namespace fileapi {
namespace {
-FilePath::StringType GetRegisterNameForPath(const FilePath& path) {
+base::FilePath::StringType GetRegisterNameForPath(const base::FilePath& path) {
// If it's not a root path simply return a base name.
if (path.DirName() != path)
return path.BaseName().value();
#if defined(FILE_PATH_USES_DRIVE_LETTERS)
- FilePath::StringType name;
+ base::FilePath::StringType name;
for (size_t i = 0;
- i < path.value().size() && !FilePath::IsSeparator(path.value()[i]);
+ i < path.value().size() && !base::FilePath::IsSeparator(path.value()[i]);
++i) {
if (path.value()[i] == L':') {
name.append(L"_drive");
@@ -67,19 +67,19 @@ IsolatedContext::FileInfoSet::FileInfoSet() {}
IsolatedContext::FileInfoSet::~FileInfoSet() {}
bool IsolatedContext::FileInfoSet::AddPath(
- const FilePath& path, std::string* registered_name) {
+ const base::FilePath& path, std::string* registered_name) {
// The given path should not contain any '..' and should be absolute.
if (path.ReferencesParent() || !path.IsAbsolute())
return false;
- FilePath::StringType name = GetRegisterNameForPath(path);
- std::string utf8name = FilePath(name).AsUTF8Unsafe();
- FilePath normalized_path = path.NormalizePathSeparators();
+ base::FilePath::StringType name = GetRegisterNameForPath(path);
+ std::string utf8name = base::FilePath(name).AsUTF8Unsafe();
+ base::FilePath normalized_path = path.NormalizePathSeparators();
bool inserted =
fileset_.insert(MountPointInfo(utf8name, normalized_path)).second;
if (!inserted) {
int suffix = 1;
- std::string basepart = FilePath(name).RemoveExtension().AsUTF8Unsafe();
- std::string ext = FilePath(FilePath(name).Extension()).AsUTF8Unsafe();
+ std::string basepart = base::FilePath(name).RemoveExtension().AsUTF8Unsafe();
+ std::string ext = base::FilePath(base::FilePath(name).Extension()).AsUTF8Unsafe();
while (!inserted) {
utf8name = base::StringPrintf("%s (%d)", basepart.c_str(), suffix++);
if (!ext.empty())
@@ -94,7 +94,7 @@ bool IsolatedContext::FileInfoSet::AddPath(
}
bool IsolatedContext::FileInfoSet::AddPathWithName(
- const FilePath& path, const std::string& name) {
+ const base::FilePath& path, const std::string& name) {
// The given path should not contain any '..' and should be absolute.
if (path.ReferencesParent() || !path.IsAbsolute())
return false;
@@ -126,7 +126,7 @@ class IsolatedContext::Instance {
void AddRef() { ++ref_counts_; }
void RemoveRef() { --ref_counts_; }
- bool ResolvePathForName(const std::string& name, FilePath* path) const;
+ bool ResolvePathForName(const std::string& name, base::FilePath* path) const;
// Returns true if the instance is a single-path instance.
bool IsSinglePathInstance() const;
@@ -166,13 +166,13 @@ IsolatedContext::Instance::Instance(FileSystemType type,
IsolatedContext::Instance::~Instance() {}
bool IsolatedContext::Instance::ResolvePathForName(const std::string& name,
- FilePath* path) const {
+ base::FilePath* path) const {
if (IsSinglePathIsolatedFileSystem(type_)) {
*path = file_info_.path;
return file_info_.name == name;
}
std::set<MountPointInfo>::const_iterator found = files_.find(
- MountPointInfo(name, FilePath()));
+ MountPointInfo(name, base::FilePath()));
if (found == files_.end())
return false;
*path = found->path;
@@ -206,15 +206,15 @@ std::string IsolatedContext::RegisterDraggedFileSystem(
std::string IsolatedContext::RegisterFileSystemForPath(
FileSystemType type,
- const FilePath& path_in,
+ const base::FilePath& path_in,
std::string* register_name) {
- FilePath path(path_in.NormalizePathSeparators());
+ base::FilePath path(path_in.NormalizePathSeparators());
DCHECK(!path.ReferencesParent() && path.IsAbsolute());
std::string name;
if (register_name && !register_name->empty()) {
name = *register_name;
} else {
- name = FilePath(GetRegisterNameForPath(path)).AsUTF8Unsafe();
+ name = base::FilePath(GetRegisterNameForPath(path)).AsUTF8Unsafe();
if (register_name)
register_name->assign(name);
}
@@ -236,7 +236,7 @@ bool IsolatedContext::RevokeFileSystem(const std::string& filesystem_id) {
}
bool IsolatedContext::GetRegisteredPath(
- const std::string& filesystem_id, FilePath* path) const {
+ const std::string& filesystem_id, base::FilePath* path) const {
DCHECK(path);
base::AutoLock locker(lock_);
IDToInstance::const_iterator found = instance_map_.find(filesystem_id);
@@ -246,10 +246,10 @@ bool IsolatedContext::GetRegisteredPath(
return true;
}
-bool IsolatedContext::CrackVirtualPath(const FilePath& virtual_path,
+bool IsolatedContext::CrackVirtualPath(const base::FilePath& virtual_path,
std::string* id_or_name,
FileSystemType* type,
- FilePath* path) const {
+ base::FilePath* path) const {
DCHECK(id_or_name);
DCHECK(path);
@@ -258,17 +258,17 @@ bool IsolatedContext::CrackVirtualPath(const FilePath& virtual_path,
return false;
// The virtual_path should comprise <id_or_name> and <relative_path> parts.
- std::vector<FilePath::StringType> components;
+ std::vector<base::FilePath::StringType> components;
virtual_path.GetComponents(&components);
if (components.size() < 1)
return false;
- std::vector<FilePath::StringType>::iterator component_iter =
+ std::vector<base::FilePath::StringType>::iterator component_iter =
components.begin();
- std::string fsid = FilePath(*component_iter++).MaybeAsASCII();
+ std::string fsid = base::FilePath(*component_iter++).MaybeAsASCII();
if (fsid.empty())
return false;
- FilePath cracked_path;
+ base::FilePath cracked_path;
{
base::AutoLock locker(lock_);
IDToInstance::const_iterator found_instance = instance_map_.find(fsid);
@@ -286,7 +286,7 @@ bool IsolatedContext::CrackVirtualPath(const FilePath& virtual_path,
}
// *component_iter should be a name of the registered path.
- std::string name = FilePath(*component_iter++).AsUTF8Unsafe();
+ std::string name = base::FilePath(*component_iter++).AsUTF8Unsafe();
if (!instance->ResolvePathForName(name, &cracked_path))
return false;
}
@@ -309,13 +309,13 @@ FileSystemURL IsolatedContext::CrackURL(const GURL& url) const {
FileSystemURL IsolatedContext::CreateCrackedFileSystemURL(
const GURL& origin,
FileSystemType type,
- const FilePath& path) const {
+ const base::FilePath& path) const {
if (!HandlesFileSystemMountType(type))
return FileSystemURL();
std::string mount_name;
FileSystemType cracked_type;
- FilePath cracked_path;
+ base::FilePath cracked_path;
if (!CrackVirtualPath(path, &mount_name, &cracked_type, &cracked_path))
return FileSystemURL();
@@ -323,9 +323,9 @@ FileSystemURL IsolatedContext::CreateCrackedFileSystemURL(
mount_name, cracked_type, cracked_path);
}
-void IsolatedContext::RevokeFileSystemByPath(const FilePath& path_in) {
+void IsolatedContext::RevokeFileSystemByPath(const base::FilePath& path_in) {
base::AutoLock locker(lock_);
- FilePath path(path_in.NormalizePathSeparators());
+ base::FilePath path(path_in.NormalizePathSeparators());
PathToID::iterator ids_iter = path_to_id_map_.find(path);
if (ids_iter == path_to_id_map_.end())
return;
@@ -377,9 +377,9 @@ bool IsolatedContext::GetDraggedFileInfo(
return true;
}
-FilePath IsolatedContext::CreateVirtualRootPath(
+base::FilePath IsolatedContext::CreateVirtualRootPath(
const std::string& filesystem_id) const {
- return FilePath().AppendASCII(filesystem_id);
+ return base::FilePath().AppendASCII(filesystem_id);
}
IsolatedContext::IsolatedContext() {
diff --git a/webkit/fileapi/isolated_context.h b/webkit/fileapi/isolated_context.h
index d679bc3..faf034c 100644
--- a/webkit/fileapi/isolated_context.h
+++ b/webkit/fileapi/isolated_context.h
@@ -48,12 +48,12 @@ class WEBKIT_STORAGE_EXPORT IsolatedContext : public MountPoints {
// the registered name assigned for the path. |path| needs to be
// absolute and should not contain parent references.
// Return false if the |path| is not valid and could not be added.
- bool AddPath(const FilePath& path, std::string* registered_name);
+ bool AddPath(const base::FilePath& path, std::string* registered_name);
// Add the given |path| with the |name|.
// Return false if the |name| is already registered in the set or
// is not valid and could not be added.
- bool AddPathWithName(const FilePath& path, const std::string& name);
+ bool AddPathWithName(const base::FilePath& path, const std::string& name);
const std::set<MountPointInfo>& fileset() const { return fileset_; }
@@ -99,7 +99,7 @@ class WEBKIT_STORAGE_EXPORT IsolatedContext : public MountPoints {
// registered as the given |register_name|, otherwise it is populated
// with the name internally assigned to the path.
std::string RegisterFileSystemForPath(FileSystemType type,
- const FilePath& path,
+ const base::FilePath& path,
std::string* register_name);
// Revokes all filesystem(s) registered for the given path.
@@ -110,7 +110,7 @@ class WEBKIT_STORAGE_EXPORT IsolatedContext : public MountPoints {
// It is ok to call this for the path that has no associated filesystems.
// Note that this only works for the filesystems registered by
// |RegisterFileSystemForPath|.
- void RevokeFileSystemByPath(const FilePath& path);
+ void RevokeFileSystemByPath(const base::FilePath& path);
// Adds a reference to a filesystem specified by the given filesystem_id.
void AddReference(const std::string& filesystem_id);
@@ -133,19 +133,19 @@ class WEBKIT_STORAGE_EXPORT IsolatedContext : public MountPoints {
virtual bool HandlesFileSystemMountType(FileSystemType type) const OVERRIDE;
virtual bool RevokeFileSystem(const std::string& filesystem_id) OVERRIDE;
virtual bool GetRegisteredPath(const std::string& filesystem_id,
- FilePath* path) const OVERRIDE;
- virtual bool CrackVirtualPath(const FilePath& virtual_path,
+ base::FilePath* path) const OVERRIDE;
+ virtual bool CrackVirtualPath(const base::FilePath& virtual_path,
std::string* filesystem_id,
FileSystemType* type,
- FilePath* path) const OVERRIDE;
+ base::FilePath* path) const OVERRIDE;
virtual FileSystemURL CrackURL(const GURL& url) const OVERRIDE;
virtual FileSystemURL CreateCrackedFileSystemURL(
const GURL& origin,
FileSystemType type,
- const FilePath& path) const OVERRIDE;
+ const base::FilePath& path) const OVERRIDE;
// Returns the virtual root path that looks like /<filesystem_id>.
- FilePath CreateVirtualRootPath(const std::string& filesystem_id) const;
+ base::FilePath CreateVirtualRootPath(const std::string& filesystem_id) const;
private:
friend struct base::DefaultLazyInstanceTraits<IsolatedContext>;
@@ -156,7 +156,7 @@ class WEBKIT_STORAGE_EXPORT IsolatedContext : public MountPoints {
typedef std::map<std::string, Instance*> IDToInstance;
// Reverse map from registered path to IDs.
- typedef std::map<FilePath, std::set<std::string> > PathToID;
+ typedef std::map<base::FilePath, std::set<std::string> > PathToID;
// Obtain an instance of this class via GetInstance().
IsolatedContext();
diff --git a/webkit/fileapi/isolated_context_unittest.cc b/webkit/fileapi/isolated_context_unittest.cc
index 4cb7a84..c2c9537 100644
--- a/webkit/fileapi/isolated_context_unittest.cc
+++ b/webkit/fileapi/isolated_context_unittest.cc
@@ -24,19 +24,19 @@ typedef IsolatedContext::MountPointInfo FileInfo;
namespace {
-const FilePath kTestPaths[] = {
- FilePath(DRIVE FPL("/a/b.txt")),
- FilePath(DRIVE FPL("/c/d/e")),
- FilePath(DRIVE FPL("/h/")),
- FilePath(DRIVE FPL("/")),
+const base::FilePath kTestPaths[] = {
+ base::FilePath(DRIVE FPL("/a/b.txt")),
+ base::FilePath(DRIVE FPL("/c/d/e")),
+ base::FilePath(DRIVE FPL("/h/")),
+ base::FilePath(DRIVE FPL("/")),
#if defined(FILE_PATH_USES_WIN_SEPARATORS)
- FilePath(DRIVE FPL("\\foo\\bar")),
- FilePath(DRIVE FPL("\\")),
+ base::FilePath(DRIVE FPL("\\foo\\bar")),
+ base::FilePath(DRIVE FPL("\\")),
#endif
// For duplicated base name test.
- FilePath(DRIVE FPL("/")),
- FilePath(DRIVE FPL("/f/e")),
- FilePath(DRIVE FPL("/f/b.txt")),
+ base::FilePath(DRIVE FPL("/")),
+ base::FilePath(DRIVE FPL("/f/e")),
+ base::FilePath(DRIVE FPL("/f/b.txt")),
};
} // namespace
@@ -71,7 +71,7 @@ class IsolatedContextTest : public testing::Test {
protected:
std::string id_;
- std::multiset<FilePath> fileset_;
+ std::multiset<base::FilePath> fileset_;
std::vector<std::string> names_;
private:
@@ -91,10 +91,10 @@ TEST_F(IsolatedContextTest, RegisterAndRevokeTest) {
// register in SetUp() by RegisterDraggedFileSystem) is properly cracked as
// a valid virtual path in the isolated filesystem.
for (size_t i = 0; i < arraysize(kTestPaths); ++i) {
- FilePath virtual_path = isolated_context()->CreateVirtualRootPath(id_)
+ base::FilePath virtual_path = isolated_context()->CreateVirtualRootPath(id_)
.AppendASCII(names_[i]);
std::string cracked_id;
- FilePath cracked_path;
+ base::FilePath cracked_path;
FileSystemType cracked_type;
ASSERT_TRUE(isolated_context()->CrackVirtualPath(
virtual_path, &cracked_id, &cracked_type, &cracked_path));
@@ -106,14 +106,14 @@ TEST_F(IsolatedContextTest, RegisterAndRevokeTest) {
// Make sure GetRegisteredPath returns false for id_ since it is
// registered for dragged files.
- FilePath path;
+ base::FilePath path;
ASSERT_FALSE(isolated_context()->GetRegisteredPath(id_, &path));
// Deref the current one and registering a new one.
isolated_context()->RemoveReference(id_);
std::string id2 = isolated_context()->RegisterFileSystemForPath(
- kFileSystemTypeNativeLocal, FilePath(DRIVE FPL("/foo")), NULL);
+ kFileSystemTypeNativeLocal, base::FilePath(DRIVE FPL("/foo")), NULL);
// Make sure the GetDraggedFileInfo returns false for both ones.
ASSERT_FALSE(isolated_context()->GetDraggedFileInfo(id2, &toplevels));
@@ -165,7 +165,7 @@ TEST_F(IsolatedContextTest, RegisterAndRevokeTest) {
TEST_F(IsolatedContextTest, CrackWithRelativePaths) {
const struct {
- FilePath::StringType path;
+ base::FilePath::StringType path;
bool valid;
} relatives[] = {
{ FPL("foo"), true },
@@ -186,10 +186,10 @@ TEST_F(IsolatedContextTest, CrackWithRelativePaths) {
for (size_t j = 0; j < ARRAYSIZE_UNSAFE(relatives); ++j) {
SCOPED_TRACE(testing::Message() << "Testing "
<< kTestPaths[i].value() << " " << relatives[j].path);
- FilePath virtual_path = isolated_context()->CreateVirtualRootPath(id_)
+ base::FilePath virtual_path = isolated_context()->CreateVirtualRootPath(id_)
.AppendASCII(names_[i]).Append(relatives[j].path);
std::string cracked_id;
- FilePath cracked_path;
+ base::FilePath cracked_path;
FileSystemType cracked_type;
if (!relatives[j].valid) {
ASSERT_FALSE(isolated_context()->CrackVirtualPath(
@@ -209,7 +209,7 @@ TEST_F(IsolatedContextTest, CrackWithRelativePaths) {
TEST_F(IsolatedContextTest, CrackURLWithRelativePaths) {
const struct {
- FilePath::StringType path;
+ base::FilePath::StringType path;
bool valid;
} relatives[] = {
{ FPL("foo"), true },
@@ -230,7 +230,7 @@ TEST_F(IsolatedContextTest, CrackURLWithRelativePaths) {
for (size_t j = 0; j < ARRAYSIZE_UNSAFE(relatives); ++j) {
SCOPED_TRACE(testing::Message() << "Testing "
<< kTestPaths[i].value() << " " << relatives[j].path);
- FilePath virtual_path = isolated_context()->CreateVirtualRootPath(id_)
+ base::FilePath virtual_path = isolated_context()->CreateVirtualRootPath(id_)
.AppendASCII(names_[i]).Append(relatives[j].path);
FileSystemURL cracked = isolated_context()->CreateCrackedFileSystemURL(
@@ -254,12 +254,12 @@ TEST_F(IsolatedContextTest, CrackURLWithRelativePaths) {
TEST_F(IsolatedContextTest, TestWithVirtualRoot) {
std::string cracked_id;
- FilePath cracked_path;
+ base::FilePath cracked_path;
// Trying to crack virtual root "/" returns true but with empty cracked path
// as "/" of the isolated filesystem is a pure virtual directory
// that has no corresponding platform directory.
- FilePath virtual_path = isolated_context()->CreateVirtualRootPath(id_);
+ base::FilePath virtual_path = isolated_context()->CreateVirtualRootPath(id_);
ASSERT_TRUE(isolated_context()->CrackVirtualPath(
virtual_path, &cracked_id, NULL, &cracked_path));
ASSERT_EQ(FPL(""), cracked_path.value());
@@ -275,7 +275,7 @@ TEST_F(IsolatedContextTest, TestWithVirtualRoot) {
TEST_F(IsolatedContextTest, CanHandleURL) {
const GURL test_origin("http://chromium.org");
- const FilePath test_path(FPL("/mount"));
+ const base::FilePath test_path(FPL("/mount"));
// Should handle isolated file system.
EXPECT_TRUE(isolated_context()->HandlesFileSystemMountType(
diff --git a/webkit/fileapi/isolated_file_util.cc b/webkit/fileapi/isolated_file_util.cc
index efe485e..66abe55 100644
--- a/webkit/fileapi/isolated_file_util.cc
+++ b/webkit/fileapi/isolated_file_util.cc
@@ -34,10 +34,10 @@ class SetFileEnumerator : public FileSystemFileUtil::AbstractFileEnumerator {
virtual ~SetFileEnumerator() {}
// AbstractFileEnumerator overrides.
- virtual FilePath Next() OVERRIDE {
+ virtual base::FilePath Next() OVERRIDE {
if (file_iter_ == files_.end())
- return FilePath();
- FilePath platform_file = (file_iter_++)->path;
+ return base::FilePath();
+ base::FilePath platform_file = (file_iter_++)->path;
NativeFileUtil::GetFileInfo(platform_file, &file_info_);
return platform_file;
}
@@ -65,7 +65,7 @@ class RecursiveSetFileEnumerator
virtual ~RecursiveSetFileEnumerator() {}
// AbstractFileEnumerator overrides.
- virtual FilePath Next() OVERRIDE;
+ virtual base::FilePath Next() OVERRIDE;
virtual int64 Size() OVERRIDE {
DCHECK(current_enumerator_.get());
return current_enumerator_->Size();
@@ -85,16 +85,16 @@ class RecursiveSetFileEnumerator
scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator> current_enumerator_;
};
-FilePath RecursiveSetFileEnumerator::Next() {
+base::FilePath RecursiveSetFileEnumerator::Next() {
if (current_enumerator_.get()) {
- FilePath path = current_enumerator_->Next();
+ base::FilePath path = current_enumerator_->Next();
if (!path.empty())
return path;
}
// We reached the end.
if (file_iter_ == files_.end())
- return FilePath();
+ return base::FilePath();
// Enumerates subdirectories of the next path.
FileInfo& next_file = *file_iter_++;
@@ -113,7 +113,7 @@ IsolatedFileUtil::IsolatedFileUtil() {}
PlatformFileError IsolatedFileUtil::GetLocalFilePath(
FileSystemOperationContext* context,
const FileSystemURL& url,
- FilePath* local_file_path) {
+ base::FilePath* local_file_path) {
DCHECK(local_file_path);
DCHECK(url.is_valid());
if (url.path().empty()) {
@@ -132,7 +132,7 @@ PlatformFileError DraggedFileUtil::GetFileInfo(
FileSystemOperationContext* context,
const FileSystemURL& url,
PlatformFileInfo* file_info,
- FilePath* platform_path) {
+ base::FilePath* platform_path) {
DCHECK(file_info);
std::string filesystem_id;
DCHECK(url.is_valid());
@@ -149,7 +149,7 @@ PlatformFileError DraggedFileUtil::GetFileInfo(
}
base::PlatformFileError error =
NativeFileUtil::GetFileInfo(url.path(), file_info);
- if (file_util::IsLink(url.path()) && !FilePath().IsParent(url.path())) {
+ if (file_util::IsLink(url.path()) && !base::FilePath().IsParent(url.path())) {
// Don't follow symlinks unless it's the one that are selected by the user.
return base::PLATFORM_FILE_ERROR_NOT_FOUND;
}
diff --git a/webkit/fileapi/isolated_file_util.h b/webkit/fileapi/isolated_file_util.h
index e2f65ee..9f3ae90 100644
--- a/webkit/fileapi/isolated_file_util.h
+++ b/webkit/fileapi/isolated_file_util.h
@@ -22,7 +22,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE IsolatedFileUtil : public LocalFileUtil {
virtual base::PlatformFileError GetLocalFilePath(
FileSystemOperationContext* context,
const FileSystemURL& file_system_url,
- FilePath* local_file_path) OVERRIDE;
+ base::FilePath* local_file_path) OVERRIDE;
};
// Dragged file system is a specialized IsolatedFileUtil where read access to
@@ -38,7 +38,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE DraggedFileUtil : public IsolatedFileUtil {
FileSystemOperationContext* context,
const FileSystemURL& url,
base::PlatformFileInfo* file_info,
- FilePath* platform_path) OVERRIDE;
+ base::FilePath* platform_path) OVERRIDE;
virtual scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator(
FileSystemOperationContext* context,
const FileSystemURL& root_url,
diff --git a/webkit/fileapi/isolated_file_util_unittest.cc b/webkit/fileapi/isolated_file_util_unittest.cc
index 06c1a34..4652372 100644
--- a/webkit/fileapi/isolated_file_util_unittest.cc
+++ b/webkit/fileapi/isolated_file_util_unittest.cc
@@ -39,16 +39,16 @@ namespace {
// Random root paths in which we create each file/directory of the
// RegularTestCases (so that we can simulate a drop with files/directories
// from multiple directories).
-static const FilePath::CharType* kRootPaths[] = {
+static const base::FilePath::CharType* kRootPaths[] = {
FILE_PATH_LITERAL("a"),
FILE_PATH_LITERAL("b/c"),
FILE_PATH_LITERAL("etc"),
};
-FilePath GetTopLevelPath(const FilePath& path) {
- std::vector<FilePath::StringType> components;
+base::FilePath GetTopLevelPath(const base::FilePath& path) {
+ std::vector<base::FilePath::StringType> components;
path.GetComponents(&components);
- return FilePath(components[0]);
+ return base::FilePath(components[0]);
}
bool IsDirectoryEmpty(FileSystemOperationContext* context,
@@ -100,7 +100,7 @@ class IsolatedFileUtilTest : public testing::Test {
IsolatedContext* isolated_context() const {
return IsolatedContext::GetInstance();
}
- const FilePath& root_path() const {
+ const base::FilePath& root_path() const {
return data_dir_.path();
}
FileSystemContext* file_system_context() const {
@@ -112,20 +112,20 @@ class IsolatedFileUtilTest : public testing::Test {
}
std::string filesystem_id() const { return filesystem_id_; }
- FilePath GetTestCasePlatformPath(const FilePath::StringType& path) {
- return toplevel_root_map_[GetTopLevelPath(FilePath(path))].Append(path).
+ base::FilePath GetTestCasePlatformPath(const base::FilePath::StringType& path) {
+ return toplevel_root_map_[GetTopLevelPath(base::FilePath(path))].Append(path).
NormalizePathSeparators();
}
- FilePath GetTestCaseLocalPath(const FilePath& path) {
- FilePath relative;
+ base::FilePath GetTestCaseLocalPath(const base::FilePath& path) {
+ base::FilePath relative;
if (data_dir_.path().AppendRelativePath(path, &relative))
return relative;
return path;
}
- FileSystemURL GetFileSystemURL(const FilePath& path) const {
- FilePath virtual_path = isolated_context()->CreateVirtualRootPath(
+ FileSystemURL GetFileSystemURL(const base::FilePath& path) const {
+ base::FilePath virtual_path = isolated_context()->CreateVirtualRootPath(
filesystem_id()).Append(path);
return file_system_context_->CreateCrackedFileSystemURL(
GURL("http://example.com"),
@@ -133,7 +133,7 @@ class IsolatedFileUtilTest : public testing::Test {
virtual_path);
}
- FileSystemURL GetOtherFileSystemURL(const FilePath& path) {
+ FileSystemURL GetOtherFileSystemURL(const base::FilePath& path) {
return other_file_util_helper_.CreateURL(GetTestCaseLocalPath(path));
}
@@ -145,7 +145,7 @@ class IsolatedFileUtilTest : public testing::Test {
// Get the file info for url1.
base::PlatformFileInfo info1;
- FilePath platform_path1;
+ base::FilePath platform_path1;
context.reset(new FileSystemOperationContext(file_system_context()));
ASSERT_EQ(base::PLATFORM_FILE_OK,
file_util1->GetFileInfo(context.get(), url1,
@@ -153,7 +153,7 @@ class IsolatedFileUtilTest : public testing::Test {
// Get the file info for url2.
base::PlatformFileInfo info2;
- FilePath platform_path2;
+ base::FilePath platform_path2;
context.reset(new FileSystemOperationContext(file_system_context()));
ASSERT_EQ(base::PLATFORM_FILE_OK,
file_util2->GetFileInfo(context.get(), url2,
@@ -176,20 +176,20 @@ class IsolatedFileUtilTest : public testing::Test {
const FileSystemURL& root1,
const FileSystemURL& root2) {
scoped_ptr<FileSystemOperationContext> context;
- FilePath root_path1 = root1.path();
- FilePath root_path2 = root2.path();
+ base::FilePath root_path1 = root1.path();
+ base::FilePath root_path2 = root2.path();
context.reset(new FileSystemOperationContext(file_system_context()));
scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator> file_enum1 =
file_util1->CreateFileEnumerator(context.get(), root1,
true /* recursive */);
- FilePath current;
- std::set<FilePath> file_set1;
+ base::FilePath current;
+ std::set<base::FilePath> file_set1;
while (!(current = file_enum1->Next()).empty()) {
if (file_enum1->IsDirectory())
continue;
- FilePath relative;
+ base::FilePath relative;
root_path1.AppendRelativePath(current, &relative);
file_set1.insert(relative);
}
@@ -200,7 +200,7 @@ class IsolatedFileUtilTest : public testing::Test {
true /* recursive */);
while (!(current = file_enum2->Next()).empty()) {
- FilePath relative;
+ base::FilePath relative;
root_path2.AppendRelativePath(current, &relative);
FileSystemURL url1 = root1.WithPath(root_path1.Append(relative));
FileSystemURL url2 = root2.WithPath(root_path2.Append(relative));
@@ -229,13 +229,13 @@ class IsolatedFileUtilTest : public testing::Test {
IsolatedContext::FileInfoSet toplevels;
for (size_t i = 0; i < test::kRegularTestCaseSize; ++i) {
const test::TestCaseRecord& test_case = test::kRegularTestCases[i];
- FilePath path(test_case.path);
- FilePath toplevel = GetTopLevelPath(path);
+ base::FilePath path(test_case.path);
+ base::FilePath toplevel = GetTopLevelPath(path);
// We create the test case files under one of the kRootPaths
// to simulate a drop with multiple directories.
if (toplevel_root_map_.find(toplevel) == toplevel_root_map_.end()) {
- FilePath root = root_path().Append(
+ base::FilePath root = root_path().Append(
kRootPaths[(root_path_index++) % arraysize(kRootPaths)]);
toplevel_root_map_[toplevel] = root;
toplevels.AddPath(root.Append(path), NULL);
@@ -253,7 +253,7 @@ class IsolatedFileUtilTest : public testing::Test {
MessageLoop message_loop_;
std::string filesystem_id_;
scoped_refptr<FileSystemContext> file_system_context_;
- std::map<FilePath, FilePath> toplevel_root_map_;
+ std::map<base::FilePath, base::FilePath> toplevel_root_map_;
scoped_ptr<IsolatedFileUtil> file_util_;
LocalFileSystemTestOriginHelper other_file_util_helper_;
DISALLOW_COPY_AND_ASSIGN(IsolatedFileUtilTest);
@@ -264,13 +264,13 @@ TEST_F(IsolatedFileUtilTest, BasicTest) {
SCOPED_TRACE(testing::Message() << "Testing RegularTestCases " << i);
const test::TestCaseRecord& test_case = test::kRegularTestCases[i];
- FileSystemURL url = GetFileSystemURL(FilePath(test_case.path));
+ FileSystemURL url = GetFileSystemURL(base::FilePath(test_case.path));
// See if we can query the file info via the isolated FileUtil.
// (This should succeed since we have registered all the top-level
// entries of the test cases in SetUp())
base::PlatformFileInfo info;
- FilePath platform_path;
+ base::FilePath platform_path;
FileSystemOperationContext context(file_system_context());
ASSERT_EQ(base::PLATFORM_FILE_OK,
file_util()->GetFileInfo(&context, url, &info, &platform_path));
@@ -312,7 +312,7 @@ TEST_F(IsolatedFileUtilTest, UnregisteredPathsTest) {
for (size_t i = 0; i < arraysize(kUnregisteredCases); ++i) {
SCOPED_TRACE(testing::Message() << "Creating kUnregisteredCases " << i);
const test::TestCaseRecord& test_case = kUnregisteredCases[i];
- FileSystemURL url = GetFileSystemURL(FilePath(test_case.path));
+ FileSystemURL url = GetFileSystemURL(base::FilePath(test_case.path));
// We should not be able to get the valid URL for unregistered files.
ASSERT_FALSE(url.is_valid());
@@ -336,13 +336,13 @@ TEST_F(IsolatedFileUtilTest, ReadDirectoryTest) {
<< ": " << test_case.path);
// Read entries in the directory to construct the expected results map.
- typedef std::map<FilePath::StringType, base::FileUtilProxy::Entry> EntryMap;
+ typedef std::map<base::FilePath::StringType, base::FileUtilProxy::Entry> EntryMap;
EntryMap expected_entry_map;
FileEnumerator file_enum(
GetTestCasePlatformPath(test_case.path), false /* not recursive */,
FileEnumerator::FILES | FileEnumerator::DIRECTORIES);
- FilePath current;
+ base::FilePath current;
while (!(current = file_enum.Next()).empty()) {
FileEnumerator::FindInfo file_info;
file_enum.GetFindInfo(&file_info);
@@ -355,7 +355,7 @@ TEST_F(IsolatedFileUtilTest, ReadDirectoryTest) {
}
// Perform ReadDirectory in the isolated filesystem.
- FileSystemURL url = GetFileSystemURL(FilePath(test_case.path));
+ FileSystemURL url = GetFileSystemURL(base::FilePath(test_case.path));
std::vector<base::FileUtilProxy::Entry> entries;
FileSystemOperationContext context(file_system_context());
ASSERT_EQ(base::PLATFORM_FILE_OK,
@@ -379,11 +379,11 @@ TEST_F(IsolatedFileUtilTest, ReadDirectoryTest) {
TEST_F(IsolatedFileUtilTest, GetLocalFilePathTest) {
for (size_t i = 0; i < test::kRegularTestCaseSize; ++i) {
const test::TestCaseRecord& test_case = test::kRegularTestCases[i];
- FileSystemURL url = GetFileSystemURL(FilePath(test_case.path));
+ FileSystemURL url = GetFileSystemURL(base::FilePath(test_case.path));
FileSystemOperationContext context(file_system_context());
- FilePath local_file_path;
+ base::FilePath local_file_path;
EXPECT_EQ(base::PLATFORM_FILE_OK,
file_util()->GetLocalFilePath(&context, url, &local_file_path));
EXPECT_EQ(GetTestCasePlatformPath(test_case.path).value(),
@@ -394,12 +394,12 @@ TEST_F(IsolatedFileUtilTest, GetLocalFilePathTest) {
TEST_F(IsolatedFileUtilTest, CopyOutFileTest) {
scoped_ptr<FileSystemOperationContext> context(
new FileSystemOperationContext(file_system_context()));
- FileSystemURL root_url = GetFileSystemURL(FilePath());
+ FileSystemURL root_url = GetFileSystemURL(base::FilePath());
scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator> file_enum(
file_util()->CreateFileEnumerator(context.get(),
root_url,
true /* recursive */));
- FilePath current;
+ base::FilePath current;
while (!(current = file_enum->Next()).empty()) {
if (file_enum->IsDirectory())
continue;
@@ -434,12 +434,12 @@ TEST_F(IsolatedFileUtilTest, CopyOutFileTest) {
TEST_F(IsolatedFileUtilTest, CopyOutDirectoryTest) {
scoped_ptr<FileSystemOperationContext> context(
new FileSystemOperationContext(file_system_context()));
- FileSystemURL root_url = GetFileSystemURL(FilePath());
+ FileSystemURL root_url = GetFileSystemURL(base::FilePath());
scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator> file_enum(
file_util()->CreateFileEnumerator(context.get(),
root_url,
false /* recursive */));
- FilePath current;
+ base::FilePath current;
while (!(current = file_enum->Next()).empty()) {
if (!file_enum->IsDirectory())
continue;
@@ -477,7 +477,7 @@ TEST_F(IsolatedFileUtilTest, TouchTest) {
if (test_case.is_directory)
continue;
SCOPED_TRACE(testing::Message() << test_case.path);
- FileSystemURL url = GetFileSystemURL(FilePath(test_case.path));
+ FileSystemURL url = GetFileSystemURL(base::FilePath(test_case.path));
base::Time last_access_time = base::Time::FromTimeT(1000);
base::Time last_modified_time = base::Time::FromTimeT(2000);
@@ -489,7 +489,7 @@ TEST_F(IsolatedFileUtilTest, TouchTest) {
// Verification.
base::PlatformFileInfo info;
- FilePath platform_path;
+ base::FilePath platform_path;
ASSERT_EQ(base::PLATFORM_FILE_OK,
file_util()->GetFileInfo(GetOperationContext().get(), url,
&info, &platform_path));
@@ -505,11 +505,11 @@ TEST_F(IsolatedFileUtilTest, TruncateTest) {
continue;
SCOPED_TRACE(testing::Message() << test_case.path);
- FileSystemURL url = GetFileSystemURL(FilePath(test_case.path));
+ FileSystemURL url = GetFileSystemURL(base::FilePath(test_case.path));
// Truncate to 0.
base::PlatformFileInfo info;
- FilePath platform_path;
+ base::FilePath platform_path;
EXPECT_EQ(base::PLATFORM_FILE_OK,
file_util()->Truncate(GetOperationContext().get(), url, 0));
ASSERT_EQ(base::PLATFORM_FILE_OK,
diff --git a/webkit/fileapi/isolated_mount_point_provider.cc b/webkit/fileapi/isolated_mount_point_provider.cc
index f21909c..160a71c 100644
--- a/webkit/fileapi/isolated_mount_point_provider.cc
+++ b/webkit/fileapi/isolated_mount_point_provider.cc
@@ -35,7 +35,7 @@
namespace fileapi {
IsolatedMountPointProvider::IsolatedMountPointProvider(
- const FilePath& profile_path)
+ const base::FilePath& profile_path)
: profile_path_(profile_path),
media_path_filter_(new MediaPathFilter()),
isolated_file_util_(new AsyncFileUtilAdapter(new IsolatedFileUtil())),
@@ -64,12 +64,12 @@ void IsolatedMountPointProvider::ValidateFileSystemRoot(
base::Bind(callback, base::PLATFORM_FILE_ERROR_SECURITY));
}
-FilePath IsolatedMountPointProvider::GetFileSystemRootPathOnFileThread(
+base::FilePath IsolatedMountPointProvider::GetFileSystemRootPathOnFileThread(
const FileSystemURL& url,
bool create) {
// This is not supposed to be used.
NOTREACHED();
- return FilePath();
+ return base::FilePath();
}
bool IsolatedMountPointProvider::IsAccessAllowed(const FileSystemURL& url) {
@@ -77,7 +77,7 @@ bool IsolatedMountPointProvider::IsAccessAllowed(const FileSystemURL& url) {
}
bool IsolatedMountPointProvider::IsRestrictedFileName(
- const FilePath& filename) const {
+ const base::FilePath& filename) const {
// TODO(kinuko): We need to check platform-specific restricted file names
// before we actually start allowing file creation in isolated file systems.
return false;
diff --git a/webkit/fileapi/isolated_mount_point_provider.h b/webkit/fileapi/isolated_mount_point_provider.h
index 5c89f11..64f82a6 100644
--- a/webkit/fileapi/isolated_mount_point_provider.h
+++ b/webkit/fileapi/isolated_mount_point_provider.h
@@ -17,7 +17,7 @@ class MediaPathFilter;
class IsolatedMountPointProvider : public FileSystemMountPointProvider {
public:
- explicit IsolatedMountPointProvider(const FilePath& profile_path);
+ explicit IsolatedMountPointProvider(const base::FilePath& profile_path);
virtual ~IsolatedMountPointProvider();
// FileSystemMountPointProvider implementation.
@@ -26,11 +26,11 @@ class IsolatedMountPointProvider : public FileSystemMountPointProvider {
FileSystemType type,
bool create,
const ValidateFileSystemCallback& callback) OVERRIDE;
- virtual FilePath GetFileSystemRootPathOnFileThread(
+ virtual base::FilePath GetFileSystemRootPathOnFileThread(
const FileSystemURL& url,
bool create) OVERRIDE;
virtual bool IsAccessAllowed(const FileSystemURL& url) OVERRIDE;
- virtual bool IsRestrictedFileName(const FilePath& filename) const OVERRIDE;
+ virtual bool IsRestrictedFileName(const base::FilePath& filename) const OVERRIDE;
virtual FileSystemFileUtil* GetFileUtil(FileSystemType type) OVERRIDE;
virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) OVERRIDE;
virtual FilePermissionPolicy GetPermissionPolicy(
@@ -58,7 +58,7 @@ class IsolatedMountPointProvider : public FileSystemMountPointProvider {
private:
// Store the profile path. We need this to create temporary snapshot files.
- const FilePath profile_path_;
+ const base::FilePath profile_path_;
scoped_ptr<MediaPathFilter> media_path_filter_;
diff --git a/webkit/fileapi/local_file_stream_writer.cc b/webkit/fileapi/local_file_stream_writer.cc
index f3679f9..e17784e 100644
--- a/webkit/fileapi/local_file_stream_writer.cc
+++ b/webkit/fileapi/local_file_stream_writer.cc
@@ -20,7 +20,7 @@ const int kOpenFlagsForWrite = base::PLATFORM_FILE_OPEN |
} // namespace
-LocalFileStreamWriter::LocalFileStreamWriter(const FilePath& file_path,
+LocalFileStreamWriter::LocalFileStreamWriter(const base::FilePath& file_path,
int64 initial_offset)
: file_path_(file_path),
initial_offset_(initial_offset),
diff --git a/webkit/fileapi/local_file_stream_writer.h b/webkit/fileapi/local_file_stream_writer.h
index e23b476..a6d15f9 100644
--- a/webkit/fileapi/local_file_stream_writer.h
+++ b/webkit/fileapi/local_file_stream_writer.h
@@ -28,7 +28,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE LocalFileStreamWriter
public:
// Create a writer for the existing file in the path |file_path| starting from
// |initial_offset|.
- LocalFileStreamWriter(const FilePath& file_path, int64 initial_offset);
+ LocalFileStreamWriter(const base::FilePath& file_path, int64 initial_offset);
virtual ~LocalFileStreamWriter();
// FileStreamWriter overrides.
@@ -72,7 +72,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE LocalFileStreamWriter
bool CancelIfRequested();
// Initialization parameters.
- const FilePath file_path_;
+ const base::FilePath file_path_;
const int64 initial_offset_;
// Current states of the operation.
diff --git a/webkit/fileapi/local_file_stream_writer_unittest.cc b/webkit/fileapi/local_file_stream_writer_unittest.cc
index 3fda6d6..d67a7da 100644
--- a/webkit/fileapi/local_file_stream_writer_unittest.cc
+++ b/webkit/fileapi/local_file_stream_writer_unittest.cc
@@ -29,7 +29,7 @@ class LocalFileStreamWriterTest : public testing::Test {
}
protected:
- FilePath Path(const std::string& name) {
+ base::FilePath Path(const std::string& name) {
return temp_dir_.path().AppendASCII(name);
}
@@ -52,15 +52,15 @@ class LocalFileStreamWriterTest : public testing::Test {
return net::OK;
}
- std::string GetFileContent(const FilePath& path) {
+ std::string GetFileContent(const base::FilePath& path) {
std::string content;
file_util::ReadFileToString(path, &content);
return content;
}
- FilePath CreateFileWithContent(const std::string& name,
+ base::FilePath CreateFileWithContent(const std::string& name,
const std::string& data) {
- FilePath path = Path(name);
+ base::FilePath path = Path(name);
file_util::WriteFile(path, data.c_str(), data.size());
return path;
}
@@ -77,7 +77,7 @@ void NeverCalled(int unused) {
} // namespace
TEST_F(LocalFileStreamWriterTest, Write) {
- FilePath path = CreateFileWithContent("file_a", "");
+ base::FilePath path = CreateFileWithContent("file_a", "");
scoped_ptr<LocalFileStreamWriter> writer(new LocalFileStreamWriter(path, 0));
EXPECT_EQ(net::OK, WriteStringToWriter(writer.get(), "foo"));
EXPECT_EQ(net::OK, WriteStringToWriter(writer.get(), "bar"));
@@ -88,7 +88,7 @@ TEST_F(LocalFileStreamWriterTest, Write) {
}
TEST_F(LocalFileStreamWriterTest, WriteMiddle) {
- FilePath path = CreateFileWithContent("file_a", "foobar");
+ base::FilePath path = CreateFileWithContent("file_a", "foobar");
scoped_ptr<LocalFileStreamWriter> writer(new LocalFileStreamWriter(path, 2));
EXPECT_EQ(net::OK, WriteStringToWriter(writer.get(), "xxx"));
writer.reset();
@@ -98,7 +98,7 @@ TEST_F(LocalFileStreamWriterTest, WriteMiddle) {
}
TEST_F(LocalFileStreamWriterTest, WriteEnd) {
- FilePath path = CreateFileWithContent("file_a", "foobar");
+ base::FilePath path = CreateFileWithContent("file_a", "foobar");
scoped_ptr<LocalFileStreamWriter> writer(new LocalFileStreamWriter(path, 6));
EXPECT_EQ(net::OK, WriteStringToWriter(writer.get(), "xxx"));
writer.reset();
@@ -108,7 +108,7 @@ TEST_F(LocalFileStreamWriterTest, WriteEnd) {
}
TEST_F(LocalFileStreamWriterTest, WriteFailForNonexistingFile) {
- FilePath path = Path("file_a");
+ base::FilePath path = Path("file_a");
ASSERT_FALSE(file_util::PathExists(path));
scoped_ptr<LocalFileStreamWriter> writer(new LocalFileStreamWriter(path, 0));
EXPECT_EQ(net::ERR_FILE_NOT_FOUND, WriteStringToWriter(writer.get(), "foo"));
@@ -118,7 +118,7 @@ TEST_F(LocalFileStreamWriterTest, WriteFailForNonexistingFile) {
}
TEST_F(LocalFileStreamWriterTest, CancelBeforeOperation) {
- FilePath path = Path("file_a");
+ base::FilePath path = Path("file_a");
scoped_ptr<LocalFileStreamWriter> writer(new LocalFileStreamWriter(path, 0));
// Cancel immediately fails when there's no in-flight operation.
int cancel_result = writer->Cancel(base::Bind(&NeverCalled));
@@ -126,7 +126,7 @@ TEST_F(LocalFileStreamWriterTest, CancelBeforeOperation) {
}
TEST_F(LocalFileStreamWriterTest, CancelAfterFinishedOperation) {
- FilePath path = CreateFileWithContent("file_a", "");
+ base::FilePath path = CreateFileWithContent("file_a", "");
scoped_ptr<LocalFileStreamWriter> writer(new LocalFileStreamWriter(path, 0));
EXPECT_EQ(net::OK, WriteStringToWriter(writer.get(), "foo"));
@@ -142,7 +142,7 @@ TEST_F(LocalFileStreamWriterTest, CancelAfterFinishedOperation) {
}
TEST_F(LocalFileStreamWriterTest, CancelWrite) {
- FilePath path = CreateFileWithContent("file_a", "foobar");
+ base::FilePath path = CreateFileWithContent("file_a", "foobar");
scoped_ptr<LocalFileStreamWriter> writer(new LocalFileStreamWriter(path, 0));
scoped_refptr<net::StringIOBuffer> buffer(new net::StringIOBuffer("xxx"));
diff --git a/webkit/fileapi/local_file_system_operation.cc b/webkit/fileapi/local_file_system_operation.cc
index edf26b0..4cda1f8 100644
--- a/webkit/fileapi/local_file_system_operation.cc
+++ b/webkit/fileapi/local_file_system_operation.cc
@@ -193,7 +193,7 @@ void LocalFileSystemOperation::GetMetadata(
base::PlatformFileError result = SetUp(url, SETUP_FOR_READ);
if (result != base::PLATFORM_FILE_OK) {
- callback.Run(result, base::PlatformFileInfo(), FilePath());
+ callback.Run(result, base::PlatformFileInfo(), base::FilePath());
delete this;
return;
}
@@ -372,7 +372,7 @@ LocalFileSystemOperation::AsLocalFileSystemOperation() {
}
void LocalFileSystemOperation::SyncGetPlatformPath(const FileSystemURL& url,
- FilePath* platform_path) {
+ base::FilePath* platform_path) {
DCHECK(SetPendingOperationType(kOperationGetLocalPath));
base::PlatformFileError result = SetUp(url, SETUP_FOR_READ);
@@ -396,7 +396,7 @@ void LocalFileSystemOperation::CreateSnapshotFile(
base::PlatformFileError result = SetUp(url, SETUP_FOR_READ);
if (result != base::PLATFORM_FILE_OK) {
- callback.Run(result, base::PlatformFileInfo(), FilePath(), NULL);
+ callback.Run(result, base::PlatformFileInfo(), base::FilePath(), NULL);
delete this;
return;
}
@@ -408,7 +408,7 @@ void LocalFileSystemOperation::CreateSnapshotFile(
}
void LocalFileSystemOperation::CopyInForeignFile(
- const FilePath& src_local_disk_file_path,
+ const base::FilePath& src_local_disk_file_path,
const FileSystemURL& dest_url,
const StatusCallback& callback) {
DCHECK(SetPendingOperationType(kOperationCopyInForeignFile));
@@ -666,7 +666,7 @@ void LocalFileSystemOperation::DoMoveFileLocal(
}
void LocalFileSystemOperation::DoCopyInForeignFile(
- const FilePath& src_local_disk_file_path,
+ const base::FilePath& src_local_disk_file_path,
const FileSystemURL& dest_url,
const StatusCallback& callback) {
async_file_util_->CopyInForeignFile(
@@ -737,7 +737,7 @@ void LocalFileSystemOperation::DidDirectoryExists(
const StatusCallback& callback,
base::PlatformFileError rv,
const base::PlatformFileInfo& file_info,
- const FilePath& unused) {
+ const base::FilePath& unused) {
if (rv == base::PLATFORM_FILE_OK && !file_info.is_directory)
rv = base::PLATFORM_FILE_ERROR_NOT_A_DIRECTORY;
callback.Run(rv);
@@ -747,7 +747,7 @@ void LocalFileSystemOperation::DidFileExists(
const StatusCallback& callback,
base::PlatformFileError rv,
const base::PlatformFileInfo& file_info,
- const FilePath& unused) {
+ const base::FilePath& unused) {
if (rv == base::PLATFORM_FILE_OK && file_info.is_directory)
rv = base::PLATFORM_FILE_ERROR_NOT_A_FILE;
callback.Run(rv);
@@ -757,7 +757,7 @@ void LocalFileSystemOperation::DidGetMetadata(
const GetMetadataCallback& callback,
base::PlatformFileError rv,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path) {
+ const base::FilePath& platform_path) {
callback.Run(rv, file_info, platform_path);
}
@@ -812,7 +812,7 @@ void LocalFileSystemOperation::DidCreateSnapshotFile(
const SnapshotFileCallback& callback,
base::PlatformFileError result,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path,
+ const base::FilePath& platform_path,
SnapshotFilePolicy snapshot_policy) {
scoped_refptr<ShareableFileReference> file_ref;
if (result == base::PLATFORM_FILE_OK &&
diff --git a/webkit/fileapi/local_file_system_operation.h b/webkit/fileapi/local_file_system_operation.h
index cd828d8..73ee457 100644
--- a/webkit/fileapi/local_file_system_operation.h
+++ b/webkit/fileapi/local_file_system_operation.h
@@ -91,7 +91,7 @@ class WEBKIT_STORAGE_EXPORT LocalFileSystemOperation
// - PLATFORM_FILE_ERROR_FAILED if |dest_url| does not exist and
// its parent path is a file.
//
- void CopyInForeignFile(const FilePath& src_local_disk_path,
+ void CopyInForeignFile(const base::FilePath& src_local_disk_path,
const FileSystemURL& dest_url,
const StatusCallback& callback);
@@ -149,7 +149,7 @@ class WEBKIT_STORAGE_EXPORT LocalFileSystemOperation
const StatusCallback& callback);
// Synchronously gets the platform path for the given |url|.
- void SyncGetPlatformPath(const FileSystemURL& url, FilePath* platform_path);
+ void SyncGetPlatformPath(const FileSystemURL& url, base::FilePath* platform_path);
private:
class ScopedUpdateNotifier;
@@ -235,7 +235,7 @@ class WEBKIT_STORAGE_EXPORT LocalFileSystemOperation
void DoMoveFileLocal(const FileSystemURL& src,
const FileSystemURL& dest,
const StatusCallback& callback);
- void DoCopyInForeignFile(const FilePath& src_local_disk_file_path,
+ void DoCopyInForeignFile(const base::FilePath& src_local_disk_file_path,
const FileSystemURL& dest,
const StatusCallback& callback);
void DoTruncate(const FileSystemURL& url,
@@ -264,15 +264,15 @@ class WEBKIT_STORAGE_EXPORT LocalFileSystemOperation
void DidDirectoryExists(const StatusCallback& callback,
base::PlatformFileError rv,
const base::PlatformFileInfo& file_info,
- const FilePath& unused);
+ const base::FilePath& unused);
void DidFileExists(const StatusCallback& callback,
base::PlatformFileError rv,
const base::PlatformFileInfo& file_info,
- const FilePath& unused);
+ const base::FilePath& unused);
void DidGetMetadata(const GetMetadataCallback& callback,
base::PlatformFileError rv,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path);
+ const base::FilePath& platform_path);
void DidReadDirectory(const ReadDirectoryCallback& callback,
base::PlatformFileError rv,
const std::vector<base::FileUtilProxy::Entry>& entries,
@@ -291,7 +291,7 @@ class WEBKIT_STORAGE_EXPORT LocalFileSystemOperation
const SnapshotFileCallback& callback,
base::PlatformFileError rv,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path,
+ const base::FilePath& platform_path,
SnapshotFilePolicy snapshot_policy);
// Checks the validity of a given |url| and populates |file_util| for |mode|.
diff --git a/webkit/fileapi/local_file_system_operation_unittest.cc b/webkit/fileapi/local_file_system_operation_unittest.cc
index c49e2b2..37b76a5 100644
--- a/webkit/fileapi/local_file_system_operation_unittest.cc
+++ b/webkit/fileapi/local_file_system_operation_unittest.cc
@@ -58,7 +58,7 @@ class LocalFileSystemOperationTest
int status() const { return status_; }
const base::PlatformFileInfo& info() const { return info_; }
- const FilePath& path() const { return path_; }
+ const base::FilePath& path() const { return path_; }
const std::vector<base::FileUtilProxy::Entry>& entries() const {
return entries_;
}
@@ -101,32 +101,32 @@ class LocalFileSystemOperationTest
return context;
}
- FileSystemURL URLForPath(const FilePath& path) const {
+ FileSystemURL URLForPath(const base::FilePath& path) const {
return test_helper_.CreateURL(path);
}
- FilePath PlatformPath(const FilePath& virtual_path) {
+ base::FilePath PlatformPath(const base::FilePath& virtual_path) {
return test_helper_.GetLocalPath(virtual_path);
}
- bool FileExists(const FilePath& virtual_path) {
+ bool FileExists(const base::FilePath& virtual_path) {
FileSystemURL url = test_helper_.CreateURL(virtual_path);
base::PlatformFileInfo file_info;
- FilePath platform_path;
+ base::FilePath platform_path;
scoped_ptr<FileSystemOperationContext> context(NewContext());
base::PlatformFileError error = file_util()->GetFileInfo(
context.get(), url, &file_info, &platform_path);
return error == base::PLATFORM_FILE_OK && !file_info.is_directory;
}
- bool DirectoryExists(const FilePath& virtual_path) {
+ bool DirectoryExists(const base::FilePath& virtual_path) {
FileSystemURL url = test_helper_.CreateURL(virtual_path);
scoped_ptr<FileSystemOperationContext> context(NewContext());
return FileUtilHelper::DirectoryExists(context.get(), file_util(), url);
}
- FilePath CreateUniqueFileInDir(const FilePath& virtual_dir_path) {
- FilePath file_name = FilePath::FromUTF8Unsafe(
+ base::FilePath CreateUniqueFileInDir(const base::FilePath& virtual_dir_path) {
+ base::FilePath file_name = base::FilePath::FromUTF8Unsafe(
"tmpfile-" + base::IntToString(next_unique_path_suffix_++));
FileSystemURL url = test_helper_.CreateURL(
virtual_dir_path.Append(file_name));
@@ -139,8 +139,8 @@ class LocalFileSystemOperationTest
return url.path();
}
- FilePath CreateUniqueDirInDir(const FilePath& virtual_dir_path) {
- FilePath dir_name = FilePath::FromUTF8Unsafe(
+ base::FilePath CreateUniqueDirInDir(const base::FilePath& virtual_dir_path) {
+ base::FilePath dir_name = base::FilePath::FromUTF8Unsafe(
"tmpdir-" + base::IntToString(next_unique_path_suffix_++));
FileSystemURL url = test_helper_.CreateURL(
virtual_dir_path.Append(dir_name));
@@ -151,8 +151,8 @@ class LocalFileSystemOperationTest
return url.path();
}
- FilePath CreateUniqueDir() {
- return CreateUniqueDirInDir(FilePath());
+ base::FilePath CreateUniqueDir() {
+ return CreateUniqueDirInDir(base::FilePath());
}
LocalFileSystemTestOriginHelper test_helper_;
@@ -192,7 +192,7 @@ class LocalFileSystemOperationTest
void DidGetMetadata(base::PlatformFileError status,
const base::PlatformFileInfo& info,
- const FilePath& platform_path) {
+ const base::FilePath& platform_path) {
info_ = info;
path_ = platform_path;
status_ = status;
@@ -201,7 +201,7 @@ class LocalFileSystemOperationTest
void DidCreateSnapshotFile(
base::PlatformFileError status,
const base::PlatformFileInfo& info,
- const FilePath& platform_path,
+ const base::FilePath& platform_path,
const scoped_refptr<ShareableFileReference>& shareable_file_ref) {
info_ = info;
path_ = platform_path;
@@ -236,8 +236,8 @@ class LocalFileSystemOperationTest
ASSERT_EQ(quota::kQuotaStatusOk, status);
}
- void GenerateUniquePathInDir(const FilePath& dir,
- FilePath* file_path,
+ void GenerateUniquePathInDir(const base::FilePath& dir,
+ base::FilePath* file_path,
int64* path_cost) {
int64 base_usage;
GetUsageAndQuota(&base_usage, NULL);
@@ -272,7 +272,7 @@ class LocalFileSystemOperationTest
// For post-operation status.
int status_;
base::PlatformFileInfo info_;
- FilePath path_;
+ base::FilePath path_;
std::vector<base::FileUtilProxy::Entry> entries_;
scoped_refptr<ShareableFileReference> shareable_file_ref_;
@@ -290,7 +290,7 @@ class LocalFileSystemOperationTest
};
void LocalFileSystemOperationTest::SetUp() {
- FilePath base_dir = base_.path().AppendASCII("filesystem");
+ base::FilePath base_dir = base_.path().AppendASCII("filesystem");
quota_manager_ = new quota::MockQuotaManager(
false /* is_incognito */, base_dir,
base::MessageLoopProxy::current(),
@@ -319,8 +319,8 @@ LocalFileSystemOperation* LocalFileSystemOperationTest::operation() {
}
TEST_F(LocalFileSystemOperationTest, TestMoveFailureSrcDoesntExist) {
- FileSystemURL src(URLForPath(FilePath(FILE_PATH_LITERAL("a"))));
- FileSystemURL dest(URLForPath(FilePath(FILE_PATH_LITERAL("b"))));
+ FileSystemURL src(URLForPath(base::FilePath(FILE_PATH_LITERAL("a"))));
+ FileSystemURL dest(URLForPath(base::FilePath(FILE_PATH_LITERAL("b"))));
change_observer()->ResetCount();
operation()->Move(src, dest, RecordStatusCallback());
MessageLoop::current()->RunUntilIdle();
@@ -329,8 +329,8 @@ TEST_F(LocalFileSystemOperationTest, TestMoveFailureSrcDoesntExist) {
}
TEST_F(LocalFileSystemOperationTest, TestMoveFailureContainsPath) {
- FilePath src_dir_path(CreateUniqueDir());
- FilePath dest_dir_path(CreateUniqueDirInDir(src_dir_path));
+ base::FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath dest_dir_path(CreateUniqueDirInDir(src_dir_path));
operation()->Move(URLForPath(src_dir_path), URLForPath(dest_dir_path),
RecordStatusCallback());
MessageLoop::current()->RunUntilIdle();
@@ -340,9 +340,9 @@ TEST_F(LocalFileSystemOperationTest, TestMoveFailureContainsPath) {
TEST_F(LocalFileSystemOperationTest, TestMoveFailureSrcDirExistsDestFile) {
// Src exists and is dir. Dest is a file.
- FilePath src_dir_path(CreateUniqueDir());
- FilePath dest_dir_path(CreateUniqueDir());
- FilePath dest_file_path(CreateUniqueFileInDir(dest_dir_path));
+ base::FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath dest_dir_path(CreateUniqueDir());
+ base::FilePath dest_file_path(CreateUniqueFileInDir(dest_dir_path));
operation()->Move(URLForPath(src_dir_path), URLForPath(dest_file_path),
RecordStatusCallback());
@@ -354,9 +354,9 @@ TEST_F(LocalFileSystemOperationTest, TestMoveFailureSrcDirExistsDestFile) {
TEST_F(LocalFileSystemOperationTest,
TestMoveFailureSrcFileExistsDestNonEmptyDir) {
// Src exists and is a directory. Dest is a non-empty directory.
- FilePath src_dir_path(CreateUniqueDir());
- FilePath dest_dir_path(CreateUniqueDir());
- FilePath child_file_path(CreateUniqueFileInDir(dest_dir_path));
+ base::FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath dest_dir_path(CreateUniqueDir());
+ base::FilePath child_file_path(CreateUniqueFileInDir(dest_dir_path));
operation()->Move(URLForPath(src_dir_path), URLForPath(dest_dir_path),
RecordStatusCallback());
@@ -367,9 +367,9 @@ TEST_F(LocalFileSystemOperationTest,
TEST_F(LocalFileSystemOperationTest, TestMoveFailureSrcFileExistsDestDir) {
// Src exists and is a file. Dest is a directory.
- FilePath src_dir_path(CreateUniqueDir());
- FilePath src_file_path(CreateUniqueFileInDir(src_dir_path));
- FilePath dest_dir_path(CreateUniqueDir());
+ base::FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath src_file_path(CreateUniqueFileInDir(src_dir_path));
+ base::FilePath dest_dir_path(CreateUniqueDir());
operation()->Move(URLForPath(src_file_path), URLForPath(dest_dir_path),
RecordStatusCallback());
@@ -380,8 +380,8 @@ TEST_F(LocalFileSystemOperationTest, TestMoveFailureSrcFileExistsDestDir) {
TEST_F(LocalFileSystemOperationTest, TestMoveFailureDestParentDoesntExist) {
// Dest. parent path does not exist.
- FilePath src_dir_path(CreateUniqueDir());
- FilePath nonexisting_file = FilePath(FILE_PATH_LITERAL("NonexistingDir")).
+ base::FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath nonexisting_file = base::FilePath(FILE_PATH_LITERAL("NonexistingDir")).
Append(FILE_PATH_LITERAL("NonexistingFile"));
operation()->Move(URLForPath(src_dir_path), URLForPath(nonexisting_file),
@@ -392,10 +392,10 @@ TEST_F(LocalFileSystemOperationTest, TestMoveFailureDestParentDoesntExist) {
}
TEST_F(LocalFileSystemOperationTest, TestMoveSuccessSrcFileAndOverwrite) {
- FilePath src_dir_path(CreateUniqueDir());
- FilePath src_file_path(CreateUniqueFileInDir(src_dir_path));
- FilePath dest_dir_path(CreateUniqueDir());
- FilePath dest_file_path(CreateUniqueFileInDir(dest_dir_path));
+ base::FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath src_file_path(CreateUniqueFileInDir(src_dir_path));
+ base::FilePath dest_dir_path(CreateUniqueDir());
+ base::FilePath dest_file_path(CreateUniqueFileInDir(dest_dir_path));
operation()->Move(URLForPath(src_file_path), URLForPath(dest_file_path),
RecordStatusCallback());
@@ -413,10 +413,10 @@ TEST_F(LocalFileSystemOperationTest, TestMoveSuccessSrcFileAndOverwrite) {
}
TEST_F(LocalFileSystemOperationTest, TestMoveSuccessSrcFileAndNew) {
- FilePath src_dir_path(CreateUniqueDir());
- FilePath src_file_path(CreateUniqueFileInDir(src_dir_path));
- FilePath dest_dir_path(CreateUniqueDir());
- FilePath dest_file_path(dest_dir_path.Append(FILE_PATH_LITERAL("NewFile")));
+ base::FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath src_file_path(CreateUniqueFileInDir(src_dir_path));
+ base::FilePath dest_dir_path(CreateUniqueDir());
+ base::FilePath dest_file_path(dest_dir_path.Append(FILE_PATH_LITERAL("NewFile")));
operation()->Move(URLForPath(src_file_path), URLForPath(dest_file_path),
RecordStatusCallback());
@@ -430,8 +430,8 @@ TEST_F(LocalFileSystemOperationTest, TestMoveSuccessSrcFileAndNew) {
}
TEST_F(LocalFileSystemOperationTest, TestMoveSuccessSrcDirAndOverwrite) {
- FilePath src_dir_path(CreateUniqueDir());
- FilePath dest_dir_path(CreateUniqueDir());
+ base::FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath dest_dir_path(CreateUniqueDir());
operation()->Move(URLForPath(src_dir_path), URLForPath(dest_dir_path),
RecordStatusCallback());
@@ -450,9 +450,9 @@ TEST_F(LocalFileSystemOperationTest, TestMoveSuccessSrcDirAndOverwrite) {
}
TEST_F(LocalFileSystemOperationTest, TestMoveSuccessSrcDirAndNew) {
- FilePath src_dir_path(CreateUniqueDir());
- FilePath dest_parent_dir_path(CreateUniqueDir());
- FilePath dest_child_dir_path(dest_parent_dir_path.
+ base::FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath dest_parent_dir_path(CreateUniqueDir());
+ base::FilePath dest_child_dir_path(dest_parent_dir_path.
Append(FILE_PATH_LITERAL("NewDirectory")));
operation()->Move(URLForPath(src_dir_path), URLForPath(dest_child_dir_path),
@@ -468,12 +468,12 @@ TEST_F(LocalFileSystemOperationTest, TestMoveSuccessSrcDirAndNew) {
}
TEST_F(LocalFileSystemOperationTest, TestMoveSuccessSrcDirRecursive) {
- FilePath src_dir_path(CreateUniqueDir());
- FilePath child_dir_path(CreateUniqueDirInDir(src_dir_path));
- FilePath grandchild_file_path(
+ base::FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath child_dir_path(CreateUniqueDirInDir(src_dir_path));
+ base::FilePath grandchild_file_path(
CreateUniqueFileInDir(child_dir_path));
- FilePath dest_dir_path(CreateUniqueDir());
+ base::FilePath dest_dir_path(CreateUniqueDir());
operation()->Move(URLForPath(src_dir_path), URLForPath(dest_dir_path),
RecordStatusCallback());
@@ -493,8 +493,8 @@ TEST_F(LocalFileSystemOperationTest, TestMoveSuccessSrcDirRecursive) {
}
TEST_F(LocalFileSystemOperationTest, TestCopyFailureSrcDoesntExist) {
- operation()->Copy(URLForPath(FilePath(FILE_PATH_LITERAL("a"))),
- URLForPath(FilePath(FILE_PATH_LITERAL("b"))),
+ operation()->Copy(URLForPath(base::FilePath(FILE_PATH_LITERAL("a"))),
+ URLForPath(base::FilePath(FILE_PATH_LITERAL("b"))),
RecordStatusCallback());
MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND, status());
@@ -502,8 +502,8 @@ TEST_F(LocalFileSystemOperationTest, TestCopyFailureSrcDoesntExist) {
}
TEST_F(LocalFileSystemOperationTest, TestCopyFailureContainsPath) {
- FilePath src_dir_path(CreateUniqueDir());
- FilePath dest_dir_path(CreateUniqueDirInDir(src_dir_path));
+ base::FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath dest_dir_path(CreateUniqueDirInDir(src_dir_path));
operation()->Copy(URLForPath(src_dir_path), URLForPath(dest_dir_path),
RecordStatusCallback());
MessageLoop::current()->RunUntilIdle();
@@ -513,9 +513,9 @@ TEST_F(LocalFileSystemOperationTest, TestCopyFailureContainsPath) {
TEST_F(LocalFileSystemOperationTest, TestCopyFailureSrcDirExistsDestFile) {
// Src exists and is dir. Dest is a file.
- FilePath src_dir_path(CreateUniqueDir());
- FilePath dest_dir_path(CreateUniqueDir());
- FilePath dest_file_path(CreateUniqueFileInDir(dest_dir_path));
+ base::FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath dest_dir_path(CreateUniqueDir());
+ base::FilePath dest_file_path(CreateUniqueFileInDir(dest_dir_path));
operation()->Copy(URLForPath(src_dir_path), URLForPath(dest_file_path),
RecordStatusCallback());
@@ -527,9 +527,9 @@ TEST_F(LocalFileSystemOperationTest, TestCopyFailureSrcDirExistsDestFile) {
TEST_F(LocalFileSystemOperationTest,
TestCopyFailureSrcFileExistsDestNonEmptyDir) {
// Src exists and is a directory. Dest is a non-empty directory.
- FilePath src_dir_path(CreateUniqueDir());
- FilePath dest_dir_path(CreateUniqueDir());
- FilePath child_file_path(CreateUniqueFileInDir(dest_dir_path));
+ base::FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath dest_dir_path(CreateUniqueDir());
+ base::FilePath child_file_path(CreateUniqueFileInDir(dest_dir_path));
operation()->Copy(URLForPath(src_dir_path), URLForPath(dest_dir_path),
RecordStatusCallback());
@@ -540,9 +540,9 @@ TEST_F(LocalFileSystemOperationTest,
TEST_F(LocalFileSystemOperationTest, TestCopyFailureSrcFileExistsDestDir) {
// Src exists and is a file. Dest is a directory.
- FilePath src_dir_path(CreateUniqueDir());
- FilePath src_file_path(CreateUniqueFileInDir(src_dir_path));
- FilePath dest_dir_path(CreateUniqueDir());
+ base::FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath src_file_path(CreateUniqueFileInDir(src_dir_path));
+ base::FilePath dest_dir_path(CreateUniqueDir());
operation()->Copy(URLForPath(src_file_path), URLForPath(dest_dir_path),
RecordStatusCallback());
@@ -553,10 +553,10 @@ TEST_F(LocalFileSystemOperationTest, TestCopyFailureSrcFileExistsDestDir) {
TEST_F(LocalFileSystemOperationTest, TestCopyFailureDestParentDoesntExist) {
// Dest. parent path does not exist.
- FilePath src_dir_path(CreateUniqueDir());
- FilePath nonexisting_path = FilePath(FILE_PATH_LITERAL("DontExistDir"));
+ base::FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath nonexisting_path = base::FilePath(FILE_PATH_LITERAL("DontExistDir"));
file_util::EnsureEndsWithSeparator(&nonexisting_path);
- FilePath nonexisting_file_path(nonexisting_path.Append(
+ base::FilePath nonexisting_file_path(nonexisting_path.Append(
FILE_PATH_LITERAL("DontExistFile")));
operation()->Copy(URLForPath(src_dir_path),
@@ -570,11 +570,11 @@ TEST_F(LocalFileSystemOperationTest, TestCopyFailureDestParentDoesntExist) {
TEST_F(LocalFileSystemOperationTest, TestCopyFailureByQuota) {
base::PlatformFileInfo info;
- FilePath src_dir_path(CreateUniqueDir());
- FilePath src_file_path(CreateUniqueFileInDir(src_dir_path));
- FilePath dest_dir_path(CreateUniqueDir());
+ base::FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath src_file_path(CreateUniqueFileInDir(src_dir_path));
+ base::FilePath dest_dir_path(CreateUniqueDir());
- FilePath dest_file_path;
+ base::FilePath dest_file_path;
int64 dest_path_cost;
GenerateUniquePathInDir(dest_dir_path, &dest_file_path, &dest_path_cost);
@@ -599,10 +599,10 @@ TEST_F(LocalFileSystemOperationTest, TestCopyFailureByQuota) {
}
TEST_F(LocalFileSystemOperationTest, TestCopySuccessSrcFileAndOverwrite) {
- FilePath src_dir_path(CreateUniqueDir());
- FilePath src_file_path(CreateUniqueFileInDir(src_dir_path));
- FilePath dest_dir_path(CreateUniqueDir());
- FilePath dest_file_path(CreateUniqueFileInDir(dest_dir_path));
+ base::FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath src_file_path(CreateUniqueFileInDir(src_dir_path));
+ base::FilePath dest_dir_path(CreateUniqueDir());
+ base::FilePath dest_file_path(CreateUniqueFileInDir(dest_dir_path));
operation()->Copy(URLForPath(src_file_path), URLForPath(dest_file_path),
RecordStatusCallback());
@@ -616,10 +616,10 @@ TEST_F(LocalFileSystemOperationTest, TestCopySuccessSrcFileAndOverwrite) {
}
TEST_F(LocalFileSystemOperationTest, TestCopySuccessSrcFileAndNew) {
- FilePath src_dir_path(CreateUniqueDir());
- FilePath src_file_path(CreateUniqueFileInDir(src_dir_path));
- FilePath dest_dir_path(CreateUniqueDir());
- FilePath dest_file_path(dest_dir_path.Append(FILE_PATH_LITERAL("NewFile")));
+ base::FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath src_file_path(CreateUniqueFileInDir(src_dir_path));
+ base::FilePath dest_dir_path(CreateUniqueDir());
+ base::FilePath dest_file_path(dest_dir_path.Append(FILE_PATH_LITERAL("NewFile")));
operation()->Copy(URLForPath(src_file_path), URLForPath(dest_file_path),
RecordStatusCallback());
@@ -633,8 +633,8 @@ TEST_F(LocalFileSystemOperationTest, TestCopySuccessSrcFileAndNew) {
}
TEST_F(LocalFileSystemOperationTest, TestCopySuccessSrcDirAndOverwrite) {
- FilePath src_dir_path(CreateUniqueDir());
- FilePath dest_dir_path(CreateUniqueDir());
+ base::FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath dest_dir_path(CreateUniqueDir());
operation()->Copy(URLForPath(src_dir_path), URLForPath(dest_dir_path),
RecordStatusCallback());
@@ -653,9 +653,9 @@ TEST_F(LocalFileSystemOperationTest, TestCopySuccessSrcDirAndOverwrite) {
}
TEST_F(LocalFileSystemOperationTest, TestCopySuccessSrcDirAndNew) {
- FilePath src_dir_path(CreateUniqueDir());
- FilePath dest_parent_dir_path(CreateUniqueDir());
- FilePath dest_child_dir_path(dest_parent_dir_path.
+ base::FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath dest_parent_dir_path(CreateUniqueDir());
+ base::FilePath dest_child_dir_path(dest_parent_dir_path.
Append(FILE_PATH_LITERAL("NewDirectory")));
operation()->Copy(URLForPath(src_dir_path), URLForPath(dest_child_dir_path),
@@ -670,12 +670,12 @@ TEST_F(LocalFileSystemOperationTest, TestCopySuccessSrcDirAndNew) {
}
TEST_F(LocalFileSystemOperationTest, TestCopySuccessSrcDirRecursive) {
- FilePath src_dir_path(CreateUniqueDir());
- FilePath child_dir_path(CreateUniqueDirInDir(src_dir_path));
- FilePath grandchild_file_path(
+ base::FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath child_dir_path(CreateUniqueDirInDir(src_dir_path));
+ base::FilePath grandchild_file_path(
CreateUniqueFileInDir(child_dir_path));
- FilePath dest_dir_path(CreateUniqueDir());
+ base::FilePath dest_dir_path(CreateUniqueDir());
operation()->Copy(URLForPath(src_dir_path), URLForPath(dest_dir_path),
RecordStatusCallback());
MessageLoop::current()->RunUntilIdle();
@@ -696,13 +696,13 @@ TEST_F(LocalFileSystemOperationTest, TestCopySuccessSrcDirRecursive) {
}
TEST_F(LocalFileSystemOperationTest, TestCopyInForeignFileSuccess) {
- FilePath src_local_disk_file_path;
+ base::FilePath src_local_disk_file_path;
file_util::CreateTemporaryFile(&src_local_disk_file_path);
const char test_data[] = "foo";
int data_size = ARRAYSIZE_UNSAFE(test_data);
file_util::WriteFile(src_local_disk_file_path, test_data, data_size);
- FilePath dest_dir_path(CreateUniqueDir());
- FilePath dest_file_path(dest_dir_path.Append(
+ base::FilePath dest_dir_path(CreateUniqueDir());
+ base::FilePath dest_file_path(dest_dir_path.Append(
src_local_disk_file_path.BaseName()));
FileSystemURL dest_file_url = URLForPath(dest_file_path);
int64 before_usage;
@@ -729,14 +729,14 @@ TEST_F(LocalFileSystemOperationTest, TestCopyInForeignFileSuccess) {
}
TEST_F(LocalFileSystemOperationTest, TestCopyInForeignFileFailureByQuota) {
- FilePath src_local_disk_file_path;
+ base::FilePath src_local_disk_file_path;
file_util::CreateTemporaryFile(&src_local_disk_file_path);
const char test_data[] = "foo";
file_util::WriteFile(src_local_disk_file_path, test_data,
ARRAYSIZE_UNSAFE(test_data));
- FilePath dest_dir_path(CreateUniqueDir());
- FilePath dest_file_path(dest_dir_path.Append(
+ base::FilePath dest_dir_path(CreateUniqueDir());
+ base::FilePath dest_file_path(dest_dir_path.Append(
src_local_disk_file_path.BaseName()));
FileSystemURL dest_file_url = URLForPath(dest_file_path);
@@ -756,8 +756,8 @@ TEST_F(LocalFileSystemOperationTest, TestCopyInForeignFileFailureByQuota) {
TEST_F(LocalFileSystemOperationTest, TestCreateFileFailure) {
// Already existing file and exclusive true.
- FilePath dir_path(CreateUniqueDir());
- FilePath file_path(CreateUniqueFileInDir(dir_path));
+ base::FilePath dir_path(CreateUniqueDir());
+ base::FilePath file_path(CreateUniqueFileInDir(dir_path));
operation()->CreateFile(URLForPath(file_path), true,
RecordStatusCallback());
MessageLoop::current()->RunUntilIdle();
@@ -767,8 +767,8 @@ TEST_F(LocalFileSystemOperationTest, TestCreateFileFailure) {
TEST_F(LocalFileSystemOperationTest, TestCreateFileSuccessFileExists) {
// Already existing file and exclusive false.
- FilePath dir_path(CreateUniqueDir());
- FilePath file_path(CreateUniqueFileInDir(dir_path));
+ base::FilePath dir_path(CreateUniqueDir());
+ base::FilePath file_path(CreateUniqueFileInDir(dir_path));
operation()->CreateFile(URLForPath(file_path), false,
RecordStatusCallback());
MessageLoop::current()->RunUntilIdle();
@@ -781,8 +781,8 @@ TEST_F(LocalFileSystemOperationTest, TestCreateFileSuccessFileExists) {
TEST_F(LocalFileSystemOperationTest, TestCreateFileSuccessExclusive) {
// File doesn't exist but exclusive is true.
- FilePath dir_path(CreateUniqueDir());
- FilePath file_path(dir_path.Append(FILE_PATH_LITERAL("FileDoesntExist")));
+ base::FilePath dir_path(CreateUniqueDir());
+ base::FilePath file_path(dir_path.Append(FILE_PATH_LITERAL("FileDoesntExist")));
operation()->CreateFile(URLForPath(file_path), true,
RecordStatusCallback());
MessageLoop::current()->RunUntilIdle();
@@ -793,8 +793,8 @@ TEST_F(LocalFileSystemOperationTest, TestCreateFileSuccessExclusive) {
TEST_F(LocalFileSystemOperationTest, TestCreateFileSuccessFileDoesntExist) {
// Non existing file.
- FilePath dir_path(CreateUniqueDir());
- FilePath file_path(dir_path.Append(FILE_PATH_LITERAL("FileDoesntExist")));
+ base::FilePath dir_path(CreateUniqueDir());
+ base::FilePath file_path(dir_path.Append(FILE_PATH_LITERAL("FileDoesntExist")));
operation()->CreateFile(URLForPath(file_path), false,
RecordStatusCallback());
MessageLoop::current()->RunUntilIdle();
@@ -805,9 +805,9 @@ TEST_F(LocalFileSystemOperationTest, TestCreateFileSuccessFileDoesntExist) {
TEST_F(LocalFileSystemOperationTest,
TestCreateDirFailureDestParentDoesntExist) {
// Dest. parent path does not exist.
- FilePath nonexisting_path(FilePath(
+ base::FilePath nonexisting_path(base::FilePath(
FILE_PATH_LITERAL("DirDoesntExist")));
- FilePath nonexisting_file_path(nonexisting_path.Append(
+ base::FilePath nonexisting_file_path(nonexisting_path.Append(
FILE_PATH_LITERAL("FileDoesntExist")));
operation()->CreateDirectory(URLForPath(nonexisting_file_path), false, false,
RecordStatusCallback());
@@ -818,7 +818,7 @@ TEST_F(LocalFileSystemOperationTest,
TEST_F(LocalFileSystemOperationTest, TestCreateDirFailureDirExists) {
// Exclusive and dir existing at path.
- FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath src_dir_path(CreateUniqueDir());
operation()->CreateDirectory(URLForPath(src_dir_path), true, false,
RecordStatusCallback());
MessageLoop::current()->RunUntilIdle();
@@ -828,8 +828,8 @@ TEST_F(LocalFileSystemOperationTest, TestCreateDirFailureDirExists) {
TEST_F(LocalFileSystemOperationTest, TestCreateDirFailureFileExists) {
// Exclusive true and file existing at path.
- FilePath dir_path(CreateUniqueDir());
- FilePath file_path(CreateUniqueFileInDir(dir_path));
+ base::FilePath dir_path(CreateUniqueDir());
+ base::FilePath file_path(CreateUniqueFileInDir(dir_path));
operation()->CreateDirectory(URLForPath(file_path), true, false,
RecordStatusCallback());
MessageLoop::current()->RunUntilIdle();
@@ -839,7 +839,7 @@ TEST_F(LocalFileSystemOperationTest, TestCreateDirFailureFileExists) {
TEST_F(LocalFileSystemOperationTest, TestCreateDirSuccess) {
// Dir exists and exclusive is false.
- FilePath dir_path(CreateUniqueDir());
+ base::FilePath dir_path(CreateUniqueDir());
operation()->CreateDirectory(URLForPath(dir_path), false, false,
RecordStatusCallback());
MessageLoop::current()->RunUntilIdle();
@@ -847,7 +847,7 @@ TEST_F(LocalFileSystemOperationTest, TestCreateDirSuccess) {
EXPECT_TRUE(change_observer()->HasNoChange());
// Dir doesn't exist.
- FilePath nonexisting_dir_path(FilePath(
+ base::FilePath nonexisting_dir_path(base::FilePath(
FILE_PATH_LITERAL("nonexistingdir")));
operation()->CreateDirectory(URLForPath(nonexisting_dir_path), false, false,
RecordStatusCallback());
@@ -859,7 +859,7 @@ TEST_F(LocalFileSystemOperationTest, TestCreateDirSuccess) {
TEST_F(LocalFileSystemOperationTest, TestCreateDirSuccessExclusive) {
// Dir doesn't exist.
- FilePath nonexisting_dir_path(FilePath(
+ base::FilePath nonexisting_dir_path(base::FilePath(
FILE_PATH_LITERAL("nonexistingdir")));
operation()->CreateDirectory(URLForPath(nonexisting_dir_path), true, false,
@@ -872,7 +872,7 @@ TEST_F(LocalFileSystemOperationTest, TestCreateDirSuccessExclusive) {
}
TEST_F(LocalFileSystemOperationTest, TestExistsAndMetadataFailure) {
- FilePath nonexisting_dir_path(FilePath(
+ base::FilePath nonexisting_dir_path(base::FilePath(
FILE_PATH_LITERAL("nonexistingdir")));
operation()->GetMetadata(URLForPath(nonexisting_dir_path),
RecordMetadataCallback());
@@ -893,7 +893,7 @@ TEST_F(LocalFileSystemOperationTest, TestExistsAndMetadataFailure) {
}
TEST_F(LocalFileSystemOperationTest, TestExistsAndMetadataSuccess) {
- FilePath dir_path(CreateUniqueDir());
+ base::FilePath dir_path(CreateUniqueDir());
int read_access = 0;
operation()->DirectoryExists(URLForPath(dir_path),
@@ -906,10 +906,10 @@ TEST_F(LocalFileSystemOperationTest, TestExistsAndMetadataSuccess) {
MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
EXPECT_TRUE(info().is_directory);
- EXPECT_EQ(FilePath(), path());
+ EXPECT_EQ(base::FilePath(), path());
++read_access;
- FilePath file_path(CreateUniqueFileInDir(dir_path));
+ base::FilePath file_path(CreateUniqueFileInDir(dir_path));
operation()->FileExists(URLForPath(file_path), RecordStatusCallback());
MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
@@ -928,12 +928,12 @@ TEST_F(LocalFileSystemOperationTest, TestExistsAndMetadataSuccess) {
}
TEST_F(LocalFileSystemOperationTest, TestTypeMismatchErrors) {
- FilePath dir_path(CreateUniqueDir());
+ base::FilePath dir_path(CreateUniqueDir());
operation()->FileExists(URLForPath(dir_path), RecordStatusCallback());
MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_A_FILE, status());
- FilePath file_path(CreateUniqueFileInDir(dir_path));
+ base::FilePath file_path(CreateUniqueFileInDir(dir_path));
ASSERT_FALSE(file_path.empty());
operation()->DirectoryExists(URLForPath(file_path), RecordStatusCallback());
MessageLoop::current()->RunUntilIdle();
@@ -942,7 +942,7 @@ TEST_F(LocalFileSystemOperationTest, TestTypeMismatchErrors) {
TEST_F(LocalFileSystemOperationTest, TestReadDirFailure) {
// Path doesn't exist
- FilePath nonexisting_dir_path(FilePath(
+ base::FilePath nonexisting_dir_path(base::FilePath(
FILE_PATH_LITERAL("NonExistingDir")));
file_util::EnsureEndsWithSeparator(&nonexisting_dir_path);
operation()->ReadDirectory(URLForPath(nonexisting_dir_path),
@@ -951,8 +951,8 @@ TEST_F(LocalFileSystemOperationTest, TestReadDirFailure) {
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND, status());
// File exists.
- FilePath dir_path(CreateUniqueDir());
- FilePath file_path(CreateUniqueFileInDir(dir_path));
+ base::FilePath dir_path(CreateUniqueDir());
+ base::FilePath file_path(CreateUniqueFileInDir(dir_path));
operation()->ReadDirectory(URLForPath(file_path),
RecordReadDirectoryCallback());
MessageLoop::current()->RunUntilIdle();
@@ -965,9 +965,9 @@ TEST_F(LocalFileSystemOperationTest, TestReadDirSuccess) {
// | |
// child_dir child_file
// Verify reading parent_dir.
- FilePath parent_dir_path(CreateUniqueDir());
- FilePath child_file_path(CreateUniqueFileInDir(parent_dir_path));
- FilePath child_dir_path(CreateUniqueDirInDir(parent_dir_path));
+ base::FilePath parent_dir_path(CreateUniqueDir());
+ base::FilePath child_file_path(CreateUniqueFileInDir(parent_dir_path));
+ base::FilePath child_dir_path(CreateUniqueDirInDir(parent_dir_path));
ASSERT_FALSE(child_dir_path.empty());
operation()->ReadDirectory(URLForPath(parent_dir_path),
@@ -991,7 +991,7 @@ TEST_F(LocalFileSystemOperationTest, TestReadDirSuccess) {
TEST_F(LocalFileSystemOperationTest, TestRemoveFailure) {
// Path doesn't exist.
- FilePath nonexisting_path(FilePath(
+ base::FilePath nonexisting_path(base::FilePath(
FILE_PATH_LITERAL("NonExistingDir")));
file_util::EnsureEndsWithSeparator(&nonexisting_path);
@@ -1006,9 +1006,9 @@ TEST_F(LocalFileSystemOperationTest, TestRemoveFailure) {
// | |
// child_dir child_file
// Verify deleting parent_dir.
- FilePath parent_dir_path(CreateUniqueDir());
- FilePath child_file_path(CreateUniqueFileInDir(parent_dir_path));
- FilePath child_dir_path(CreateUniqueDirInDir(parent_dir_path));
+ base::FilePath parent_dir_path(CreateUniqueDir());
+ base::FilePath child_file_path(CreateUniqueFileInDir(parent_dir_path));
+ base::FilePath child_dir_path(CreateUniqueDirInDir(parent_dir_path));
ASSERT_FALSE(child_dir_path.empty());
operation()->Remove(URLForPath(parent_dir_path), false /* recursive */,
@@ -1020,7 +1020,7 @@ TEST_F(LocalFileSystemOperationTest, TestRemoveFailure) {
}
TEST_F(LocalFileSystemOperationTest, TestRemoveSuccess) {
- FilePath empty_dir_path(CreateUniqueDir());
+ base::FilePath empty_dir_path(CreateUniqueDir());
EXPECT_TRUE(DirectoryExists(empty_dir_path));
operation()->Remove(URLForPath(empty_dir_path), false /* recursive */,
@@ -1037,9 +1037,9 @@ TEST_F(LocalFileSystemOperationTest, TestRemoveSuccess) {
// | |
// child_dir child_file
// Verify deleting parent_dir.
- FilePath parent_dir_path(CreateUniqueDir());
- FilePath child_file_path(CreateUniqueFileInDir(parent_dir_path));
- FilePath child_dir_path(CreateUniqueDirInDir(parent_dir_path));
+ base::FilePath parent_dir_path(CreateUniqueDir());
+ base::FilePath child_file_path(CreateUniqueFileInDir(parent_dir_path));
+ base::FilePath child_dir_path(CreateUniqueDirInDir(parent_dir_path));
ASSERT_FALSE(child_dir_path.empty());
operation()->Remove(URLForPath(parent_dir_path), true /* recursive */,
@@ -1054,8 +1054,8 @@ TEST_F(LocalFileSystemOperationTest, TestRemoveSuccess) {
}
TEST_F(LocalFileSystemOperationTest, TestTruncate) {
- FilePath dir_path(CreateUniqueDir());
- FilePath file_path(CreateUniqueFileInDir(dir_path));
+ base::FilePath dir_path(CreateUniqueDir());
+ base::FilePath file_path(CreateUniqueFileInDir(dir_path));
char test_data[] = "test data";
int data_size = static_cast<int>(sizeof(test_data));
@@ -1118,8 +1118,8 @@ TEST_F(LocalFileSystemOperationTest, TestTruncate) {
TEST_F(LocalFileSystemOperationTest, TestTruncateFailureByQuota) {
base::PlatformFileInfo info;
- FilePath dir_path(CreateUniqueDir());
- FilePath file_path(CreateUniqueFileInDir(dir_path));
+ base::FilePath dir_path(CreateUniqueDir());
+ base::FilePath file_path(CreateUniqueFileInDir(dir_path));
GrantQuotaForCurrentUsage();
AddQuota(10);
@@ -1143,8 +1143,8 @@ TEST_F(LocalFileSystemOperationTest, TestTruncateFailureByQuota) {
}
TEST_F(LocalFileSystemOperationTest, TestTouchFile) {
- FilePath file_path(CreateUniqueFileInDir(FilePath()));
- FilePath platform_path = PlatformPath(file_path);
+ base::FilePath file_path(CreateUniqueFileInDir(base::FilePath()));
+ base::FilePath platform_path = PlatformPath(file_path);
base::PlatformFileInfo info;
@@ -1176,12 +1176,12 @@ TEST_F(LocalFileSystemOperationTest, TestTouchFile) {
}
TEST_F(LocalFileSystemOperationTest, TestCreateSnapshotFile) {
- FilePath dir_path(CreateUniqueDir());
+ base::FilePath dir_path(CreateUniqueDir());
// Create a file for the testing.
operation()->DirectoryExists(URLForPath(dir_path),
RecordStatusCallback());
- FilePath file_path(CreateUniqueFileInDir(dir_path));
+ base::FilePath file_path(CreateUniqueFileInDir(dir_path));
operation()->FileExists(URLForPath(file_path), RecordStatusCallback());
MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(base::PLATFORM_FILE_OK, status());
diff --git a/webkit/fileapi/local_file_system_operation_write_unittest.cc b/webkit/fileapi/local_file_system_operation_write_unittest.cc
index 4a8cd47..5841222 100644
--- a/webkit/fileapi/local_file_system_operation_write_unittest.cc
+++ b/webkit/fileapi/local_file_system_operation_write_unittest.cc
@@ -43,7 +43,7 @@ void AssertStatusEq(base::PlatformFileError expected,
class MockQuotaManager : public QuotaManager {
public:
- MockQuotaManager(const FilePath& base_dir, int64 quota)
+ MockQuotaManager(const base::FilePath& base_dir, int64 quota)
: QuotaManager(false /* is_incognito */, base_dir,
base::MessageLoopProxy::current(),
base::MessageLoopProxy::current(),
@@ -109,7 +109,7 @@ class LocalFileSystemOperationWriteTest
return &change_observer_;
}
- FileSystemURL URLForPath(const FilePath& path) const {
+ FileSystemURL URLForPath(const base::FilePath& path) const {
return test_helper_.CreateURL(path);
}
@@ -153,7 +153,7 @@ class LocalFileSystemOperationWriteTest
MessageLoop loop_;
base::ScopedTempDir dir_;
- FilePath virtual_path_;
+ base::FilePath virtual_path_;
// For post-operation status.
base::PlatformFileError status_;
@@ -172,13 +172,13 @@ class LocalFileSystemOperationWriteTest
void LocalFileSystemOperationWriteTest::SetUp() {
ASSERT_TRUE(dir_.CreateUniqueTempDir());
- FilePath base_dir = dir_.path().AppendASCII("filesystem");
+ base::FilePath base_dir = dir_.path().AppendASCII("filesystem");
quota_manager_ = new MockQuotaManager(base_dir, 1024);
test_helper_.SetUp(base_dir,
false /* unlimited quota */,
quota_manager_->proxy());
- virtual_path_ = FilePath(FILE_PATH_LITERAL("temporary file"));
+ virtual_path_ = base::FilePath(FILE_PATH_LITERAL("temporary file"));
operation()->CreateFile(
URLForPath(virtual_path_), true /* exclusive */,
@@ -248,7 +248,7 @@ TEST_F(LocalFileSystemOperationWriteTest, TestWriteInvalidFile) {
ScopedTextBlob blob(url_request_context_, blob_url, "It\'ll not be written.");
operation()->Write(&url_request_context_,
- URLForPath(FilePath(FILE_PATH_LITERAL("nonexist"))),
+ URLForPath(base::FilePath(FILE_PATH_LITERAL("nonexist"))),
blob_url, 0, RecordWriteCallback());
MessageLoop::current()->Run();
@@ -260,7 +260,7 @@ TEST_F(LocalFileSystemOperationWriteTest, TestWriteInvalidFile) {
}
TEST_F(LocalFileSystemOperationWriteTest, TestWriteDir) {
- FilePath virtual_dir_path(FILE_PATH_LITERAL("d"));
+ base::FilePath virtual_dir_path(FILE_PATH_LITERAL("d"));
operation()->CreateDirectory(
URLForPath(virtual_dir_path),
true /* exclusive */, false /* recursive */,
@@ -330,7 +330,7 @@ TEST_F(LocalFileSystemOperationWriteTest, TestImmediateCancelFailingWrite) {
FileSystemOperation* write_operation = operation();
write_operation->Write(&url_request_context_,
- URLForPath(FilePath(FILE_PATH_LITERAL("nonexist"))),
+ URLForPath(base::FilePath(FILE_PATH_LITERAL("nonexist"))),
blob_url, 0, RecordWriteCallback());
write_operation->Cancel(RecordCancelCallback());
// We use RunAllPendings() instead of Run() here, because we won't dispatch
diff --git a/webkit/fileapi/local_file_system_quota_unittest.cc b/webkit/fileapi/local_file_system_quota_unittest.cc
index 1e7f6a7..0e39102 100644
--- a/webkit/fileapi/local_file_system_quota_unittest.cc
+++ b/webkit/fileapi/local_file_system_quota_unittest.cc
@@ -72,13 +72,13 @@ class LocalFileSystemQuotaTest
return context;
}
- void PrepareFileSet(const FilePath& virtual_path);
+ void PrepareFileSet(const base::FilePath& virtual_path);
- FileSystemURL URLForPath(const FilePath& path) const {
+ FileSystemURL URLForPath(const base::FilePath& path) const {
return test_helper_.CreateURL(path);
}
- FilePath PlatformPath(const FilePath& virtual_path) {
+ base::FilePath PlatformPath(const base::FilePath& virtual_path) {
return test_helper_.GetLocalPath(virtual_path);
}
@@ -100,24 +100,24 @@ class LocalFileSystemQuotaTest
MessageLoop::current()->RunUntilIdle();
}
- bool FileExists(const FilePath& virtual_path) {
+ bool FileExists(const base::FilePath& virtual_path) {
FileSystemURL url = test_helper_.CreateURL(virtual_path);
base::PlatformFileInfo file_info;
- FilePath platform_path;
+ base::FilePath platform_path;
scoped_ptr<FileSystemOperationContext> context(NewContext());
base::PlatformFileError error = file_util()->GetFileInfo(
context.get(), url, &file_info, &platform_path);
return error == base::PLATFORM_FILE_OK;
}
- bool DirectoryExists(const FilePath& virtual_path) {
+ bool DirectoryExists(const base::FilePath& virtual_path) {
FileSystemURL path = test_helper_.CreateURL(virtual_path);
scoped_ptr<FileSystemOperationContext> context(NewContext());
return FileUtilHelper::DirectoryExists(context.get(), file_util(), path);
}
- FilePath CreateUniqueFileInDir(const FilePath& virtual_dir_path) {
- FilePath file_name = FilePath::FromUTF8Unsafe(
+ base::FilePath CreateUniqueFileInDir(const base::FilePath& virtual_dir_path) {
+ base::FilePath file_name = base::FilePath::FromUTF8Unsafe(
"tmpfile-" + base::IntToString(next_unique_path_suffix_++));
FileSystemURL url = test_helper_.CreateURL(
virtual_dir_path.Append(file_name));
@@ -130,8 +130,8 @@ class LocalFileSystemQuotaTest
return url.path();
}
- FilePath CreateUniqueDirInDir(const FilePath& virtual_dir_path) {
- FilePath dir_name = FilePath::FromUTF8Unsafe(
+ base::FilePath CreateUniqueDirInDir(const base::FilePath& virtual_dir_path) {
+ base::FilePath dir_name = base::FilePath::FromUTF8Unsafe(
"tmpdir-" + base::IntToString(next_unique_path_suffix_++));
FileSystemURL url = test_helper_.CreateURL(
virtual_dir_path.Append(dir_name));
@@ -142,15 +142,15 @@ class LocalFileSystemQuotaTest
return url.path();
}
- FilePath CreateUniqueDir() {
- return CreateUniqueDirInDir(FilePath());
+ base::FilePath CreateUniqueDir() {
+ return CreateUniqueDirInDir(base::FilePath());
}
- FilePath child_dir_path_;
- FilePath child_file1_path_;
- FilePath child_file2_path_;
- FilePath grandchild_file1_path_;
- FilePath grandchild_file2_path_;
+ base::FilePath child_dir_path_;
+ base::FilePath child_file1_path_;
+ base::FilePath child_file2_path_;
+ base::FilePath grandchild_file1_path_;
+ base::FilePath grandchild_file2_path_;
int64 child_path_cost_;
int64 grandchild_path_cost_;
@@ -186,7 +186,7 @@ class LocalFileSystemQuotaTest
void LocalFileSystemQuotaTest::SetUp() {
ASSERT_TRUE(work_dir_.CreateUniqueTempDir());
- FilePath filesystem_dir_path = work_dir_.path().AppendASCII("filesystem");
+ base::FilePath filesystem_dir_path = work_dir_.path().AppendASCII("filesystem");
ASSERT_TRUE(file_util::CreateDirectory(filesystem_dir_path));
quota_manager_ = new quota::QuotaManager(
@@ -217,7 +217,7 @@ void LocalFileSystemQuotaTest::OnGetUsageAndQuota(
quota_ = quota;
}
-void LocalFileSystemQuotaTest::PrepareFileSet(const FilePath& virtual_path) {
+void LocalFileSystemQuotaTest::PrepareFileSet(const base::FilePath& virtual_path) {
int64 usage = SizeByQuotaUtil();
child_dir_path_ = CreateUniqueDirInDir(virtual_path);
child_file1_path_ = CreateUniqueFileInDir(virtual_path);
@@ -231,10 +231,10 @@ void LocalFileSystemQuotaTest::PrepareFileSet(const FilePath& virtual_path) {
}
TEST_F(LocalFileSystemQuotaTest, TestMoveSuccessSrcDirRecursive) {
- FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath src_dir_path(CreateUniqueDir());
int src_path_cost = SizeByQuotaUtil();
PrepareFileSet(src_dir_path);
- FilePath dest_dir_path(CreateUniqueDir());
+ base::FilePath dest_dir_path(CreateUniqueDir());
EXPECT_EQ(0, ActualFileSize());
int total_path_cost = SizeByQuotaUtil();
@@ -279,10 +279,10 @@ TEST_F(LocalFileSystemQuotaTest, TestMoveSuccessSrcDirRecursive) {
}
TEST_F(LocalFileSystemQuotaTest, TestCopySuccessSrcDirRecursive) {
- FilePath src_dir_path(CreateUniqueDir());
+ base::FilePath src_dir_path(CreateUniqueDir());
PrepareFileSet(src_dir_path);
- FilePath dest_dir1_path(CreateUniqueDir());
- FilePath dest_dir2_path(CreateUniqueDir());
+ base::FilePath dest_dir1_path(CreateUniqueDir());
+ base::FilePath dest_dir2_path(CreateUniqueDir());
EXPECT_EQ(0, ActualFileSize());
int total_path_cost = SizeByQuotaUtil();
diff --git a/webkit/fileapi/local_file_system_test_helper.cc b/webkit/fileapi/local_file_system_test_helper.cc
index e3dbe61..fe206f1 100644
--- a/webkit/fileapi/local_file_system_test_helper.cc
+++ b/webkit/fileapi/local_file_system_test_helper.cc
@@ -38,7 +38,7 @@ LocalFileSystemTestOriginHelper::LocalFileSystemTestOriginHelper()
LocalFileSystemTestOriginHelper::~LocalFileSystemTestOriginHelper() {
}
-void LocalFileSystemTestOriginHelper::SetUp(const FilePath& base_dir) {
+void LocalFileSystemTestOriginHelper::SetUp(const base::FilePath& base_dir) {
SetUp(base_dir, false, NULL);
}
@@ -50,17 +50,17 @@ void LocalFileSystemTestOriginHelper::SetUp(
// Prepare the origin's root directory.
file_system_context_->GetMountPointProvider(type_)->
- GetFileSystemRootPathOnFileThread(CreateURL(FilePath()),
+ GetFileSystemRootPathOnFileThread(CreateURL(base::FilePath()),
true /* create */);
// Initialize the usage cache file.
- FilePath usage_cache_path = GetUsageCachePath();
+ base::FilePath usage_cache_path = GetUsageCachePath();
if (!usage_cache_path.empty())
FileSystemUsageCache::UpdateUsage(usage_cache_path, 0);
}
void LocalFileSystemTestOriginHelper::SetUp(
- const FilePath& base_dir,
+ const base::FilePath& base_dir,
bool unlimited_quota,
quota::QuotaManagerProxy* quota_manager_proxy) {
scoped_refptr<quota::MockSpecialStoragePolicy> special_storage_policy =
@@ -79,11 +79,11 @@ void LocalFileSystemTestOriginHelper::SetUp(
// Prepare the origin's root directory.
FileSystemMountPointProvider* mount_point_provider =
file_system_context_->GetMountPointProvider(type_);
- mount_point_provider->GetFileSystemRootPathOnFileThread(CreateURL(FilePath()),
+ mount_point_provider->GetFileSystemRootPathOnFileThread(CreateURL(base::FilePath()),
true /* create */);
// Initialize the usage cache file.
- FilePath usage_cache_path = GetUsageCachePath();
+ base::FilePath usage_cache_path = GetUsageCachePath();
if (!usage_cache_path.empty())
FileSystemUsageCache::UpdateUsage(usage_cache_path, 0);
}
@@ -93,33 +93,33 @@ void LocalFileSystemTestOriginHelper::TearDown() {
MessageLoop::current()->RunUntilIdle();
}
-FilePath LocalFileSystemTestOriginHelper::GetOriginRootPath() const {
+base::FilePath LocalFileSystemTestOriginHelper::GetOriginRootPath() const {
return file_system_context_->GetMountPointProvider(type_)->
- GetFileSystemRootPathOnFileThread(CreateURL(FilePath()), false);
+ GetFileSystemRootPathOnFileThread(CreateURL(base::FilePath()), false);
}
-FilePath LocalFileSystemTestOriginHelper::GetLocalPath(const FilePath& path) {
+base::FilePath LocalFileSystemTestOriginHelper::GetLocalPath(const base::FilePath& path) {
DCHECK(file_util_);
- FilePath local_path;
+ base::FilePath local_path;
scoped_ptr<FileSystemOperationContext> context(NewOperationContext());
file_util_->GetLocalFilePath(context.get(), CreateURL(path), &local_path);
return local_path;
}
-FilePath LocalFileSystemTestOriginHelper::GetLocalPathFromASCII(
+base::FilePath LocalFileSystemTestOriginHelper::GetLocalPathFromASCII(
const std::string& path) {
- return GetLocalPath(FilePath().AppendASCII(path));
+ return GetLocalPath(base::FilePath().AppendASCII(path));
}
-FilePath LocalFileSystemTestOriginHelper::GetUsageCachePath() const {
+base::FilePath LocalFileSystemTestOriginHelper::GetUsageCachePath() const {
if (type_ != kFileSystemTypeTemporary &&
type_ != kFileSystemTypePersistent)
- return FilePath();
+ return base::FilePath();
return file_system_context_->
sandbox_provider()->GetUsageCachePathForOriginAndType(origin_, type_);
}
-FileSystemURL LocalFileSystemTestOriginHelper::CreateURL(const FilePath& path)
+FileSystemURL LocalFileSystemTestOriginHelper::CreateURL(const base::FilePath& path)
const {
return file_system_context_->CreateCrackedFileSystemURL(origin_, type_, path);
}
@@ -163,7 +163,7 @@ LocalFileSystemOperation* LocalFileSystemTestOriginHelper::NewOperation() {
NewOperationContext());
LocalFileSystemOperation* operation = static_cast<LocalFileSystemOperation*>(
file_system_context_->CreateFileSystemOperation(
- CreateURL(FilePath()), NULL));
+ CreateURL(base::FilePath()), NULL));
return operation;
}
diff --git a/webkit/fileapi/local_file_system_test_helper.h b/webkit/fileapi/local_file_system_test_helper.h
index c6cf8c7..6dbebc6 100644
--- a/webkit/fileapi/local_file_system_test_helper.h
+++ b/webkit/fileapi/local_file_system_test_helper.h
@@ -15,12 +15,14 @@
#include "webkit/fileapi/file_system_util.h"
#include "webkit/quota/quota_types.h"
+namespace base {
+class FilePath;
+}
+
namespace quota {
class QuotaManagerProxy;
}
-class FilePath;
-
namespace fileapi {
class FileSystemContext;
@@ -37,27 +39,27 @@ class LocalFileSystemTestOriginHelper {
LocalFileSystemTestOriginHelper();
~LocalFileSystemTestOriginHelper();
- void SetUp(const FilePath& base_dir);
+ void SetUp(const base::FilePath& base_dir);
// If you want to use more than one LocalFileSystemTestOriginHelper in
// a single base directory, they have to share a context, so that they don't
// have multiple databases fighting over the lock to the origin directory
// [deep down inside ObfuscatedFileUtil].
void SetUp(FileSystemContext* file_system_context);
- void SetUp(const FilePath& base_dir,
+ void SetUp(const base::FilePath& base_dir,
bool unlimited_quota,
quota::QuotaManagerProxy* quota_manager_proxy);
void TearDown();
- FilePath GetOriginRootPath() const;
- FilePath GetLocalPath(const FilePath& path);
- FilePath GetLocalPathFromASCII(const std::string& path);
+ base::FilePath GetOriginRootPath() const;
+ base::FilePath GetLocalPath(const base::FilePath& path);
+ base::FilePath GetLocalPathFromASCII(const std::string& path);
// Returns empty path if filesystem type is neither temporary nor persistent.
- FilePath GetUsageCachePath() const;
+ base::FilePath GetUsageCachePath() const;
- FileSystemURL CreateURL(const FilePath& path) const;
+ FileSystemURL CreateURL(const base::FilePath& path) const;
FileSystemURL CreateURLFromUTF8(const std::string& utf8) const {
- return CreateURL(FilePath::FromUTF8Unsafe(utf8));
+ return CreateURL(base::FilePath::FromUTF8Unsafe(utf8));
}
// Helper methods for same-FileUtil copy/move.
diff --git a/webkit/fileapi/local_file_util.cc b/webkit/fileapi/local_file_util.cc
index 0cecdca..4b533c9 100644
--- a/webkit/fileapi/local_file_util.cc
+++ b/webkit/fileapi/local_file_util.cc
@@ -20,8 +20,8 @@ using base::PlatformFileError;
class LocalFileEnumerator : public FileSystemFileUtil::AbstractFileEnumerator {
public:
- LocalFileEnumerator(const FilePath& platform_root_path,
- const FilePath& virtual_root_path,
+ LocalFileEnumerator(const base::FilePath& platform_root_path,
+ const base::FilePath& virtual_root_path,
bool recursive,
int file_type)
: file_enum_(platform_root_path, recursive, file_type),
@@ -34,7 +34,7 @@ class LocalFileEnumerator : public FileSystemFileUtil::AbstractFileEnumerator {
~LocalFileEnumerator() {}
- virtual FilePath Next() OVERRIDE;
+ virtual base::FilePath Next() OVERRIDE;
virtual int64 Size() OVERRIDE;
virtual base::Time LastModifiedTime() OVERRIDE;
virtual bool IsDirectory() OVERRIDE;
@@ -42,12 +42,12 @@ class LocalFileEnumerator : public FileSystemFileUtil::AbstractFileEnumerator {
private:
file_util::FileEnumerator file_enum_;
file_util::FileEnumerator::FindInfo file_util_info_;
- FilePath platform_root_path_;
- FilePath virtual_root_path_;
+ base::FilePath platform_root_path_;
+ base::FilePath virtual_root_path_;
};
-FilePath LocalFileEnumerator::Next() {
- FilePath next = file_enum_.Next();
+base::FilePath LocalFileEnumerator::Next() {
+ base::FilePath next = file_enum_.Next();
// Don't return symlinks.
while (!next.empty() && file_util::IsLink(next))
next = file_enum_.Next();
@@ -55,7 +55,7 @@ FilePath LocalFileEnumerator::Next() {
return next;
file_enum_.GetFindInfo(&file_util_info_);
- FilePath path;
+ base::FilePath path;
platform_root_path_.AppendRelativePath(next, &path);
return virtual_root_path_.Append(path);
}
@@ -82,7 +82,7 @@ PlatformFileError LocalFileUtil::CreateOrOpen(
FileSystemOperationContext* context,
const FileSystemURL& url, int file_flags,
base::PlatformFile* file_handle, bool* created) {
- FilePath file_path;
+ base::FilePath file_path;
PlatformFileError error = GetLocalFilePath(context, url, &file_path);
if (error != base::PLATFORM_FILE_OK)
return error;
@@ -99,7 +99,7 @@ PlatformFileError LocalFileUtil::EnsureFileExists(
FileSystemOperationContext* context,
const FileSystemURL& url,
bool* created) {
- FilePath file_path;
+ base::FilePath file_path;
PlatformFileError error = GetLocalFilePath(context, url, &file_path);
if (error != base::PLATFORM_FILE_OK)
return error;
@@ -111,7 +111,7 @@ PlatformFileError LocalFileUtil::CreateDirectory(
const FileSystemURL& url,
bool exclusive,
bool recursive) {
- FilePath file_path;
+ base::FilePath file_path;
PlatformFileError error = GetLocalFilePath(context, url, &file_path);
if (error != base::PLATFORM_FILE_OK)
return error;
@@ -122,8 +122,8 @@ PlatformFileError LocalFileUtil::GetFileInfo(
FileSystemOperationContext* context,
const FileSystemURL& url,
base::PlatformFileInfo* file_info,
- FilePath* platform_file_path) {
- FilePath file_path;
+ base::FilePath* platform_file_path) {
+ base::FilePath file_path;
PlatformFileError error = GetLocalFilePath(context, url, &file_path);
if (error != base::PLATFORM_FILE_OK)
return error;
@@ -141,7 +141,7 @@ scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator> LocalFileUtil::
FileSystemOperationContext* context,
const FileSystemURL& root_url,
bool recursive) {
- FilePath file_path;
+ base::FilePath file_path;
if (GetLocalFilePath(context, root_url, &file_path) !=
base::PLATFORM_FILE_OK) {
return make_scoped_ptr(new EmptyFileEnumerator)
@@ -157,11 +157,11 @@ scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator> LocalFileUtil::
PlatformFileError LocalFileUtil::GetLocalFilePath(
FileSystemOperationContext* context,
const FileSystemURL& url,
- FilePath* local_file_path) {
+ base::FilePath* local_file_path) {
FileSystemMountPointProvider* provider =
context->file_system_context()->GetMountPointProvider(url.type());
DCHECK(provider);
- FilePath root = provider->GetFileSystemRootPathOnFileThread(url, false);
+ base::FilePath root = provider->GetFileSystemRootPathOnFileThread(url, false);
if (root.empty())
return base::PLATFORM_FILE_ERROR_NOT_FOUND;
*local_file_path = root.Append(url.path());
@@ -173,7 +173,7 @@ PlatformFileError LocalFileUtil::Touch(
const FileSystemURL& url,
const base::Time& last_access_time,
const base::Time& last_modified_time) {
- FilePath file_path;
+ base::FilePath file_path;
PlatformFileError error = GetLocalFilePath(context, url, &file_path);
if (error != base::PLATFORM_FILE_OK)
return error;
@@ -184,7 +184,7 @@ PlatformFileError LocalFileUtil::Truncate(
FileSystemOperationContext* context,
const FileSystemURL& url,
int64 length) {
- FilePath file_path;
+ base::FilePath file_path;
PlatformFileError error = GetLocalFilePath(context, url, &file_path);
if (error != base::PLATFORM_FILE_OK)
return error;
@@ -196,12 +196,12 @@ PlatformFileError LocalFileUtil::CopyOrMoveFile(
const FileSystemURL& src_url,
const FileSystemURL& dest_url,
bool copy) {
- FilePath src_file_path;
+ base::FilePath src_file_path;
PlatformFileError error = GetLocalFilePath(context, src_url, &src_file_path);
if (error != base::PLATFORM_FILE_OK)
return error;
- FilePath dest_file_path;
+ base::FilePath dest_file_path;
error = GetLocalFilePath(context, dest_url, &dest_file_path);
if (error != base::PLATFORM_FILE_OK)
return error;
@@ -211,12 +211,12 @@ PlatformFileError LocalFileUtil::CopyOrMoveFile(
PlatformFileError LocalFileUtil::CopyInForeignFile(
FileSystemOperationContext* context,
- const FilePath& src_file_path,
+ const base::FilePath& src_file_path,
const FileSystemURL& dest_url) {
if (src_file_path.empty())
return base::PLATFORM_FILE_ERROR_INVALID_OPERATION;
- FilePath dest_file_path;
+ base::FilePath dest_file_path;
PlatformFileError error =
GetLocalFilePath(context, dest_url, &dest_file_path);
if (error != base::PLATFORM_FILE_OK)
@@ -227,7 +227,7 @@ PlatformFileError LocalFileUtil::CopyInForeignFile(
PlatformFileError LocalFileUtil::DeleteFile(
FileSystemOperationContext* context,
const FileSystemURL& url) {
- FilePath file_path;
+ base::FilePath file_path;
PlatformFileError error = GetLocalFilePath(context, url, &file_path);
if (error != base::PLATFORM_FILE_OK)
return error;
@@ -237,7 +237,7 @@ PlatformFileError LocalFileUtil::DeleteFile(
PlatformFileError LocalFileUtil::DeleteDirectory(
FileSystemOperationContext* context,
const FileSystemURL& url) {
- FilePath file_path;
+ base::FilePath file_path;
PlatformFileError error = GetLocalFilePath(context, url, &file_path);
if (error != base::PLATFORM_FILE_OK)
return error;
@@ -248,7 +248,7 @@ base::PlatformFileError LocalFileUtil::CreateSnapshotFile(
FileSystemOperationContext* context,
const FileSystemURL& url,
base::PlatformFileInfo* file_info,
- FilePath* platform_path,
+ base::FilePath* platform_path,
SnapshotFilePolicy* policy) {
DCHECK(policy);
DCHECK(file_info);
diff --git a/webkit/fileapi/local_file_util.h b/webkit/fileapi/local_file_util.h
index bbe51f1..7f19a68 100644
--- a/webkit/fileapi/local_file_util.h
+++ b/webkit/fileapi/local_file_util.h
@@ -12,10 +12,10 @@
#include "webkit/storage/webkit_storage_export.h"
namespace base {
+class FilePath;
class Time;
}
-class FilePath;
class GURL;
namespace fileapi {
@@ -50,7 +50,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE LocalFileUtil : public FileSystemFileUtil {
FileSystemOperationContext* context,
const FileSystemURL& url,
base::PlatformFileInfo* file_info,
- FilePath* platform_file) OVERRIDE;
+ base::FilePath* platform_file) OVERRIDE;
virtual scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator(
FileSystemOperationContext* context,
const FileSystemURL& root_url,
@@ -58,7 +58,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE LocalFileUtil : public FileSystemFileUtil {
virtual base::PlatformFileError GetLocalFilePath(
FileSystemOperationContext* context,
const FileSystemURL& file_system_url,
- FilePath* local_file_path) OVERRIDE;
+ base::FilePath* local_file_path) OVERRIDE;
virtual base::PlatformFileError Touch(
FileSystemOperationContext* context,
const FileSystemURL& url,
@@ -75,7 +75,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE LocalFileUtil : public FileSystemFileUtil {
bool copy) OVERRIDE;
virtual base::PlatformFileError CopyInForeignFile(
FileSystemOperationContext* context,
- const FilePath& src_file_path,
+ const base::FilePath& src_file_path,
const FileSystemURL& dest_url) OVERRIDE;
virtual base::PlatformFileError DeleteFile(
FileSystemOperationContext* context,
@@ -87,7 +87,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE LocalFileUtil : public FileSystemFileUtil {
FileSystemOperationContext* context,
const FileSystemURL& url,
base::PlatformFileInfo* file_info,
- FilePath* platform_path,
+ base::FilePath* platform_path,
SnapshotFilePolicy* snapshot_policy) OVERRIDE;
private:
diff --git a/webkit/fileapi/local_file_util_unittest.cc b/webkit/fileapi/local_file_util_unittest.cc
index 72c9ecb..fc3175a 100644
--- a/webkit/fileapi/local_file_util_unittest.cc
+++ b/webkit/fileapi/local_file_util_unittest.cc
@@ -51,7 +51,7 @@ class LocalFileUtilTest : public testing::Test {
return test_helper_.CreateURLFromUTF8(file_name);
}
- FilePath LocalPath(const char *file_name) {
+ base::FilePath LocalPath(const char *file_name) {
return test_helper_.GetLocalPathFromASCII(file_name);
}
diff --git a/webkit/fileapi/media/device_media_file_util.cc b/webkit/fileapi/media/device_media_file_util.cc
index a5db4a8..b1f037c 100644
--- a/webkit/fileapi/media/device_media_file_util.cc
+++ b/webkit/fileapi/media/device_media_file_util.cc
@@ -22,7 +22,7 @@ namespace fileapi {
namespace {
-const FilePath::CharType kDeviceMediaFileUtilTempDir[] =
+const base::FilePath::CharType kDeviceMediaFileUtilTempDir[] =
FILE_PATH_LITERAL("DeviceMediaFileSystem");
MTPDeviceDelegate* GetMTPDeviceDelegate(FileSystemOperationContext* context) {
@@ -33,7 +33,7 @@ MTPDeviceDelegate* GetMTPDeviceDelegate(FileSystemOperationContext* context) {
} // namespace
-DeviceMediaFileUtil::DeviceMediaFileUtil(const FilePath& profile_path)
+DeviceMediaFileUtil::DeviceMediaFileUtil(const base::FilePath& profile_path)
: profile_path_(profile_path) {
}
@@ -70,7 +70,7 @@ PlatformFileError DeviceMediaFileUtil::GetFileInfo(
FileSystemOperationContext* context,
const FileSystemURL& url,
PlatformFileInfo* file_info,
- FilePath* platform_path) {
+ base::FilePath* platform_path) {
MTPDeviceDelegate* delegate = GetMTPDeviceDelegate(context);
if (!delegate)
return base::PLATFORM_FILE_ERROR_NOT_FOUND;
@@ -104,7 +104,7 @@ DeviceMediaFileUtil::CreateFileEnumerator(
PlatformFileError DeviceMediaFileUtil::GetLocalFilePath(
FileSystemOperationContext* context,
const FileSystemURL& file_system_url,
- FilePath* local_file_path) {
+ base::FilePath* local_file_path) {
return base::PLATFORM_FILE_ERROR_SECURITY;
}
@@ -133,7 +133,7 @@ PlatformFileError DeviceMediaFileUtil::CopyOrMoveFile(
PlatformFileError DeviceMediaFileUtil::CopyInForeignFile(
FileSystemOperationContext* context,
- const FilePath& src_file_path,
+ const base::FilePath& src_file_path,
const FileSystemURL& dest_url) {
return base::PLATFORM_FILE_ERROR_SECURITY;
}
@@ -154,7 +154,7 @@ base::PlatformFileError DeviceMediaFileUtil::CreateSnapshotFile(
FileSystemOperationContext* context,
const FileSystemURL& url,
base::PlatformFileInfo* file_info,
- FilePath* local_path,
+ base::FilePath* local_path,
SnapshotFilePolicy* snapshot_policy) {
DCHECK(file_info);
DCHECK(local_path);
@@ -167,7 +167,7 @@ base::PlatformFileError DeviceMediaFileUtil::CreateSnapshotFile(
return base::PLATFORM_FILE_ERROR_NOT_FOUND;
// Create a temp file in "profile_path_/kDeviceMediaFileUtilTempDir".
- FilePath isolated_media_file_system_dir_path =
+ base::FilePath isolated_media_file_system_dir_path =
profile_path_.Append(kDeviceMediaFileUtilTempDir);
bool dir_exists = file_util::DirectoryExists(
isolated_media_file_system_dir_path);
diff --git a/webkit/fileapi/media/device_media_file_util.h b/webkit/fileapi/media/device_media_file_util.h
index bd6bb80..efe85c7 100644
--- a/webkit/fileapi/media/device_media_file_util.h
+++ b/webkit/fileapi/media/device_media_file_util.h
@@ -22,7 +22,7 @@ class FileSystemOperationContext;
class WEBKIT_STORAGE_EXPORT_PRIVATE DeviceMediaFileUtil
: public FileSystemFileUtil {
public:
- explicit DeviceMediaFileUtil(const FilePath& profile_path);
+ explicit DeviceMediaFileUtil(const base::FilePath& profile_path);
virtual ~DeviceMediaFileUtil() {}
// FileSystemFileUtil overrides.
@@ -47,7 +47,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE DeviceMediaFileUtil
FileSystemOperationContext* context,
const FileSystemURL& url,
base::PlatformFileInfo* file_info,
- FilePath* platform_path) OVERRIDE;
+ base::FilePath* platform_path) OVERRIDE;
virtual scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator(
FileSystemOperationContext* context,
const FileSystemURL& root_url,
@@ -55,7 +55,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE DeviceMediaFileUtil
virtual base::PlatformFileError GetLocalFilePath(
FileSystemOperationContext* context,
const FileSystemURL& file_system_url,
- FilePath* local_file_path) OVERRIDE;
+ base::FilePath* local_file_path) OVERRIDE;
virtual base::PlatformFileError Touch(
FileSystemOperationContext* context,
const FileSystemURL& url,
@@ -72,7 +72,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE DeviceMediaFileUtil
bool copy) OVERRIDE;
virtual base::PlatformFileError CopyInForeignFile(
FileSystemOperationContext* context,
- const FilePath& src_file_path,
+ const base::FilePath& src_file_path,
const FileSystemURL& dest_url) OVERRIDE;
virtual base::PlatformFileError DeleteFile(
FileSystemOperationContext* context,
@@ -84,12 +84,12 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE DeviceMediaFileUtil
FileSystemOperationContext* context,
const FileSystemURL& url,
base::PlatformFileInfo* file_info,
- FilePath* platform_path,
+ base::FilePath* platform_path,
SnapshotFilePolicy* policy) OVERRIDE;
private:
// Profile path
- const FilePath profile_path_;
+ const base::FilePath profile_path_;
DISALLOW_COPY_AND_ASSIGN(DeviceMediaFileUtil);
};
diff --git a/webkit/fileapi/media/filtering_file_enumerator.cc b/webkit/fileapi/media/filtering_file_enumerator.cc
index e291697..393cfa2 100644
--- a/webkit/fileapi/media/filtering_file_enumerator.cc
+++ b/webkit/fileapi/media/filtering_file_enumerator.cc
@@ -21,8 +21,8 @@ namespace {
// Used to skip the hidden folders and files. Returns true if the file specified
// by |path| should be skipped.
-bool ShouldSkip(const FilePath& path) {
- const FilePath& base_name = path.BaseName();
+bool ShouldSkip(const base::FilePath& path) {
+ const base::FilePath& base_name = path.BaseName();
if (base_name.empty())
return false;
@@ -77,9 +77,9 @@ FilteringFileEnumerator::FilteringFileEnumerator(
FilteringFileEnumerator::~FilteringFileEnumerator() {
}
-FilePath FilteringFileEnumerator::Next() {
+base::FilePath FilteringFileEnumerator::Next() {
while (true) {
- FilePath next = base_enumerator_->Next();
+ base::FilePath next = base_enumerator_->Next();
if (ShouldSkip(next))
continue;
diff --git a/webkit/fileapi/media/filtering_file_enumerator.h b/webkit/fileapi/media/filtering_file_enumerator.h
index 9e70880..accb2b0 100644
--- a/webkit/fileapi/media/filtering_file_enumerator.h
+++ b/webkit/fileapi/media/filtering_file_enumerator.h
@@ -22,7 +22,7 @@ class WEBKIT_STORAGE_EXPORT FilteringFileEnumerator
MediaPathFilter* filter);
virtual ~FilteringFileEnumerator();
- virtual FilePath Next() OVERRIDE;
+ virtual base::FilePath Next() OVERRIDE;
virtual int64 Size() OVERRIDE;
virtual base::Time LastModifiedTime() OVERRIDE;
virtual bool IsDirectory() OVERRIDE;
diff --git a/webkit/fileapi/media/media_path_filter.cc b/webkit/fileapi/media/media_path_filter.cc
index ae92c19..c9a0a81 100644
--- a/webkit/fileapi/media/media_path_filter.cc
+++ b/webkit/fileapi/media/media_path_filter.cc
@@ -14,7 +14,7 @@ namespace fileapi {
namespace {
-const FilePath::CharType* const kExtraSupportedExtensions[] = {
+const base::FilePath::CharType* const kExtraSupportedExtensions[] = {
FILE_PATH_LITERAL("3gp"),
FILE_PATH_LITERAL("3gpp"),
FILE_PATH_LITERAL("avi"),
@@ -27,7 +27,7 @@ const FilePath::CharType* const kExtraSupportedExtensions[] = {
FILE_PATH_LITERAL("wmv"),
};
-bool IsUnsupportedExtension(const FilePath::StringType& extension) {
+bool IsUnsupportedExtension(const base::FilePath::StringType& extension) {
std::string mime_type;
return !net::GetMimeTypeFromExtension(extension, &mime_type) ||
!net::IsSupportedMimeType(mime_type);
@@ -42,7 +42,7 @@ MediaPathFilter::MediaPathFilter()
MediaPathFilter::~MediaPathFilter() {
}
-bool MediaPathFilter::Match(const FilePath& path) {
+bool MediaPathFilter::Match(const base::FilePath& path) {
EnsureInitialized();
return std::binary_search(media_file_extensions_.begin(),
media_file_extensions_.end(),
@@ -73,7 +73,7 @@ void MediaPathFilter::EnsureInitialized() {
for (MediaFileExtensionList::iterator itr = media_file_extensions_.begin();
itr != media_file_extensions_.end(); ++itr)
- *itr = FilePath::kExtensionSeparator + *itr;
+ *itr = base::FilePath::kExtensionSeparator + *itr;
std::sort(media_file_extensions_.begin(), media_file_extensions_.end());
initialized_ = true;
diff --git a/webkit/fileapi/media/media_path_filter.h b/webkit/fileapi/media/media_path_filter.h
index 9079b8d..694be4e 100644
--- a/webkit/fileapi/media/media_path_filter.h
+++ b/webkit/fileapi/media/media_path_filter.h
@@ -11,7 +11,9 @@
#include "base/synchronization/lock.h"
#include "webkit/storage/webkit_storage_export.h"
+namespace base {
class FilePath;
+}
namespace fileapi {
@@ -21,10 +23,10 @@ class WEBKIT_STORAGE_EXPORT MediaPathFilter {
public:
MediaPathFilter();
~MediaPathFilter();
- bool Match(const FilePath& path);
+ bool Match(const base::FilePath& path);
private:
- typedef std::vector<FilePath::StringType> MediaFileExtensionList;
+ typedef std::vector<base::FilePath::StringType> MediaFileExtensionList;
void EnsureInitialized();
diff --git a/webkit/fileapi/media/mtp_device_delegate.h b/webkit/fileapi/media/mtp_device_delegate.h
index 793f46c..a5e89ac 100644
--- a/webkit/fileapi/media/mtp_device_delegate.h
+++ b/webkit/fileapi/media/mtp_device_delegate.h
@@ -9,9 +9,8 @@
#include "base/platform_file.h"
#include "webkit/fileapi/file_system_file_util.h"
-class FilePath;
-
namespace base {
+class FilePath;
class SequencedTaskRunner;
class Time;
}
@@ -26,7 +25,7 @@ class MTPDeviceDelegate {
public:
// Returns information about the given file path.
virtual base::PlatformFileError GetFileInfo(
- const FilePath& file_path,
+ const base::FilePath& file_path,
base::PlatformFileInfo* file_info) = 0;
// Returns a pointer to a new instance of AbstractFileEnumerator to enumerate
@@ -34,15 +33,15 @@ class MTPDeviceDelegate {
// caller, and its lifetime should not extend past when the current call
// returns to the main media task runner thread.
virtual scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator>
- CreateFileEnumerator(const FilePath& root,
+ CreateFileEnumerator(const base::FilePath& root,
bool recursive) = 0;
// Updates the temporary snapshot file contents given by |local_path| with
// media file contents given by |device_file_path| and also returns the
// metadata of the temporary file.
virtual base::PlatformFileError CreateSnapshotFile(
- const FilePath& device_file_path,
- const FilePath& local_path,
+ const base::FilePath& device_file_path,
+ const base::FilePath& local_path,
base::PlatformFileInfo* file_info) = 0;
// Called when the
diff --git a/webkit/fileapi/media/mtp_device_map_service.cc b/webkit/fileapi/media/mtp_device_map_service.cc
index 7316068..758a913 100644
--- a/webkit/fileapi/media/mtp_device_map_service.cc
+++ b/webkit/fileapi/media/mtp_device_map_service.cc
@@ -26,7 +26,7 @@ MTPDeviceMapService* MTPDeviceMapService::GetInstance() {
}
void MTPDeviceMapService::AddDelegate(
- const FilePath::StringType& device_location,
+ const base::FilePath::StringType& device_location,
MTPDeviceDelegate* delegate) {
DCHECK(delegate);
DCHECK(!device_location.empty());
@@ -38,7 +38,7 @@ void MTPDeviceMapService::AddDelegate(
}
void MTPDeviceMapService::RemoveDelegate(
- const FilePath::StringType& device_location) {
+ const base::FilePath::StringType& device_location) {
base::AutoLock lock(lock_);
DelegateMap::iterator it = delegate_map_.find(device_location);
DCHECK(it != delegate_map_.end());
@@ -48,13 +48,13 @@ void MTPDeviceMapService::RemoveDelegate(
MTPDeviceDelegate* MTPDeviceMapService::GetMTPDeviceDelegate(
const std::string& filesystem_id) {
- FilePath device_path;
+ base::FilePath device_path;
if (!IsolatedContext::GetInstance()->GetRegisteredPath(filesystem_id,
&device_path)) {
return NULL;
}
- const FilePath::StringType& device_location = device_path.value();
+ const base::FilePath::StringType& device_location = device_path.value();
DCHECK(!device_location.empty());
base::AutoLock lock(lock_);
diff --git a/webkit/fileapi/media/mtp_device_map_service.h b/webkit/fileapi/media/mtp_device_map_service.h
index 686d1cb..69da393 100644
--- a/webkit/fileapi/media/mtp_device_map_service.h
+++ b/webkit/fileapi/media/mtp_device_map_service.h
@@ -26,13 +26,13 @@ class WEBKIT_STORAGE_EXPORT MTPDeviceMapService {
// Adds the MTP device delegate to the map service. |device_location|
// specifies the mount location of the MTP device.
// Called on a media task runner thread.
- void AddDelegate(const FilePath::StringType& device_location,
+ void AddDelegate(const base::FilePath::StringType& device_location,
MTPDeviceDelegate* delegate);
// Removes the MTP device delegate from the map service. |device_location|
// specifies the mount location of the MTP device.
// Called on the UI thread.
- void RemoveDelegate(const FilePath::StringType& device_location);
+ void RemoveDelegate(const base::FilePath::StringType& device_location);
// Gets the media device delegate associated with |filesystem_id|.
// Return NULL if the |filesystem_id| is no longer valid (e.g. because the
@@ -47,7 +47,7 @@ class WEBKIT_STORAGE_EXPORT MTPDeviceMapService {
// Mapping of device_location and MTPDeviceDelegate* object. It is safe to
// store and access the raw pointer. This class operates on the IO thread.
- typedef std::map<FilePath::StringType, MTPDeviceDelegate*> DelegateMap;
+ typedef std::map<base::FilePath::StringType, MTPDeviceDelegate*> DelegateMap;
// Get access to this class using GetInstance() method.
MTPDeviceMapService();
diff --git a/webkit/fileapi/media/native_media_file_util.cc b/webkit/fileapi/media/native_media_file_util.cc
index 6f7c53c..115278c 100644
--- a/webkit/fileapi/media/native_media_file_util.cc
+++ b/webkit/fileapi/media/native_media_file_util.cc
@@ -31,7 +31,7 @@ PlatformFileError NativeMediaFileUtil::CreateOrOpen(
PlatformFileError NativeMediaFileUtil::EnsureFileExists(
FileSystemOperationContext* context,
const FileSystemURL& url, bool* created) {
- FilePath file_path;
+ base::FilePath file_path;
PlatformFileError error = GetFilteredLocalFilePath(context, url, &file_path);
if (error != base::PLATFORM_FILE_OK)
return error;
@@ -55,7 +55,7 @@ PlatformFileError NativeMediaFileUtil::Touch(
const FileSystemURL& url,
const base::Time& last_access_time,
const base::Time& last_modified_time) {
- FilePath file_path;
+ base::FilePath file_path;
PlatformFileError error = GetFilteredLocalFilePathForExistingFileOrDirectory(
context,
url,
@@ -71,7 +71,7 @@ PlatformFileError NativeMediaFileUtil::Truncate(
FileSystemOperationContext* context,
const FileSystemURL& url,
int64 length) {
- FilePath file_path;
+ base::FilePath file_path;
PlatformFileError error = GetFilteredLocalFilePathForExistingFileOrDirectory(
context,
url,
@@ -88,7 +88,7 @@ PlatformFileError NativeMediaFileUtil::CopyOrMoveFile(
const FileSystemURL& src_url,
const FileSystemURL& dest_url,
bool copy) {
- FilePath src_file_path;
+ base::FilePath src_file_path;
PlatformFileError error =
GetFilteredLocalFilePathForExistingFileOrDirectory(
context, src_url,
@@ -99,7 +99,7 @@ PlatformFileError NativeMediaFileUtil::CopyOrMoveFile(
if (NativeFileUtil::DirectoryExists(src_file_path))
return base::PLATFORM_FILE_ERROR_NOT_A_FILE;
- FilePath dest_file_path;
+ base::FilePath dest_file_path;
error = GetLocalFilePath(context, dest_url, &dest_file_path);
if (error != base::PLATFORM_FILE_OK)
return error;
@@ -118,12 +118,12 @@ PlatformFileError NativeMediaFileUtil::CopyOrMoveFile(
PlatformFileError NativeMediaFileUtil::CopyInForeignFile(
FileSystemOperationContext* context,
- const FilePath& src_file_path,
+ const base::FilePath& src_file_path,
const FileSystemURL& dest_url) {
if (src_file_path.empty())
return base::PLATFORM_FILE_ERROR_INVALID_OPERATION;
- FilePath dest_file_path;
+ base::FilePath dest_file_path;
PlatformFileError error =
GetFilteredLocalFilePath(context, dest_url, &dest_file_path);
if (error != base::PLATFORM_FILE_OK)
@@ -134,7 +134,7 @@ PlatformFileError NativeMediaFileUtil::CopyInForeignFile(
PlatformFileError NativeMediaFileUtil::DeleteFile(
FileSystemOperationContext* context,
const FileSystemURL& url) {
- FilePath file_path;
+ base::FilePath file_path;
PlatformFileError error = GetLocalFilePath(context, url, &file_path);
if (error != base::PLATFORM_FILE_OK)
return error;
@@ -153,7 +153,7 @@ PlatformFileError NativeMediaFileUtil::GetFileInfo(
FileSystemOperationContext* context,
const FileSystemURL& url,
PlatformFileInfo* file_info,
- FilePath* platform_path) {
+ base::FilePath* platform_path) {
DCHECK(context);
DCHECK(context->media_path_filter());
DCHECK(file_info);
@@ -174,8 +174,8 @@ PlatformFileError NativeMediaFileUtil::GetFileInfo(
PlatformFileError NativeMediaFileUtil::GetFilteredLocalFilePath(
FileSystemOperationContext* context,
const FileSystemURL& file_system_url,
- FilePath* local_file_path) {
- FilePath file_path;
+ base::FilePath* local_file_path) {
+ base::FilePath file_path;
PlatformFileError error =
IsolatedFileUtil::GetLocalFilePath(context, file_system_url, &file_path);
if (error != base::PLATFORM_FILE_OK)
@@ -192,8 +192,8 @@ NativeMediaFileUtil::GetFilteredLocalFilePathForExistingFileOrDirectory(
FileSystemOperationContext* context,
const FileSystemURL& file_system_url,
PlatformFileError failure_error,
- FilePath* local_file_path) {
- FilePath file_path;
+ base::FilePath* local_file_path) {
+ base::FilePath file_path;
PlatformFileError error =
GetLocalFilePath(context, file_system_url, &file_path);
if (error != base::PLATFORM_FILE_OK)
diff --git a/webkit/fileapi/media/native_media_file_util.h b/webkit/fileapi/media/native_media_file_util.h
index 97b0999..b1e3573 100644
--- a/webkit/fileapi/media/native_media_file_util.h
+++ b/webkit/fileapi/media/native_media_file_util.h
@@ -48,7 +48,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE NativeMediaFileUtil
bool copy) OVERRIDE;
virtual base::PlatformFileError CopyInForeignFile(
FileSystemOperationContext* context,
- const FilePath& src_file_path,
+ const base::FilePath& src_file_path,
const FileSystemURL& dest_url) OVERRIDE;
virtual base::PlatformFileError DeleteFile(
FileSystemOperationContext* context,
@@ -57,7 +57,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE NativeMediaFileUtil
FileSystemOperationContext* context,
const FileSystemURL& url,
base::PlatformFileInfo* file_info,
- FilePath* platform_path) OVERRIDE;
+ base::FilePath* platform_path) OVERRIDE;
private:
// Like GetLocalFilePath(), but always take media_path_filter() into
@@ -66,7 +66,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE NativeMediaFileUtil
base::PlatformFileError GetFilteredLocalFilePath(
FileSystemOperationContext* context,
const FileSystemURL& file_system_url,
- FilePath* local_file_path);
+ base::FilePath* local_file_path);
// Like GetLocalFilePath(), but if the file does not exist, then return
// |failure_error|.
@@ -78,7 +78,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE NativeMediaFileUtil
FileSystemOperationContext* context,
const FileSystemURL& file_system_url,
base::PlatformFileError failure_error,
- FilePath* local_file_path);
+ base::FilePath* local_file_path);
DISALLOW_COPY_AND_ASSIGN(NativeMediaFileUtil);
};
diff --git a/webkit/fileapi/media/native_media_file_util_unittest.cc b/webkit/fileapi/media/native_media_file_util_unittest.cc
index 8fab4d3..f98379b 100644
--- a/webkit/fileapi/media/native_media_file_util_unittest.cc
+++ b/webkit/fileapi/media/native_media_file_util_unittest.cc
@@ -32,7 +32,7 @@ namespace {
typedef FileSystemOperation::FileEntryList FileEntryList;
struct FilteringTestCase {
- const FilePath::CharType* path;
+ const base::FilePath::CharType* path;
bool is_directory;
bool visible;
};
@@ -62,13 +62,13 @@ void ExpectMetadataEqHelper(const std::string& test_name,
bool expected_is_directory,
base::PlatformFileError actual,
const base::PlatformFileInfo& file_info,
- const FilePath& /*platform_path*/) {
+ const base::FilePath& /*platform_path*/) {
EXPECT_EQ(expected, actual) << test_name;
if (actual == base::PLATFORM_FILE_OK)
EXPECT_EQ(expected_is_directory, file_info.is_directory) << test_name;
}
-void DidReadDirectory(std::set<FilePath::StringType>* content,
+void DidReadDirectory(std::set<base::FilePath::StringType>* content,
bool* completed,
base::PlatformFileError error,
const FileEntryList& file_list,
@@ -80,11 +80,11 @@ void DidReadDirectory(std::set<FilePath::StringType>* content,
EXPECT_TRUE(content->insert(itr->name).second);
}
-void PopulateDirectoryWithTestCases(const FilePath& dir,
+void PopulateDirectoryWithTestCases(const base::FilePath& dir,
const FilteringTestCase* test_cases,
size_t n) {
for (size_t i = 0; i < n; ++i) {
- FilePath path = dir.Append(test_cases[i].path);
+ base::FilePath path = dir.Append(test_cases[i].path);
if (test_cases[i].is_directory) {
ASSERT_TRUE(file_util::CreateDirectory(path));
} else {
@@ -138,7 +138,7 @@ class NativeMediaFileUtilTest : public testing::Test {
return file_system_context_.get();
}
- FileSystemURL CreateURL(const FilePath::CharType* test_case_path) {
+ FileSystemURL CreateURL(const base::FilePath::CharType* test_case_path) {
return file_system_context_->CreateCrackedFileSystemURL(
origin(),
fileapi::kFileSystemTypeIsolated,
@@ -149,14 +149,14 @@ class NativeMediaFileUtilTest : public testing::Test {
return IsolatedContext::GetInstance();
}
- FilePath root_path() {
+ base::FilePath root_path() {
return data_dir_.path().Append(FPL("Media Directory"));
}
- FilePath GetVirtualPath(const FilePath::CharType* test_case_path) {
- return FilePath::FromUTF8Unsafe(filesystem_id_).
+ base::FilePath GetVirtualPath(const base::FilePath::CharType* test_case_path) {
+ return base::FilePath::FromUTF8Unsafe(filesystem_id_).
Append(FPL("Media Directory")).
- Append(FilePath(test_case_path));
+ Append(base::FilePath(test_case_path));
}
FileSystemFileUtil* file_util() {
@@ -219,7 +219,7 @@ TEST_F(NativeMediaFileUtilTest, ReadDirectoryFiltering) {
kFilteringTestCases,
arraysize(kFilteringTestCases));
- std::set<FilePath::StringType> content;
+ std::set<base::FilePath::StringType> content;
FileSystemURL url = CreateURL(FPL(""));
bool completed = false;
NewOperation(url)->ReadDirectory(
@@ -229,9 +229,9 @@ TEST_F(NativeMediaFileUtilTest, ReadDirectoryFiltering) {
EXPECT_EQ(5u, content.size());
for (size_t i = 0; i < arraysize(kFilteringTestCases); ++i) {
- FilePath::StringType name =
- FilePath(kFilteringTestCases[i].path).BaseName().value();
- std::set<FilePath::StringType>::const_iterator found = content.find(name);
+ base::FilePath::StringType name =
+ base::FilePath(kFilteringTestCases[i].path).BaseName().value();
+ std::set<base::FilePath::StringType>::const_iterator found = content.find(name);
EXPECT_EQ(kFilteringTestCases[i].visible, found != content.end());
}
}
@@ -267,7 +267,7 @@ TEST_F(NativeMediaFileUtilTest, CreateFileAndCreateDirectoryFiltering) {
}
TEST_F(NativeMediaFileUtilTest, CopySourceFiltering) {
- FilePath dest_path = root_path().AppendASCII("dest");
+ base::FilePath dest_path = root_path().AppendASCII("dest");
FileSystemURL dest_url = CreateURL(FPL("dest"));
// Run the loop twice. The first run has no source files. The second run does.
@@ -320,7 +320,7 @@ TEST_F(NativeMediaFileUtilTest, CopyDestFiltering) {
}
// Always create a dummy source data file.
- FilePath src_path = root_path().AppendASCII("foo.jpg");
+ base::FilePath src_path = root_path().AppendASCII("foo.jpg");
FileSystemURL src_url = CreateURL(FPL("foo.jpg"));
static const char kDummyData[] = "dummy";
ASSERT_TRUE(file_util::WriteFile(src_path, kDummyData, strlen(kDummyData)));
@@ -372,7 +372,7 @@ TEST_F(NativeMediaFileUtilTest, CopyDestFiltering) {
}
TEST_F(NativeMediaFileUtilTest, MoveSourceFiltering) {
- FilePath dest_path = root_path().AppendASCII("dest");
+ base::FilePath dest_path = root_path().AppendASCII("dest");
FileSystemURL dest_url = CreateURL(FPL("dest"));
// Run the loop twice. The first run has no source files. The second run does.
@@ -434,7 +434,7 @@ TEST_F(NativeMediaFileUtilTest, MoveDestFiltering) {
}
// Create the source file for every test case because it might get moved.
- FilePath src_path = root_path().AppendASCII("foo.jpg");
+ base::FilePath src_path = root_path().AppendASCII("foo.jpg");
FileSystemURL src_url = CreateURL(FPL("foo.jpg"));
static const char kDummyData[] = "dummy";
ASSERT_TRUE(
diff --git a/webkit/fileapi/mount_points.cc b/webkit/fileapi/mount_points.cc
index d754b25..fbd881d 100644
--- a/webkit/fileapi/mount_points.cc
+++ b/webkit/fileapi/mount_points.cc
@@ -8,7 +8,7 @@ namespace fileapi {
MountPoints::MountPointInfo::MountPointInfo() {}
MountPoints::MountPointInfo::MountPointInfo(
- const std::string& name, const FilePath& path)
+ const std::string& name, const base::FilePath& path)
: name(name), path(path) {}
} // namespace fileapi
diff --git a/webkit/fileapi/mount_points.h b/webkit/fileapi/mount_points.h
index 27df0f2..30779bb 100644
--- a/webkit/fileapi/mount_points.h
+++ b/webkit/fileapi/mount_points.h
@@ -26,7 +26,7 @@ class WEBKIT_STORAGE_EXPORT MountPoints {
public:
struct WEBKIT_STORAGE_EXPORT MountPointInfo {
MountPointInfo();
- MountPointInfo(const std::string& name, const FilePath& path);
+ MountPointInfo(const std::string& name, const base::FilePath& path);
// The name to be used to register the path. The registered file can
// be referred by a virtual path /<filesystem_id>/<name>.
@@ -34,7 +34,7 @@ class WEBKIT_STORAGE_EXPORT MountPoints {
std::string name;
// The path of the file.
- FilePath path;
+ base::FilePath path;
// For STL operation.
bool operator<(const MountPointInfo& that) const {
@@ -65,12 +65,12 @@ class WEBKIT_STORAGE_EXPORT MountPoints {
virtual FileSystemURL CreateCrackedFileSystemURL(
const GURL& origin,
fileapi::FileSystemType type,
- const FilePath& path) const = 0;
+ const base::FilePath& path) const = 0;
// Returns the mount point root path registered for a given |mount_name|.
// Returns false if the given |mount_name| is not valid.
virtual bool GetRegisteredPath(const std::string& mount_name,
- FilePath* path) const = 0;
+ base::FilePath* path) const = 0;
// Cracks the given |virtual_path| (which is the path part of a filesystem URL
// without '/external' or '/isolated' prefix part) and populates the
@@ -83,10 +83,10 @@ class WEBKIT_STORAGE_EXPORT MountPoints {
// Note that |path| is set to empty paths if the filesystem type is isolated
// and |virtual_path| has no <relative_path> part (i.e. pointing to the
// virtual root).
- virtual bool CrackVirtualPath(const FilePath& virtual_path,
+ virtual bool CrackVirtualPath(const base::FilePath& virtual_path,
std::string* mount_name,
FileSystemType* type,
- FilePath* path) const = 0;
+ base::FilePath* path) const = 0;
private:
DISALLOW_COPY_AND_ASSIGN(MountPoints);
diff --git a/webkit/fileapi/native_file_util.cc b/webkit/fileapi/native_file_util.cc
index 7ee3b04..a794250 100644
--- a/webkit/fileapi/native_file_util.cc
+++ b/webkit/fileapi/native_file_util.cc
@@ -16,7 +16,7 @@ namespace {
// Returns true on success, or false otherwise.
//
// TODO(benchan): Find a better place outside webkit to host this function.
-bool SetPlatformSpecificDirectoryPermissions(const FilePath& dir_path) {
+bool SetPlatformSpecificDirectoryPermissions(const base::FilePath& dir_path) {
#if defined(OS_CHROMEOS)
// System daemons on Chrome OS may run as a user different than the Chrome
// process but need to access files under the directories created here.
@@ -38,7 +38,7 @@ using base::PlatformFileError;
class NativeFileEnumerator : public FileSystemFileUtil::AbstractFileEnumerator {
public:
- NativeFileEnumerator(const FilePath& root_path,
+ NativeFileEnumerator(const base::FilePath& root_path,
bool recursive,
int file_type)
: file_enum_(root_path, recursive, file_type) {
@@ -49,7 +49,7 @@ class NativeFileEnumerator : public FileSystemFileUtil::AbstractFileEnumerator {
~NativeFileEnumerator() {}
- virtual FilePath Next() OVERRIDE;
+ virtual base::FilePath Next() OVERRIDE;
virtual int64 Size() OVERRIDE;
virtual base::Time LastModifiedTime() OVERRIDE;
virtual bool IsDirectory() OVERRIDE;
@@ -59,8 +59,8 @@ class NativeFileEnumerator : public FileSystemFileUtil::AbstractFileEnumerator {
file_util::FileEnumerator::FindInfo file_util_info_;
};
-FilePath NativeFileEnumerator::Next() {
- FilePath rv = file_enum_.Next();
+base::FilePath NativeFileEnumerator::Next() {
+ base::FilePath rv = file_enum_.Next();
if (!rv.empty())
file_enum_.GetFindInfo(&file_util_info_);
return rv;
@@ -79,7 +79,7 @@ bool NativeFileEnumerator::IsDirectory() {
}
PlatformFileError NativeFileUtil::CreateOrOpen(
- const FilePath& path, int file_flags,
+ const base::FilePath& path, int file_flags,
PlatformFile* file_handle, bool* created) {
if (!file_util::DirectoryExists(path.DirName())) {
// If its parent does not exist, should return NOT_FOUND error.
@@ -98,7 +98,7 @@ PlatformFileError NativeFileUtil::Close(PlatformFile file_handle) {
}
PlatformFileError NativeFileUtil::EnsureFileExists(
- const FilePath& path,
+ const base::FilePath& path,
bool* created) {
if (!file_util::DirectoryExists(path.DirName()))
// If its parent does not exist, should return NOT_FOUND error.
@@ -122,7 +122,7 @@ PlatformFileError NativeFileUtil::EnsureFileExists(
}
PlatformFileError NativeFileUtil::CreateDirectory(
- const FilePath& path,
+ const base::FilePath& path,
bool exclusive,
bool recursive) {
// If parent dir of file doesn't exist.
@@ -147,7 +147,7 @@ PlatformFileError NativeFileUtil::CreateDirectory(
}
PlatformFileError NativeFileUtil::GetFileInfo(
- const FilePath& path,
+ const base::FilePath& path,
base::PlatformFileInfo* file_info) {
if (!file_util::PathExists(path))
return base::PLATFORM_FILE_ERROR_NOT_FOUND;
@@ -157,7 +157,7 @@ PlatformFileError NativeFileUtil::GetFileInfo(
}
scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator>
- NativeFileUtil::CreateFileEnumerator(const FilePath& root_path,
+ NativeFileUtil::CreateFileEnumerator(const base::FilePath& root_path,
bool recursive) {
return make_scoped_ptr(new NativeFileEnumerator(
root_path, recursive,
@@ -167,7 +167,7 @@ scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator>
}
PlatformFileError NativeFileUtil::Touch(
- const FilePath& path,
+ const base::FilePath& path,
const base::Time& last_access_time,
const base::Time& last_modified_time) {
if (!file_util::TouchFile(
@@ -176,7 +176,7 @@ PlatformFileError NativeFileUtil::Touch(
return base::PLATFORM_FILE_OK;
}
-PlatformFileError NativeFileUtil::Truncate(const FilePath& path, int64 length) {
+PlatformFileError NativeFileUtil::Truncate(const base::FilePath& path, int64 length) {
PlatformFileError error_code(base::PLATFORM_FILE_ERROR_FAILED);
PlatformFile file =
base::CreatePlatformFile(
@@ -194,17 +194,17 @@ PlatformFileError NativeFileUtil::Truncate(const FilePath& path, int64 length) {
return error_code;
}
-bool NativeFileUtil::PathExists(const FilePath& path) {
+bool NativeFileUtil::PathExists(const base::FilePath& path) {
return file_util::PathExists(path);
}
-bool NativeFileUtil::DirectoryExists(const FilePath& path) {
+bool NativeFileUtil::DirectoryExists(const base::FilePath& path) {
return file_util::DirectoryExists(path);
}
PlatformFileError NativeFileUtil::CopyOrMoveFile(
- const FilePath& src_path,
- const FilePath& dest_path,
+ const base::FilePath& src_path,
+ const base::FilePath& dest_path,
bool copy) {
base::PlatformFileInfo info;
base::PlatformFileError error = NativeFileUtil::GetFileInfo(src_path, &info);
@@ -237,7 +237,7 @@ PlatformFileError NativeFileUtil::CopyOrMoveFile(
return base::PLATFORM_FILE_ERROR_FAILED;
}
-PlatformFileError NativeFileUtil::DeleteFile(const FilePath& path) {
+PlatformFileError NativeFileUtil::DeleteFile(const base::FilePath& path) {
if (!file_util::PathExists(path))
return base::PLATFORM_FILE_ERROR_NOT_FOUND;
if (file_util::DirectoryExists(path))
@@ -247,7 +247,7 @@ PlatformFileError NativeFileUtil::DeleteFile(const FilePath& path) {
return base::PLATFORM_FILE_OK;
}
-PlatformFileError NativeFileUtil::DeleteDirectory(const FilePath& path) {
+PlatformFileError NativeFileUtil::DeleteDirectory(const base::FilePath& path) {
if (!file_util::PathExists(path))
return base::PLATFORM_FILE_ERROR_NOT_FOUND;
if (!file_util::DirectoryExists(path))
diff --git a/webkit/fileapi/native_file_util.h b/webkit/fileapi/native_file_util.h
index 075d27b..55f3297 100644
--- a/webkit/fileapi/native_file_util.h
+++ b/webkit/fileapi/native_file_util.h
@@ -33,32 +33,32 @@ namespace fileapi {
class WEBKIT_STORAGE_EXPORT_PRIVATE NativeFileUtil {
public:
static base::PlatformFileError CreateOrOpen(
- const FilePath& path,
+ const base::FilePath& path,
int file_flags,
base::PlatformFile* file_handle,
bool* created);
static base::PlatformFileError Close(base::PlatformFile file);
- static base::PlatformFileError EnsureFileExists(const FilePath& path,
+ static base::PlatformFileError EnsureFileExists(const base::FilePath& path,
bool* created);
- static base::PlatformFileError CreateDirectory(const FilePath& path,
+ static base::PlatformFileError CreateDirectory(const base::FilePath& path,
bool exclusive,
bool recursive);
- static base::PlatformFileError GetFileInfo(const FilePath& path,
+ static base::PlatformFileError GetFileInfo(const base::FilePath& path,
base::PlatformFileInfo* file_info);
static scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator>
- CreateFileEnumerator(const FilePath& root_path,
+ CreateFileEnumerator(const base::FilePath& root_path,
bool recursive);
- static base::PlatformFileError Touch(const FilePath& path,
+ static base::PlatformFileError Touch(const base::FilePath& path,
const base::Time& last_access_time,
const base::Time& last_modified_time);
- static base::PlatformFileError Truncate(const FilePath& path, int64 length);
- static bool PathExists(const FilePath& path);
- static bool DirectoryExists(const FilePath& path);
- static base::PlatformFileError CopyOrMoveFile(const FilePath& src_path,
- const FilePath& dest_path,
+ static base::PlatformFileError Truncate(const base::FilePath& path, int64 length);
+ static bool PathExists(const base::FilePath& path);
+ static bool DirectoryExists(const base::FilePath& path);
+ static base::PlatformFileError CopyOrMoveFile(const base::FilePath& src_path,
+ const base::FilePath& dest_path,
bool copy);
- static base::PlatformFileError DeleteFile(const FilePath& path);
- static base::PlatformFileError DeleteDirectory(const FilePath& path);
+ static base::PlatformFileError DeleteFile(const base::FilePath& path);
+ static base::PlatformFileError DeleteDirectory(const base::FilePath& path);
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(NativeFileUtil);
diff --git a/webkit/fileapi/obfuscated_file_util.cc b/webkit/fileapi/obfuscated_file_util.cc
index dd75118..657eef1 100644
--- a/webkit/fileapi/obfuscated_file_util.cc
+++ b/webkit/fileapi/obfuscated_file_util.cc
@@ -28,8 +28,8 @@
// Example of various paths:
// void ObfuscatedFileUtil::DoSomething(const FileSystemURL& url) {
-// FilePath virtual_path = url.path();
-// FilePath local_path = GetLocalFilePath(url);
+// base::FilePath virtual_path = url.path();
+// base::FilePath local_path = GetLocalFilePath(url);
//
// NativeFileUtil::DoSomething(local_path);
// file_util::DoAnother(local_path);
@@ -47,7 +47,7 @@ const int64 kFlushDelaySeconds = 10 * 60; // 10 minutes
void InitFileInfo(
FileSystemDirectoryDatabase::FileInfo* file_info,
FileSystemDirectoryDatabase::FileId parent_id,
- const FilePath::StringType& file_name) {
+ const base::FilePath::StringType& file_name) {
DCHECK(file_info);
file_info->parent_id = parent_id;
file_info->name = file_name;
@@ -55,7 +55,7 @@ void InitFileInfo(
// Costs computed as per crbug.com/86114, based on the LevelDB implementation of
// path storage under Linux. It's not clear if that will differ on Windows, on
-// which FilePath uses wide chars [since they're converted to UTF-8 for storage
+// which base::FilePath uses wide chars [since they're converted to UTF-8 for storage
// anyway], but as long as the cost is high enough that one can't cheat on quota
// by storing data in paths, it doesn't need to be all that accurate.
const int64 kPathCreationQuotaCost = 146; // Bytes per inode, basically.
@@ -91,9 +91,9 @@ void TouchDirectory(FileSystemDirectoryDatabase* db, FileId dir_id) {
NOTREACHED();
}
-const FilePath::CharType kTemporaryDirectoryName[] = FILE_PATH_LITERAL("t");
-const FilePath::CharType kPersistentDirectoryName[] = FILE_PATH_LITERAL("p");
-const FilePath::CharType kSyncableDirectoryName[] = FILE_PATH_LITERAL("s");
+const base::FilePath::CharType kTemporaryDirectoryName[] = FILE_PATH_LITERAL("t");
+const base::FilePath::CharType kPersistentDirectoryName[] = FILE_PATH_LITERAL("p");
+const base::FilePath::CharType kSyncableDirectoryName[] = FILE_PATH_LITERAL("s");
} // namespace
@@ -116,7 +116,7 @@ class ObfuscatedFileEnumerator
type_(root_url.type()),
recursive_(recursive),
current_file_id_(0) {
- FilePath root_virtual_path = root_url.path();
+ base::FilePath root_virtual_path = root_url.path();
FileId file_id;
if (!db_->GetFileWithPath(root_virtual_path, &file_id))
@@ -128,16 +128,16 @@ class ObfuscatedFileEnumerator
virtual ~ObfuscatedFileEnumerator() {}
- virtual FilePath Next() OVERRIDE {
+ virtual base::FilePath Next() OVERRIDE {
ProcessRecurseQueue();
if (display_stack_.empty())
- return FilePath();
+ return base::FilePath();
current_file_id_ = display_stack_.back();
display_stack_.pop_back();
FileInfo file_info;
- FilePath platform_file_path;
+ base::FilePath platform_file_path;
base::PlatformFileError error =
obfuscated_file_util_->GetFileInfoInternal(
db_, context_, origin_, type_, current_file_id_,
@@ -145,7 +145,7 @@ class ObfuscatedFileEnumerator
if (error != base::PLATFORM_FILE_OK)
return Next();
- FilePath virtual_path =
+ base::FilePath virtual_path =
current_parent_virtual_path_.Append(file_info.name);
if (recursive_ && file_info.is_directory()) {
FileRecord record = { current_file_id_, virtual_path };
@@ -172,7 +172,7 @@ class ObfuscatedFileEnumerator
struct FileRecord {
FileId file_id;
- FilePath virtual_path;
+ base::FilePath virtual_path;
};
void ProcessRecurseQueue() {
@@ -196,7 +196,7 @@ class ObfuscatedFileEnumerator
std::queue<FileRecord> recurse_queue_;
std::vector<FileId> display_stack_;
- FilePath current_parent_virtual_path_;
+ base::FilePath current_parent_virtual_path_;
FileId current_file_id_;
base::PlatformFileInfo current_platform_file_info_;
@@ -208,7 +208,7 @@ class ObfuscatedOriginEnumerator
typedef FileSystemOriginDatabase::OriginRecord OriginRecord;
ObfuscatedOriginEnumerator(
FileSystemOriginDatabase* origin_database,
- const FilePath& base_file_path)
+ const base::FilePath& base_file_path)
: base_file_path_(base_file_path) {
if (origin_database)
origin_database->ListAllOrigins(&origins_);
@@ -231,24 +231,24 @@ class ObfuscatedOriginEnumerator
virtual bool HasFileSystemType(FileSystemType type) const OVERRIDE {
if (current_.path.empty())
return false;
- FilePath::StringType type_string =
+ base::FilePath::StringType type_string =
ObfuscatedFileUtil::GetDirectoryNameForType(type);
if (type_string.empty()) {
NOTREACHED();
return false;
}
- FilePath path = base_file_path_.Append(current_.path).Append(type_string);
+ base::FilePath path = base_file_path_.Append(current_.path).Append(type_string);
return file_util::DirectoryExists(path);
}
private:
std::vector<OriginRecord> origins_;
OriginRecord current_;
- FilePath base_file_path_;
+ base::FilePath base_file_path_;
};
ObfuscatedFileUtil::ObfuscatedFileUtil(
- const FilePath& file_system_directory)
+ const base::FilePath& file_system_directory)
: file_system_directory_(file_system_directory) {
}
@@ -285,7 +285,7 @@ PlatformFileError ObfuscatedFileUtil::CreateOrOpen(
if (!AllocateQuota(context, growth))
return base::PLATFORM_FILE_ERROR_NO_SPACE;
PlatformFileError error = CreateFile(
- context, FilePath(),
+ context, base::FilePath(),
url.origin(), url.type(), &file_info,
file_flags, file_handle);
if (created && base::PLATFORM_FILE_OK == error) {
@@ -301,7 +301,7 @@ PlatformFileError ObfuscatedFileUtil::CreateOrOpen(
return base::PLATFORM_FILE_ERROR_EXISTS;
base::PlatformFileInfo platform_file_info;
- FilePath local_path;
+ base::FilePath local_path;
FileInfo file_info;
base::PlatformFileError error = GetFileInfoInternal(
db, context, url.origin(), url.type(), file_id,
@@ -378,7 +378,7 @@ PlatformFileError ObfuscatedFileUtil::EnsureFileExists(
if (!AllocateQuota(context, growth))
return base::PLATFORM_FILE_ERROR_NO_SPACE;
PlatformFileError error = CreateFile(
- context, FilePath(), url.origin(), url.type(), &file_info, 0, NULL);
+ context, base::FilePath(), url.origin(), url.type(), &file_info, 0, NULL);
if (created && base::PLATFORM_FILE_OK == error) {
*created = true;
UpdateUsage(context, url, growth);
@@ -421,12 +421,12 @@ PlatformFileError ObfuscatedFileUtil::CreateDirectory(
return base::PLATFORM_FILE_OK;
}
- std::vector<FilePath::StringType> components;
+ std::vector<base::FilePath::StringType> components;
VirtualPath::GetComponents(url.path(), &components);
FileId parent_id = 0;
size_t index;
for (index = 0; index < components.size(); ++index) {
- FilePath::StringType name = components[index];
+ base::FilePath::StringType name = components[index];
if (name == FILE_PATH_LITERAL("/"))
continue;
if (!db->GetChildWithName(parent_id, name, &parent_id))
@@ -464,7 +464,7 @@ PlatformFileError ObfuscatedFileUtil::GetFileInfo(
FileSystemOperationContext* context,
const FileSystemURL& url,
base::PlatformFileInfo* file_info,
- FilePath* platform_file_path) {
+ base::FilePath* platform_file_path) {
FileSystemDirectoryDatabase* db = GetDirectoryDatabase(
url.origin(), url.type(), false);
if (!db)
@@ -498,7 +498,7 @@ scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator>
PlatformFileError ObfuscatedFileUtil::GetLocalFilePath(
FileSystemOperationContext* context,
const FileSystemURL& url,
- FilePath* local_path) {
+ base::FilePath* local_path) {
FileSystemDirectoryDatabase* db = GetDirectoryDatabase(
url.origin(), url.type(), false);
if (!db)
@@ -543,7 +543,7 @@ PlatformFileError ObfuscatedFileUtil::Touch(
return base::PLATFORM_FILE_ERROR_FAILED;
return base::PLATFORM_FILE_OK;
}
- FilePath local_path = DataPathToLocalPath(
+ base::FilePath local_path = DataPathToLocalPath(
url.origin(), url.type(), file_info.data_path);
return NativeFileUtil::Touch(
local_path, last_access_time, last_modified_time);
@@ -554,7 +554,7 @@ PlatformFileError ObfuscatedFileUtil::Truncate(
const FileSystemURL& url,
int64 length) {
base::PlatformFileInfo file_info;
- FilePath local_path;
+ base::FilePath local_path;
base::PlatformFileError error =
GetFileInfo(context, url, &file_info, &local_path);
if (error != base::PLATFORM_FILE_OK)
@@ -596,7 +596,7 @@ PlatformFileError ObfuscatedFileUtil::CopyOrMoveFile(
FileInfo src_file_info;
base::PlatformFileInfo src_platform_file_info;
- FilePath src_local_path;
+ base::FilePath src_local_path;
base::PlatformFileError error = GetFileInfoInternal(
db, context, src_url.origin(), src_url.type(), src_file_id,
&src_file_info, &src_platform_file_info, &src_local_path);
@@ -607,7 +607,7 @@ PlatformFileError ObfuscatedFileUtil::CopyOrMoveFile(
FileInfo dest_file_info;
base::PlatformFileInfo dest_platform_file_info; // overwrite case only
- FilePath dest_local_path; // overwrite case only
+ base::FilePath dest_local_path; // overwrite case only
if (overwrite) {
base::PlatformFileError error = GetFileInfoInternal(
db, context, dest_url.origin(), dest_url.type(), dest_file_id,
@@ -715,7 +715,7 @@ PlatformFileError ObfuscatedFileUtil::CopyOrMoveFile(
PlatformFileError ObfuscatedFileUtil::CopyInForeignFile(
FileSystemOperationContext* context,
- const FilePath& src_file_path,
+ const base::FilePath& src_file_path,
const FileSystemURL& dest_url) {
FileSystemDirectoryDatabase* db = GetDirectoryDatabase(
dest_url.origin(), dest_url.type(), true);
@@ -733,7 +733,7 @@ PlatformFileError ObfuscatedFileUtil::CopyInForeignFile(
FileInfo dest_file_info;
base::PlatformFileInfo dest_platform_file_info; // overwrite case only
if (overwrite) {
- FilePath dest_local_path;
+ base::FilePath dest_local_path;
base::PlatformFileError error = GetFileInfoInternal(
db, context, dest_url.origin(), dest_url.type(), dest_file_id,
&dest_file_info, &dest_platform_file_info, &dest_local_path);
@@ -766,7 +766,7 @@ PlatformFileError ObfuscatedFileUtil::CopyInForeignFile(
base::PlatformFileError error;
if (overwrite) {
- FilePath dest_local_path = DataPathToLocalPath(
+ base::FilePath dest_local_path = DataPathToLocalPath(
dest_url.origin(), dest_url.type(), dest_file_info.data_path);
error = NativeFileUtil::CopyOrMoveFile(
src_file_path, dest_local_path, true);
@@ -805,7 +805,7 @@ PlatformFileError ObfuscatedFileUtil::DeleteFile(
FileInfo file_info;
base::PlatformFileInfo platform_file_info;
- FilePath local_path;
+ base::FilePath local_path;
base::PlatformFileError error = GetFileInfoInternal(
db, context, url.origin(), url.type(), file_id,
&file_info, &platform_file_info, &local_path);
@@ -870,7 +870,7 @@ base::PlatformFileError ObfuscatedFileUtil::CreateSnapshotFile(
FileSystemOperationContext* context,
const FileSystemURL& url,
base::PlatformFileInfo* file_info,
- FilePath* platform_path,
+ base::FilePath* platform_path,
SnapshotFilePolicy* policy) {
DCHECK(policy);
// We're just returning the local file information.
@@ -909,23 +909,23 @@ bool ObfuscatedFileUtil::IsDirectoryEmpty(
return children.empty();
}
-FilePath ObfuscatedFileUtil::GetDirectoryForOriginAndType(
+base::FilePath ObfuscatedFileUtil::GetDirectoryForOriginAndType(
const GURL& origin,
FileSystemType type,
bool create,
base::PlatformFileError* error_code) {
- FilePath origin_dir = GetDirectoryForOrigin(origin, create, error_code);
+ base::FilePath origin_dir = GetDirectoryForOrigin(origin, create, error_code);
if (origin_dir.empty())
- return FilePath();
- FilePath::StringType type_string = GetDirectoryNameForType(type);
+ return base::FilePath();
+ base::FilePath::StringType type_string = GetDirectoryNameForType(type);
if (type_string.empty()) {
LOG(WARNING) << "Unknown filesystem type requested:" << type;
if (error_code)
*error_code = base::PLATFORM_FILE_ERROR_INVALID_URL;
- return FilePath();
+ return base::FilePath();
}
- FilePath path = origin_dir.Append(type_string);
+ base::FilePath path = origin_dir.Append(type_string);
base::PlatformFileError error = base::PLATFORM_FILE_OK;
if (!file_util::DirectoryExists(path) &&
(!create || !file_util::CreateDirectory(path))) {
@@ -942,7 +942,7 @@ FilePath ObfuscatedFileUtil::GetDirectoryForOriginAndType(
bool ObfuscatedFileUtil::DeleteDirectoryForOriginAndType(
const GURL& origin, FileSystemType type) {
base::PlatformFileError error = base::PLATFORM_FILE_OK;
- FilePath origin_type_path = GetDirectoryForOriginAndType(origin, type, false,
+ base::FilePath origin_type_path = GetDirectoryForOriginAndType(origin, type, false,
&error);
if (origin_type_path.empty())
return true;
@@ -958,7 +958,7 @@ bool ObfuscatedFileUtil::DeleteDirectoryForOriginAndType(
return false;
}
- FilePath origin_path = origin_type_path.DirName();
+ base::FilePath origin_path = origin_type_path.DirName();
DCHECK_EQ(origin_path.value(),
GetDirectoryForOrigin(origin, false, NULL).value());
@@ -992,7 +992,7 @@ bool ObfuscatedFileUtil::DeleteDirectoryForOriginAndType(
}
// static
-FilePath::StringType ObfuscatedFileUtil::GetDirectoryNameForType(
+base::FilePath::StringType ObfuscatedFileUtil::GetDirectoryNameForType(
FileSystemType type) {
switch (type) {
case kFileSystemTypeTemporary:
@@ -1003,7 +1003,7 @@ FilePath::StringType ObfuscatedFileUtil::GetDirectoryNameForType(
return kSyncableDirectoryName;
case kFileSystemTypeUnknown:
default:
- return FilePath::StringType();
+ return base::FilePath::StringType();
}
}
@@ -1032,14 +1032,14 @@ bool ObfuscatedFileUtil::DestroyDirectoryDatabase(
}
PlatformFileError error = base::PLATFORM_FILE_OK;
- FilePath path = GetDirectoryForOriginAndType(origin, type, false, &error);
+ base::FilePath path = GetDirectoryForOriginAndType(origin, type, false, &error);
if (path.empty() || error == base::PLATFORM_FILE_ERROR_NOT_FOUND)
return true;
return FileSystemDirectoryDatabase::DestroyDatabase(path);
}
// static
-int64 ObfuscatedFileUtil::ComputeFilePathCost(const FilePath& path) {
+int64 ObfuscatedFileUtil::ComputeFilePathCost(const base::FilePath& path) {
return UsageForPath(VirtualPath::BaseName(path).value().size());
}
@@ -1051,7 +1051,7 @@ PlatformFileError ObfuscatedFileUtil::GetFileInfoInternal(
FileId file_id,
FileInfo* local_info,
base::PlatformFileInfo* file_info,
- FilePath* platform_file_path) {
+ base::FilePath* platform_file_path) {
DCHECK(db);
DCHECK(context);
DCHECK(file_info);
@@ -1067,13 +1067,13 @@ PlatformFileError ObfuscatedFileUtil::GetFileInfoInternal(
file_info->is_directory = true;
file_info->is_symbolic_link = false;
file_info->last_modified = local_info->modification_time;
- *platform_file_path = FilePath();
+ *platform_file_path = base::FilePath();
// We don't fill in ctime or atime.
return base::PLATFORM_FILE_OK;
}
if (local_info->data_path.empty())
return base::PLATFORM_FILE_ERROR_INVALID_OPERATION;
- FilePath local_path = DataPathToLocalPath(
+ base::FilePath local_path = DataPathToLocalPath(
origin, type, local_info->data_path);
base::PlatformFileError error = NativeFileUtil::GetFileInfo(
local_path, file_info);
@@ -1095,7 +1095,7 @@ PlatformFileError ObfuscatedFileUtil::GetFileInfoInternal(
PlatformFileError ObfuscatedFileUtil::CreateFile(
FileSystemOperationContext* context,
- const FilePath& src_file_path,
+ const base::FilePath& src_file_path,
const GURL& dest_origin,
FileSystemType dest_type,
FileInfo* dest_file_info, int file_flags, PlatformFile* handle) {
@@ -1105,12 +1105,12 @@ PlatformFileError ObfuscatedFileUtil::CreateFile(
dest_origin, dest_type, true);
PlatformFileError error = base::PLATFORM_FILE_OK;
- FilePath root = GetDirectoryForOriginAndType(dest_origin, dest_type, false,
+ base::FilePath root = GetDirectoryForOriginAndType(dest_origin, dest_type, false,
&error);
if (error != base::PLATFORM_FILE_OK)
return error;
- FilePath dest_local_path;
+ base::FilePath dest_local_path;
error = GenerateNewLocalPath(db, context, dest_origin, dest_type,
&dest_local_path);
if (error != base::PLATFORM_FILE_OK)
@@ -1157,7 +1157,7 @@ PlatformFileError ObfuscatedFileUtil::CreateFile(
// This removes the root, including the trailing slash, leaving a relative
// path.
- dest_file_info->data_path = FilePath(
+ dest_file_info->data_path = base::FilePath(
dest_local_path.value().substr(root.value().length() + 1));
FileId file_id;
@@ -1174,12 +1174,12 @@ PlatformFileError ObfuscatedFileUtil::CreateFile(
return base::PLATFORM_FILE_OK;
}
-FilePath ObfuscatedFileUtil::DataPathToLocalPath(
- const GURL& origin, FileSystemType type, const FilePath& data_path) {
+base::FilePath ObfuscatedFileUtil::DataPathToLocalPath(
+ const GURL& origin, FileSystemType type, const base::FilePath& data_path) {
PlatformFileError error = base::PLATFORM_FILE_OK;
- FilePath root = GetDirectoryForOriginAndType(origin, type, false, &error);
+ base::FilePath root = GetDirectoryForOriginAndType(origin, type, false, &error);
if (error != base::PLATFORM_FILE_OK)
- return FilePath();
+ return base::FilePath();
return root.Append(data_path);
}
@@ -1202,7 +1202,7 @@ FileSystemDirectoryDatabase* ObfuscatedFileUtil::GetDirectoryDatabase(
}
PlatformFileError error = base::PLATFORM_FILE_OK;
- FilePath path = GetDirectoryForOriginAndType(origin, type, create, &error);
+ base::FilePath path = GetDirectoryForOriginAndType(origin, type, create, &error);
if (error != base::PLATFORM_FILE_OK) {
LOG(WARNING) << "Failed to get origin+type directory: " << path.value();
return NULL;
@@ -1213,7 +1213,7 @@ FileSystemDirectoryDatabase* ObfuscatedFileUtil::GetDirectoryDatabase(
return database;
}
-FilePath ObfuscatedFileUtil::GetDirectoryForOrigin(
+base::FilePath ObfuscatedFileUtil::GetDirectoryForOrigin(
const GURL& origin, bool create, base::PlatformFileError* error_code) {
if (!InitOriginDatabase(create)) {
if (error_code) {
@@ -1221,30 +1221,30 @@ FilePath ObfuscatedFileUtil::GetDirectoryForOrigin(
base::PLATFORM_FILE_ERROR_FAILED :
base::PLATFORM_FILE_ERROR_NOT_FOUND;
}
- return FilePath();
+ return base::FilePath();
}
- FilePath directory_name;
+ base::FilePath directory_name;
std::string id = GetOriginIdentifierFromURL(origin);
bool exists_in_db = origin_database_->HasOriginPath(id);
if (!exists_in_db && !create) {
if (error_code)
*error_code = base::PLATFORM_FILE_ERROR_NOT_FOUND;
- return FilePath();
+ return base::FilePath();
}
if (!origin_database_->GetPathForOrigin(id, &directory_name)) {
if (error_code)
*error_code = base::PLATFORM_FILE_ERROR_FAILED;
- return FilePath();
+ return base::FilePath();
}
- FilePath path = file_system_directory_.Append(directory_name);
+ base::FilePath path = file_system_directory_.Append(directory_name);
bool exists_in_fs = file_util::DirectoryExists(path);
if (!exists_in_db && exists_in_fs) {
if (!file_util::Delete(path, true)) {
if (error_code)
*error_code = base::PLATFORM_FILE_ERROR_FAILED;
- return FilePath();
+ return base::FilePath();
}
exists_in_fs = false;
}
@@ -1255,7 +1255,7 @@ FilePath ObfuscatedFileUtil::GetDirectoryForOrigin(
*error_code = create ?
base::PLATFORM_FILE_ERROR_FAILED :
base::PLATFORM_FILE_ERROR_NOT_FOUND;
- return FilePath();
+ return base::FilePath();
}
}
@@ -1308,15 +1308,15 @@ PlatformFileError ObfuscatedFileUtil::GenerateNewLocalPath(
FileSystemOperationContext* context,
const GURL& origin,
FileSystemType type,
- FilePath* local_path) {
+ base::FilePath* local_path) {
DCHECK(local_path);
int64 number;
if (!db || !db->GetNextInteger(&number))
return base::PLATFORM_FILE_ERROR_FAILED;
PlatformFileError error = base::PLATFORM_FILE_OK;
- FilePath new_local_path = GetDirectoryForOriginAndType(origin, type, false,
- &error);
+ base::FilePath new_local_path = GetDirectoryForOriginAndType(origin, type,
+ false, &error);
if (error != base::PLATFORM_FILE_OK)
return base::PLATFORM_FILE_ERROR_FAILED;
diff --git a/webkit/fileapi/obfuscated_file_util.h b/webkit/fileapi/obfuscated_file_util.h
index 88fc441..f9d770b 100644
--- a/webkit/fileapi/obfuscated_file_util.h
+++ b/webkit/fileapi/obfuscated_file_util.h
@@ -55,7 +55,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE ObfuscatedFileUtil
virtual bool HasFileSystemType(FileSystemType type) const = 0;
};
- explicit ObfuscatedFileUtil(const FilePath& file_system_directory);
+ explicit ObfuscatedFileUtil(const base::FilePath& file_system_directory);
virtual ~ObfuscatedFileUtil();
// FileSystemFileUtil overrides.
@@ -80,7 +80,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE ObfuscatedFileUtil
FileSystemOperationContext* context,
const FileSystemURL& url,
base::PlatformFileInfo* file_info,
- FilePath* platform_file) OVERRIDE;
+ base::FilePath* platform_file) OVERRIDE;
virtual scoped_ptr<AbstractFileEnumerator> CreateFileEnumerator(
FileSystemOperationContext* context,
const FileSystemURL& root_url,
@@ -88,7 +88,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE ObfuscatedFileUtil
virtual base::PlatformFileError GetLocalFilePath(
FileSystemOperationContext* context,
const FileSystemURL& file_system_url,
- FilePath* local_path) OVERRIDE;
+ base::FilePath* local_path) OVERRIDE;
virtual base::PlatformFileError Touch(
FileSystemOperationContext* context,
const FileSystemURL& url,
@@ -105,7 +105,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE ObfuscatedFileUtil
bool copy) OVERRIDE;
virtual base::PlatformFileError CopyInForeignFile(
FileSystemOperationContext* context,
- const FilePath& src_file_path,
+ const base::FilePath& src_file_path,
const FileSystemURL& dest_url) OVERRIDE;
virtual base::PlatformFileError DeleteFile(
FileSystemOperationContext* context,
@@ -117,7 +117,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE ObfuscatedFileUtil
FileSystemOperationContext* context,
const FileSystemURL& url,
base::PlatformFileInfo* file_info,
- FilePath* platform_path,
+ base::FilePath* platform_path,
SnapshotFilePolicy* policy) OVERRIDE;
// Returns true if the directory |url| is empty.
@@ -133,7 +133,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE ObfuscatedFileUtil
// there is a file system error (e.g. the directory doesn't exist on disk and
// |create| is false). Callers should always check |error_code| to make sure
// the returned path is usable.
- FilePath GetDirectoryForOriginAndType(
+ base::FilePath GetDirectoryForOriginAndType(
const GURL& origin,
FileSystemType type,
bool create,
@@ -146,7 +146,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE ObfuscatedFileUtil
// TODO(ericu): This doesn't really feel like it belongs in this class.
// The previous version lives in FileSystemPathManager, but perhaps
// SandboxMountPointProvider would be better?
- static FilePath::StringType GetDirectoryNameForType(FileSystemType type);
+ static base::FilePath::StringType GetDirectoryNameForType(FileSystemType type);
// This method and all methods of its returned class must be called only on
// the FILE thread. The caller is responsible for deleting the returned
@@ -162,7 +162,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE ObfuscatedFileUtil
// this ignores all but the BaseName of the supplied path. In order to
// compute the cost of adding a multi-segment directory recursively, call this
// on each path segment and add the results.
- static int64 ComputeFilePathCost(const FilePath& path);
+ static int64 ComputeFilePathCost(const base::FilePath& path);
private:
typedef FileSystemDirectoryDatabase::FileId FileId;
@@ -178,7 +178,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE ObfuscatedFileUtil
FileId file_id,
FileInfo* local_info,
base::PlatformFileInfo* file_info,
- FilePath* platform_file_path);
+ base::FilePath* platform_file_path);
// Creates a new file, both the underlying backing file and the entry in the
// database. |dest_file_info| is an in-out parameter. Supply the name and
@@ -193,7 +193,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE ObfuscatedFileUtil
// DCHECK and handle will hold base::kInvalidPlatformFileValue.
base::PlatformFileError CreateFile(
FileSystemOperationContext* context,
- const FilePath& source_file_path,
+ const base::FilePath& source_file_path,
const GURL& dest_origin,
FileSystemType dest_type,
FileInfo* dest_file_info,
@@ -203,10 +203,10 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE ObfuscatedFileUtil
// This converts from a relative path [as is stored in the FileInfo.data_path
// field] to an absolute platform path that can be given to the native
// filesystem.
- FilePath DataPathToLocalPath(
+ base::FilePath DataPathToLocalPath(
const GURL& origin,
FileSystemType type,
- const FilePath& data_file_path);
+ const base::FilePath& data_file_path);
// This returns NULL if |create| flag is false and a filesystem does not
// exist for the given |origin_url| and |type|.
@@ -216,7 +216,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE ObfuscatedFileUtil
// Gets the topmost directory specific to this origin. This will
// contain both the filesystem type subdirectories.
- FilePath GetDirectoryForOrigin(const GURL& origin,
+ base::FilePath GetDirectoryForOrigin(const GURL& origin,
bool create,
base::PlatformFileError* error_code);
@@ -233,12 +233,12 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE ObfuscatedFileUtil
FileSystemOperationContext* context,
const GURL& origin,
FileSystemType type,
- FilePath* local_path);
+ base::FilePath* local_path);
typedef std::map<std::string, FileSystemDirectoryDatabase*> DirectoryMap;
DirectoryMap directories_;
scoped_ptr<FileSystemOriginDatabase> origin_database_;
- FilePath file_system_directory_;
+ base::FilePath file_system_directory_;
base::OneShotTimer<ObfuscatedFileUtil> timer_;
DISALLOW_COPY_AND_ASSIGN(ObfuscatedFileUtil);
diff --git a/webkit/fileapi/obfuscated_file_util_unittest.cc b/webkit/fileapi/obfuscated_file_util_unittest.cc
index f33bc6b..a481c0c 100644
--- a/webkit/fileapi/obfuscated_file_util_unittest.cc
+++ b/webkit/fileapi/obfuscated_file_util_unittest.cc
@@ -33,11 +33,11 @@ namespace fileapi {
namespace {
-bool FileExists(const FilePath& path) {
+bool FileExists(const base::FilePath& path) {
return file_util::PathExists(path) && !file_util::DirectoryExists(path);
}
-int64 GetSize(const FilePath& path) {
+int64 GetSize(const base::FilePath& path) {
int64 size;
EXPECT_TRUE(file_util::GetFileSize(path, &size));
return size;
@@ -191,7 +191,7 @@ class ObfuscatedFileUtilTest : public testing::Test {
return static_cast<ObfuscatedFileUtil*>(test_helper_.file_util());
}
- const FilePath& test_directory() const {
+ const base::FilePath& test_directory() const {
return data_dir_.path();
}
@@ -234,7 +234,7 @@ class ObfuscatedFileUtilTest : public testing::Test {
bool PathExists(const FileSystemURL& url) {
scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
base::PlatformFileInfo file_info;
- FilePath platform_path;
+ base::FilePath platform_path;
base::PlatformFileError error = ofu()->GetFileInfo(
context.get(), url, &file_info, &platform_path);
return error == base::PLATFORM_FILE_OK;
@@ -255,7 +255,7 @@ class ObfuscatedFileUtilTest : public testing::Test {
return ObfuscatedFileUtil::ComputeFilePathCost(url.path());
}
- FileSystemURL CreateURL(const FilePath& path) {
+ FileSystemURL CreateURL(const base::FilePath& path) {
return test_helper_.CreateURL(path);
}
@@ -268,12 +268,12 @@ class ObfuscatedFileUtilTest : public testing::Test {
void CheckFileAndCloseHandle(
const FileSystemURL& url, base::PlatformFile file_handle) {
scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
- FilePath local_path;
+ base::FilePath local_path;
EXPECT_EQ(base::PLATFORM_FILE_OK, ofu()->GetLocalFilePath(
context.get(), url, &local_path));
base::PlatformFileInfo file_info0;
- FilePath data_path;
+ base::FilePath data_path;
EXPECT_EQ(base::PLATFORM_FILE_OK, ofu()->GetFileInfo(
context.get(), url, &file_info0, &data_path));
EXPECT_EQ(data_path, local_path);
@@ -326,10 +326,10 @@ class ObfuscatedFileUtilTest : public testing::Test {
void ValidateTestDirectory(
const FileSystemURL& root_url,
- const std::set<FilePath::StringType>& files,
- const std::set<FilePath::StringType>& directories) {
+ const std::set<base::FilePath::StringType>& files,
+ const std::set<base::FilePath::StringType>& directories) {
scoped_ptr<FileSystemOperationContext> context;
- std::set<FilePath::StringType>::const_iterator iter;
+ std::set<base::FilePath::StringType>::const_iterator iter;
for (iter = files.begin(); iter != files.end(); ++iter) {
bool created = true;
context.reset(NewContext(NULL));
@@ -390,8 +390,8 @@ class ObfuscatedFileUtilTest : public testing::Test {
void FillTestDirectory(
const FileSystemURL& root_url,
- std::set<FilePath::StringType>* files,
- std::set<FilePath::StringType>* directories) {
+ std::set<base::FilePath::StringType>* files,
+ std::set<base::FilePath::StringType>* directories) {
scoped_ptr<FileSystemOperationContext> context;
context.reset(NewContext(NULL));
std::vector<base::FileUtilProxy::Entry> entries;
@@ -408,7 +408,7 @@ class ObfuscatedFileUtilTest : public testing::Test {
directories->insert(FILE_PATH_LITERAL("fourth"));
directories->insert(FILE_PATH_LITERAL("fifth"));
directories->insert(FILE_PATH_LITERAL("sixth"));
- std::set<FilePath::StringType>::iterator iter;
+ std::set<base::FilePath::StringType>::iterator iter;
for (iter = files->begin(); iter != files->end(); ++iter) {
bool created = false;
context.reset(NewContext(NULL));
@@ -432,8 +432,8 @@ class ObfuscatedFileUtilTest : public testing::Test {
}
void TestReadDirectoryHelper(const FileSystemURL& root_url) {
- std::set<FilePath::StringType> files;
- std::set<FilePath::StringType> directories;
+ std::set<base::FilePath::StringType> files;
+ std::set<base::FilePath::StringType> directories;
FillTestDirectory(root_url, &files, &directories);
scoped_ptr<FileSystemOperationContext> context;
@@ -448,7 +448,7 @@ class ObfuscatedFileUtilTest : public testing::Test {
for (entry_iter = entries.begin(); entry_iter != entries.end();
++entry_iter) {
const base::FileUtilProxy::Entry& entry = *entry_iter;
- std::set<FilePath::StringType>::iterator iter = files.find(entry.name);
+ std::set<base::FilePath::StringType>::iterator iter = files.find(entry.name);
if (iter != files.end()) {
EXPECT_FALSE(entry.is_directory);
files.erase(iter);
@@ -471,7 +471,7 @@ class ObfuscatedFileUtilTest : public testing::Test {
context.get(), url, last_access_time, last_modified_time));
// Currently we fire no change notifications for Touch.
EXPECT_TRUE(change_observer()->HasNoChange());
- FilePath local_path;
+ base::FilePath local_path;
base::PlatformFileInfo file_info;
context.reset(NewContext(NULL));
EXPECT_EQ(base::PLATFORM_FILE_OK, ofu()->GetFileInfo(
@@ -499,8 +499,8 @@ class ObfuscatedFileUtilTest : public testing::Test {
void TestCopyInForeignFileHelper(bool overwrite) {
base::ScopedTempDir source_dir;
ASSERT_TRUE(source_dir.CreateUniqueTempDir());
- FilePath root_file_path = source_dir.path();
- FilePath src_file_path = root_file_path.AppendASCII("file_name");
+ base::FilePath root_file_path = source_dir.path();
+ base::FilePath src_file_path = root_file_path.AppendASCII("file_name");
FileSystemURL dest_url = CreateURLFromUTF8("new file");
int64 src_file_length = 87;
@@ -551,7 +551,7 @@ class ObfuscatedFileUtilTest : public testing::Test {
context.reset(NewContext(NULL));
base::PlatformFileInfo file_info;
- FilePath data_path;
+ base::FilePath data_path;
EXPECT_EQ(base::PLATFORM_FILE_OK, ofu()->GetFileInfo(
context.get(), dest_url, &file_info, &data_path));
EXPECT_NE(data_path, src_file_path);
@@ -571,7 +571,7 @@ class ObfuscatedFileUtilTest : public testing::Test {
base::Time GetModifiedTime(const FileSystemURL& url) {
scoped_ptr<FileSystemOperationContext> context(NewContext(NULL));
- FilePath data_path;
+ base::FilePath data_path;
base::PlatformFileInfo file_info;
context.reset(NewContext(NULL));
EXPECT_EQ(base::PLATFORM_FILE_OK,
@@ -693,7 +693,7 @@ TEST_F(ObfuscatedFileUtilTest, TestCreateAndDeleteFile) {
CheckFileAndCloseHandle(url, file_handle);
context.reset(NewContext(NULL));
- FilePath local_path;
+ base::FilePath local_path;
EXPECT_EQ(base::PLATFORM_FILE_OK, ofu()->GetLocalFilePath(
context.get(), url, &local_path));
EXPECT_TRUE(file_util::PathExists(local_path));
@@ -761,7 +761,7 @@ TEST_F(ObfuscatedFileUtilTest, TestTruncate) {
EXPECT_EQ(1, change_observer()->get_and_reset_create_file_count());
context.reset(NewContext(NULL));
- FilePath local_path;
+ base::FilePath local_path;
EXPECT_EQ(base::PLATFORM_FILE_OK, ofu()->GetLocalFilePath(
context.get(), url, &local_path));
EXPECT_EQ(0, GetSize(local_path));
@@ -837,7 +837,7 @@ TEST_F(ObfuscatedFileUtilTest, TestQuotaOnTruncation) {
}
// Delete backing file to make following truncation fail.
- FilePath local_path;
+ base::FilePath local_path;
ASSERT_EQ(base::PLATFORM_FILE_OK,
ofu()->GetLocalFilePath(
UnlimitedContext().get(),
@@ -954,7 +954,7 @@ TEST_F(ObfuscatedFileUtilTest, TestDirectoryOps) {
EXPECT_TRUE(change_observer()->HasNoChange());
base::PlatformFileInfo file_info;
- FilePath local_path;
+ base::FilePath local_path;
EXPECT_EQ(base::PLATFORM_FILE_OK, ofu()->GetFileInfo(
context.get(), url, &file_info, &local_path));
EXPECT_TRUE(local_path.empty());
@@ -1138,13 +1138,13 @@ TEST_F(ObfuscatedFileUtilTest, TestPathQuotas) {
bool exclusive = true;
bool recursive = true;
url = CreateURLFromUTF8("directory/to/use");
- std::vector<FilePath::StringType> components;
+ std::vector<base::FilePath::StringType> components;
url.path().GetComponents(&components);
path_cost = 0;
- for (std::vector<FilePath::StringType>::iterator iter = components.begin();
+ for (std::vector<base::FilePath::StringType>::iterator iter = components.begin();
iter != components.end(); ++iter) {
path_cost += ObfuscatedFileUtil::ComputeFilePathCost(
- FilePath(*iter));
+ base::FilePath(*iter));
}
context.reset(NewContext(NULL));
context->set_allowed_bytes_growth(1024);
@@ -1250,7 +1250,7 @@ TEST_F(ObfuscatedFileUtilTest, TestCopyOrMoveFileSuccess) {
if (test_case.is_copy_not_move) {
base::PlatformFileInfo file_info;
- FilePath local_path;
+ base::FilePath local_path;
context.reset(NewContext(NULL));
EXPECT_EQ(base::PLATFORM_FILE_OK, ofu()->GetFileInfo(
context.get(), source_url, &file_info, &local_path));
@@ -1259,13 +1259,13 @@ TEST_F(ObfuscatedFileUtilTest, TestCopyOrMoveFileSuccess) {
ofu()->DeleteFile(context.get(), source_url));
} else {
base::PlatformFileInfo file_info;
- FilePath local_path;
+ base::FilePath local_path;
context.reset(NewContext(NULL));
EXPECT_EQ(base::PLATFORM_FILE_ERROR_NOT_FOUND, ofu()->GetFileInfo(
context.get(), source_url, &file_info, &local_path));
}
base::PlatformFileInfo file_info;
- FilePath local_path;
+ base::FilePath local_path;
EXPECT_EQ(base::PLATFORM_FILE_OK, ofu()->GetFileInfo(
context.get(), dest_url, &file_info, &local_path));
EXPECT_EQ(kSourceLength, file_info.size);
@@ -1389,8 +1389,8 @@ TEST_F(ObfuscatedFileUtilTest, TestEnumerator) {
ASSERT_EQ(base::PLATFORM_FILE_OK, ofu()->CreateDirectory(
context.get(), src_url, exclusive, recursive));
- std::set<FilePath::StringType> files;
- std::set<FilePath::StringType> directories;
+ std::set<base::FilePath::StringType> files;
+ std::set<base::FilePath::StringType> directories;
FillTestDirectory(src_url, &files, &directories);
FileSystemURL dest_url = CreateURLFromUTF8("destination dir");
@@ -1505,7 +1505,7 @@ TEST_F(ObfuscatedFileUtilTest, TestRevokeUsageCache) {
for (size_t i = 0; i < test::kRegularTestCaseSize; ++i) {
SCOPED_TRACE(testing::Message() << "Creating kRegularTestCase " << i);
const test::TestCaseRecord& test_case = test::kRegularTestCases[i];
- FilePath file_path(test_case.path);
+ base::FilePath file_path(test_case.path);
expected_quota += ObfuscatedFileUtil::ComputeFilePathCost(file_path);
if (test_case.is_directory) {
bool exclusive = true;
@@ -1550,7 +1550,7 @@ TEST_F(ObfuscatedFileUtilTest, TestInconsistency) {
scoped_ptr<FileSystemOperationContext> context;
base::PlatformFile file;
base::PlatformFileInfo file_info;
- FilePath data_path;
+ base::FilePath data_path;
bool created = false;
// Create a non-empty file.
@@ -1625,7 +1625,7 @@ TEST_F(ObfuscatedFileUtilTest, TestIncompleteDirectoryReading) {
CreateURLFromUTF8("bar"),
CreateURLFromUTF8("baz")
};
- const FileSystemURL empty_path = CreateURL(FilePath());
+ const FileSystemURL empty_path = CreateURL(base::FilePath());
scoped_ptr<FileSystemOperationContext> context;
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kPath); ++i) {
@@ -1644,7 +1644,7 @@ TEST_F(ObfuscatedFileUtilTest, TestIncompleteDirectoryReading) {
EXPECT_EQ(3u, entries.size());
context.reset(NewContext(NULL));
- FilePath local_path;
+ base::FilePath local_path;
EXPECT_EQ(base::PLATFORM_FILE_OK,
ofu()->GetLocalFilePath(context.get(), kPath[0], &local_path));
EXPECT_TRUE(file_util::Delete(local_path, false));
@@ -1780,7 +1780,7 @@ TEST_F(ObfuscatedFileUtilTest, TestDirectoryTimestampForCreation) {
EXPECT_EQ(base::PLATFORM_FILE_OK,
ofu()->EnsureFileExists(context.get(), src_path, &created));
EXPECT_TRUE(created);
- FilePath src_local_path;
+ base::FilePath src_local_path;
context.reset(NewContext(NULL));
EXPECT_EQ(base::PLATFORM_FILE_OK,
ofu()->GetLocalFilePath(context.get(), src_path, &src_local_path));
@@ -1883,7 +1883,7 @@ TEST_F(ObfuscatedFileUtilTest, TestFileEnumeratorTimestamp) {
EXPECT_EQ(base::PLATFORM_FILE_OK,
ofu()->CreateDirectory(context.get(), url2, false, false));
- FilePath file_path;
+ base::FilePath file_path;
context.reset(NewContext(NULL));
EXPECT_EQ(base::PLATFORM_FILE_OK,
ofu()->GetLocalFilePath(context.get(), url1, &file_path));
@@ -1900,11 +1900,11 @@ TEST_F(ObfuscatedFileUtilTest, TestFileEnumeratorTimestamp) {
ofu()->CreateFileEnumerator(context.get(), dir, false));
int count = 0;
- FilePath file_path_each;
+ base::FilePath file_path_each;
while (!(file_path_each = file_enum->Next()).empty()) {
context.reset(NewContext(NULL));
base::PlatformFileInfo file_info;
- FilePath file_path;
+ base::FilePath file_path;
EXPECT_EQ(base::PLATFORM_FILE_OK,
ofu()->GetFileInfo(context.get(),
dir.WithPath(file_path_each),
diff --git a/webkit/fileapi/remote_file_system_proxy.h b/webkit/fileapi/remote_file_system_proxy.h
index e54a266..2d3ba77 100644
--- a/webkit/fileapi/remote_file_system_proxy.h
+++ b/webkit/fileapi/remote_file_system_proxy.h
@@ -13,7 +13,7 @@ namespace fileapi {
typedef base::Callback<
void(base::PlatformFileError result,
- const FilePath& platform_path,
+ const base::FilePath& platform_path,
const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref)>
WritableSnapshotFile;
diff --git a/webkit/fileapi/sandbox_file_stream_writer.cc b/webkit/fileapi/sandbox_file_stream_writer.cc
index 036c4dd..7906f17 100644
--- a/webkit/fileapi/sandbox_file_stream_writer.cc
+++ b/webkit/fileapi/sandbox_file_stream_writer.cc
@@ -121,7 +121,7 @@ void SandboxFileStreamWriter::DidGetFileInfo(
const net::CompletionCallback& callback,
base::PlatformFileError file_error,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path) {
+ const base::FilePath& platform_path) {
if (CancelIfRequested())
return;
if (file_error != base::PLATFORM_FILE_OK) {
diff --git a/webkit/fileapi/sandbox_file_stream_writer.h b/webkit/fileapi/sandbox_file_stream_writer.h
index a1f0e19..c1dfe18 100644
--- a/webkit/fileapi/sandbox_file_stream_writer.h
+++ b/webkit/fileapi/sandbox_file_stream_writer.h
@@ -52,7 +52,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE SandboxFileStreamWriter
void DidGetFileInfo(const net::CompletionCallback& callback,
base::PlatformFileError file_error,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path);
+ const base::FilePath& platform_path);
void DidGetUsageAndQuota(const net::CompletionCallback& callback,
quota::QuotaStatusCode status,
int64 usage, int64 quota);
@@ -74,7 +74,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE SandboxFileStreamWriter
UpdateObserverList observers_;
- FilePath file_path_;
+ base::FilePath file_path_;
int64 file_size_;
int64 total_bytes_written_;
int64 allowed_bytes_to_write_;
diff --git a/webkit/fileapi/sandbox_mount_point_provider.cc b/webkit/fileapi/sandbox_mount_point_provider.cc
index baf7cac..a7121ac 100644
--- a/webkit/fileapi/sandbox_mount_point_provider.cc
+++ b/webkit/fileapi/sandbox_mount_point_provider.cc
@@ -63,12 +63,12 @@ const char kPersistentOriginsCountLabel[] = "FileSystem.PersistentOriginsCount";
// Restricted names.
// http://dev.w3.org/2009/dap/file-system/file-dir-sys.html#naming-restrictions
-const FilePath::CharType* const kRestrictedNames[] = {
+const base::FilePath::CharType* const kRestrictedNames[] = {
FILE_PATH_LITERAL("."), FILE_PATH_LITERAL(".."),
};
// Restricted chars.
-const FilePath::CharType kRestrictedChars[] = {
+const base::FilePath::CharType kRestrictedChars[] = {
FILE_PATH_LITERAL('/'), FILE_PATH_LITERAL('\\'),
};
@@ -109,7 +109,7 @@ void ValidateRootOnFileThread(
base::PlatformFileError* error_ptr) {
DCHECK(error_ptr);
- FilePath root_path =
+ base::FilePath root_path =
file_util->GetDirectoryForOriginAndType(
origin_url, type, create, error_ptr);
if (*error_ptr != base::PLATFORM_FILE_OK) {
@@ -126,7 +126,7 @@ void ValidateRootOnFileThread(
} // anonymous namespace
-const FilePath::CharType SandboxMountPointProvider::kFileSystemDirectory[] =
+const base::FilePath::CharType SandboxMountPointProvider::kFileSystemDirectory[] =
FILE_PATH_LITERAL("File System");
// static
@@ -139,7 +139,7 @@ bool SandboxMountPointProvider::CanHandleType(FileSystemType type) {
SandboxMountPointProvider::SandboxMountPointProvider(
quota::QuotaManagerProxy* quota_manager_proxy,
base::SequencedTaskRunner* file_task_runner,
- const FilePath& profile_path,
+ const base::FilePath& profile_path,
const FileSystemOptions& file_system_options)
: file_task_runner_(file_task_runner),
profile_path_(profile_path),
@@ -211,16 +211,16 @@ void SandboxMountPointProvider::ValidateFileSystemRoot(
callback, base::Owned(error_ptr)));
};
-FilePath
+base::FilePath
SandboxMountPointProvider::GetFileSystemRootPathOnFileThread(
const FileSystemURL& url,
bool create) {
if (file_system_options_.is_incognito())
// TODO(kinuko): return an isolated temporary directory.
- return FilePath();
+ return base::FilePath();
if (!IsAllowedScheme(url.origin()))
- return FilePath();
+ return base::FilePath();
return GetBaseDirectoryForOriginAndType(url.origin(), url.type(), create);
}
@@ -233,7 +233,7 @@ bool SandboxMountPointProvider::IsAccessAllowed(const FileSystemURL& url) {
return IsAllowedScheme(url.origin());
}
-bool SandboxMountPointProvider::IsRestrictedFileName(const FilePath& filename)
+bool SandboxMountPointProvider::IsRestrictedFileName(const base::FilePath& filename)
const {
if (filename.value().empty())
return false;
@@ -246,7 +246,7 @@ bool SandboxMountPointProvider::IsRestrictedFileName(const FilePath& filename)
for (size_t i = 0; i < arraysize(kRestrictedChars); ++i) {
if (filename.value().find(kRestrictedChars[i]) !=
- FilePath::StringType::npos)
+ base::FilePath::StringType::npos)
return true;
}
@@ -341,14 +341,14 @@ SandboxMountPointProvider::CreateOriginEnumerator() {
return new ObfuscatedOriginEnumerator(sandbox_sync_file_util());
}
-FilePath SandboxMountPointProvider::GetBaseDirectoryForOriginAndType(
+base::FilePath SandboxMountPointProvider::GetBaseDirectoryForOriginAndType(
const GURL& origin_url, fileapi::FileSystemType type, bool create) {
base::PlatformFileError error = base::PLATFORM_FILE_OK;
- FilePath path = sandbox_sync_file_util()->GetDirectoryForOriginAndType(
+ base::FilePath path = sandbox_sync_file_util()->GetDirectoryForOriginAndType(
origin_url, type, create, &error);
if (error != base::PLATFORM_FILE_OK)
- return FilePath();
+ return base::FilePath();
return path;
}
@@ -418,10 +418,10 @@ int64 SandboxMountPointProvider::GetOriginUsageOnFileThread(
const GURL& origin_url,
fileapi::FileSystemType type) {
DCHECK(CanHandleType(type));
- FilePath base_path =
+ base::FilePath base_path =
GetBaseDirectoryForOriginAndType(origin_url, type, false);
if (base_path.empty() || !file_util::DirectoryExists(base_path)) return 0;
- FilePath usage_file_path =
+ base::FilePath usage_file_path =
base_path.Append(FileSystemUsageCache::kUsageFileName);
bool is_valid = FileSystemUsageCache::IsValid(usage_file_path);
@@ -439,11 +439,11 @@ int64 SandboxMountPointProvider::GetOriginUsageOnFileThread(
FileSystemOperationContext context(file_system_context);
FileSystemURL url = file_system_context->CreateCrackedFileSystemURL(
- origin_url, type, FilePath());
+ origin_url, type, base::FilePath());
scoped_ptr<FileSystemFileUtil::AbstractFileEnumerator> enumerator(
sandbox_sync_file_util()->CreateFileEnumerator(&context, url, true));
- FilePath file_path_each;
+ base::FilePath file_path_each;
int64 usage = 0;
while (!(file_path_each = enumerator->Next()).empty()) {
@@ -459,7 +459,7 @@ void SandboxMountPointProvider::InvalidateUsageCache(
const GURL& origin_url, fileapi::FileSystemType type) {
DCHECK(CanHandleType(type));
base::PlatformFileError error = base::PLATFORM_FILE_OK;
- FilePath usage_file_path = GetUsageCachePathForOriginAndType(
+ base::FilePath usage_file_path = GetUsageCachePathForOriginAndType(
sandbox_sync_file_util(), origin_url, type, &error);
if (error != base::PLATFORM_FILE_OK)
return;
@@ -540,29 +540,29 @@ SandboxMountPointProvider::CreateFileSystemOperationForSync(
operation_context.Pass());
}
-FilePath SandboxMountPointProvider::GetUsageCachePathForOriginAndType(
+base::FilePath SandboxMountPointProvider::GetUsageCachePathForOriginAndType(
const GURL& origin_url,
FileSystemType type) {
base::PlatformFileError error;
- FilePath path = GetUsageCachePathForOriginAndType(
+ base::FilePath path = GetUsageCachePathForOriginAndType(
sandbox_sync_file_util(), origin_url, type, &error);
if (error != base::PLATFORM_FILE_OK)
- return FilePath();
+ return base::FilePath();
return path;
}
// static
-FilePath SandboxMountPointProvider::GetUsageCachePathForOriginAndType(
+base::FilePath SandboxMountPointProvider::GetUsageCachePathForOriginAndType(
ObfuscatedFileUtil* sandbox_file_util,
const GURL& origin_url,
fileapi::FileSystemType type,
base::PlatformFileError* error_out) {
DCHECK(error_out);
*error_out = base::PLATFORM_FILE_OK;
- FilePath base_path = sandbox_file_util->GetDirectoryForOriginAndType(
+ base::FilePath base_path = sandbox_file_util->GetDirectoryForOriginAndType(
origin_url, type, false /* create */, error_out);
if (*error_out != base::PLATFORM_FILE_OK)
- return FilePath();
+ return base::FilePath();
return base_path.Append(FileSystemUsageCache::kUsageFileName);
}
diff --git a/webkit/fileapi/sandbox_mount_point_provider.h b/webkit/fileapi/sandbox_mount_point_provider.h
index 2a8a3ff..6176875 100644
--- a/webkit/fileapi/sandbox_mount_point_provider.h
+++ b/webkit/fileapi/sandbox_mount_point_provider.h
@@ -59,7 +59,7 @@ class WEBKIT_STORAGE_EXPORT SandboxMountPointProvider
};
// The FileSystem directory name.
- static const FilePath::CharType kFileSystemDirectory[];
+ static const base::FilePath::CharType kFileSystemDirectory[];
static bool CanHandleType(FileSystemType type);
@@ -68,7 +68,7 @@ class WEBKIT_STORAGE_EXPORT SandboxMountPointProvider
SandboxMountPointProvider(
quota::QuotaManagerProxy* quota_manager_proxy,
base::SequencedTaskRunner* file_task_runner,
- const FilePath& profile_path,
+ const base::FilePath& profile_path,
const FileSystemOptions& file_system_options);
virtual ~SandboxMountPointProvider();
@@ -78,11 +78,11 @@ class WEBKIT_STORAGE_EXPORT SandboxMountPointProvider
FileSystemType type,
bool create,
const ValidateFileSystemCallback& callback) OVERRIDE;
- virtual FilePath GetFileSystemRootPathOnFileThread(
+ virtual base::FilePath GetFileSystemRootPathOnFileThread(
const FileSystemURL& url,
bool create) OVERRIDE;
virtual bool IsAccessAllowed(const FileSystemURL& url) OVERRIDE;
- virtual bool IsRestrictedFileName(const FilePath& filename) const OVERRIDE;
+ virtual bool IsRestrictedFileName(const base::FilePath& filename) const OVERRIDE;
virtual FileSystemFileUtil* GetFileUtil(FileSystemType type) OVERRIDE;
virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) OVERRIDE;
virtual FilePermissionPolicy GetPermissionPolicy(
@@ -118,7 +118,7 @@ class WEBKIT_STORAGE_EXPORT SandboxMountPointProvider
// the 'unique' part.)
// Returns an empty path if the given type is invalid.
// This method can only be called on the file thread.
- FilePath GetBaseDirectoryForOriginAndType(
+ base::FilePath GetBaseDirectoryForOriginAndType(
const GURL& origin_url,
FileSystemType type,
bool create);
@@ -174,12 +174,12 @@ class WEBKIT_STORAGE_EXPORT SandboxMountPointProvider
friend class SyncableFileSystemOperation;
// Returns a path to the usage cache file.
- FilePath GetUsageCachePathForOriginAndType(
+ base::FilePath GetUsageCachePathForOriginAndType(
const GURL& origin_url,
FileSystemType type);
// Returns a path to the usage cache file (static version).
- static FilePath GetUsageCachePathForOriginAndType(
+ static base::FilePath GetUsageCachePathForOriginAndType(
ObfuscatedFileUtil* sandbox_file_util,
const GURL& origin_url,
FileSystemType type,
@@ -202,7 +202,7 @@ class WEBKIT_STORAGE_EXPORT SandboxMountPointProvider
scoped_refptr<base::SequencedTaskRunner> file_task_runner_;
- const FilePath profile_path_;
+ const base::FilePath profile_path_;
FileSystemOptions file_system_options_;
diff --git a/webkit/fileapi/sandbox_mount_point_provider_unittest.cc b/webkit/fileapi/sandbox_mount_point_provider_unittest.cc
index 875ab76..9d51114 100644
--- a/webkit/fileapi/sandbox_mount_point_provider_unittest.cc
+++ b/webkit/fileapi/sandbox_mount_point_provider_unittest.cc
@@ -39,7 +39,7 @@ class SandboxMountPointProviderOriginEnumeratorTest : public testing::Test {
protected:
void CreateOriginTypeDirectory(const GURL& origin,
fileapi::FileSystemType type) {
- FilePath target = sandbox_provider_->
+ base::FilePath target = sandbox_provider_->
GetBaseDirectoryForOriginAndType(origin, type, true);
ASSERT_TRUE(!target.empty());
ASSERT_TRUE(file_util::DirectoryExists(target));
diff --git a/webkit/fileapi/sandbox_quota_observer.cc b/webkit/fileapi/sandbox_quota_observer.cc
index ec24d37..c12ddb2 100644
--- a/webkit/fileapi/sandbox_quota_observer.cc
+++ b/webkit/fileapi/sandbox_quota_observer.cc
@@ -29,7 +29,7 @@ SandboxQuotaObserver::~SandboxQuotaObserver() {}
void SandboxQuotaObserver::OnStartUpdate(const FileSystemURL& url) {
DCHECK(SandboxMountPointProvider::CanHandleType(url.type()));
DCHECK(update_notify_runner_->RunsTasksOnCurrentThread());
- FilePath usage_file_path = GetUsageCachePath(url);
+ base::FilePath usage_file_path = GetUsageCachePath(url);
if (usage_file_path.empty())
return;
FileSystemUsageCache::IncrementDirty(usage_file_path);
@@ -48,7 +48,7 @@ void SandboxQuotaObserver::OnUpdate(const FileSystemURL& url,
delta);
}
- FilePath usage_file_path = GetUsageCachePath(url);
+ base::FilePath usage_file_path = GetUsageCachePath(url);
if (usage_file_path.empty())
return;
@@ -65,7 +65,7 @@ void SandboxQuotaObserver::OnEndUpdate(const FileSystemURL& url) {
DCHECK(SandboxMountPointProvider::CanHandleType(url.type()));
DCHECK(update_notify_runner_->RunsTasksOnCurrentThread());
- FilePath usage_file_path = GetUsageCachePath(url);
+ base::FilePath usage_file_path = GetUsageCachePath(url);
if (usage_file_path.empty())
return;
@@ -89,15 +89,15 @@ void SandboxQuotaObserver::OnAccess(const FileSystemURL& url) {
}
}
-FilePath SandboxQuotaObserver::GetUsageCachePath(const FileSystemURL& url) {
+base::FilePath SandboxQuotaObserver::GetUsageCachePath(const FileSystemURL& url) {
DCHECK(sandbox_file_util_);
base::PlatformFileError error = base::PLATFORM_FILE_OK;
- FilePath path = SandboxMountPointProvider::GetUsageCachePathForOriginAndType(
+ base::FilePath path = SandboxMountPointProvider::GetUsageCachePathForOriginAndType(
sandbox_file_util_, url.origin(), url.type(), &error);
if (error != base::PLATFORM_FILE_OK) {
LOG(WARNING) << "Could not get usage cache path for: "
<< url.DebugString();
- return FilePath();
+ return base::FilePath();
}
return path;
}
@@ -114,7 +114,7 @@ void SandboxQuotaObserver::ApplyPendingUsageUpdate() {
}
void SandboxQuotaObserver::UpdateUsageCacheFile(
- const FilePath& usage_file_path,
+ const base::FilePath& usage_file_path,
int64 delta) {
DCHECK(!usage_file_path.empty());
if (!usage_file_path.empty() && delta != 0)
diff --git a/webkit/fileapi/sandbox_quota_observer.h b/webkit/fileapi/sandbox_quota_observer.h
index 4711ec0..ea971a4 100644
--- a/webkit/fileapi/sandbox_quota_observer.h
+++ b/webkit/fileapi/sandbox_quota_observer.h
@@ -33,7 +33,7 @@ class SandboxQuotaObserver
: public FileUpdateObserver,
public FileAccessObserver {
public:
- typedef std::map<FilePath, int64> PendingUpdateNotificationMap;
+ typedef std::map<base::FilePath, int64> PendingUpdateNotificationMap;
SandboxQuotaObserver(
quota::QuotaManagerProxy* quota_manager_proxy,
@@ -51,9 +51,9 @@ class SandboxQuotaObserver
private:
void ApplyPendingUsageUpdate();
- void UpdateUsageCacheFile(const FilePath& usage_file_path, int64 delta);
+ void UpdateUsageCacheFile(const base::FilePath& usage_file_path, int64 delta);
- FilePath GetUsageCachePath(const FileSystemURL& url);
+ base::FilePath GetUsageCachePath(const FileSystemURL& url);
scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_;
scoped_refptr<base::SequencedTaskRunner> update_notify_runner_;
diff --git a/webkit/fileapi/syncable/canned_syncable_file_system.cc b/webkit/fileapi/syncable/canned_syncable_file_system.cc
index e2746e5..d6c7c4d 100644
--- a/webkit/fileapi/syncable/canned_syncable_file_system.cc
+++ b/webkit/fileapi/syncable/canned_syncable_file_system.cc
@@ -89,7 +89,7 @@ void OnGetMetadataAndVerifyData(
const CannedSyncableFileSystem::StatusCallback& callback,
base::PlatformFileError result,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path) {
+ const base::FilePath& platform_path) {
if (result != base::PLATFORM_FILE_OK) {
callback.Run(result);
return;
@@ -104,11 +104,11 @@ void OnGetMetadataAndVerifyData(
void OnGetMetadata(
base::PlatformFileInfo* file_info_out,
- FilePath* platform_path_out,
+ base::FilePath* platform_path_out,
const CannedSyncableFileSystem::StatusCallback& callback,
base::PlatformFileError result,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path) {
+ const base::FilePath& platform_path) {
DCHECK(file_info_out);
DCHECK(platform_path_out);
*file_info_out = file_info;
@@ -375,7 +375,7 @@ PlatformFileError CannedSyncableFileSystem::VerifyFile(
PlatformFileError CannedSyncableFileSystem::GetMetadata(
const FileSystemURL& url,
base::PlatformFileInfo* info,
- FilePath* platform_path) {
+ base::FilePath* platform_path) {
return RunOnThread<PlatformFileError>(
io_task_runner_,
FROM_HERE,
@@ -540,7 +540,7 @@ void CannedSyncableFileSystem::DoVerifyFile(
void CannedSyncableFileSystem::DoGetMetadata(
const FileSystemURL& url,
base::PlatformFileInfo* info,
- FilePath* platform_path,
+ base::FilePath* platform_path,
const StatusCallback& callback) {
EXPECT_TRUE(is_filesystem_opened_);
NewOperation()->GetMetadata(
diff --git a/webkit/fileapi/syncable/canned_syncable_file_system.h b/webkit/fileapi/syncable/canned_syncable_file_system.h
index f297068..d520387 100644
--- a/webkit/fileapi/syncable/canned_syncable_file_system.h
+++ b/webkit/fileapi/syncable/canned_syncable_file_system.h
@@ -110,7 +110,7 @@ class CannedSyncableFileSystem
const std::string& expected_data);
base::PlatformFileError GetMetadata(const FileSystemURL& url,
base::PlatformFileInfo* info,
- FilePath* platform_path);
+ base::FilePath* platform_path);
// Returns the # of bytes written (>=0) or an error code (<0).
int64 Write(net::URLRequestContext* url_request_context,
@@ -172,7 +172,7 @@ class CannedSyncableFileSystem
const StatusCallback& callback);
void DoGetMetadata(const FileSystemURL& url,
base::PlatformFileInfo* info,
- FilePath* platform_path,
+ base::FilePath* platform_path,
const StatusCallback& callback);
void DoWrite(net::URLRequestContext* url_request_context,
const FileSystemURL& url,
diff --git a/webkit/fileapi/syncable/local_file_change_tracker.cc b/webkit/fileapi/syncable/local_file_change_tracker.cc
index b5ee20d..4257350 100644
--- a/webkit/fileapi/syncable/local_file_change_tracker.cc
+++ b/webkit/fileapi/syncable/local_file_change_tracker.cc
@@ -21,7 +21,7 @@
namespace fileapi {
namespace {
-const FilePath::CharType kDatabaseName[] =
+const base::FilePath::CharType kDatabaseName[] =
FILE_PATH_LITERAL("LocalFileChangeTracker");
const char kMark[] = "d";
} // namespace
@@ -30,7 +30,7 @@ const char kMark[] = "d";
// object must be destructed on file_task_runner.
class LocalFileChangeTracker::TrackerDB {
public:
- explicit TrackerDB(const FilePath& base_path);
+ explicit TrackerDB(const base::FilePath& base_path);
SyncStatusCode MarkDirty(const std::string& url);
SyncStatusCode ClearDirty(const std::string& url);
@@ -47,7 +47,7 @@ class LocalFileChangeTracker::TrackerDB {
void HandleError(const tracked_objects::Location& from_here,
const leveldb::Status& status);
- const FilePath base_path_;
+ const base::FilePath base_path_;
scoped_ptr<leveldb::DB> db_;
SyncStatusCode db_status_;
@@ -60,7 +60,7 @@ LocalFileChangeTracker::ChangeInfo::~ChangeInfo() {}
// LocalFileChangeTracker ------------------------------------------------------
LocalFileChangeTracker::LocalFileChangeTracker(
- const FilePath& base_path,
+ const base::FilePath& base_path,
base::SequencedTaskRunner* file_task_runner)
: initialized_(false),
file_task_runner_(file_task_runner),
@@ -217,7 +217,7 @@ SyncStatusCode LocalFileChangeTracker::CollectLastDirtyChanges(
new FileSystemOperationContext(file_system_context));
base::PlatformFileInfo file_info;
- FilePath platform_path;
+ base::FilePath platform_path;
while (!dirty_files.empty()) {
const FileSystemURL url = dirty_files.front();
@@ -241,7 +241,7 @@ SyncStatusCode LocalFileChangeTracker::CollectLastDirtyChanges(
file_util->CreateFileEnumerator(context.get(),
url,
false /* recursive */));
- FilePath path_each;
+ base::FilePath path_each;
while (!(path_each = enumerator->Next()).empty()) {
dirty_files.push(CreateSyncableFileSystemURL(
url.origin(), url.filesystem_id(), path_each));
@@ -288,7 +288,7 @@ void LocalFileChangeTracker::RecordChange(
// TrackerDB -------------------------------------------------------------------
-LocalFileChangeTracker::TrackerDB::TrackerDB(const FilePath& base_path)
+LocalFileChangeTracker::TrackerDB::TrackerDB(const base::FilePath& base_path)
: base_path_(base_path),
db_status_(SYNC_STATUS_OK) {}
diff --git a/webkit/fileapi/syncable/local_file_change_tracker.h b/webkit/fileapi/syncable/local_file_change_tracker.h
index 9636027..b92ddaa 100644
--- a/webkit/fileapi/syncable/local_file_change_tracker.h
+++ b/webkit/fileapi/syncable/local_file_change_tracker.h
@@ -39,7 +39,7 @@ class WEBKIT_STORAGE_EXPORT LocalFileChangeTracker
// |file_task_runner| must be the one where the observee file operations run.
// (So that we can make sure DB operations are done before actual update
// happens)
- LocalFileChangeTracker(const FilePath& base_path,
+ LocalFileChangeTracker(const base::FilePath& base_path,
base::SequencedTaskRunner* file_task_runner);
virtual ~LocalFileChangeTracker();
diff --git a/webkit/fileapi/syncable/local_file_sync_context.cc b/webkit/fileapi/syncable/local_file_sync_context.cc
index 367e848..b237aaa 100644
--- a/webkit/fileapi/syncable/local_file_sync_context.cc
+++ b/webkit/fileapi/syncable/local_file_sync_context.cc
@@ -174,7 +174,7 @@ void LocalFileSyncContext::RegisterURLForWaitingSync(
void LocalFileSyncContext::ApplyRemoteChange(
FileSystemContext* file_system_context,
const FileChange& change,
- const FilePath& local_path,
+ const base::FilePath& local_path,
const FileSystemURL& url,
const SyncStatusCallback& callback) {
if (!io_task_runner_->RunsTasksOnCurrentThread()) {
@@ -564,7 +564,7 @@ void LocalFileSyncContext::DidGetWritingStatusForSync(
FileChangeList changes;
file_system_context->change_tracker()->GetChangesForURL(url, &changes);
- FilePath platform_path;
+ base::FilePath platform_path;
base::PlatformFileInfo file_info;
FileSystemFileUtil* file_util = file_system_context->GetFileUtil(url.type());
DCHECK(file_util);
@@ -624,7 +624,7 @@ void LocalFileSyncContext::DidGetFileMetadata(
const SyncFileMetadataCallback& callback,
base::PlatformFileError file_error,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path) {
+ const base::FilePath& platform_path) {
DCHECK(io_task_runner_->RunsTasksOnCurrentThread());
SyncFileMetadata metadata;
if (file_error == base::PLATFORM_FILE_OK) {
diff --git a/webkit/fileapi/syncable/local_file_sync_context.h b/webkit/fileapi/syncable/local_file_sync_context.h
index 6ffc901..a2107f2a 100644
--- a/webkit/fileapi/syncable/local_file_sync_context.h
+++ b/webkit/fileapi/syncable/local_file_sync_context.h
@@ -115,7 +115,7 @@ class WEBKIT_STORAGE_EXPORT LocalFileSyncContext
void ApplyRemoteChange(
FileSystemContext* file_system_context,
const FileChange& change,
- const FilePath& local_path,
+ const base::FilePath& local_path,
const FileSystemURL& url,
const SyncStatusCallback& callback);
@@ -236,7 +236,7 @@ class WEBKIT_STORAGE_EXPORT LocalFileSyncContext
const SyncFileMetadataCallback& callback,
base::PlatformFileError file_error,
const base::PlatformFileInfo& file_info,
- const FilePath& platform_path);
+ const base::FilePath& platform_path);
base::TimeDelta NotifyChangesDuration();
diff --git a/webkit/fileapi/syncable/local_file_sync_context_unittest.cc b/webkit/fileapi/syncable/local_file_sync_context_unittest.cc
index 0f2ad44..4cb59c7 100644
--- a/webkit/fileapi/syncable/local_file_sync_context_unittest.cc
+++ b/webkit/fileapi/syncable/local_file_sync_context_unittest.cc
@@ -119,7 +119,7 @@ class LocalFileSyncContextTest : public testing::Test {
SyncStatusCode ApplyRemoteChange(FileSystemContext* file_system_context,
const FileChange& change,
- const FilePath& local_path,
+ const base::FilePath& local_path,
const FileSystemURL& url,
SyncFileType expected_file_type) {
SCOPED_TRACE(testing::Message() << "ApplyChange for " <<
@@ -431,7 +431,7 @@ TEST_F(LocalFileSyncContextTest, ApplyRemoteChangeForDeletion) {
SYNC_FILE_TYPE_FILE);
EXPECT_EQ(SYNC_STATUS_OK,
ApplyRemoteChange(file_system.file_system_context(),
- change, FilePath(), kFile,
+ change, base::FilePath(), kFile,
SYNC_FILE_TYPE_FILE));
// The implementation doesn't check file type for deletion, and it must be ok
@@ -439,7 +439,7 @@ TEST_F(LocalFileSyncContextTest, ApplyRemoteChangeForDeletion) {
change = FileChange(FileChange::FILE_CHANGE_DELETE, SYNC_FILE_TYPE_UNKNOWN);
EXPECT_EQ(SYNC_STATUS_OK,
ApplyRemoteChange(file_system.file_system_context(),
- change, FilePath(), kDir,
+ change, base::FilePath(), kDir,
SYNC_FILE_TYPE_DIRECTORY));
// Check the directory/files are deleted successfully.
@@ -506,8 +506,8 @@ TEST_F(LocalFileSyncContextTest, ApplyRemoteChangeForAddOrUpdate) {
file_system.ClearChangeForURLInTracker(*urls.begin());
// Prepare temporary files which represent the remote file data.
- const FilePath kFilePath1(temp_dir.path().Append(FPL("file1")));
- const FilePath kFilePath2(temp_dir.path().Append(FPL("file2")));
+ const base::FilePath kFilePath1(temp_dir.path().Append(FPL("file1")));
+ const base::FilePath kFilePath2(temp_dir.path().Append(FPL("file2")));
ASSERT_EQ(static_cast<int>(arraysize(kTestFileData1) - 1),
file_util::WriteFile(kFilePath1, kTestFileData1,
@@ -565,7 +565,7 @@ TEST_F(LocalFileSyncContextTest, ApplyRemoteChangeForAddOrUpdate) {
SYNC_FILE_TYPE_DIRECTORY);
EXPECT_EQ(SYNC_STATUS_OK,
ApplyRemoteChange(file_system.file_system_context(),
- change, FilePath(), kDir,
+ change, base::FilePath(), kDir,
SYNC_FILE_TYPE_UNKNOWN));
// This should not happen, but calling ApplyRemoteChange
diff --git a/webkit/fileapi/syncable/sync_file_metadata.h b/webkit/fileapi/syncable/sync_file_metadata.h
index 266241f..097c377 100644
--- a/webkit/fileapi/syncable/sync_file_metadata.h
+++ b/webkit/fileapi/syncable/sync_file_metadata.h
@@ -43,7 +43,7 @@ struct WEBKIT_STORAGE_EXPORT LocalFileSyncInfo {
~LocalFileSyncInfo();
FileSystemURL url;
- FilePath local_file_path;
+ base::FilePath local_file_path;
SyncFileMetadata metadata;
FileChangeList changes;
};
diff --git a/webkit/fileapi/syncable/syncable_file_system_operation.cc b/webkit/fileapi/syncable/syncable_file_system_operation.cc
index 0387535..e2145b5 100644
--- a/webkit/fileapi/syncable/syncable_file_system_operation.cc
+++ b/webkit/fileapi/syncable/syncable_file_system_operation.cc
@@ -183,7 +183,7 @@ void SyncableFileSystemOperation::GetMetadata(
DCHECK(CalledOnValidThread());
if (!operation_runner_) {
callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND,
- base::PlatformFileInfo(), FilePath());
+ base::PlatformFileInfo(), base::FilePath());
delete file_system_operation_;
delete this;
return;
@@ -330,7 +330,7 @@ void SyncableFileSystemOperation::CreateSnapshotFile(
DCHECK(CalledOnValidThread());
if (!operation_runner_) {
callback.Run(base::PLATFORM_FILE_ERROR_NOT_FOUND,
- base::PlatformFileInfo(), FilePath(), NULL);
+ base::PlatformFileInfo(), base::FilePath(), NULL);
delete file_system_operation_;
delete this;
return;
diff --git a/webkit/fileapi/syncable/syncable_file_system_util.cc b/webkit/fileapi/syncable/syncable_file_system_util.cc
index e8d87d9..efb9122 100644
--- a/webkit/fileapi/syncable/syncable_file_system_util.cc
+++ b/webkit/fileapi/syncable/syncable_file_system_util.cc
@@ -14,7 +14,7 @@ namespace fileapi {
bool RegisterSyncableFileSystem(const std::string& service_name) {
return ExternalMountPoints::GetSystemInstance()->RegisterFileSystem(
- service_name, kFileSystemTypeSyncable, FilePath());
+ service_name, kFileSystemTypeSyncable, base::FilePath());
}
bool RevokeSyncableFileSystem(const std::string& service_name) {
@@ -33,11 +33,11 @@ GURL GetSyncableFileSystemRootURI(const GURL& origin,
FileSystemURL CreateSyncableFileSystemURL(const GURL& origin,
const std::string& service_name,
- const FilePath& path) {
+ const base::FilePath& path) {
return ExternalMountPoints::GetSystemInstance()->CreateCrackedFileSystemURL(
origin,
kFileSystemTypeExternal,
- FilePath::FromUTF8Unsafe(service_name).Append(path));
+ base::FilePath::FromUTF8Unsafe(service_name).Append(path));
}
bool SerializeSyncableFileSystemURL(const FileSystemURL& url,
diff --git a/webkit/fileapi/syncable/syncable_file_system_util.h b/webkit/fileapi/syncable/syncable_file_system_util.h
index 439a086..542856c 100644
--- a/webkit/fileapi/syncable/syncable_file_system_util.h
+++ b/webkit/fileapi/syncable/syncable_file_system_util.h
@@ -38,7 +38,8 @@ WEBKIT_STORAGE_EXPORT GURL GetSyncableFileSystemRootURI(
// path: '/foo/bar',
// returns 'filesystem:http://www.example.com/external/service_name/foo/bar'
WEBKIT_STORAGE_EXPORT FileSystemURL CreateSyncableFileSystemURL(
- const GURL& origin, const std::string& service_name, const FilePath& path);
+ const GURL& origin, const std::string& service_name,
+ const base::FilePath& path);
// Serializes a given FileSystemURL |url| and sets the serialized string to
// |serialized_url|. If the URL does not represent a syncable filesystem,
diff --git a/webkit/fileapi/syncable/syncable_file_system_util_unittest.cc b/webkit/fileapi/syncable/syncable_file_system_util_unittest.cc
index 91b0baa..6e8dcc0 100644
--- a/webkit/fileapi/syncable/syncable_file_system_util_unittest.cc
+++ b/webkit/fileapi/syncable/syncable_file_system_util_unittest.cc
@@ -25,14 +25,14 @@ const char kNonSyncableFileSystemRootURI[] =
const char kOrigin[] = "http://www.example.com/";
const char kServiceName[] = "service";
-const FilePath::CharType kPath[] = FILE_PATH_LITERAL("dir/file");
+const base::FilePath::CharType kPath[] = FILE_PATH_LITERAL("dir/file");
FileSystemURL CreateFileSystemURL(const std::string& url) {
return ExternalMountPoints::GetSystemInstance()->CrackURL(GURL(url));
}
-FilePath CreateNormalizedFilePath(const FilePath::CharType* path) {
- return FilePath(path).NormalizePathSeparators();
+base::FilePath CreateNormalizedFilePath(const base::FilePath::CharType* path) {
+ return base::FilePath(path).NormalizePathSeparators();
}
} // namespace
@@ -45,9 +45,9 @@ TEST(SyncableFileSystemUtilTest, GetSyncableFileSystemRootURI) {
TEST(SyncableFileSystemUtilTest, CreateSyncableFileSystemURL) {
ScopedExternalFileSystem scoped_fs(
- kServiceName, kFileSystemTypeSyncable, FilePath());
+ kServiceName, kFileSystemTypeSyncable, base::FilePath());
- const FilePath path(kPath);
+ const base::FilePath path(kPath);
const FileSystemURL expected_url =
CreateFileSystemURL(kSyncableFileSystemRootURI + path.AsUTF8Unsafe());
const FileSystemURL url =
@@ -60,13 +60,13 @@ TEST(SyncableFileSystemUtilTest, CreateSyncableFileSystemURL) {
TEST(SyncableFileSystemUtilTest,
SerializeAndDesirializeSyncableFileSystemURL) {
ScopedExternalFileSystem scoped_fs(
- kServiceName, kFileSystemTypeSyncable, FilePath());
+ kServiceName, kFileSystemTypeSyncable, base::FilePath());
const std::string expected_url_str = kSyncableFileSystemRootURI +
CreateNormalizedFilePath(kPath).AsUTF8Unsafe();
const FileSystemURL expected_url = CreateFileSystemURL(expected_url_str);
const FileSystemURL url =
- CreateSyncableFileSystemURL(GURL(kOrigin), kServiceName, FilePath(kPath));
+ CreateSyncableFileSystemURL(GURL(kOrigin), kServiceName, base::FilePath(kPath));
std::string serialized;
EXPECT_TRUE(SerializeSyncableFileSystemURL(url, &serialized));
@@ -81,9 +81,9 @@ TEST(SyncableFileSystemUtilTest,
TEST(SyncableFileSystemUtilTest,
FailInSerializingAndDeserializingSyncableFileSystemURL) {
ScopedExternalFileSystem scoped_fs(
- kServiceName, kFileSystemTypeSyncable, FilePath());
+ kServiceName, kFileSystemTypeSyncable, base::FilePath());
- const FilePath normalized_path = CreateNormalizedFilePath(kPath);
+ const base::FilePath normalized_path = CreateNormalizedFilePath(kPath);
const std::string non_registered_url =
kNonRegisteredFileSystemRootURI + normalized_path.AsUTF8Unsafe();
const std::string non_syncable_url =
diff --git a/webkit/fileapi/test_file_set.cc b/webkit/fileapi/test_file_set.cc
index 6d30f74..96213f1 100644
--- a/webkit/fileapi/test_file_set.cc
+++ b/webkit/fileapi/test_file_set.cc
@@ -39,9 +39,9 @@ const TestCaseRecord kRegularTestCases[] = {
const size_t kRegularTestCaseSize = arraysize(kRegularTestCases);
-void SetUpOneTestCase(const FilePath& root_path,
+void SetUpOneTestCase(const base::FilePath& root_path,
const TestCaseRecord& test_case) {
- FilePath path = root_path.Append(test_case.path);
+ base::FilePath path = root_path.Append(test_case.path);
if (test_case.is_directory) {
ASSERT_TRUE(file_util::CreateDirectory(path));
return;
@@ -64,7 +64,7 @@ void SetUpOneTestCase(const FilePath& root_path,
}
-void SetUpRegularTestCases(const FilePath& root_path) {
+void SetUpRegularTestCases(const base::FilePath& root_path) {
for (size_t i = 0; i < arraysize(kRegularTestCases); ++i) {
SCOPED_TRACE(testing::Message() << "Creating kRegularTestCases " << i);
SetUpOneTestCase(root_path, kRegularTestCases[i]);
diff --git a/webkit/fileapi/test_file_set.h b/webkit/fileapi/test_file_set.h
index 75673c9..6823c6d 100644
--- a/webkit/fileapi/test_file_set.h
+++ b/webkit/fileapi/test_file_set.h
@@ -19,7 +19,7 @@ namespace test {
struct TestCaseRecord {
bool is_directory;
- const FilePath::CharType path[64];
+ const base::FilePath::CharType path[64];
int64 data_file_size;
};
@@ -29,10 +29,10 @@ extern const size_t kRegularTestCaseSize;
size_t GetRegularTestCaseSize();
// Creates one file or directory specified by |record|.
-void SetUpOneTestCase(const FilePath& root_path, const TestCaseRecord& record);
+void SetUpOneTestCase(const base::FilePath& root_path, const TestCaseRecord& record);
// Creates the files and directories specified in kRegularTestCases.
-void SetUpRegularTestCases(const FilePath& root_path);
+void SetUpRegularTestCases(const base::FilePath& root_path);
} // namespace test
diff --git a/webkit/fileapi/test_mount_point_provider.cc b/webkit/fileapi/test_mount_point_provider.cc
index d062763..25b1630 100644
--- a/webkit/fileapi/test_mount_point_provider.cc
+++ b/webkit/fileapi/test_mount_point_provider.cc
@@ -66,7 +66,7 @@ class TestMountPointProvider::QuotaUtil
TestMountPointProvider::TestMountPointProvider(
base::SequencedTaskRunner* task_runner,
- const FilePath& base_path)
+ const base::FilePath& base_path)
: base_path_(base_path),
task_runner_(task_runner),
local_file_util_(new AsyncFileUtilAdapter(new LocalFileUtil())),
@@ -89,7 +89,7 @@ void TestMountPointProvider::ValidateFileSystemRoot(
NOTREACHED();
}
-FilePath TestMountPointProvider::GetFileSystemRootPathOnFileThread(
+base::FilePath TestMountPointProvider::GetFileSystemRootPathOnFileThread(
const FileSystemURL& url,
bool create) {
DCHECK_EQ(kFileSystemTypeTest, url.type());
@@ -98,7 +98,7 @@ FilePath TestMountPointProvider::GetFileSystemRootPathOnFileThread(
success = file_util::CreateDirectory(base_path_);
else
success = file_util::DirectoryExists(base_path_);
- return success ? base_path_ : FilePath();
+ return success ? base_path_ : base::FilePath();
}
bool TestMountPointProvider::IsAccessAllowed(const FileSystemURL& url) {
@@ -106,7 +106,7 @@ bool TestMountPointProvider::IsAccessAllowed(const FileSystemURL& url) {
}
bool TestMountPointProvider::IsRestrictedFileName(
- const FilePath& filename) const {
+ const base::FilePath& filename) const {
return false;
}
diff --git a/webkit/fileapi/test_mount_point_provider.h b/webkit/fileapi/test_mount_point_provider.h
index 4bee102..29a4614 100644
--- a/webkit/fileapi/test_mount_point_provider.h
+++ b/webkit/fileapi/test_mount_point_provider.h
@@ -30,7 +30,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE TestMountPointProvider
public:
TestMountPointProvider(
base::SequencedTaskRunner* task_runner,
- const FilePath& base_path);
+ const base::FilePath& base_path);
virtual ~TestMountPointProvider();
// FileSystemMountPointProvider implementation.
@@ -39,11 +39,11 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE TestMountPointProvider
FileSystemType type,
bool create,
const ValidateFileSystemCallback& callback) OVERRIDE;
- virtual FilePath GetFileSystemRootPathOnFileThread(
+ virtual base::FilePath GetFileSystemRootPathOnFileThread(
const FileSystemURL& url,
bool create) OVERRIDE;
virtual bool IsAccessAllowed(const FileSystemURL& url) OVERRIDE;
- virtual bool IsRestrictedFileName(const FilePath& filename) const OVERRIDE;
+ virtual bool IsRestrictedFileName(const base::FilePath& filename) const OVERRIDE;
virtual FileSystemFileUtil* GetFileUtil(FileSystemType type) OVERRIDE;
virtual AsyncFileUtil* GetAsyncFileUtil(FileSystemType type) OVERRIDE;
virtual FilePermissionPolicy GetPermissionPolicy(
@@ -74,7 +74,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE TestMountPointProvider
private:
class QuotaUtil;
- FilePath base_path_;
+ base::FilePath base_path_;
scoped_refptr<base::SequencedTaskRunner> task_runner_;
scoped_ptr<AsyncFileUtilAdapter> local_file_util_;
scoped_ptr<QuotaUtil> quota_util_;
diff --git a/webkit/fileapi/upload_file_system_file_element_reader_unittest.cc b/webkit/fileapi/upload_file_system_file_element_reader_unittest.cc
index 4d9c7bef..d9ea383 100644
--- a/webkit/fileapi/upload_file_system_file_element_reader_unittest.cc
+++ b/webkit/fileapi/upload_file_system_file_element_reader_unittest.cc
@@ -85,7 +85,7 @@ class UploadFileSystemFileElementReaderTest : public testing::Test {
file_system_context_->CreateCrackedFileSystemURL(
GURL(kFileSystemURLOrigin),
kFileSystemType,
- FilePath().AppendASCII(filename));
+ base::FilePath().AppendASCII(filename));
fileapi::FileSystemFileUtil* file_util =
file_system_context_->GetFileUtil(kFileSystemType);
@@ -108,7 +108,7 @@ class UploadFileSystemFileElementReaderTest : public testing::Test {
base::ClosePlatformFile(handle);
base::PlatformFileInfo file_info;
- FilePath platform_path;
+ base::FilePath platform_path;
ASSERT_EQ(base::PLATFORM_FILE_OK,
file_util->GetFileInfo(&context, url, &file_info,
&platform_path));
diff --git a/webkit/glue/dom_operations_unittest.cc b/webkit/glue/dom_operations_unittest.cc
index 05aeb76..141a819 100644
--- a/webkit/glue/dom_operations_unittest.cc
+++ b/webkit/glue/dom_operations_unittest.cc
@@ -20,7 +20,7 @@ class DomOperationsTests : public TestShellTest {
// Test function GetAllSavableResourceLinksForCurrentPage with a web page.
// We expect result of GetAllSavableResourceLinksForCurrentPage exactly
// matches expected_resources_set.
- void GetSavableResourceLinksForPage(const FilePath& page_file_path,
+ void GetSavableResourceLinksForPage(const base::FilePath& page_file_path,
const std::set<GURL>& expected_resources_set);
protected:
@@ -36,7 +36,7 @@ class DomOperationsTests : public TestShellTest {
void DomOperationsTests::GetSavableResourceLinksForPage(
- const FilePath& page_file_path,
+ const base::FilePath& page_file_path,
const std::set<GURL>& expected_resources_set) {
// Convert local file path to file URL.
GURL file_url = net::FilePathToFileURL(page_file_path);
@@ -82,7 +82,7 @@ void DomOperationsTests::GetSavableResourceLinksForPage(
TEST_F(DomOperationsTests, GetSavableResourceLinksWithPageHasValidLinks) {
std::set<GURL> expected_resources_set;
// Set directory of test data.
- FilePath page_file_path = data_dir_.AppendASCII("dom_serializer");
+ base::FilePath page_file_path = data_dir_.AppendASCII("dom_serializer");
const char* expected_sub_resource_links[] = {
"file:///c:/yt/css/base_all-vfl36460.css",
@@ -98,7 +98,7 @@ TEST_F(DomOperationsTests, GetSavableResourceLinksWithPageHasValidLinks) {
expected_resources_set.insert(GURL(expected_sub_resource_links[i]));
// Add all expected links of frame to expected set.
for (size_t i = 0; i < arraysize(expected_frame_links); ++i) {
- const FilePath expected_frame_url =
+ const base::FilePath expected_frame_url =
page_file_path.AppendASCII(expected_frame_links[i]);
expected_resources_set.insert(
net::FilePathToFileURL(expected_frame_url));
@@ -113,14 +113,14 @@ TEST_F(DomOperationsTests, GetSavableResourceLinksWithPageHasValidLinks) {
TEST_F(DomOperationsTests, GetSavableResourceLinksWithPageHasInvalidLinks) {
std::set<GURL> expected_resources_set;
// Set directory of test data.
- FilePath page_file_path = data_dir_.AppendASCII("dom_serializer");
+ base::FilePath page_file_path = data_dir_.AppendASCII("dom_serializer");
const char* expected_frame_links[] = {
"youtube_2.htm"
};
// Add all expected links of frame to expected set.
for (size_t i = 0; i < arraysize(expected_frame_links); ++i) {
- FilePath expected_frame_url =
+ base::FilePath expected_frame_url =
page_file_path.AppendASCII(expected_frame_links[i]);
expected_resources_set.insert(
net::FilePathToFileURL(expected_frame_url));
diff --git a/webkit/glue/dom_serializer_unittest.cc b/webkit/glue/dom_serializer_unittest.cc
index 7097def..de4f8a4 100644
--- a/webkit/glue/dom_serializer_unittest.cc
+++ b/webkit/glue/dom_serializer_unittest.cc
@@ -205,7 +205,7 @@ class DomSerializerTests : public TestShellTest,
WebVector<WebString> local_paths_;
// The local_directory_name_ is dummy relative path of directory which
// contain all saved auxiliary files included all sub frames and resources.
- const FilePath local_directory_name_;
+ const base::FilePath local_directory_name_;
protected:
// testing::Test
@@ -283,7 +283,7 @@ bool IsMetaElement(const WebNode& node, std::string& charset_info) {
// If original contents have document type, the serialized contents also have
// document type.
TEST_F(DomSerializerTests, SerializeHTMLDOMWithDocType) {
- FilePath page_file_path = data_dir_;
+ base::FilePath page_file_path = data_dir_;
page_file_path = page_file_path.AppendASCII("dom_serializer");
page_file_path = page_file_path.AppendASCII("youtube_1.htm");
GURL file_url = net::FilePathToFileURL(page_file_path);
@@ -312,7 +312,7 @@ TEST_F(DomSerializerTests, SerializeHTMLDOMWithDocType) {
// If original contents do not have document type, the serialized contents
// also do not have document type.
TEST_F(DomSerializerTests, SerializeHTMLDOMWithoutDocType) {
- FilePath page_file_path = data_dir_;
+ base::FilePath page_file_path = data_dir_;
page_file_path = page_file_path.AppendASCII("dom_serializer");
page_file_path = page_file_path.AppendASCII("youtube_2.htm");
GURL file_url = net::FilePathToFileURL(page_file_path);
@@ -342,7 +342,7 @@ TEST_F(DomSerializerTests, SerializeHTMLDOMWithoutDocType) {
// finishing serialization, the serialized contents should be same
// with original XML document.
TEST_F(DomSerializerTests, SerializeXMLDocWithBuiltInEntities) {
- FilePath page_file_path = data_dir_;
+ base::FilePath page_file_path = data_dir_;
page_file_path = page_file_path.AppendASCII("dom_serializer");
page_file_path = page_file_path.AppendASCII("note.xml");
// Read original contents for later comparison.
@@ -364,7 +364,7 @@ TEST_F(DomSerializerTests, SerializeXMLDocWithBuiltInEntities) {
// When serializing DOM, we add MOTW declaration before html tag.
TEST_F(DomSerializerTests, SerializeHTMLDOMWithAddingMOTW) {
- FilePath page_file_path = data_dir_;
+ base::FilePath page_file_path = data_dir_;
page_file_path = page_file_path.AppendASCII("dom_serializer");
page_file_path = page_file_path.AppendASCII("youtube_2.htm");
// Read original contents for later comparison .
@@ -398,7 +398,7 @@ TEST_F(DomSerializerTests, SerializeHTMLDOMWithAddingMOTW) {
// http://bugs.webkit.org/show_bug.cgi?id=16621 even the original document
// does not have META charset declaration.
TEST_F(DomSerializerTests, SerializeHTMLDOMWithNoMetaCharsetInOriginalDoc) {
- FilePath page_file_path = data_dir_;
+ base::FilePath page_file_path = data_dir_;
page_file_path = page_file_path.AppendASCII("dom_serializer");
page_file_path = page_file_path.AppendASCII("youtube_1.htm");
// Get file URL.
@@ -462,7 +462,7 @@ TEST_F(DomSerializerTests, SerializeHTMLDOMWithNoMetaCharsetInOriginalDoc) {
// declarations.
TEST_F(DomSerializerTests,
SerializeHTMLDOMWithMultipleMetaCharsetInOriginalDoc) {
- FilePath page_file_path = data_dir_;
+ base::FilePath page_file_path = data_dir_;
page_file_path = page_file_path.AppendASCII("dom_serializer");
page_file_path = page_file_path.AppendASCII("youtube_2.htm");
// Get file URL.
@@ -527,7 +527,7 @@ TEST_F(DomSerializerTests,
// Test situation of html entities in text when serializing HTML DOM.
TEST_F(DomSerializerTests, SerializeHTMLDOMWithEntitiesInText) {
- FilePath page_file_path = data_dir_;
+ base::FilePath page_file_path = data_dir_;
page_file_path = page_file_path.AppendASCII(
"dom_serializer/htmlentities_in_text.htm");
// Get file URL. The URL is dummy URL to identify the following loading
@@ -587,7 +587,7 @@ TEST_F(DomSerializerTests, SerializeHTMLDOMWithEntitiesInText) {
// HTML DOM.
// This test started to fail at WebKit r65388. See http://crbug.com/52279.
TEST_F(DomSerializerTests, SerializeHTMLDOMWithEntitiesInAttributeValue) {
- FilePath page_file_path = data_dir_;
+ base::FilePath page_file_path = data_dir_;
page_file_path = page_file_path.AppendASCII(
"dom_serializer/htmlentities_in_attribute_value.htm");
// Get file URL. The URL is dummy URL to identify the following loading
@@ -638,7 +638,7 @@ TEST_F(DomSerializerTests, SerializeHTMLDOMWithEntitiesInAttributeValue) {
// This test started to fail at WebKit r65351. See http://crbug.com/52279.
TEST_F(DomSerializerTests, SerializeHTMLDOMWithNonStandardEntities) {
// Make a test file URL and load it.
- FilePath page_file_path = data_dir_;
+ base::FilePath page_file_path = data_dir_;
page_file_path = page_file_path.AppendASCII("dom_serializer");
page_file_path = page_file_path.AppendASCII("nonstandard_htmlentities.htm");
GURL file_url = net::FilePathToFileURL(page_file_path);
@@ -678,7 +678,7 @@ TEST_F(DomSerializerTests, SerializeHTMLDOMWithBaseTag) {
// There are total 2 available base tags in this test file.
const int kTotalBaseTagCountInTestFile = 2;
- FilePath page_file_path = data_dir_.AppendASCII("dom_serializer");
+ base::FilePath page_file_path = data_dir_.AppendASCII("dom_serializer");
file_util::EnsureEndsWithSeparator(&page_file_path);
// Get page dir URL which is base URL of this file.
@@ -782,7 +782,7 @@ TEST_F(DomSerializerTests, SerializeHTMLDOMWithBaseTag) {
// Serializing page which has an empty HEAD tag.
TEST_F(DomSerializerTests, SerializeHTMLDOMWithEmptyHead) {
- FilePath page_file_path = data_dir_;
+ base::FilePath page_file_path = data_dir_;
page_file_path = page_file_path.AppendASCII("dom_serializer");
page_file_path = page_file_path.AppendASCII("empty_head.htm");
GURL file_url = net::FilePathToFileURL(page_file_path);
@@ -842,7 +842,7 @@ TEST_F(DomSerializerTests, SerializeHTMLDOMWithEmptyHead) {
// Test that we don't crash when the page contains an iframe that
// was handled as a download (http://crbug.com/42212).
TEST_F(DomSerializerTests, SerializeDocumentWithDownloadedIFrame) {
- FilePath page_file_path = data_dir_;
+ base::FilePath page_file_path = data_dir_;
page_file_path = page_file_path.AppendASCII("dom_serializer");
page_file_path = page_file_path.AppendASCII("iframe-src-is-exe.htm");
GURL file_url = net::FilePathToFileURL(page_file_path);
@@ -854,7 +854,7 @@ TEST_F(DomSerializerTests, SerializeDocumentWithDownloadedIFrame) {
}
TEST_F(DomSerializerTests, SubResourceForElementsInNonHTMLNamespace) {
- FilePath page_file_path = data_dir_;
+ base::FilePath page_file_path = data_dir_;
page_file_path = page_file_path.AppendASCII("dom_serializer");
page_file_path = page_file_path.AppendASCII("non_html_namespace.htm");
GURL file_url = net::FilePathToFileURL(page_file_path);
diff --git a/webkit/glue/glue_serialize.cc b/webkit/glue/glue_serialize.cc
index 3fad842..e9d3ae4 100644
--- a/webkit/glue/glue_serialize.cc
+++ b/webkit/glue/glue_serialize.cc
@@ -509,9 +509,9 @@ WebHistoryItem HistoryItemFromString(const std::string& serialized_item) {
return HistoryItemFromString(serialized_item, ALWAYS_INCLUDE_FORM_DATA, true);
}
-std::vector<FilePath> FilePathsFromHistoryState(
+std::vector<base::FilePath> FilePathsFromHistoryState(
const std::string& content_state) {
- std::vector<FilePath> to_return;
+ std::vector<base::FilePath> to_return;
// TODO(darin): We should avoid using the WebKit API here, so that we do not
// need to have WebKit initialized before calling this method.
const WebHistoryItem& item =
diff --git a/webkit/glue/glue_serialize.h b/webkit/glue/glue_serialize.h
index ac869a9..38df965 100644
--- a/webkit/glue/glue_serialize.h
+++ b/webkit/glue/glue_serialize.h
@@ -28,7 +28,7 @@ WEBKIT_GLUE_EXPORT WebKit::WebHistoryItem HistoryItemFromString(
// Reads file paths from the HTTP body and the file input elements of a
// serialized WebHistoryItem.
-WEBKIT_GLUE_EXPORT std::vector<FilePath> FilePathsFromHistoryState(
+WEBKIT_GLUE_EXPORT std::vector<base::FilePath> FilePathsFromHistoryState(
const std::string& content_state);
// For testing purposes only.
diff --git a/webkit/glue/glue_serialize_unittest.cc b/webkit/glue/glue_serialize_unittest.cc
index 91916ef..250dceac 100644
--- a/webkit/glue/glue_serialize_unittest.cc
+++ b/webkit/glue/glue_serialize_unittest.cc
@@ -265,8 +265,8 @@ TEST_F(GlueSerializeTest, FilePathsFromHistoryState) {
WebHistoryItem item = MakeHistoryItem(false, true);
// Append file paths to item.
- FilePath file_path1(FILE_PATH_LITERAL("file.txt"));
- FilePath file_path2(FILE_PATH_LITERAL("another_file"));
+ base::FilePath file_path1(FILE_PATH_LITERAL("file.txt"));
+ base::FilePath file_path2(FILE_PATH_LITERAL("another_file"));
WebHTTPBody http_body;
http_body.initialize();
http_body.appendFile(webkit_base::FilePathToWebString(file_path1));
@@ -274,7 +274,7 @@ TEST_F(GlueSerializeTest, FilePathsFromHistoryState) {
item.setHTTPBody(http_body);
std::string serialized_item = webkit_glue::HistoryItemToString(item);
- const std::vector<FilePath>& file_paths =
+ const std::vector<base::FilePath>& file_paths =
webkit_glue::FilePathsFromHistoryState(serialized_item);
ASSERT_EQ(2U, file_paths.size());
EXPECT_EQ(file_path1, file_paths[0]);
diff --git a/webkit/glue/resource_loader_bridge.h b/webkit/glue/resource_loader_bridge.h
index 52859b3..d20040f 100644
--- a/webkit/glue/resource_loader_bridge.h
+++ b/webkit/glue/resource_loader_bridge.h
@@ -181,7 +181,7 @@ struct ResourceResponseInfo {
// The path to a file that will contain the response body. It may only
// contain a portion of the response body at the time that the ResponseInfo
// becomes available.
- FilePath download_file_path;
+ base::FilePath download_file_path;
// True if the response was delivered using SPDY.
bool was_fetched_via_spdy;
diff --git a/webkit/glue/resource_request_body.cc b/webkit/glue/resource_request_body.cc
index eb820fc..763c7d0 100644
--- a/webkit/glue/resource_request_body.cc
+++ b/webkit/glue/resource_request_body.cc
@@ -73,7 +73,7 @@ void ResourceRequestBody::AppendBytes(const char* bytes, int bytes_len) {
}
void ResourceRequestBody::AppendFileRange(
- const FilePath& file_path,
+ const base::FilePath& file_path,
uint64 offset, uint64 length,
const base::Time& expected_modification_time) {
elements_.push_back(Element());
diff --git a/webkit/glue/resource_request_body.h b/webkit/glue/resource_request_body.h
index 8331bdf..71a0495 100644
--- a/webkit/glue/resource_request_body.h
+++ b/webkit/glue/resource_request_body.h
@@ -14,6 +14,7 @@
#include "webkit/glue/webkit_glue_export.h"
namespace base {
+class FilePath;
class TaskRunner;
}
@@ -42,7 +43,7 @@ class WEBKIT_GLUE_EXPORT ResourceRequestBody
ResourceRequestBody();
void AppendBytes(const char* bytes, int bytes_len);
- void AppendFileRange(const FilePath& file_path,
+ void AppendFileRange(const base::FilePath& file_path,
uint64 offset, uint64 length,
const base::Time& expected_modification_time);
void AppendBlob(const GURL& blob_url);
diff --git a/webkit/glue/resource_request_body_unittest.cc b/webkit/glue/resource_request_body_unittest.cc
index 62c5d70..c596739 100644
--- a/webkit/glue/resource_request_body_unittest.cc
+++ b/webkit/glue/resource_request_body_unittest.cc
@@ -59,14 +59,14 @@ TEST(ResourceRequestBodyTest, CreateUploadDataStreamWithoutBlob) {
scoped_refptr<ResourceRequestBody> request_body = new ResourceRequestBody;
const char kData[] = "123";
- const FilePath::StringType kFilePath = FILE_PATH_LITERAL("abc");
+ const base::FilePath::StringType kFilePath = FILE_PATH_LITERAL("abc");
const uint64 kFileOffset = 10U;
const uint64 kFileLength = 100U;
const base::Time kFileTime = base::Time::FromDoubleT(999);
const int64 kIdentifier = 12345;
request_body->AppendBytes(kData, arraysize(kData) - 1);
- request_body->AppendFileRange(FilePath(kFilePath),
+ request_body->AppendFileRange(base::FilePath(kFilePath),
kFileOffset, kFileLength, kFileTime);
request_body->set_identifier(kIdentifier);
@@ -106,7 +106,7 @@ TEST(ResourceRequestBodyTest, ResolveBlobAndCreateUploadDataStream) {
blob_data->AppendData("BlobData");
blob_data->AppendFile(
- FilePath(FILE_PATH_LITERAL("BlobFile.txt")), 0, 20, time1);
+ base::FilePath(FILE_PATH_LITERAL("BlobFile.txt")), 0, 20, time1);
GURL blob_url1("blob://url_1");
blob_storage_controller.AddFinishedBlob(blob_url1, blob_data);
@@ -132,7 +132,7 @@ TEST(ResourceRequestBodyTest, ResolveBlobAndCreateUploadDataStream) {
ResourceRequestBody::Element upload_element1, upload_element2;
upload_element1.SetToBytes("Hello", 5);
upload_element2.SetToFilePathRange(
- FilePath(FILE_PATH_LITERAL("foo1.txt")), 0, 20, time2);
+ base::FilePath(FILE_PATH_LITERAL("foo1.txt")), 0, 20, time2);
// Test no blob reference.
scoped_refptr<ResourceRequestBody> request_body(new ResourceRequestBody());
diff --git a/webkit/glue/simple_webmimeregistry_impl.cc b/webkit/glue/simple_webmimeregistry_impl.cc
index 98473ee..b8e81a8 100644
--- a/webkit/glue/simple_webmimeregistry_impl.cc
+++ b/webkit/glue/simple_webmimeregistry_impl.cc
@@ -139,7 +139,7 @@ WebString SimpleWebMimeRegistryImpl::mimeTypeFromFile(
WebString SimpleWebMimeRegistryImpl::preferredExtensionForMIMEType(
const WebString& mime_type) {
- FilePath::StringType file_extension;
+ base::FilePath::StringType file_extension;
net::GetPreferredExtensionForMimeType(ToASCIIOrEmpty(mime_type),
&file_extension);
return webkit_base::FilePathStringToWebString(file_extension);
diff --git a/webkit/glue/unittest_test_server.h b/webkit/glue/unittest_test_server.h
index 2d5df48..815e62b 100644
--- a/webkit/glue/unittest_test_server.h
+++ b/webkit/glue/unittest_test_server.h
@@ -15,7 +15,7 @@ class UnittestTestServer : public net::TestServer {
UnittestTestServer()
: net::TestServer(net::TestServer::TYPE_HTTP,
net::TestServer::kLocalhost,
- FilePath(FILE_PATH_LITERAL("webkit/data"))) {
+ base::FilePath(FILE_PATH_LITERAL("webkit/data"))) {
}
};
diff --git a/webkit/glue/web_intent_data.cc b/webkit/glue/web_intent_data.cc
index 0ad55b5..9df1422 100644
--- a/webkit/glue/web_intent_data.cc
+++ b/webkit/glue/web_intent_data.cc
@@ -61,7 +61,7 @@ WebIntentData::WebIntentData(const string16& action_in,
WebIntentData::WebIntentData(const string16& action_in,
const string16& type_in,
- const FilePath& blob_file_in,
+ const base::FilePath& blob_file_in,
int64 blob_length_in)
: action(action_in),
type(type_in),
diff --git a/webkit/glue/web_intent_data.h b/webkit/glue/web_intent_data.h
index fe73328..1d18428 100644
--- a/webkit/glue/web_intent_data.h
+++ b/webkit/glue/web_intent_data.h
@@ -50,7 +50,7 @@ struct WEBKIT_GLUE_EXPORT WebIntentData {
// arguments to WebBlob::createFromFile. Note: when mime_data has
// length==1, this blob will be set as the 'blob' member of the first
// object in the delivered data payload.
- FilePath blob_file;
+ base::FilePath blob_file;
// Length of the blob.
int64 blob_length;
diff --git a/webkit/glue/web_intent_reply_data.cc b/webkit/glue/web_intent_reply_data.cc
index 8a19fef..1b30891 100644
--- a/webkit/glue/web_intent_reply_data.cc
+++ b/webkit/glue/web_intent_reply_data.cc
@@ -22,7 +22,7 @@ WebIntentReply::WebIntentReply(
WebIntentReply::WebIntentReply(
WebIntentReplyType response_type,
- FilePath response_data_file,
+ base::FilePath response_data_file,
int64 response_data_file_length)
: type(response_type),
data_file(response_data_file),
diff --git a/webkit/glue/web_intent_reply_data.h b/webkit/glue/web_intent_reply_data.h
index f3bd172..038c022 100644
--- a/webkit/glue/web_intent_reply_data.h
+++ b/webkit/glue/web_intent_reply_data.h
@@ -35,7 +35,7 @@ struct WEBKIT_GLUE_EXPORT WebIntentReply {
WebIntentReply(WebIntentReplyType type, string16 data);
WebIntentReply(
WebIntentReplyType type,
- FilePath data_file,
+ base::FilePath data_file,
int64 data_file_size);
bool operator==(const WebIntentReply& other) const;
@@ -47,7 +47,7 @@ struct WEBKIT_GLUE_EXPORT WebIntentReply {
string16 data;
// FilePath to the data to be delivered. Default value is empty.
- FilePath data_file;
+ base::FilePath data_file;
// Length of data_path.
int64 data_file_size;
diff --git a/webkit/glue/web_intent_reply_data_unittest.cc b/webkit/glue/web_intent_reply_data_unittest.cc
index a8aed51..bf7004c 100644
--- a/webkit/glue/web_intent_reply_data_unittest.cc
+++ b/webkit/glue/web_intent_reply_data_unittest.cc
@@ -17,7 +17,7 @@ TEST(WebIntentReplyDataTest, DefaultValues) {
WebIntentReply reply;
EXPECT_EQ(webkit_glue::WEB_INTENT_REPLY_INVALID, reply.type);
EXPECT_EQ(string16(), reply.data);
- EXPECT_EQ(FilePath(), reply.data_file);
+ EXPECT_EQ(base::FilePath(), reply.data_file);
EXPECT_EQ(-1, reply.data_file_size);
}
@@ -39,17 +39,17 @@ TEST(WebIntentReplyDataTest, Equality) {
WebIntentReply file_a(
webkit_glue::WEB_INTENT_REPLY_SUCCESS,
- FilePath(),
+ base::FilePath(),
22);
WebIntentReply file_b(
webkit_glue::WEB_INTENT_REPLY_SUCCESS,
- FilePath(),
+ base::FilePath(),
22);
WebIntentReply file_c(
webkit_glue::WEB_INTENT_REPLY_SUCCESS,
- FilePath(),
+ base::FilePath(),
17);
EXPECT_EQ(file_a, file_b);
diff --git a/webkit/glue/webfileutilities_impl.cc b/webkit/glue/webfileutilities_impl.cc
index 3241884..fdf63a1 100644
--- a/webkit/glue/webfileutilities_impl.cc
+++ b/webkit/glue/webfileutilities_impl.cc
@@ -27,7 +27,7 @@ WebFileUtilitiesImpl::~WebFileUtilitiesImpl() {
}
bool WebFileUtilitiesImpl::fileExists(const WebString& path) {
- FilePath file_path = webkit_base::WebStringToFilePath(path);
+ base::FilePath file_path = webkit_base::WebStringToFilePath(path);
return file_util::PathExists(file_path);
}
@@ -58,33 +58,33 @@ bool WebFileUtilitiesImpl::getFileInfo(const WebString& path,
}
WebString WebFileUtilitiesImpl::directoryName(const WebString& path) {
- FilePath file_path(webkit_base::WebStringToFilePath(path));
+ base::FilePath file_path(webkit_base::WebStringToFilePath(path));
return webkit_base::FilePathToWebString(file_path.DirName());
}
WebString WebFileUtilitiesImpl::pathByAppendingComponent(
const WebString& webkit_path,
const WebString& webkit_component) {
- FilePath path(webkit_base::WebStringToFilePath(webkit_path));
- FilePath component(webkit_base::WebStringToFilePath(webkit_component));
- FilePath combined_path = path.Append(component);
+ base::FilePath path(webkit_base::WebStringToFilePath(webkit_path));
+ base::FilePath component(webkit_base::WebStringToFilePath(webkit_component));
+ base::FilePath combined_path = path.Append(component);
return webkit_base::FilePathStringToWebString(combined_path.value());
}
bool WebFileUtilitiesImpl::makeAllDirectories(const WebString& path) {
DCHECK(!sandbox_enabled_);
- FilePath file_path = webkit_base::WebStringToFilePath(path);
+ base::FilePath file_path = webkit_base::WebStringToFilePath(path);
return file_util::CreateDirectory(file_path);
}
WebString WebFileUtilitiesImpl::getAbsolutePath(const WebString& path) {
- FilePath file_path(webkit_base::WebStringToFilePath(path));
+ base::FilePath file_path(webkit_base::WebStringToFilePath(path));
file_util::AbsolutePath(&file_path);
return webkit_base::FilePathStringToWebString(file_path.value());
}
bool WebFileUtilitiesImpl::isDirectory(const WebString& path) {
- FilePath file_path(webkit_base::WebStringToFilePath(path));
+ base::FilePath file_path(webkit_base::WebStringToFilePath(path));
return file_util::DirectoryExists(file_path);
}
diff --git a/webkit/media/crypto/ppapi/clear_key_cdm.cc b/webkit/media/crypto/ppapi/clear_key_cdm.cc
index 7c6eda5..2894a52 100644
--- a/webkit/media/crypto/ppapi/clear_key_cdm.cc
+++ b/webkit/media/crypto/ppapi/clear_key_cdm.cc
@@ -50,7 +50,7 @@ static base::AtExitManager g_at_exit_manager;
// are required for running in the sandbox, and should no longer be required
// after http://crbug.com/91970 is fixed.
static bool InitializeFFmpegLibraries() {
- FilePath file_path;
+ base::FilePath file_path;
CHECK(PathService::Get(base::DIR_EXE, &file_path));
CHECK(media::InitializeMediaLibrary(file_path));
return true;
diff --git a/webkit/mocks/mock_resource_loader_bridge.h b/webkit/mocks/mock_resource_loader_bridge.h
index 5be7d89..3af75a7 100644
--- a/webkit/mocks/mock_resource_loader_bridge.h
+++ b/webkit/mocks/mock_resource_loader_bridge.h
@@ -8,7 +8,9 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "webkit/glue/resource_loader_bridge.h"
+namespace base {
class FilePath;
+}
namespace webkit_glue {
@@ -23,7 +25,7 @@ class MockResourceLoaderBridge : public webkit_glue::ResourceLoaderBridge {
MOCK_METHOD2(AppendDataToUpload, void(const char* data, int data_len));
MOCK_METHOD4(AppendFileRangeToUpload,
- void(const FilePath& file_path,
+ void(const base::FilePath& file_path,
uint64 offset,
uint64 length,
const base::Time& expected_modification_time));
diff --git a/webkit/plugins/npapi/plugin_host.cc b/webkit/plugins/npapi/plugin_host.cc
index a54c0ba..5cea951 100644
--- a/webkit/plugins/npapi/plugin_host.cc
+++ b/webkit/plugins/npapi/plugin_host.cc
@@ -467,14 +467,14 @@ static NPError PostURLNotify(NPP id,
return NPERR_FILE_NOT_FOUND;
std::string file_path_ascii(buf);
- FilePath file_path;
+ base::FilePath file_path;
static const char kFileUrlPrefix[] = "file:";
if (StartsWithASCII(file_path_ascii, kFileUrlPrefix, false)) {
GURL file_url(file_path_ascii);
DCHECK(file_url.SchemeIsFile());
net::FileURLToFilePath(file_url, &file_path);
} else {
- file_path = FilePath::FromWStringHack(
+ file_path = base::FilePath::FromWStringHack(
base::SysNativeMBToWide(file_path_ascii));
}
diff --git a/webkit/plugins/npapi/plugin_instance.cc b/webkit/plugins/npapi/plugin_instance.cc
index f26cbec..4d49a05 100644
--- a/webkit/plugins/npapi/plugin_instance.cc
+++ b/webkit/plugins/npapi/plugin_instance.cc
@@ -315,7 +315,7 @@ void PluginInstance::NPP_StreamAsFile(NPStream *stream, const char *fname) {
// Creating a temporary FilePath instance on the stack as the explicit
// FilePath constructor with StringType as an argument causes a compiler
// error when invoked via vector push back.
- FilePath file_name = FilePath::FromWStringHack(UTF8ToWide(fname));
+ base::FilePath file_name = base::FilePath::FromWStringHack(UTF8ToWide(fname));
files_created_.push_back(file_name);
}
diff --git a/webkit/plugins/npapi/plugin_lib.cc b/webkit/plugins/npapi/plugin_lib.cc
index ed01426..7b927e0 100644
--- a/webkit/plugins/npapi/plugin_lib.cc
+++ b/webkit/plugins/npapi/plugin_lib.cc
@@ -23,7 +23,7 @@ const char kPluginInstancesActiveCounter[] = "PluginInstancesActive";
// A list of all the instantiated plugins.
static std::vector<scoped_refptr<PluginLib> >* g_loaded_libs;
-PluginLib* PluginLib::CreatePluginLib(const FilePath& filename) {
+PluginLib* PluginLib::CreatePluginLib(const base::FilePath& filename) {
// We can only have one PluginLib object per plugin as it controls the per
// instance function calls (i.e. NP_Initialize and NP_Shutdown). So we keep
// a map of PluginLib objects.
@@ -271,7 +271,7 @@ bool PluginLib::Load() {
// This is a helper to help perform a delayed NP_Shutdown and FreeLibrary on the
// plugin dll.
-void FreePluginLibraryHelper(const FilePath& path,
+void FreePluginLibraryHelper(const base::FilePath& path,
base::NativeLibrary library,
NP_ShutdownFunc shutdown_func) {
if (shutdown_func) {
diff --git a/webkit/plugins/npapi/plugin_lib.h b/webkit/plugins/npapi/plugin_lib.h
index 9051e2d..36e9a41 100644
--- a/webkit/plugins/npapi/plugin_lib.h
+++ b/webkit/plugins/npapi/plugin_lib.h
@@ -16,7 +16,9 @@
#include "webkit/plugins/npapi/webplugin.h"
#include "webkit/plugins/webkit_plugins_export.h"
+namespace base {
class FilePath;
+}
namespace webkit {
namespace npapi {
@@ -27,12 +29,12 @@ class PluginInstance;
// manager for new PluginInstances.
class WEBKIT_PLUGINS_EXPORT PluginLib : public base::RefCounted<PluginLib> {
public:
- static PluginLib* CreatePluginLib(const FilePath& filename);
+ static PluginLib* CreatePluginLib(const base::FilePath& filename);
// Creates a WebPluginInfo structure given a plugin's path. On success
// returns true, with the information being put into "info".
// Returns false if the library couldn't be found, or if it's not a plugin.
- static bool ReadWebPluginInfo(const FilePath& filename,
+ static bool ReadWebPluginInfo(const base::FilePath& filename,
webkit::WebPluginInfo* info);
#if defined(OS_POSIX) && !defined(OS_MACOSX)
diff --git a/webkit/plugins/npapi/plugin_lib_mac.mm b/webkit/plugins/npapi/plugin_lib_mac.mm
index d283100..32e40df9 100644
--- a/webkit/plugins/npapi/plugin_lib_mac.mm
+++ b/webkit/plugins/npapi/plugin_lib_mac.mm
@@ -76,7 +76,7 @@ NSDictionary* GetMIMETypes(CFBundleRef bundle) {
}
}
-bool ReadPlistPluginInfo(const FilePath& filename, CFBundleRef bundle,
+bool ReadPlistPluginInfo(const base::FilePath& filename, CFBundleRef bundle,
WebPluginInfo* info) {
NSDictionary* mime_types = GetMIMETypes(bundle);
if (!mime_types)
@@ -137,7 +137,7 @@ bool ReadPlistPluginInfo(const FilePath& filename, CFBundleRef bundle,
} // anonymous namespace
-bool PluginLib::ReadWebPluginInfo(const FilePath &filename,
+bool PluginLib::ReadWebPluginInfo(const base::FilePath &filename,
WebPluginInfo* info) {
// There are three ways to get information about plugin capabilities:
// 1) a set of Info.plist keys, documented at
diff --git a/webkit/plugins/npapi/plugin_lib_posix.cc b/webkit/plugins/npapi/plugin_lib_posix.cc
index cc3ed52..144b133 100644
--- a/webkit/plugins/npapi/plugin_lib_posix.cc
+++ b/webkit/plugins/npapi/plugin_lib_posix.cc
@@ -42,7 +42,7 @@ enum nsPluginVariable {
// Read the ELF header and return true if it is usable on
// the current architecture (e.g. 32-bit ELF on 32-bit build).
// Returns false on other errors as well.
-bool ELFMatchesCurrentArchitecture(const FilePath& filename) {
+bool ELFMatchesCurrentArchitecture(const base::FilePath& filename) {
// First make sure we can open the file and it is in fact, a regular file.
struct stat stat_buf;
// Open with O_NONBLOCK so we don't block on pipes.
@@ -91,7 +91,7 @@ struct __attribute__((packed)) NSPluginWrapperInfo {
// if so attempt to unwrap it. Pass in an opened plugin handle; on
// success, |dl| and |unwrapped_path| will be filled in with the newly
// opened plugin. On failure, params are left unmodified.
-void UnwrapNSPluginWrapper(void **dl, FilePath* unwrapped_path) {
+void UnwrapNSPluginWrapper(void **dl, base::FilePath* unwrapped_path) {
NSPluginWrapperInfo* info =
reinterpret_cast<NSPluginWrapperInfo*>(dlsym(*dl, "NPW_Plugin"));
if (!info)
@@ -107,7 +107,8 @@ void UnwrapNSPluginWrapper(void **dl, FilePath* unwrapped_path) {
sizeof(info->path)));
if (!path_end)
path_end = info->path + sizeof(info->path);
- FilePath path = FilePath(std::string(info->path, path_end - info->path));
+ base::FilePath path = base::FilePath(
+ std::string(info->path, path_end - info->path));
if (!ELFMatchesCurrentArchitecture(path)) {
LOG(WARNING) << path.value() << " is nspluginwrapper wrapping a "
@@ -139,7 +140,7 @@ void UnwrapNSPluginWrapper(void **dl, FilePath* unwrapped_path) {
} // namespace
-bool PluginLib::ReadWebPluginInfo(const FilePath& filename,
+bool PluginLib::ReadWebPluginInfo(const base::FilePath& filename,
WebPluginInfo* info) {
// The file to reference is:
// http://mxr.mozilla.org/firefox/source/modules/plugin/base/src/nsPluginsDirUnix.cpp
diff --git a/webkit/plugins/npapi/plugin_lib_win.cc b/webkit/plugins/npapi/plugin_lib_win.cc
index 224e1c3..8a0f6cc 100644
--- a/webkit/plugins/npapi/plugin_lib_win.cc
+++ b/webkit/plugins/npapi/plugin_lib_win.cc
@@ -15,7 +15,7 @@
namespace webkit {
namespace npapi {
-bool PluginLib::ReadWebPluginInfo(const FilePath &filename,
+bool PluginLib::ReadWebPluginInfo(const base::FilePath &filename,
WebPluginInfo* info) {
// On windows, the way we get the mime types for the library is
// to check the version information in the DLL itself. This
diff --git a/webkit/plugins/npapi/plugin_list.cc b/webkit/plugins/npapi/plugin_list.cc
index 5bcc960..7047a7f 100644
--- a/webkit/plugins/npapi/plugin_list.cc
+++ b/webkit/plugins/npapi/plugin_list.cc
@@ -86,7 +86,7 @@ void PluginList::RefreshPlugins() {
loading_state_ = LOADING_STATE_NEEDS_REFRESH;
}
-void PluginList::AddExtraPluginPath(const FilePath& plugin_path) {
+void PluginList::AddExtraPluginPath(const base::FilePath& plugin_path) {
if (!NPAPIPluginsSupported()) {
// TODO(jam): remove and just have CHECK once we're sure this doesn't get
// triggered.
@@ -101,16 +101,16 @@ void PluginList::AddExtraPluginPath(const FilePath& plugin_path) {
#endif
}
-void PluginList::RemoveExtraPluginPath(const FilePath& plugin_path) {
+void PluginList::RemoveExtraPluginPath(const base::FilePath& plugin_path) {
base::AutoLock lock(lock_);
- std::vector<FilePath>::iterator it =
+ std::vector<base::FilePath>::iterator it =
std::find(extra_plugin_paths_.begin(), extra_plugin_paths_.end(),
plugin_path);
if (it != extra_plugin_paths_.end())
extra_plugin_paths_.erase(it);
}
-void PluginList::AddExtraPluginDir(const FilePath& plugin_dir) {
+void PluginList::AddExtraPluginDir(const base::FilePath& plugin_dir) {
// Chrome OS only loads plugins from /opt/google/chrome/plugins.
#if !defined(OS_CHROMEOS)
base::AutoLock lock(lock_);
@@ -148,7 +148,7 @@ void PluginList::RegisterInternalPluginWithEntryPoints(
}
}
-void PluginList::UnregisterInternalPlugin(const FilePath& path) {
+void PluginList::UnregisterInternalPlugin(const base::FilePath& path) {
base::AutoLock lock(lock_);
for (size_t i = 0; i < internal_plugins_.size(); i++) {
if (internal_plugins_[i].info.path == path) {
@@ -170,7 +170,7 @@ void PluginList::GetInternalPlugins(
}
}
-bool PluginList::ReadPluginInfo(const FilePath& filename,
+bool PluginList::ReadPluginInfo(const base::FilePath& filename,
webkit::WebPluginInfo* info,
const PluginEntryPoints** entry_points) {
{
@@ -252,10 +252,10 @@ void PluginList::LoadPluginsIntoPluginListInternal(
if (!will_load_callback.is_null())
will_load_callback.Run();
- std::vector<FilePath> plugin_paths;
+ std::vector<base::FilePath> plugin_paths;
GetPluginPathsToLoad(&plugin_paths);
- for (std::vector<FilePath>::const_iterator it = plugin_paths.begin();
+ for (std::vector<base::FilePath>::const_iterator it = plugin_paths.begin();
it != plugin_paths.end();
++it) {
WebPluginInfo plugin_info;
@@ -286,7 +286,7 @@ void PluginList::LoadPlugins() {
}
bool PluginList::LoadPluginIntoPluginList(
- const FilePath& path,
+ const base::FilePath& path,
std::vector<webkit::WebPluginInfo>* plugins,
WebPluginInfo* plugin_info) {
LOG_IF(ERROR, PluginList::DebugPluginLoading())
@@ -316,11 +316,11 @@ bool PluginList::LoadPluginIntoPluginList(
return true;
}
-void PluginList::GetPluginPathsToLoad(std::vector<FilePath>* plugin_paths) {
+void PluginList::GetPluginPathsToLoad(std::vector<base::FilePath>* plugin_paths) {
// Don't want to hold the lock while loading new plugins, so we don't block
// other methods if they're called on other threads.
- std::vector<FilePath> extra_plugin_paths;
- std::vector<FilePath> extra_plugin_dirs;
+ std::vector<base::FilePath> extra_plugin_paths;
+ std::vector<base::FilePath> extra_plugin_dirs;
{
base::AutoLock lock(lock_);
extra_plugin_paths = extra_plugin_paths_;
@@ -328,7 +328,7 @@ void PluginList::GetPluginPathsToLoad(std::vector<FilePath>* plugin_paths) {
}
for (size_t i = 0; i < extra_plugin_paths.size(); ++i) {
- const FilePath& path = extra_plugin_paths[i];
+ const base::FilePath& path = extra_plugin_paths[i];
if (std::find(plugin_paths->begin(), plugin_paths->end(), path) !=
plugin_paths->end()) {
continue;
@@ -342,7 +342,7 @@ void PluginList::GetPluginPathsToLoad(std::vector<FilePath>* plugin_paths) {
for (size_t i = 0; i < extra_plugin_dirs.size(); ++i)
GetPluginsInDir(extra_plugin_dirs[i], plugin_paths);
- std::vector<FilePath> directories_to_scan;
+ std::vector<base::FilePath> directories_to_scan;
GetPluginDirectories(&directories_to_scan);
for (size_t i = 0; i < directories_to_scan.size(); ++i)
GetPluginsInDir(directories_to_scan[i], plugin_paths);
@@ -401,12 +401,12 @@ void PluginList::GetPluginInfoArray(
if (actual_mime_types)
actual_mime_types->clear();
- std::set<FilePath> visited_plugins;
+ std::set<base::FilePath> visited_plugins;
// Add in plugins by mime type.
for (size_t i = 0; i < plugins_list_.size(); ++i) {
if (SupportsType(plugins_list_[i], mime_type, allow_wildcard)) {
- FilePath path = plugins_list_[i].path;
+ base::FilePath path = plugins_list_[i].path;
if (visited_plugins.insert(path).second) {
info->push_back(plugins_list_[i]);
if (actual_mime_types)
@@ -423,7 +423,7 @@ void PluginList::GetPluginInfoArray(
std::string actual_mime_type;
for (size_t i = 0; i < plugins_list_.size(); ++i) {
if (SupportsExtension(plugins_list_[i], extension, &actual_mime_type)) {
- FilePath path = plugins_list_[i].path;
+ base::FilePath path = plugins_list_[i].path;
if (visited_plugins.insert(path).second &&
AllowMimeTypeMismatch(mime_type, actual_mime_type)) {
info->push_back(plugins_list_[i]);
diff --git a/webkit/plugins/npapi/plugin_list.h b/webkit/plugins/npapi/plugin_list.h
index f34a18a..1cd82ed 100644
--- a/webkit/plugins/npapi/plugin_list.h
+++ b/webkit/plugins/npapi/plugin_list.h
@@ -71,14 +71,14 @@ class WEBKIT_PLUGINS_EXPORT PluginList {
// Add/Remove an extra plugin to load when we actually do the loading. Must
// be called before the plugins have been loaded.
- void AddExtraPluginPath(const FilePath& plugin_path);
- void RemoveExtraPluginPath(const FilePath& plugin_path);
+ void AddExtraPluginPath(const base::FilePath& plugin_path);
+ void RemoveExtraPluginPath(const base::FilePath& plugin_path);
// Same as above, but specifies a directory in which to search for plugins.
- void AddExtraPluginDir(const FilePath& plugin_dir);
+ void AddExtraPluginDir(const base::FilePath& plugin_dir);
// Get the ordered list of directories from which to load plugins
- void GetPluginDirectories(std::vector<FilePath>* plugin_dirs);
+ void GetPluginDirectories(std::vector<base::FilePath>* plugin_dirs);
// Register an internal plugin with the specified plugin information.
// An internal plugin must be registered before it can
@@ -100,7 +100,7 @@ class WEBKIT_PLUGINS_EXPORT PluginList {
// on the path from the version info previously registered.
//
// This is generally only necessary for tests.
- void UnregisterInternalPlugin(const FilePath& path);
+ void UnregisterInternalPlugin(const base::FilePath& path);
// Gets a list of all the registered internal plugins.
void GetInternalPlugins(std::vector<webkit::WebPluginInfo>* plugins);
@@ -110,7 +110,7 @@ class WEBKIT_PLUGINS_EXPORT PluginList {
// internal plugin, "entry_points" is filled in as well with a
// internally-owned PluginEntryPoints pointer.
// Returns false if the library couldn't be found, or if it's not a plugin.
- bool ReadPluginInfo(const FilePath& filename,
+ bool ReadPluginInfo(const base::FilePath& filename,
webkit::WebPluginInfo* info,
const PluginEntryPoints** entry_points);
@@ -153,7 +153,7 @@ class WEBKIT_PLUGINS_EXPORT PluginList {
// Load a specific plugin with full path. Return true iff loading the plug-in
// was successful.
- bool LoadPluginIntoPluginList(const FilePath& filename,
+ bool LoadPluginIntoPluginList(const base::FilePath& filename,
std::vector<webkit::WebPluginInfo>* plugins,
webkit::WebPluginInfo* plugin_info);
@@ -161,7 +161,7 @@ class WEBKIT_PLUGINS_EXPORT PluginList {
// using a different instance of this class.
// Computes a list of all plugins to potentially load from all sources.
- void GetPluginPathsToLoad(std::vector<FilePath>* plugin_paths);
+ void GetPluginPathsToLoad(std::vector<base::FilePath>* plugin_paths);
// Clears the internal list of Plugins and copies them from the vector.
void SetPlugins(const std::vector<webkit::WebPluginInfo>& plugins);
@@ -200,7 +200,8 @@ class WEBKIT_PLUGINS_EXPORT PluginList {
// Walks a directory and produces a list of all the plugins to potentially
// load in that directory.
- void GetPluginsInDir(const FilePath& path, std::vector<FilePath>* plugins);
+ void GetPluginsInDir(const base::FilePath& path,
+ std::vector<base::FilePath>* plugins);
// Returns true if we should load the given plugin, or false otherwise.
// |plugins| is the list of plugins we have crawled in the current plugin
@@ -234,7 +235,7 @@ class WEBKIT_PLUGINS_EXPORT PluginList {
// Gets plugin paths registered under HKCU\Software\MozillaPlugins and
// HKLM\Software\MozillaPlugins.
- void GetPluginPathsFromRegistry(std::vector<FilePath>* plugins);
+ void GetPluginPathsFromRegistry(std::vector<base::FilePath>* plugins);
#endif
//
@@ -247,10 +248,10 @@ class WEBKIT_PLUGINS_EXPORT PluginList {
LoadingState loading_state_;
// Extra plugin paths that we want to search when loading.
- std::vector<FilePath> extra_plugin_paths_;
+ std::vector<base::FilePath> extra_plugin_paths_;
// Extra plugin directories that we want to search when loading.
- std::vector<FilePath> extra_plugin_dirs_;
+ std::vector<base::FilePath> extra_plugin_dirs_;
// Holds information about internal plugins.
std::vector<InternalPlugin> internal_plugins_;
diff --git a/webkit/plugins/npapi/plugin_list_mac.mm b/webkit/plugins/npapi/plugin_list_mac.mm
index 719301d..b818f89 100644
--- a/webkit/plugins/npapi/plugin_list_mac.mm
+++ b/webkit/plugins/npapi/plugin_list_mac.mm
@@ -19,7 +19,7 @@ namespace npapi {
namespace {
-void GetPluginCommonDirectory(std::vector<FilePath>* plugin_dirs,
+void GetPluginCommonDirectory(std::vector<base::FilePath>* plugin_dirs,
bool user) {
// Note that there are no NSSearchPathDirectory constants for these
// directories so we can't use Cocoa's NSSearchPathForDirectoriesInDomains().
@@ -32,7 +32,7 @@ void GetPluginCommonDirectory(std::vector<FilePath>* plugin_dirs,
if (err)
return;
- plugin_dirs->push_back(FilePath(base::mac::PathFromFSRef(ref)));
+ plugin_dirs->push_back(base::FilePath(base::mac::PathFromFSRef(ref)));
}
// Returns true if the plugin should be prevented from loading.
@@ -68,7 +68,7 @@ bool IsBlacklistedPlugin(const WebPluginInfo& info) {
void PluginList::PlatformInit() {
}
-void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) {
+void PluginList::GetPluginDirectories(std::vector<base::FilePath>* plugin_dirs) {
// Load from the user's area
GetPluginCommonDirectory(plugin_dirs, true);
@@ -77,11 +77,11 @@ void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) {
}
void PluginList::GetPluginsInDir(
- const FilePath& path, std::vector<FilePath>* plugins) {
+ const base::FilePath& path, std::vector<base::FilePath>* plugins) {
file_util::FileEnumerator enumerator(path,
false, // not recursive
file_util::FileEnumerator::DIRECTORIES);
- for (FilePath path = enumerator.Next(); !path.value().empty();
+ for (base::FilePath path = enumerator.Next(); !path.value().empty();
path = enumerator.Next()) {
plugins->push_back(path);
}
diff --git a/webkit/plugins/npapi/plugin_list_posix.cc b/webkit/plugins/npapi/plugin_list_posix.cc
index 94974a5..62c4990 100644
--- a/webkit/plugins/npapi/plugin_list_posix.cc
+++ b/webkit/plugins/npapi/plugin_list_posix.cc
@@ -21,7 +21,7 @@ namespace npapi {
namespace {
// We build up a list of files and mtimes so we can sort them.
-typedef std::pair<FilePath, base::Time> FileAndTime;
+typedef std::pair<base::FilePath, base::Time> FileAndTime;
typedef std::vector<FileAndTime> FileTimeList;
enum PluginQuirk {
@@ -63,7 +63,7 @@ bool CheckQuirks(PluginQuirk quirks) {
// Also check against any PluginQuirks the bad plugin may have.
// The use of the file size is an optimization so we don't have to read in
// the entire file unless we have to.
-bool IsBlacklistedBySha1sumAndQuirks(const FilePath& path) {
+bool IsBlacklistedBySha1sumAndQuirks(const base::FilePath& path) {
const struct BadEntry {
int64 size;
std::string sha1;
@@ -123,7 +123,7 @@ bool IsUndesirablePlugin(const WebPluginInfo& info) {
// This is an ugly hack to blacklist Adobe Acrobat due to not supporting
// its Xt-based mainloop.
// http://code.google.com/p/chromium/issues/detail?id=38229
-bool IsBlacklistedPlugin(const FilePath& path) {
+bool IsBlacklistedPlugin(const base::FilePath& path) {
const char* kBlackListedPlugins[] = {
"nppdf.so", // Adobe PDF
};
@@ -141,7 +141,7 @@ bool IsBlacklistedPlugin(const FilePath& path) {
void PluginList::PlatformInit() {
}
-void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) {
+void PluginList::GetPluginDirectories(std::vector<base::FilePath>* plugin_dirs) {
// See http://groups.google.com/group/chromium-dev/browse_thread/thread/7a70e5fcbac786a9
// for discussion.
// We first consult Chrome-specific dirs, then fall back on the logic
@@ -152,7 +152,7 @@ void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) {
// related to extra_plugin_dirs in plugin_list.cc.
// The Chrome binary dir + "plugins/".
- FilePath dir;
+ base::FilePath dir;
PathService::Get(base::DIR_EXE, &dir);
plugin_dirs->push_back(dir.Append("plugins"));
@@ -169,36 +169,36 @@ void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) {
std::vector<std::string> paths;
base::SplitString(moz_plugin_path, ':', &paths);
for (size_t i = 0; i < paths.size(); ++i)
- plugin_dirs->push_back(FilePath(paths[i]));
+ plugin_dirs->push_back(base::FilePath(paths[i]));
}
// 2) NS_USER_PLUGINS_DIR: ~/.mozilla/plugins.
// This is a de-facto standard, so even though we're not Mozilla, let's
// look in there too.
- FilePath home = file_util::GetHomeDir();
+ base::FilePath home = file_util::GetHomeDir();
if (!home.empty())
plugin_dirs->push_back(home.Append(".mozilla/plugins"));
// 3) NS_SYSTEM_PLUGINS_DIR:
// This varies across different browsers and versions, so check 'em all.
- plugin_dirs->push_back(FilePath("/usr/lib/browser-plugins"));
- plugin_dirs->push_back(FilePath("/usr/lib/mozilla/plugins"));
- plugin_dirs->push_back(FilePath("/usr/lib/firefox/plugins"));
- plugin_dirs->push_back(FilePath("/usr/lib/xulrunner-addons/plugins"));
+ plugin_dirs->push_back(base::FilePath("/usr/lib/browser-plugins"));
+ plugin_dirs->push_back(base::FilePath("/usr/lib/mozilla/plugins"));
+ plugin_dirs->push_back(base::FilePath("/usr/lib/firefox/plugins"));
+ plugin_dirs->push_back(base::FilePath("/usr/lib/xulrunner-addons/plugins"));
#if defined(ARCH_CPU_64_BITS)
// On my Ubuntu system, /usr/lib64 is a symlink to /usr/lib.
// But a user reported on their Fedora system they are separate.
- plugin_dirs->push_back(FilePath("/usr/lib64/browser-plugins"));
- plugin_dirs->push_back(FilePath("/usr/lib64/mozilla/plugins"));
- plugin_dirs->push_back(FilePath("/usr/lib64/firefox/plugins"));
- plugin_dirs->push_back(FilePath("/usr/lib64/xulrunner-addons/plugins"));
+ plugin_dirs->push_back(base::FilePath("/usr/lib64/browser-plugins"));
+ plugin_dirs->push_back(base::FilePath("/usr/lib64/mozilla/plugins"));
+ plugin_dirs->push_back(base::FilePath("/usr/lib64/firefox/plugins"));
+ plugin_dirs->push_back(base::FilePath("/usr/lib64/xulrunner-addons/plugins"));
#endif // defined(ARCH_CPU_64_BITS)
#endif // !defined(OS_CHROMEOS)
}
void PluginList::GetPluginsInDir(
- const FilePath& dir_path, std::vector<FilePath>* plugins) {
+ const base::FilePath& dir_path, std::vector<base::FilePath>* plugins) {
// See ScanPluginsDirectory near
// http://mxr.mozilla.org/firefox/source/modules/plugin/base/src/nsPluginHostImpl.cpp#5052
@@ -208,7 +208,7 @@ void PluginList::GetPluginsInDir(
file_util::FileEnumerator enumerator(dir_path,
false, // not recursive
file_util::FileEnumerator::FILES);
- for (FilePath path = enumerator.Next(); !path.value().empty();
+ for (base::FilePath path = enumerator.Next(); !path.value().empty();
path = enumerator.Next()) {
// Skip over Mozilla .xpt files.
if (path.MatchesExtension(FILE_PATH_LITERAL(".xpt")))
@@ -218,7 +218,7 @@ void PluginList::GetPluginsInDir(
// its path to find dependent data files.
// file_util::AbsolutePath calls through to realpath(), which resolves
// symlinks.
- FilePath orig_path = path;
+ base::FilePath orig_path = path;
file_util::AbsolutePath(&path);
LOG_IF(ERROR, PluginList::DebugPluginLoading())
<< "Resolved " << orig_path.value() << " -> " << path.value();
diff --git a/webkit/plugins/npapi/plugin_list_unittest.cc b/webkit/plugins/npapi/plugin_list_unittest.cc
index 5d198d1..0fc55bf 100644
--- a/webkit/plugins/npapi/plugin_list_unittest.cc
+++ b/webkit/plugins/npapi/plugin_list_unittest.cc
@@ -31,8 +31,8 @@ bool Contains(const std::vector<WebPluginInfo>& list,
return false;
}
-FilePath::CharType kFooPath[] = FILE_PATH_LITERAL("/plugins/foo.plugin");
-FilePath::CharType kBarPath[] = FILE_PATH_LITERAL("/plugins/bar.plugin");
+base::FilePath::CharType kFooPath[] = FILE_PATH_LITERAL("/plugins/foo.plugin");
+base::FilePath::CharType kBarPath[] = FILE_PATH_LITERAL("/plugins/bar.plugin");
const char* kFooName = "Foo Plugin";
} // namespace
@@ -41,11 +41,11 @@ class PluginListTest : public testing::Test {
public:
PluginListTest()
: foo_plugin_(ASCIIToUTF16(kFooName),
- FilePath(kFooPath),
+ base::FilePath(kFooPath),
ASCIIToUTF16("1.2.3"),
ASCIIToUTF16("foo")),
bar_plugin_(ASCIIToUTF16("Bar Plugin"),
- FilePath(kBarPath),
+ base::FilePath(kBarPath),
ASCIIToUTF16("2.3.4"),
ASCIIToUTF16("bar")) {
}
@@ -71,7 +71,7 @@ TEST_F(PluginListTest, GetPlugins) {
TEST_F(PluginListTest, BadPluginDescription) {
WebPluginInfo plugin_3043(
- string16(), FilePath(FILE_PATH_LITERAL("/myplugin.3.0.43")),
+ string16(), base::FilePath(FILE_PATH_LITERAL("/myplugin.3.0.43")),
string16(), string16());
// Simulate loading of the plugins.
plugin_list_.ClearPluginsToLoad();
diff --git a/webkit/plugins/npapi/plugin_list_win.cc b/webkit/plugins/npapi/plugin_list_win.cc
index 22dce63..0f19d08 100644
--- a/webkit/plugins/npapi/plugin_list_win.cc
+++ b/webkit/plugins/npapi/plugin_list_win.cc
@@ -43,7 +43,7 @@ const char16 kRegistryJavaHome[] = L"JavaHome";
const char16 kJavaDeploy1[] = L"npdeploytk.dll";
const char16 kJavaDeploy2[] = L"npdeployjava1.dll";
-FilePath AppendPluginsDir(const FilePath& path) {
+base::FilePath AppendPluginsDir(const base::FilePath& path) {
return path.AppendASCII("plugins");
}
@@ -51,8 +51,8 @@ FilePath AppendPluginsDir(const FilePath& path) {
// may be a versioned subdirectory, or it may be the same directory as the
// GetExeDirectory(), depending on the embedder's implementation.
// Path is an output parameter to receive the path.
-void GetAppDirectory(std::set<FilePath>* plugin_dirs) {
- FilePath app_path;
+void GetAppDirectory(std::set<base::FilePath>* plugin_dirs) {
+ base::FilePath app_path;
if (!PathService::Get(base::DIR_MODULE, &app_path))
return;
plugin_dirs->insert(AppendPluginsDir(app_path));
@@ -60,15 +60,15 @@ void GetAppDirectory(std::set<FilePath>* plugin_dirs) {
// Gets the directory where the launching executable resides on disk.
// Path is an output parameter to receive the path.
-void GetExeDirectory(std::set<FilePath>* plugin_dirs) {
- FilePath exe_path;
+void GetExeDirectory(std::set<base::FilePath>* plugin_dirs) {
+ base::FilePath exe_path;
if (!PathService::Get(base::DIR_EXE, &exe_path))
return;
plugin_dirs->insert(AppendPluginsDir(exe_path));
}
// Gets the installed path for a registered app.
-bool GetInstalledPath(const char16* app, FilePath* out) {
+bool GetInstalledPath(const char16* app, base::FilePath* out) {
string16 reg_path(kRegistryApps);
reg_path.append(L"\\");
reg_path.append(app);
@@ -78,12 +78,12 @@ bool GetInstalledPath(const char16* app, FilePath* out) {
// As of Win7 AppPaths can also be registered in HKCU: http://goo.gl/UgFOf.
if (base::win::GetVersion() >= base::win::VERSION_WIN7 &&
hkcu_key.ReadValue(kRegistryPath, &path) == ERROR_SUCCESS) {
- *out = FilePath(path);
+ *out = base::FilePath(path);
return true;
} else {
base::win::RegKey hklm_key(HKEY_LOCAL_MACHINE, reg_path.c_str(), KEY_READ);
if (hklm_key.ReadValue(kRegistryPath, &path) == ERROR_SUCCESS) {
- *out = FilePath(path);
+ *out = base::FilePath(path);
return true;
}
}
@@ -95,7 +95,7 @@ bool GetInstalledPath(const char16* app, FilePath* out) {
void GetPluginsInRegistryDirectory(
HKEY root_key,
const string16& registry_folder,
- std::set<FilePath>* plugin_dirs) {
+ std::set<base::FilePath>* plugin_dirs) {
for (base::win::RegistryKeyIterator iter(root_key, registry_folder.c_str());
iter.Valid(); ++iter) {
// Use the registry to gather plugin across the file system.
@@ -106,13 +106,13 @@ void GetPluginsInRegistryDirectory(
string16 path;
if (key.ReadValue(kRegistryPath, &path) == ERROR_SUCCESS)
- plugin_dirs->insert(FilePath(path));
+ plugin_dirs->insert(base::FilePath(path));
}
}
// Enumerate through the registry key to find all installed FireFox paths.
// FireFox 3 beta and version 2 can coexist. See bug: 1025003
-void GetFirefoxInstalledPaths(std::vector<FilePath>* out) {
+void GetFirefoxInstalledPaths(std::vector<base::FilePath>* out) {
base::win::RegistryKeyIterator it(HKEY_LOCAL_MACHINE,
kRegistryFirefoxInstalled);
for (; it.Valid(); ++it) {
@@ -122,7 +122,7 @@ void GetFirefoxInstalledPaths(std::vector<FilePath>* out) {
string16 install_dir;
if (key.ReadValue(L"Install Directory", &install_dir) != ERROR_SUCCESS)
continue;
- out->push_back(FilePath(install_dir));
+ out->push_back(base::FilePath(install_dir));
}
}
@@ -130,14 +130,14 @@ void GetFirefoxInstalledPaths(std::vector<FilePath>* out) {
// of a kludge, but it helps us locate the flash player for users that
// already have it for firefox. Not having to download yet-another-plugin
// is a good thing.
-void GetFirefoxDirectory(std::set<FilePath>* plugin_dirs) {
- std::vector<FilePath> paths;
+void GetFirefoxDirectory(std::set<base::FilePath>* plugin_dirs) {
+ std::vector<base::FilePath> paths;
GetFirefoxInstalledPaths(&paths);
for (unsigned int i = 0; i < paths.size(); ++i) {
plugin_dirs->insert(AppendPluginsDir(paths[i]));
}
- FilePath firefox_app_data_plugin_path;
+ base::FilePath firefox_app_data_plugin_path;
if (PathService::Get(base::DIR_APP_DATA, &firefox_app_data_plugin_path)) {
firefox_app_data_plugin_path =
firefox_app_data_plugin_path.AppendASCII("Mozilla");
@@ -146,8 +146,8 @@ void GetFirefoxDirectory(std::set<FilePath>* plugin_dirs) {
}
// Hardcoded logic to detect Acrobat plugins locations.
-void GetAcrobatDirectory(std::set<FilePath>* plugin_dirs) {
- FilePath path;
+void GetAcrobatDirectory(std::set<base::FilePath>* plugin_dirs) {
+ base::FilePath path;
if (!GetInstalledPath(kRegistryAcrobatReader, &path) &&
!GetInstalledPath(kRegistryAcrobat, &path)) {
return;
@@ -157,21 +157,21 @@ void GetAcrobatDirectory(std::set<FilePath>* plugin_dirs) {
}
// Hardcoded logic to detect QuickTime plugin location.
-void GetQuicktimeDirectory(std::set<FilePath>* plugin_dirs) {
- FilePath path;
+void GetQuicktimeDirectory(std::set<base::FilePath>* plugin_dirs) {
+ base::FilePath path;
if (GetInstalledPath(kRegistryQuickTime, &path))
plugin_dirs->insert(AppendPluginsDir(path));
}
// Hardcoded logic to detect Windows Media Player plugin location.
-void GetWindowsMediaDirectory(std::set<FilePath>* plugin_dirs) {
- FilePath path;
+void GetWindowsMediaDirectory(std::set<base::FilePath>* plugin_dirs) {
+ base::FilePath path;
if (GetInstalledPath(kRegistryWindowsMedia, &path))
plugin_dirs->insert(path);
}
// Hardcoded logic to detect Java plugin location.
-void GetJavaDirectory(std::set<FilePath>* plugin_dirs) {
+void GetJavaDirectory(std::set<base::FilePath>* plugin_dirs) {
// Load the new NPAPI Java plugin
// 1. Open the main JRE key under HKLM
base::win::RegKey java_key(HKEY_LOCAL_MACHINE, kRegistryJava,
@@ -199,12 +199,12 @@ void GetJavaDirectory(std::set<FilePath>* plugin_dirs) {
// 5. We don't know the exact name of the DLL but it's in the form
// NP*.dll so just invoke LoadPlugins on this path.
- plugin_dirs->insert(FilePath(java_plugin_directory));
+ plugin_dirs->insert(base::FilePath(java_plugin_directory));
}
}
}
-bool IsValid32BitImage(const FilePath& path) {
+bool IsValid32BitImage(const base::FilePath& path) {
file_util::MemoryMappedFile plugin_image;
if (!plugin_image.InitializeAsImageSection(path))
@@ -266,9 +266,9 @@ void PluginList::PlatformInit() {
dont_load_new_wmp_ = command_line.HasSwitch(switches::kUseOldWMPPlugin);
}
-void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) {
+void PluginList::GetPluginDirectories(std::vector<base::FilePath>* plugin_dirs) {
// We use a set for uniqueness, which we require, over order, which we do not.
- std::set<FilePath> dirs;
+ std::set<base::FilePath> dirs;
// Load from the application-specific area
GetAppDirectory(&dirs);
@@ -289,12 +289,12 @@ void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) {
GetQuicktimeDirectory(&dirs);
GetWindowsMediaDirectory(&dirs);
- for (std::set<FilePath>::iterator i = dirs.begin(); i != dirs.end(); ++i)
+ for (std::set<base::FilePath>::iterator i = dirs.begin(); i != dirs.end(); ++i)
plugin_dirs->push_back(*i);
}
void PluginList::GetPluginsInDir(
- const FilePath& path, std::vector<FilePath>* plugins) {
+ const base::FilePath& path, std::vector<base::FilePath>* plugins) {
WIN32_FIND_DATA find_file_data;
HANDLE find_handle;
@@ -308,7 +308,7 @@ void PluginList::GetPluginsInDir(
do {
if (!(find_file_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
- FilePath filename = path.Append(find_file_data.cFileName);
+ base::FilePath filename = path.Append(find_file_data.cFileName);
plugins->push_back(filename);
}
} while (FindNextFile(find_handle, &find_file_data) != 0);
@@ -317,15 +317,15 @@ void PluginList::GetPluginsInDir(
FindClose(find_handle);
}
-void PluginList::GetPluginPathsFromRegistry(std::vector<FilePath>* plugins) {
- std::set<FilePath> plugin_dirs;
+void PluginList::GetPluginPathsFromRegistry(std::vector<base::FilePath>* plugins) {
+ std::set<base::FilePath> plugin_dirs;
GetPluginsInRegistryDirectory(
HKEY_CURRENT_USER, kRegistryMozillaPlugins, &plugin_dirs);
GetPluginsInRegistryDirectory(
HKEY_LOCAL_MACHINE, kRegistryMozillaPlugins, &plugin_dirs);
- for (std::set<FilePath>::iterator i = plugin_dirs.begin();
+ for (std::set<base::FilePath>::iterator i = plugin_dirs.begin();
i != plugin_dirs.end(); ++i) {
plugins->push_back(*i);
}
@@ -336,9 +336,9 @@ bool PluginList::ShouldLoadPluginUsingPluginList(
std::vector<webkit::WebPluginInfo>* plugins) {
// Version check
for (size_t j = 0; j < plugins->size(); ++j) {
- FilePath::StringType plugin1 =
+ base::FilePath::StringType plugin1 =
StringToLowerASCII((*plugins)[j].path.BaseName().value());
- FilePath::StringType plugin2 =
+ base::FilePath::StringType plugin2 =
StringToLowerASCII(info.path.BaseName().value());
if ((plugin1 == plugin2 && HaveSharedMimeType((*plugins)[j], info)) ||
(plugin1 == kJavaDeploy1 && plugin2 == kJavaDeploy2) ||
@@ -361,7 +361,7 @@ bool PluginList::ShouldLoadPluginUsingPluginList(
}
// Troublemakers.
- FilePath::StringType filename =
+ base::FilePath::StringType filename =
StringToLowerASCII(info.path.BaseName().value());
// Depends on XPCOM.
if (filename == kMozillaActiveXPlugin)
@@ -383,7 +383,7 @@ bool PluginList::ShouldLoadPluginUsingPluginList(
// We only work with newer versions of the Java plugin which use NPAPI only
// and don't depend on XPCOM.
if (filename == kJavaPlugin1 || filename == kJavaPlugin2) {
- std::vector<FilePath::StringType> ver;
+ std::vector<base::FilePath::StringType> ver;
base::SplitString(info.version, '.', &ver);
int major, minor, update;
if (ver.size() == 4 &&
@@ -417,7 +417,7 @@ bool PluginList::ShouldLoadPluginUsingPluginList(
#if !defined(ARCH_CPU_X86_64)
// The plugin in question could be a 64 bit plugin which we cannot load.
- FilePath plugin_path(info.path);
+ base::FilePath plugin_path(info.path);
file_util::AbsolutePath(&plugin_path);
if (!IsValid32BitImage(plugin_path))
return false;
diff --git a/webkit/plugins/npapi/plugin_stream.cc b/webkit/plugins/npapi/plugin_stream.cc
index 8946030..543ab3e 100644
--- a/webkit/plugins/npapi/plugin_stream.cc
+++ b/webkit/plugins/npapi/plugin_stream.cc
@@ -84,9 +84,9 @@ bool PluginStream::Open(const std::string& mime_type,
GURL gurl(stream_.url);
#if defined(OS_WIN)
- FilePath path(UTF8ToWide(gurl.path()));
+ base::FilePath path(UTF8ToWide(gurl.path()));
#elif defined(OS_POSIX)
- FilePath path(gurl.path());
+ base::FilePath path(gurl.path());
#endif
if (net::GetMimeTypeFromFile(path, &temp_mime_type))
char_mime_type = temp_mime_type.c_str();
diff --git a/webkit/plugins/npapi/plugin_stream.h b/webkit/plugins/npapi/plugin_stream.h
index 2bc691a..10993f0 100644
--- a/webkit/plugins/npapi/plugin_stream.h
+++ b/webkit/plugins/npapi/plugin_stream.h
@@ -146,7 +146,7 @@ class PluginStream : public base::RefCounted<PluginStream> {
HANDLE temp_file_handle_;
#elif defined(OS_POSIX)
FILE* temp_file_;
- FilePath temp_file_path_;
+ base::FilePath temp_file_path_;
#endif
std::vector<char> delivery_data_;
int data_offset_;
diff --git a/webkit/plugins/npapi/plugin_stream_posix.cc b/webkit/plugins/npapi/plugin_stream_posix.cc
index 3422d99..ab4b0d4 100644
--- a/webkit/plugins/npapi/plugin_stream_posix.cc
+++ b/webkit/plugins/npapi/plugin_stream_posix.cc
@@ -19,7 +19,7 @@ void PluginStream::ResetTempFileHandle() {
}
void PluginStream::ResetTempFileName() {
- temp_file_path_ = FilePath();
+ temp_file_path_ = base::FilePath();
}
void PluginStream::WriteAsFile() {
diff --git a/webkit/plugins/npapi/test/plugin_geturl_test.cc b/webkit/plugins/npapi/test/plugin_geturl_test.cc
index f03c5c31..b1ab554 100644
--- a/webkit/plugins/npapi/test/plugin_geturl_test.cc
+++ b/webkit/plugins/npapi/test/plugin_geturl_test.cc
@@ -187,10 +187,10 @@ NPError PluginGetURLTest::NewStream(NPMIMEType type, NPStream* stream,
#if defined(OS_WIN)
filename = filename.substr(8); // remove "file:///"
// Assume an ASCII path on Windows.
- FilePath path = FilePath(ASCIIToWide(filename));
+ base::FilePath path = base::FilePath(ASCIIToWide(filename));
#else
filename = filename.substr(7); // remove "file://"
- FilePath path = FilePath(filename);
+ base::FilePath path = base::FilePath(filename);
#endif
test_file_ = file_util::OpenFile(path, "r");
diff --git a/webkit/plugins/npapi/webplugin_delegate_impl.cc b/webkit/plugins/npapi/webplugin_delegate_impl.cc
index e3f5785..3ff6116 100644
--- a/webkit/plugins/npapi/webplugin_delegate_impl.cc
+++ b/webkit/plugins/npapi/webplugin_delegate_impl.cc
@@ -24,7 +24,7 @@ namespace webkit {
namespace npapi {
WebPluginDelegateImpl* WebPluginDelegateImpl::Create(
- const FilePath& filename,
+ const base::FilePath& filename,
const std::string& mime_type) {
scoped_refptr<PluginLib> plugin_lib(PluginLib::CreatePluginLib(filename));
if (plugin_lib.get() == NULL)
@@ -239,7 +239,7 @@ void WebPluginDelegateImpl::DidManualLoadFail() {
instance()->DidManualLoadFail();
}
-FilePath WebPluginDelegateImpl::GetPluginPath() {
+base::FilePath WebPluginDelegateImpl::GetPluginPath() {
return instance()->plugin_lib()->plugin_info().path;
}
diff --git a/webkit/plugins/npapi/webplugin_delegate_impl.h b/webkit/plugins/npapi/webplugin_delegate_impl.h
index 38f18cd..d0a624b 100644
--- a/webkit/plugins/npapi/webplugin_delegate_impl.h
+++ b/webkit/plugins/npapi/webplugin_delegate_impl.h
@@ -27,7 +27,9 @@
typedef struct _GdkDrawable GdkPixmap;
#endif
+namespace base {
class FilePath;
+}
#if defined(OS_MACOSX)
#ifdef __OBJC__
@@ -77,7 +79,7 @@ class WEBKIT_PLUGINS_EXPORT WebPluginDelegateImpl : public WebPluginDelegate {
PLUGIN_QUIRK_EMULATE_IME = 131072, // Windows.
};
- static WebPluginDelegateImpl* Create(const FilePath& filename,
+ static WebPluginDelegateImpl* Create(const base::FilePath& filename,
const std::string& mime_type);
#if defined(OS_WIN)
@@ -138,7 +140,7 @@ class WEBKIT_PLUGINS_EXPORT WebPluginDelegateImpl : public WebPluginDelegate {
gfx::Rect GetClipRect() const { return clip_rect_; }
// Returns the path for the library implementing this plugin.
- FilePath GetPluginPath();
+ base::FilePath GetPluginPath();
// Returns a combination of PluginQuirks.
int GetQuirks() const { return quirks_; }
diff --git a/webkit/plugins/npapi/webplugin_impl.cc b/webkit/plugins/npapi/webplugin_impl.cc
index 64a36e2..357bb01 100644
--- a/webkit/plugins/npapi/webplugin_impl.cc
+++ b/webkit/plugins/npapi/webplugin_impl.cc
@@ -464,7 +464,7 @@ bool WebPluginImpl::isPlaceholder() {
WebPluginImpl::WebPluginImpl(
WebFrame* webframe,
const WebPluginParams& params,
- const FilePath& file_path,
+ const base::FilePath& file_path,
const base::WeakPtr<WebPluginPageDelegate>& page_delegate)
: windowless_(false),
window_(gfx::kNullPluginWindow),
diff --git a/webkit/plugins/npapi/webplugin_impl.h b/webkit/plugins/npapi/webplugin_impl.h
index 844ddd4..90ac280 100644
--- a/webkit/plugins/npapi/webplugin_impl.h
+++ b/webkit/plugins/npapi/webplugin_impl.h
@@ -58,7 +58,7 @@ class WEBKIT_PLUGINS_EXPORT WebPluginImpl :
WebPluginImpl(
WebKit::WebFrame* frame,
const WebKit::WebPluginParams& params,
- const FilePath& file_path,
+ const base::FilePath& file_path,
const base::WeakPtr<WebPluginPageDelegate>& page_delegate);
virtual ~WebPluginImpl();
@@ -315,7 +315,7 @@ class WEBKIT_PLUGINS_EXPORT WebPluginImpl :
WebPluginGeometry geometry_;
// The location of the plugin on disk.
- FilePath file_path_;
+ base::FilePath file_path_;
// The mime type of the plugin.
std::string mime_type_;
diff --git a/webkit/plugins/npapi/webplugin_page_delegate.h b/webkit/plugins/npapi/webplugin_page_delegate.h
index ec4b34a..e632014 100644
--- a/webkit/plugins/npapi/webplugin_page_delegate.h
+++ b/webkit/plugins/npapi/webplugin_page_delegate.h
@@ -9,7 +9,9 @@
#include "ui/gfx/native_widget_types.h"
+namespace base {
class FilePath;
+}
namespace WebKit {
class WebCookieJar;
@@ -29,12 +31,12 @@ class WebPluginPageDelegate {
// new plugin is instanced. See CreateWebPluginDelegateHelper
// for a default WebPluginDelegate implementation.
virtual WebPluginDelegate* CreatePluginDelegate(
- const FilePath& file_path,
+ const base::FilePath& file_path,
const std::string& mime_type) = 0;
// Caled to create a replacement plug-in when loading a plug-in failed.
virtual WebKit::WebPlugin* CreatePluginReplacement(
- const FilePath& file_path) = 0;
+ const base::FilePath& file_path) = 0;
// Called when a windowed plugin is created.
// Lets the view delegate create anything it is using to wrap the plugin.
diff --git a/webkit/plugins/ppapi/file_callbacks.cc b/webkit/plugins/ppapi/file_callbacks.cc
index 0ab4453..dd8906d 100644
--- a/webkit/plugins/ppapi/file_callbacks.cc
+++ b/webkit/plugins/ppapi/file_callbacks.cc
@@ -46,7 +46,7 @@ void FileCallbacks::DidSucceed() {
void FileCallbacks::DidReadMetadata(
const base::PlatformFileInfo& file_info,
- const FilePath& unused) {
+ const base::FilePath& unused) {
if (callback_->completed())
return;
diff --git a/webkit/plugins/ppapi/file_callbacks.h b/webkit/plugins/ppapi/file_callbacks.h
index c254dab..2e31e2f 100644
--- a/webkit/plugins/ppapi/file_callbacks.h
+++ b/webkit/plugins/ppapi/file_callbacks.h
@@ -46,7 +46,7 @@ class FileCallbacks : public fileapi::FileSystemCallbackDispatcher {
virtual void DidSucceed();
virtual void DidReadMetadata(
const base::PlatformFileInfo& file_info,
- const FilePath& unused);
+ const base::FilePath& unused);
virtual void DidReadDirectory(
const std::vector<base::FileUtilProxy::Entry>& entries, bool has_more);
virtual void DidOpenFileSystem(const std::string&,
diff --git a/webkit/plugins/ppapi/mock_plugin_delegate.cc b/webkit/plugins/ppapi/mock_plugin_delegate.cc
index d54356a..e60a6ef 100644
--- a/webkit/plugins/ppapi/mock_plugin_delegate.cc
+++ b/webkit/plugins/ppapi/mock_plugin_delegate.cc
@@ -68,7 +68,7 @@ SkBitmap* MockPluginDelegate::GetSadPluginBitmap() {
}
WebKit::WebPlugin* MockPluginDelegate::CreatePluginReplacement(
- const FilePath& file_path) {
+ const base::FilePath& file_path) {
return NULL;
}
@@ -141,7 +141,7 @@ void MockPluginDelegate::NumberOfFindResultsChanged(int identifier,
void MockPluginDelegate::SelectedFindResultChanged(int identifier, int index) {
}
-bool MockPluginDelegate::AsyncOpenFile(const FilePath& path,
+bool MockPluginDelegate::AsyncOpenFile(const base::FilePath& path,
int flags,
const AsyncOpenFileCallback& callback) {
return false;
@@ -222,9 +222,9 @@ void MockPluginDelegate::DidUpdateFile(const GURL& file_path, int64_t delta) {
void MockPluginDelegate::SyncGetFileSystemPlatformPath(
const GURL& url,
- FilePath* platform_path) {
+ base::FilePath* platform_path) {
DCHECK(platform_path);
- *platform_path = FilePath();
+ *platform_path = base::FilePath();
}
scoped_refptr<base::MessageLoopProxy>
diff --git a/webkit/plugins/ppapi/mock_plugin_delegate.h b/webkit/plugins/ppapi/mock_plugin_delegate.h
index de4c28f..c4c1342 100644
--- a/webkit/plugins/ppapi/mock_plugin_delegate.h
+++ b/webkit/plugins/ppapi/mock_plugin_delegate.h
@@ -35,7 +35,8 @@ class MockPluginDelegate : public PluginDelegate {
virtual scoped_ptr< ::ppapi::thunk::ResourceCreationAPI>
CreateResourceCreationAPI(PluginInstance* instance);
virtual SkBitmap* GetSadPluginBitmap();
- virtual WebKit::WebPlugin* CreatePluginReplacement(const FilePath& file_path);
+ virtual WebKit::WebPlugin* CreatePluginReplacement(
+ const base::FilePath& file_path);
virtual PlatformImage2D* CreateImage2D(int width, int height);
virtual PlatformGraphics2D* GetGraphics2D(PluginInstance* instance,
PP_Resource graphics_2d);
@@ -63,7 +64,7 @@ class MockPluginDelegate : public PluginDelegate {
int total,
bool final_result);
virtual void SelectedFindResultChanged(int identifier, int index);
- virtual bool AsyncOpenFile(const FilePath& path,
+ virtual bool AsyncOpenFile(const base::FilePath& path,
int flags,
const AsyncOpenFileCallback& callback);
virtual bool AsyncOpenFileSystemURL(
@@ -102,7 +103,7 @@ class MockPluginDelegate : public PluginDelegate {
virtual void WillUpdateFile(const GURL& file_path);
virtual void DidUpdateFile(const GURL& file_path, int64_t delta);
virtual void SyncGetFileSystemPlatformPath(const GURL& url,
- FilePath* platform_path);
+ base::FilePath* platform_path);
virtual scoped_refptr<base::MessageLoopProxy>
GetFileThreadMessageLoopProxy();
virtual uint32 TCPSocketCreate();
diff --git a/webkit/plugins/ppapi/plugin_delegate.h b/webkit/plugins/ppapi/plugin_delegate.h
index 3f6d058..5b7b923 100644
--- a/webkit/plugins/ppapi/plugin_delegate.h
+++ b/webkit/plugins/ppapi/plugin_delegate.h
@@ -392,7 +392,7 @@ class PluginDelegate {
// Creates a replacement plug-in that is shown when the plug-in at |file_path|
// couldn't be loaded.
virtual WebKit::WebPlugin* CreatePluginReplacement(
- const FilePath& file_path) = 0;
+ const base::FilePath& file_path) = 0;
// The caller will own the pointer returned from this.
virtual PlatformImage2D* CreateImage2D(int width, int height) = 0;
@@ -460,7 +460,7 @@ class PluginDelegate {
// Sends an async IPC to open a local file.
typedef base::Callback<void (base::PlatformFileError, base::PassPlatformFile)>
AsyncOpenFileCallback;
- virtual bool AsyncOpenFile(const FilePath& path,
+ virtual bool AsyncOpenFile(const base::FilePath& path,
int flags,
const AsyncOpenFileCallback& callback) = 0;
@@ -518,7 +518,7 @@ class PluginDelegate {
// Synchronously returns the platform file path for a filesystem URL.
virtual void SyncGetFileSystemPlatformPath(const GURL& url,
- FilePath* platform_path) = 0;
+ base::FilePath* platform_path) = 0;
// Returns a MessageLoopProxy instance associated with the message loop
// of the file thread in this renderer.
diff --git a/webkit/plugins/ppapi/plugin_module.cc b/webkit/plugins/ppapi/plugin_module.cc
index de17710..d021864 100644
--- a/webkit/plugins/ppapi/plugin_module.cc
+++ b/webkit/plugins/ppapi/plugin_module.cc
@@ -400,7 +400,7 @@ PluginModule::EntryPoints::EntryPoints()
// PluginModule ----------------------------------------------------------------
PluginModule::PluginModule(const std::string& name,
- const FilePath& path,
+ const base::FilePath& path,
PluginDelegate::ModuleLifetime* lifetime_delegate,
const ::ppapi::PpapiPermissions& perms)
: lifetime_delegate_(lifetime_delegate),
@@ -476,7 +476,7 @@ bool PluginModule::InitAsInternalPlugin(const EntryPoints& entry_points) {
return false;
}
-bool PluginModule::InitAsLibrary(const FilePath& path) {
+bool PluginModule::InitAsLibrary(const base::FilePath& path) {
base::NativeLibrary library = base::LoadNativeLibrary(path, NULL);
if (!library)
return false;
diff --git a/webkit/plugins/ppapi/plugin_module.h b/webkit/plugins/ppapi/plugin_module.h
index 4d47459..ecf17bb 100644
--- a/webkit/plugins/ppapi/plugin_module.h
+++ b/webkit/plugins/ppapi/plugin_module.h
@@ -26,9 +26,12 @@
#include "webkit/plugins/ppapi/plugin_delegate.h"
#include "webkit/plugins/webkit_plugins_export.h"
-class FilePath;
typedef void* NPIdentifier;
+namespace base {
+class FilePath;
+}
+
namespace ppapi {
class CallbackTracker;
class WebKitForwarding;
@@ -83,7 +86,7 @@ class WEBKIT_PLUGINS_EXPORT PluginModule :
// all plugin modules. In practice it will be a global singleton that
// tracks which modules are alive.
PluginModule(const std::string& name,
- const FilePath& path,
+ const base::FilePath& path,
PluginDelegate::ModuleLifetime* lifetime_delegate,
const ::ppapi::PpapiPermissions& perms);
@@ -104,7 +107,7 @@ class WEBKIT_PLUGINS_EXPORT PluginModule :
// Initializes this module using the given library path as the plugin.
// Returns true on success. False means that the plugin can not be used.
- bool InitAsLibrary(const FilePath& path);
+ bool InitAsLibrary(const base::FilePath& path);
// Initializes this module for the given out of process proxy. This takes
// ownership of the given pointer, even in the failure case.
@@ -144,7 +147,7 @@ class WEBKIT_PLUGINS_EXPORT PluginModule :
PP_Module pp_module() const { return pp_module_; }
const std::string& name() const { return name_; }
- const FilePath& path() const { return path_; }
+ const base::FilePath& path() const { return path_; }
const ::ppapi::PpapiPermissions& permissions() const { return permissions_; }
PluginInstance* CreateInstance(PluginDelegate* delegate,
@@ -241,7 +244,7 @@ class WEBKIT_PLUGINS_EXPORT PluginModule :
// The name and file location of the module.
const std::string name_;
- const FilePath path_;
+ const base::FilePath path_;
::ppapi::PpapiPermissions permissions_;
diff --git a/webkit/plugins/ppapi/ppapi_unittest.cc b/webkit/plugins/ppapi/ppapi_unittest.cc
index 05dbfed..bccebd9 100644
--- a/webkit/plugins/ppapi/ppapi_unittest.cc
+++ b/webkit/plugins/ppapi/ppapi_unittest.cc
@@ -78,7 +78,7 @@ void PpapiUnittest::SetUp() {
delegate_.reset(NewPluginDelegate());
// Initialize the mock module.
- module_ = new PluginModule("Mock plugin", FilePath(), this,
+ module_ = new PluginModule("Mock plugin", base::FilePath(), this,
::ppapi::PpapiPermissions());
PluginModule::EntryPoints entry_points;
entry_points.get_interface = &MockGetInterface;
diff --git a/webkit/plugins/ppapi/ppb_directory_reader_impl.cc b/webkit/plugins/ppapi/ppb_directory_reader_impl.cc
index ec1315e..7cd8d5d 100644
--- a/webkit/plugins/ppapi/ppb_directory_reader_impl.cc
+++ b/webkit/plugins/ppapi/ppb_directory_reader_impl.cc
@@ -33,7 +33,7 @@ namespace ppapi {
namespace {
-std::string FilePathStringToUTF8String(const FilePath::StringType& str) {
+std::string FilePathStringToUTF8String(const base::FilePath::StringType& str) {
#if defined(OS_WIN)
return WideToUTF8(str);
#elif defined(OS_POSIX)
@@ -43,7 +43,7 @@ std::string FilePathStringToUTF8String(const FilePath::StringType& str) {
#endif
}
-FilePath::StringType UTF8StringToFilePathString(const std::string& str) {
+base::FilePath::StringType UTF8StringToFilePathString(const std::string& str) {
#if defined(OS_WIN)
return UTF8ToWide(str);
#elif defined(OS_POSIX)
@@ -110,7 +110,7 @@ void PPB_DirectoryReader_Impl::AddNewEntries(
std::string dir_path = directory_ref_->GetCreateInfo().path;
if (dir_path[dir_path.size() - 1] != '/')
dir_path += '/';
- FilePath::StringType dir_file_path = UTF8StringToFilePathString(dir_path);
+ base::FilePath::StringType dir_file_path = UTF8StringToFilePathString(dir_path);
for (std::vector<base::FileUtilProxy::Entry>::const_iterator it =
entries.begin(); it != entries.end(); it++) {
base::FileUtilProxy::Entry entry;
diff --git a/webkit/plugins/ppapi/ppb_file_ref_impl.cc b/webkit/plugins/ppapi/ppb_file_ref_impl.cc
index b74a4c4..ec785e4 100644
--- a/webkit/plugins/ppapi/ppb_file_ref_impl.cc
+++ b/webkit/plugins/ppapi/ppb_file_ref_impl.cc
@@ -55,10 +55,10 @@ void TrimTrailingSlash(std::string* path) {
path->erase(path->size() - 1, 1);
}
-std::string GetNameForExternalFilePath(const FilePath& in_path) {
- const FilePath::StringType& path = in_path.value();
- size_t pos = path.rfind(FilePath::kSeparators[0]);
- CHECK(pos != FilePath::StringType::npos);
+std::string GetNameForExternalFilePath(const base::FilePath& in_path) {
+ const base::FilePath::StringType& path = in_path.value();
+ size_t pos = path.rfind(base::FilePath::kSeparators[0]);
+ CHECK(pos != base::FilePath::StringType::npos);
#if defined(OS_WIN)
return WideToUTF8(path.substr(pos + 1));
#elif defined(OS_POSIX)
@@ -88,7 +88,7 @@ PPB_FileRef_Impl::PPB_FileRef_Impl(const PPB_FileRef_CreateInfo& info,
}
PPB_FileRef_Impl::PPB_FileRef_Impl(const PPB_FileRef_CreateInfo& info,
- const FilePath& external_file_path)
+ const base::FilePath& external_file_path)
: PPB_FileRef_Shared(::ppapi::OBJECT_IS_IMPL, info),
file_system_(),
external_file_system_path_(external_file_path) {
@@ -132,7 +132,7 @@ PPB_FileRef_Impl* PPB_FileRef_Impl::CreateInternal(PP_Resource pp_file_system,
// static
PPB_FileRef_Impl* PPB_FileRef_Impl::CreateExternal(
PP_Instance instance,
- const FilePath& external_file_path,
+ const base::FilePath& external_file_path,
const std::string& display_name) {
PPB_FileRef_CreateInfo info;
info.resource = HostResource::MakeInstanceOnly(instance);
@@ -249,10 +249,10 @@ PP_Var PPB_FileRef_Impl::GetAbsolutePath() {
return external_path_var_->GetPPVar();
}
-FilePath PPB_FileRef_Impl::GetSystemPath() const {
+base::FilePath PPB_FileRef_Impl::GetSystemPath() const {
if (GetFileSystemType() != PP_FILESYSTEMTYPE_EXTERNAL) {
NOTREACHED();
- return FilePath();
+ return base::FilePath();
}
return external_file_system_path_;
}
diff --git a/webkit/plugins/ppapi/ppb_file_ref_impl.h b/webkit/plugins/ppapi/ppb_file_ref_impl.h
index d7bb8c5..4d455a7 100644
--- a/webkit/plugins/ppapi/ppb_file_ref_impl.h
+++ b/webkit/plugins/ppapi/ppb_file_ref_impl.h
@@ -27,7 +27,7 @@ class WEBKIT_GLUE_EXPORT PPB_FileRef_Impl
PPB_FileRef_Impl(const ::ppapi::PPB_FileRef_CreateInfo& info,
PPB_FileSystem_Impl* file_system);
PPB_FileRef_Impl(const ::ppapi::PPB_FileRef_CreateInfo& info,
- const FilePath& external_file_path);
+ const base::FilePath& external_file_path);
virtual ~PPB_FileRef_Impl();
// The returned object will have a refcount of 0 (just like "new").
@@ -36,7 +36,7 @@ class WEBKIT_GLUE_EXPORT PPB_FileRef_Impl
// The returned object will have a refcount of 0 (just like "new").
static PPB_FileRef_Impl* CreateExternal(PP_Instance instance,
- const FilePath& external_file_path,
+ const base::FilePath& external_file_path,
const std::string& display_name);
// PPB_FileRef_API implementation (not provided by PPB_FileRef_Shared).
@@ -59,7 +59,7 @@ class WEBKIT_GLUE_EXPORT PPB_FileRef_Impl
// Returns the system path corresponding to this file. Valid only for
// external filesystems.
- FilePath GetSystemPath() const;
+ base::FilePath GetSystemPath() const;
// Returns the FileSystem API URL corresponding to this file.
GURL GetFileSystemURL() const;
@@ -76,7 +76,7 @@ class WEBKIT_GLUE_EXPORT PPB_FileRef_Impl
scoped_refptr<PPB_FileSystem_Impl> file_system_;
// Used only for external filesystems.
- FilePath external_file_system_path_;
+ base::FilePath external_file_system_path_;
// Lazily initialized var created from the external path. This is so we can
// return the identical string object every time it is requested.
diff --git a/webkit/plugins/ppapi/quota_file_io_unittest.cc b/webkit/plugins/ppapi/quota_file_io_unittest.cc
index 3e052a2..65df7d7 100644
--- a/webkit/plugins/ppapi/quota_file_io_unittest.cc
+++ b/webkit/plugins/ppapi/quota_file_io_unittest.cc
@@ -88,7 +88,7 @@ class QuotaFileIOTest : public PpapiUnittest {
virtual void SetUp() OVERRIDE {
PpapiUnittest::SetUp();
ASSERT_TRUE(dir_.CreateUniqueTempDir());
- FilePath path;
+ base::FilePath path;
ASSERT_TRUE(file_util::CreateTemporaryFileInDir(dir_.path(), &path));
int file_flags = base::PLATFORM_FILE_OPEN |
base::PLATFORM_FILE_READ |
diff --git a/webkit/plugins/ppapi/url_request_info_util.cc b/webkit/plugins/ppapi/url_request_info_util.cc
index 6b1f512..8dcad54 100644
--- a/webkit/plugins/ppapi/url_request_info_util.cc
+++ b/webkit/plugins/ppapi/url_request_info_util.cc
@@ -64,7 +64,7 @@ bool AppendFileRefToBody(
if (!plugin_delegate)
return false;
- FilePath platform_path;
+ base::FilePath platform_path;
switch (file_ref->GetFileSystemType()) {
case PP_FILESYSTEMTYPE_LOCALTEMPORARY:
case PP_FILESYSTEMTYPE_LOCALPERSISTENT:
diff --git a/webkit/plugins/webplugininfo.cc b/webkit/plugins/webplugininfo.cc
index 27c6514..a581647 100644
--- a/webkit/plugins/webplugininfo.cc
+++ b/webkit/plugins/webplugininfo.cc
@@ -51,7 +51,7 @@ WebPluginInfo& WebPluginInfo::operator=(const WebPluginInfo& rhs) {
}
WebPluginInfo::WebPluginInfo(const string16& fake_name,
- const FilePath& fake_path,
+ const base::FilePath& fake_path,
const string16& fake_version,
const string16& fake_desc)
: name(fake_name),
diff --git a/webkit/plugins/webplugininfo.h b/webkit/plugins/webplugininfo.h
index cc09f78..514a046 100644
--- a/webkit/plugins/webplugininfo.h
+++ b/webkit/plugins/webplugininfo.h
@@ -53,7 +53,7 @@ struct WEBKIT_PLUGINS_EXPORT WebPluginInfo {
// Special constructor only used during unit testing:
WebPluginInfo(const string16& fake_name,
- const FilePath& fake_path,
+ const base::FilePath& fake_path,
const string16& fake_version,
const string16& fake_desc);
@@ -61,7 +61,7 @@ struct WEBKIT_PLUGINS_EXPORT WebPluginInfo {
string16 name;
// The path to the plugin file (DLL/bundle/library).
- FilePath path;
+ base::FilePath path;
// The version number of the plugin file (may be OS-specific)
string16 version;
diff --git a/webkit/quota/mock_quota_manager.cc b/webkit/quota/mock_quota_manager.cc
index 4904f453..e37dc59 100644
--- a/webkit/quota/mock_quota_manager.cc
+++ b/webkit/quota/mock_quota_manager.cc
@@ -36,7 +36,7 @@ MockQuotaManager::StorageInfo::~StorageInfo() {}
MockQuotaManager::MockQuotaManager(
bool is_incognito,
- const FilePath& profile_path,
+ const base::FilePath& profile_path,
base::SingleThreadTaskRunner* io_thread,
base::SequencedTaskRunner* db_thread,
SpecialStoragePolicy* special_storage_policy)
diff --git a/webkit/quota/mock_quota_manager.h b/webkit/quota/mock_quota_manager.h
index 013fef9..e195e61 100644
--- a/webkit/quota/mock_quota_manager.h
+++ b/webkit/quota/mock_quota_manager.h
@@ -31,7 +31,7 @@ namespace quota {
class MockQuotaManager : public QuotaManager {
public:
MockQuotaManager(bool is_incognito,
- const FilePath& profile_path,
+ const base::FilePath& profile_path,
base::SingleThreadTaskRunner* io_thread,
base::SequencedTaskRunner* db_thread,
SpecialStoragePolicy* special_storage_policy);
diff --git a/webkit/quota/quota_database.cc b/webkit/quota/quota_database.cc
index aaf6245..aeac443 100644
--- a/webkit/quota/quota_database.cc
+++ b/webkit/quota/quota_database.cc
@@ -121,7 +121,7 @@ QuotaDatabase::OriginInfoTableEntry::OriginInfoTableEntry(
}
// QuotaDatabase ------------------------------------------------------------
-QuotaDatabase::QuotaDatabase(const FilePath& path)
+QuotaDatabase::QuotaDatabase(const base::FilePath& path)
: db_file_path_(path),
is_recreating_(false),
is_disabled_(false) {
diff --git a/webkit/quota/quota_database.h b/webkit/quota/quota_database.h
index 2450559..a5c8a27 100644
--- a/webkit/quota/quota_database.h
+++ b/webkit/quota/quota_database.h
@@ -38,7 +38,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE QuotaDatabase {
static const char kTemporaryQuotaOverrideKey[];
// If 'path' is empty, an in memory database will be used.
- explicit QuotaDatabase(const FilePath& path);
+ explicit QuotaDatabase(const base::FilePath& path);
~QuotaDatabase();
void CloseConnection();
@@ -163,7 +163,7 @@ class WEBKIT_STORAGE_EXPORT_PRIVATE QuotaDatabase {
bool DumpQuotaTable(QuotaTableCallback* callback);
bool DumpOriginInfoTable(OriginInfoTableCallback* callback);
- FilePath db_file_path_;
+ base::FilePath db_file_path_;
scoped_ptr<sql::Connection> db_;
scoped_ptr<sql::MetaTable> meta_table_;
diff --git a/webkit/quota/quota_database_unittest.cc b/webkit/quota/quota_database_unittest.cc
index 40e671c..39abfac 100644
--- a/webkit/quota/quota_database_unittest.cc
+++ b/webkit/quota/quota_database_unittest.cc
@@ -46,7 +46,7 @@ class QuotaDatabaseTest : public testing::Test {
typedef QuotaDatabase::OriginInfoTableCallback
OriginInfoTableCallback;
- void LazyOpen(const FilePath& kDbFile) {
+ void LazyOpen(const base::FilePath& kDbFile) {
QuotaDatabase db(kDbFile);
EXPECT_FALSE(db.LazyOpen(false));
ASSERT_TRUE(db.LazyOpen(true));
@@ -54,7 +54,7 @@ class QuotaDatabaseTest : public testing::Test {
EXPECT_TRUE(kDbFile.empty() || file_util::PathExists(kDbFile));
}
- void UpgradeSchemaV2toV3(const FilePath& kDbFile) {
+ void UpgradeSchemaV2toV3(const base::FilePath& kDbFile) {
const QuotaTableEntry entries[] = {
QuotaTableEntry("a", kStorageTypeTemporary, 1),
QuotaTableEntry("b", kStorageTypeTemporary, 2),
@@ -76,7 +76,7 @@ class QuotaDatabaseTest : public testing::Test {
EXPECT_TRUE(verifier.table.empty());
}
- void HostQuota(const FilePath& kDbFile) {
+ void HostQuota(const base::FilePath& kDbFile) {
QuotaDatabase db(kDbFile);
ASSERT_TRUE(db.LazyOpen(true));
@@ -106,7 +106,7 @@ class QuotaDatabaseTest : public testing::Test {
EXPECT_FALSE(db.GetHostQuota(kHost, kStorageTypeTemporary, &quota));
}
- void GlobalQuota(const FilePath& kDbFile) {
+ void GlobalQuota(const base::FilePath& kDbFile) {
QuotaDatabase db(kDbFile);
ASSERT_TRUE(db.LazyOpen(true));
@@ -136,7 +136,7 @@ class QuotaDatabaseTest : public testing::Test {
EXPECT_EQ(kValue2, value);
}
- void OriginLastAccessTimeLRU(const FilePath& kDbFile) {
+ void OriginLastAccessTimeLRU(const base::FilePath& kDbFile) {
QuotaDatabase db(kDbFile);
ASSERT_TRUE(db.LazyOpen(true));
@@ -211,7 +211,7 @@ class QuotaDatabaseTest : public testing::Test {
EXPECT_TRUE(origin.is_empty());
}
- void OriginLastModifiedSince(const FilePath& kDbFile) {
+ void OriginLastModifiedSince(const base::FilePath& kDbFile) {
QuotaDatabase db(kDbFile);
ASSERT_TRUE(db.LazyOpen(true));
@@ -288,7 +288,7 @@ class QuotaDatabaseTest : public testing::Test {
EXPECT_EQ(0U, origins.count(kOrigin3));
}
- void RegisterInitialOriginInfo(const FilePath& kDbFile) {
+ void RegisterInitialOriginInfo(const base::FilePath& kDbFile) {
QuotaDatabase db(kDbFile);
const GURL kOrigins[] = {
@@ -337,7 +337,7 @@ class QuotaDatabaseTest : public testing::Test {
}
};
- void DumpQuotaTable(const FilePath& kDbFile) {
+ void DumpQuotaTable(const base::FilePath& kDbFile) {
QuotaTableEntry kTableEntries[] = {
QuotaTableEntry("http://go/", kStorageTypeTemporary, 1),
QuotaTableEntry("http://oo/", kStorageTypeTemporary, 2),
@@ -360,7 +360,7 @@ class QuotaDatabaseTest : public testing::Test {
EXPECT_TRUE(verifier.table.empty());
}
- void DumpOriginInfoTable(const FilePath& kDbFile) {
+ void DumpOriginInfoTable(const base::FilePath& kDbFile) {
base::Time now(base::Time::Now());
typedef QuotaDatabase::OriginInfoTableEntry Entry;
Entry kTableEntries[] = {
@@ -426,7 +426,7 @@ class QuotaDatabaseTest : public testing::Test {
}
}
- bool OpenDatabase(sql::Connection* db, const FilePath& kDbFile) {
+ bool OpenDatabase(sql::Connection* db, const base::FilePath& kDbFile) {
if (kDbFile.empty()) {
return db->OpenInMemory();
}
@@ -440,7 +440,7 @@ class QuotaDatabaseTest : public testing::Test {
// Create V2 database and populate some data.
void CreateV2Database(
- const FilePath& kDbFile,
+ const base::FilePath& kDbFile,
const QuotaTableEntry* entries,
size_t entries_size) {
scoped_ptr<sql::Connection> db(new sql::Connection);
@@ -495,55 +495,55 @@ class QuotaDatabaseTest : public testing::Test {
TEST_F(QuotaDatabaseTest, LazyOpen) {
base::ScopedTempDir data_dir;
ASSERT_TRUE(data_dir.CreateUniqueTempDir());
- const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db");
+ const base::FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db");
LazyOpen(kDbFile);
- LazyOpen(FilePath());
+ LazyOpen(base::FilePath());
}
TEST_F(QuotaDatabaseTest, UpgradeSchema) {
base::ScopedTempDir data_dir;
ASSERT_TRUE(data_dir.CreateUniqueTempDir());
- const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db");
+ const base::FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db");
UpgradeSchemaV2toV3(kDbFile);
}
TEST_F(QuotaDatabaseTest, HostQuota) {
base::ScopedTempDir data_dir;
ASSERT_TRUE(data_dir.CreateUniqueTempDir());
- const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db");
+ const base::FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db");
HostQuota(kDbFile);
- HostQuota(FilePath());
+ HostQuota(base::FilePath());
}
TEST_F(QuotaDatabaseTest, GlobalQuota) {
base::ScopedTempDir data_dir;
ASSERT_TRUE(data_dir.CreateUniqueTempDir());
- const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db");
+ const base::FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db");
GlobalQuota(kDbFile);
- GlobalQuota(FilePath());
+ GlobalQuota(base::FilePath());
}
TEST_F(QuotaDatabaseTest, OriginLastAccessTimeLRU) {
base::ScopedTempDir data_dir;
ASSERT_TRUE(data_dir.CreateUniqueTempDir());
- const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db");
+ const base::FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db");
OriginLastAccessTimeLRU(kDbFile);
- OriginLastAccessTimeLRU(FilePath());
+ OriginLastAccessTimeLRU(base::FilePath());
}
TEST_F(QuotaDatabaseTest, OriginLastModifiedSince) {
base::ScopedTempDir data_dir;
ASSERT_TRUE(data_dir.CreateUniqueTempDir());
- const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db");
+ const base::FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db");
OriginLastModifiedSince(kDbFile);
- OriginLastModifiedSince(FilePath());
+ OriginLastModifiedSince(base::FilePath());
}
TEST_F(QuotaDatabaseTest, BootstrapFlag) {
base::ScopedTempDir data_dir;
ASSERT_TRUE(data_dir.CreateUniqueTempDir());
- const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db");
+ const base::FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db");
QuotaDatabase db(kDbFile);
EXPECT_FALSE(db.IsOriginDatabaseBootstrapped());
@@ -556,24 +556,24 @@ TEST_F(QuotaDatabaseTest, BootstrapFlag) {
TEST_F(QuotaDatabaseTest, RegisterInitialOriginInfo) {
base::ScopedTempDir data_dir;
ASSERT_TRUE(data_dir.CreateUniqueTempDir());
- const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db");
+ const base::FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db");
RegisterInitialOriginInfo(kDbFile);
- RegisterInitialOriginInfo(FilePath());
+ RegisterInitialOriginInfo(base::FilePath());
}
TEST_F(QuotaDatabaseTest, DumpQuotaTable) {
base::ScopedTempDir data_dir;
ASSERT_TRUE(data_dir.CreateUniqueTempDir());
- const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db");
+ const base::FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db");
DumpQuotaTable(kDbFile);
- DumpQuotaTable(FilePath());
+ DumpQuotaTable(base::FilePath());
}
TEST_F(QuotaDatabaseTest, DumpOriginInfoTable) {
base::ScopedTempDir data_dir;
ASSERT_TRUE(data_dir.CreateUniqueTempDir());
- const FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db");
+ const base::FilePath kDbFile = data_dir.path().AppendASCII("quota_manager.db");
DumpOriginInfoTable(kDbFile);
- DumpOriginInfoTable(FilePath());
+ DumpOriginInfoTable(base::FilePath());
}
} // namespace quota
diff --git a/webkit/quota/quota_manager.cc b/webkit/quota/quota_manager.cc
index 0d875f0..1801372 100644
--- a/webkit/quota/quota_manager.cc
+++ b/webkit/quota/quota_manager.cc
@@ -151,7 +151,7 @@ bool UpdateModifiedTimeOnDBThread(const GURL& origin,
return database->SetOriginLastModifiedTime(origin, type, modified_time);
}
-int64 CallSystemGetAmountOfFreeDiskSpace(const FilePath& profile_path) {
+int64 CallSystemGetAmountOfFreeDiskSpace(const base::FilePath& profile_path) {
// Ensure the profile path exists.
if(!file_util::CreateDirectory(profile_path)) {
LOG(WARNING) << "Create directory failed for path" << profile_path.value();
@@ -876,7 +876,7 @@ class QuotaManager::DumpOriginInfoTableHelper {
// QuotaManager ---------------------------------------------------------------
QuotaManager::QuotaManager(bool is_incognito,
- const FilePath& profile_path,
+ const base::FilePath& profile_path,
base::SingleThreadTaskRunner* io_thread,
base::SequencedTaskRunner* db_thread,
SpecialStoragePolicy* special_storage_policy)
@@ -1183,7 +1183,7 @@ void QuotaManager::LazyInitialize() {
}
// Use an empty path to open an in-memory only databse for incognito.
- database_.reset(new QuotaDatabase(is_incognito_ ? FilePath() :
+ database_.reset(new QuotaDatabase(is_incognito_ ? base::FilePath() :
profile_path_.AppendASCII(kDatabaseName)));
temporary_usage_tracker_.reset(
diff --git a/webkit/quota/quota_manager.h b/webkit/quota/quota_manager.h
index 62f21d2..b8d9e18 100644
--- a/webkit/quota/quota_manager.h
+++ b/webkit/quota/quota_manager.h
@@ -26,9 +26,8 @@
#include "webkit/quota/special_storage_policy.h"
#include "webkit/storage/webkit_storage_export.h"
-class FilePath;
-
namespace base {
+class FilePath;
class SequencedTaskRunner;
class SingleThreadTaskRunner;
}
@@ -106,7 +105,7 @@ class WEBKIT_STORAGE_EXPORT QuotaManager
static const int64 kNoLimit;
QuotaManager(bool is_incognito,
- const FilePath& profile_path,
+ const base::FilePath& profile_path,
base::SingleThreadTaskRunner* io_thread,
base::SequencedTaskRunner* db_thread,
SpecialStoragePolicy* special_storage_policy);
@@ -246,7 +245,7 @@ class WEBKIT_STORAGE_EXPORT QuotaManager
// Function pointer type used to store the function which returns the
// available disk space for the disk containing the given FilePath.
- typedef int64 (*GetAvailableDiskSpaceFn)(const FilePath&);
+ typedef int64 (*GetAvailableDiskSpaceFn)(const base::FilePath&);
typedef base::Callback<void(const QuotaTableEntries&)>
DumpQuotaTableCallback;
@@ -365,7 +364,7 @@ class WEBKIT_STORAGE_EXPORT QuotaManager
const base::Callback<void(bool)>& reply);
const bool is_incognito_;
- const FilePath profile_path_;
+ const base::FilePath profile_path_;
scoped_refptr<QuotaManagerProxy> proxy_;
bool db_disabled_;
diff --git a/webkit/quota/quota_manager_unittest.cc b/webkit/quota/quota_manager_unittest.cc
index 49476d0..0f800a2 100644
--- a/webkit/quota/quota_manager_unittest.cc
+++ b/webkit/quota/quota_manager_unittest.cc
@@ -35,7 +35,7 @@ const StorageType kSync = kStorageTypeSyncable;
const int kAllClients = QuotaClient::kAllClientsMask;
// Returns a deterministic value for the amount of available disk space.
-int64 GetAvailableDiskSpaceForTest(const FilePath&) {
+int64 GetAvailableDiskSpaceForTest(const base::FilePath&) {
return 13377331;
}
@@ -393,7 +393,7 @@ class QuotaManagerTest : public testing::Test {
const OriginInfoTableEntries& origin_info_entries() const {
return origin_info_entries_;
}
- FilePath profile_path() const { return data_dir_.path(); }
+ base::FilePath profile_path() const { return data_dir_.path(); }
int status_callback_count() const { return status_callback_count_; }
void reset_status_callback_count() { status_callback_count_ = 0; }
diff --git a/webkit/support/platform_support_android.cc b/webkit/support/platform_support_android.cc
index f6bf077..30effc7 100644
--- a/webkit/support/platform_support_android.cc
+++ b/webkit/support/platform_support_android.cc
@@ -36,7 +36,7 @@ void BeforeInitialize(bool unit_test_mode) {
base::InitAndroidTestPaths();
// Place cache under kDumpRenderTreeDir to allow the NRWT script to clear it.
- FilePath path(kDumpRenderTreeDir);
+ base::FilePath path(kDumpRenderTreeDir);
path = path.Append("cache");
PathService::Override(base::DIR_CACHE, path);
@@ -57,7 +57,7 @@ void BeforeInitialize(bool unit_test_mode) {
}
void AfterInitialize(bool unit_test_mode) {
- FilePath data_path(kDumpRenderTreeDir);
+ base::FilePath data_path(kDumpRenderTreeDir);
data_path = data_path.Append("DumpRenderTree.pak");
ResourceBundle::InitSharedInstanceWithPakPath(data_path);
@@ -96,13 +96,13 @@ string16 TestWebKitPlatformSupport::GetLocalizedString(int message_id) {
base::StringPiece TestWebKitPlatformSupport::GetDataResource(
int resource_id,
ui::ScaleFactor scale_factor) {
- FilePath resources_path(kDumpRenderTreeDir);
+ base::FilePath resources_path(kDumpRenderTreeDir);
resources_path = resources_path.Append("DumpRenderTree_resources");
switch (resource_id) {
case IDR_BROKENIMAGE: {
CR_DEFINE_STATIC_LOCAL(std::string, broken_image_data, ());
if (broken_image_data.empty()) {
- FilePath path = resources_path.Append("missingImage.gif");
+ base::FilePath path = resources_path.Append("missingImage.gif");
bool success = file_util::ReadFileToString(path, &broken_image_data);
if (!success)
LOG(FATAL) << "Failed reading: " << path.value();
@@ -112,7 +112,7 @@ base::StringPiece TestWebKitPlatformSupport::GetDataResource(
case IDR_TEXTAREA_RESIZER: {
CR_DEFINE_STATIC_LOCAL(std::string, resize_corner_data, ());
if (resize_corner_data.empty()) {
- FilePath path = resources_path.Append("textAreaResizeCorner.png");
+ base::FilePath path = resources_path.Append("textAreaResizeCorner.png");
bool success = file_util::ReadFileToString(path, &resize_corner_data);
if (!success)
LOG(FATAL) << "Failed reading: " << path.value();
diff --git a/webkit/support/platform_support_linux.cc b/webkit/support/platform_support_linux.cc
index fa795f9..a26c5f4 100644
--- a/webkit/support/platform_support_linux.cc
+++ b/webkit/support/platform_support_linux.cc
@@ -23,7 +23,7 @@ void BeforeInitialize(bool unit_test_mode) {
}
void AfterInitialize(bool unit_test_mode) {
- FilePath data_path;
+ base::FilePath data_path;
PathService::Get(base::DIR_EXE, &data_path);
data_path = data_path.Append("DumpRenderTree.pak");
ResourceBundle::InitSharedInstanceWithPakPath(data_path);
@@ -45,14 +45,14 @@ string16 TestWebKitPlatformSupport::GetLocalizedString(int message_id) {
base::StringPiece TestWebKitPlatformSupport::GetDataResource(
int resource_id,
ui::ScaleFactor scale_factor) {
- FilePath resources_path;
+ base::FilePath resources_path;
PathService::Get(base::DIR_EXE, &resources_path);
resources_path = resources_path.Append("DumpRenderTree_resources");
switch (resource_id) {
case IDR_BROKENIMAGE: {
CR_DEFINE_STATIC_LOCAL(std::string, broken_image_data, ());
if (broken_image_data.empty()) {
- FilePath path = resources_path.Append("missingImage.gif");
+ base::FilePath path = resources_path.Append("missingImage.gif");
bool success = file_util::ReadFileToString(path, &broken_image_data);
if (!success)
LOG(FATAL) << "Failed reading: " << path.value();
@@ -62,7 +62,7 @@ base::StringPiece TestWebKitPlatformSupport::GetDataResource(
case IDR_TEXTAREA_RESIZER: {
CR_DEFINE_STATIC_LOCAL(std::string, resize_corner_data, ());
if (resize_corner_data.empty()) {
- FilePath path = resources_path.Append("textAreaResizeCorner.png");
+ base::FilePath path = resources_path.Append("textAreaResizeCorner.png");
bool success = file_util::ReadFileToString(path, &resize_corner_data);
if (!success)
LOG(FATAL) << "Failed reading: " << path.value();
diff --git a/webkit/support/platform_support_mac.mm b/webkit/support/platform_support_mac.mm
index 9a758ec..2681cb4 100644
--- a/webkit/support/platform_support_mac.mm
+++ b/webkit/support/platform_support_mac.mm
@@ -101,7 +101,7 @@ static void SwizzleNSPasteboard() {
void AfterInitialize(bool unit_test_mode) {
// Load a data pack.
g_resource_data_pack = new ui::DataPack(ui::SCALE_FACTOR_100P);
- FilePath resources_pak_path;
+ base::FilePath resources_pak_path;
if (unit_test_mode) {
PathService::Get(base::DIR_EXE, &resources_pak_path);
resources_pak_path = resources_pak_path.Append("DumpRenderTree.app")
@@ -112,7 +112,7 @@ void AfterInitialize(bool unit_test_mode) {
NSString* resource_path =
[base::mac::FrameworkBundle() pathForResource:@"DumpRenderTree"
ofType:@"pak"];
- resources_pak_path = FilePath([resource_path fileSystemRepresentation]);
+ resources_pak_path = base::FilePath([resource_path fileSystemRepresentation]);
}
if (!g_resource_data_pack->LoadFromPath(resources_pak_path)) {
LOG(FATAL) << "failed to load DumpRenderTree.pak";
@@ -156,7 +156,7 @@ void AfterInitialize(bool unit_test_mode) {
// Add <app bundle's parent dir>/plugins to the plugin path so we can load
// test plugins.
- FilePath plugins_dir;
+ base::FilePath plugins_dir;
PathService::Get(base::DIR_EXE, &plugins_dir);
plugins_dir = plugins_dir.AppendASCII("../../../plugins");
webkit::npapi::PluginList::Singleton()->AddExtraPluginDir(plugins_dir);
@@ -202,14 +202,14 @@ string16 TestWebKitPlatformSupport::GetLocalizedString(int message_id) {
}
// Helper method for getting the path to the test shell resources directory.
-static FilePath GetResourcesFilePath() {
- FilePath path;
+static base::FilePath GetResourcesFilePath() {
+ base::FilePath path;
// We assume the application is bundled.
if (!base::mac::AmIBundled()) {
LOG(FATAL) << "Failed to locate resources. The applicaiton is not bundled.";
}
PathService::Get(base::DIR_EXE, &path);
- path = path.Append(FilePath::kParentDirectory);
+ path = path.Append(base::FilePath::kParentDirectory);
return path.AppendASCII("Resources");
}
@@ -221,7 +221,7 @@ base::StringPiece TestWebKitPlatformSupport::GetDataResource(
// Use webkit's broken image icon (16x16)
CR_DEFINE_STATIC_LOCAL(std::string, broken_image_data, ());
if (broken_image_data.empty()) {
- FilePath path = GetResourcesFilePath();
+ base::FilePath path = GetResourcesFilePath();
// In order to match WebKit's colors for the missing image, we have to
// use a PNG. The GIF doesn't have the color range needed to correctly
// match the TIFF they use in Safari.
@@ -238,7 +238,7 @@ base::StringPiece TestWebKitPlatformSupport::GetDataResource(
// Use webkit's text area resizer image.
CR_DEFINE_STATIC_LOCAL(std::string, resize_corner_data, ());
if (resize_corner_data.empty()) {
- FilePath path = GetResourcesFilePath();
+ base::FilePath path = GetResourcesFilePath();
path = path.AppendASCII("textAreaResizeCorner.png");
file_util::AbsolutePath(&path);
bool success = file_util::ReadFileToString(path, &resize_corner_data);
diff --git a/webkit/support/platform_support_win.cc b/webkit/support/platform_support_win.cc
index 249a533..f1c61b9 100644
--- a/webkit/support/platform_support_win.cc
+++ b/webkit/support/platform_support_win.cc
@@ -20,8 +20,8 @@
namespace {
-FilePath GetResourceFilePath(const char* ascii_name) {
- FilePath path;
+base::FilePath GetResourceFilePath(const char* ascii_name) {
+ base::FilePath path;
PathService::Get(base::DIR_EXE, &path);
path = path.AppendASCII("DumpRenderTree_resources");
return path.AppendASCII(ascii_name);
@@ -80,7 +80,7 @@ base::StringPiece TestWebKitPlatformSupport::GetDataResource(
// Use webkit's broken image icon (16x16)
static std::string broken_image_data;
if (broken_image_data.empty()) {
- FilePath path = GetResourceFilePath("missingImage.gif");
+ base::FilePath path = GetResourceFilePath("missingImage.gif");
bool success = file_util::ReadFileToString(path, &broken_image_data);
if (!success) {
LOG(FATAL) << "Failed reading: " << path.value();
@@ -92,7 +92,7 @@ base::StringPiece TestWebKitPlatformSupport::GetDataResource(
// Use webkit's text area resizer image.
static std::string resize_corner_data;
if (resize_corner_data.empty()) {
- FilePath path = GetResourceFilePath("textAreaResizeCorner.png");
+ base::FilePath path = GetResourceFilePath("textAreaResizeCorner.png");
bool success = file_util::ReadFileToString(path, &resize_corner_data);
if (!success) {
LOG(FATAL) << "Failed reading: " << path.value();
diff --git a/webkit/support/simple_database_system.cc b/webkit/support/simple_database_system.cc
index c8b5a02..88e088c 100644
--- a/webkit/support/simple_database_system.cc
+++ b/webkit/support/simple_database_system.cc
@@ -221,7 +221,7 @@ void SimpleDatabaseSystem::VfsOpenFile(
const string16& vfs_file_name, int desired_flags,
base::PlatformFile* file_handle, base::WaitableEvent* done_event ) {
DCHECK(db_thread_proxy_->BelongsToCurrentThread());
- FilePath file_name = GetFullFilePathForVfsFile(vfs_file_name);
+ base::FilePath file_name = GetFullFilePathForVfsFile(vfs_file_name);
if (file_name.empty()) {
VfsBackend::OpenTempFileInDirectory(
db_tracker_->DatabaseDirectory(), desired_flags, file_handle);
@@ -241,7 +241,7 @@ void SimpleDatabaseSystem::VfsDeleteFile(
const int kNumDeleteRetries = 3;
int num_retries = 0;
*result = SQLITE_OK;
- FilePath file_name = GetFullFilePathForVfsFile(vfs_file_name);
+ base::FilePath file_name = GetFullFilePathForVfsFile(vfs_file_name);
do {
*result = VfsBackend::DeleteFile(file_name, sync_dir);
} while ((++num_retries < kNumDeleteRetries) &&
@@ -287,11 +287,11 @@ void SimpleDatabaseSystem::VfsGetSpaceAvailable(
done_event->Signal();
}
-FilePath SimpleDatabaseSystem::GetFullFilePathForVfsFile(
+base::FilePath SimpleDatabaseSystem::GetFullFilePathForVfsFile(
const string16& vfs_file_name) {
DCHECK(db_thread_proxy_->BelongsToCurrentThread());
if (vfs_file_name.empty()) // temp file, used for vacuuming
- return FilePath();
+ return base::FilePath();
return DatabaseUtil::GetFullFilePathForVfsFile(
db_tracker_.get(), vfs_file_name);
}
diff --git a/webkit/support/simple_database_system.h b/webkit/support/simple_database_system.h
index bd92fc2..3fef6f8f 100644
--- a/webkit/support/simple_database_system.h
+++ b/webkit/support/simple_database_system.h
@@ -80,7 +80,7 @@ class SimpleDatabaseSystem : public webkit_database::DatabaseTracker::Observer,
void VfsGetSpaceAvailable(const string16& origin_identifier,
int64* result, base::WaitableEvent* done_event);
- FilePath GetFullFilePathForVfsFile(const string16& vfs_file_name);
+ base::FilePath GetFullFilePathForVfsFile(const string16& vfs_file_name);
void ResetTracker();
void ThreadCleanup(base::WaitableEvent* done_event);
diff --git a/webkit/support/test_webkit_platform_support.cc b/webkit/support/test_webkit_platform_support.cc
index a6cf5a9..750b32b 100644
--- a/webkit/support/test_webkit_platform_support.cc
+++ b/webkit/support/test_webkit_platform_support.cc
@@ -92,7 +92,7 @@ TestWebKitPlatformSupport::TestWebKitPlatformSupport(bool unit_test_mode,
// Load libraries for media and enable the media player.
bool enable_media = false;
- FilePath module_path;
+ base::FilePath module_path;
if (PathService::Get(base::DIR_MODULE, &module_path)) {
#if defined(OS_MACOSX)
if (base::mac::AmIBundled())
@@ -141,7 +141,7 @@ TestWebKitPlatformSupport::TestWebKitPlatformSupport(bool unit_test_mode,
// Initializing with a default context, which means no on-disk cookie DB,
// and no support for directory listings.
- SimpleResourceLoaderBridge::Init(FilePath(), cache_mode, true);
+ SimpleResourceLoaderBridge::Init(base::FilePath(), cache_mode, true);
// Test shell always exposes the GC.
webkit_glue::SetJavaScriptFlags(" --expose-gc");
@@ -483,7 +483,7 @@ void TestWebKitPlatformSupport::GetPlugins(
webkit::npapi::PluginList::Singleton()->GetPlugins(plugins);
// Don't load the forked npapi_layout_test_plugin in DRT, we only want to
// use the upstream version TestNetscapePlugIn.
- const FilePath::StringType kPluginBlackList[] = {
+ const base::FilePath::StringType kPluginBlackList[] = {
FILE_PATH_LITERAL("npapi_layout_test_plugin.dll"),
FILE_PATH_LITERAL("WebKitTestNetscapePlugIn.plugin"),
FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"),
@@ -491,7 +491,7 @@ void TestWebKitPlatformSupport::GetPlugins(
for (int i = plugins->size() - 1; i >= 0; --i) {
webkit::WebPluginInfo plugin_info = plugins->at(i);
for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) {
- if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) {
+ if (plugin_info.path.BaseName() == base::FilePath(kPluginBlackList[j])) {
plugins->erase(plugins->begin() + i);
}
}
@@ -546,7 +546,7 @@ size_t TestWebKitPlatformSupport::computeLastHyphenLocation(
if (!hyphen_dictionary_) {
// Initialize the hyphen library with a sample dictionary. To avoid test
// flakiness, this code synchronously loads the dictionary.
- FilePath path = webkit_support::GetChromiumRootDirFilePath();
+ base::FilePath path = webkit_support::GetChromiumRootDirFilePath();
path = path.Append(FILE_PATH_LITERAL("third_party/hyphen/hyph_en_US.dic"));
std::string dictionary;
if (!file_util::ReadFileToString(path, &dictionary))
diff --git a/webkit/support/test_webkit_platform_support.h b/webkit/support/test_webkit_platform_support.h
index 6e2dc6e..ec43ce5 100644
--- a/webkit/support/test_webkit_platform_support.h
+++ b/webkit/support/test_webkit_platform_support.h
@@ -90,7 +90,7 @@ class TestWebKitPlatformSupport :
return &url_loader_factory_;
}
- const FilePath& file_system_root() const {
+ const base::FilePath& file_system_root() const {
return file_system_root_.path();
}
diff --git a/webkit/support/test_webplugin_page_delegate.cc b/webkit/support/test_webplugin_page_delegate.cc
index 36ac1d8..99686f1 100644
--- a/webkit/support/test_webplugin_page_delegate.cc
+++ b/webkit/support/test_webplugin_page_delegate.cc
@@ -11,13 +11,13 @@ namespace webkit_support {
webkit::npapi::WebPluginDelegate*
TestWebPluginPageDelegate::CreatePluginDelegate(
- const FilePath& file_path,
+ const base::FilePath& file_path,
const std::string& mime_type) {
return webkit::npapi::WebPluginDelegateImpl::Create(file_path, mime_type);
}
WebKit::WebPlugin* TestWebPluginPageDelegate::CreatePluginReplacement(
- const FilePath& file_path) {
+ const base::FilePath& file_path) {
return NULL;
}
diff --git a/webkit/support/test_webplugin_page_delegate.h b/webkit/support/test_webplugin_page_delegate.h
index 3949af7..b861a05 100644
--- a/webkit/support/test_webplugin_page_delegate.h
+++ b/webkit/support/test_webplugin_page_delegate.h
@@ -18,10 +18,10 @@ class TestWebPluginPageDelegate : public webkit::npapi::WebPluginPageDelegate {
virtual ~TestWebPluginPageDelegate() {}
virtual webkit::npapi::WebPluginDelegate* CreatePluginDelegate(
- const FilePath& file_path,
+ const base::FilePath& file_path,
const std::string& mime_type) OVERRIDE;
virtual WebKit::WebPlugin* CreatePluginReplacement(
- const FilePath& file_path) OVERRIDE;
+ const base::FilePath& file_path) OVERRIDE;
virtual void CreatedPluginWindow(gfx::PluginWindowHandle handle) OVERRIDE {}
virtual void WillDestroyPluginWindow(
gfx::PluginWindowHandle handle) OVERRIDE {}
diff --git a/webkit/support/webkit_support.cc b/webkit/support/webkit_support.cc
index 9e376272..66b9831 100644
--- a/webkit/support/webkit_support.cc
+++ b/webkit/support/webkit_support.cc
@@ -123,7 +123,7 @@ void InitLogging() {
// On Android we expect the log to appear in logcat.
base::InitAndroidTestLogging();
#else
- FilePath log_filename;
+ base::FilePath log_filename;
PathService::Get(base::DIR_EXE, &log_filename);
log_filename = log_filename.AppendASCII("DumpRenderTree.log");
logging::InitLogging(
@@ -215,11 +215,11 @@ class TestEnvironment {
// in SetCurrentDirectoryForFileURL() and GetAbsoluteWebStringFromUTF8Path(),
// as the directory might not exist on the device because we are using
// file-over-http bridge.
- void set_mock_current_directory(const FilePath& directory) {
+ void set_mock_current_directory(const base::FilePath& directory) {
mock_current_directory_ = directory;
}
- FilePath mock_current_directory() const {
+ base::FilePath mock_current_directory() const {
return mock_current_directory_;
}
@@ -240,7 +240,7 @@ class TestEnvironment {
scoped_ptr<TestWebKitPlatformSupport> webkit_platform_support_;
#if defined(OS_ANDROID)
- FilePath mock_current_directory_;
+ base::FilePath mock_current_directory_;
scoped_ptr<webkit_media::WebMediaPlayerManagerAndroid> media_player_manager_;
scoped_ptr<webkit_media::MediaPlayerBridgeManagerImpl> media_bridge_manager_;
#endif
@@ -253,7 +253,7 @@ class WebPluginImplWithPageDelegate
public:
WebPluginImplWithPageDelegate(WebFrame* frame,
const WebPluginParams& params,
- const FilePath& path)
+ const base::FilePath& path)
: webkit_support::TestWebPluginPageDelegate(),
webkit::npapi::WebPluginImpl(frame, params, path, AsWeakPtr()) {}
virtual ~WebPluginImplWithPageDelegate() {}
@@ -261,8 +261,8 @@ class WebPluginImplWithPageDelegate
DISALLOW_COPY_AND_ASSIGN(WebPluginImplWithPageDelegate);
};
-FilePath GetWebKitRootDirFilePath() {
- FilePath basePath;
+base::FilePath GetWebKitRootDirFilePath() {
+ base::FilePath basePath;
PathService::Get(base::DIR_SOURCE_ROOT, &basePath);
if (file_util::PathExists(
basePath.Append(FILE_PATH_LITERAL("third_party/WebKit")))) {
@@ -353,8 +353,8 @@ void SetUpTestEnvironmentImpl(bool unit_test_mode,
namespace webkit_support {
-FilePath GetChromiumRootDirFilePath() {
- FilePath basePath;
+base::FilePath GetChromiumRootDirFilePath() {
+ base::FilePath basePath;
PathService::Get(base::DIR_SOURCE_ROOT, &basePath);
if (file_util::PathExists(
basePath.Append(FILE_PATH_LITERAL("third_party/WebKit")))) {
@@ -480,7 +480,7 @@ WebKit::WebStorageNamespace* CreateSessionStorageNamespace(unsigned quota) {
}
WebKit::WebString GetWebKitRootDir() {
- FilePath path = GetWebKitRootDirFilePath();
+ base::FilePath path = GetWebKitRootDirFilePath();
std::string path_ascii = path.MaybeAsASCII();
CHECK(!path_ascii.empty());
return WebKit::WebString::fromUTF8(path_ascii.c_str());
@@ -619,11 +619,11 @@ void PostDelayedTask(TaskAdaptor* task, int64 delay_ms) {
WebString GetAbsoluteWebStringFromUTF8Path(const std::string& utf8_path) {
#if defined(OS_WIN)
- FilePath path(UTF8ToWide(utf8_path));
+ base::FilePath path(UTF8ToWide(utf8_path));
file_util::AbsolutePath(&path);
return WebString(path.value());
#else
- FilePath path(base::SysWideToNativeMB(base::SysUTF8ToWide(utf8_path)));
+ base::FilePath path(base::SysWideToNativeMB(base::SysUTF8ToWide(utf8_path)));
#if defined(OS_ANDROID)
if (WebKit::layoutTestMode()) {
// See comment of TestEnvironment::set_mock_current_directory().
@@ -655,9 +655,9 @@ WebURL CreateURLForPathOrURL(const std::string& path_or_url_in_nativemb) {
if (url.is_valid() && url.has_scheme())
return WebURL(url);
#if defined(OS_WIN)
- FilePath path(wide_path_or_url);
+ base::FilePath path(wide_path_or_url);
#else
- FilePath path(path_or_url_in_nativemb);
+ base::FilePath path(path_or_url_in_nativemb);
#endif
file_util::AbsolutePath(&path);
return net::FilePathToFileURL(path);
@@ -670,7 +670,7 @@ WebURL RewriteLayoutTestsURL(const std::string& utf8_url) {
if (utf8_url.compare(0, kPrefixLen, kPrefix, kPrefixLen))
return WebURL(GURL(utf8_url));
- FilePath replacePath =
+ base::FilePath replacePath =
GetWebKitRootDirFilePath().Append(FILE_PATH_LITERAL("LayoutTests/"));
// On Android, the file is actually accessed through file-over-http. Disable
@@ -692,14 +692,14 @@ WebURL RewriteLayoutTestsURL(const std::string& utf8_url) {
}
bool SetCurrentDirectoryForFileURL(const WebKit::WebURL& fileUrl) {
- FilePath local_path;
+ base::FilePath local_path;
if (!net::FileURLToFilePath(fileUrl, &local_path))
return false;
#if defined(OS_ANDROID)
if (WebKit::layoutTestMode()) {
// See comment of TestEnvironment::set_mock_current_directory().
DCHECK(test_environment);
- FilePath directory = local_path.DirName();
+ base::FilePath directory = local_path.DirName();
test_environment->set_mock_current_directory(directory);
// Still try to actually change the directory, but ignore any error.
// For a few tests that need to access resources directly as files
@@ -712,7 +712,7 @@ bool SetCurrentDirectoryForFileURL(const WebKit::WebURL& fileUrl) {
}
WebURL LocalFileToDataURL(const WebURL& fileUrl) {
- FilePath local_path;
+ base::FilePath local_path;
if (!net::FileURLToFilePath(fileUrl, &local_path))
return WebURL();
@@ -834,7 +834,7 @@ WebKit::WebThemeEngine* GetThemeEngine() {
// DevTools frontend path for inspector LayoutTests.
WebURL GetDevToolsPathAsURL() {
- FilePath dirExe;
+ base::FilePath dirExe;
if (!PathService::Get(base::DIR_EXE, &dirExe)) {
DCHECK(false);
return WebURL();
@@ -842,7 +842,7 @@ WebURL GetDevToolsPathAsURL() {
#if defined(OS_MACOSX)
dirExe = dirExe.AppendASCII("../../..");
#endif
- FilePath devToolsPath = dirExe.AppendASCII(
+ base::FilePath devToolsPath = dirExe.AppendASCII(
"resources/inspector/devtools.html");
return net::FilePathToFileURL(devToolsPath);
}
@@ -866,7 +866,7 @@ WebKit::WebString RegisterIsolatedFileSystem(
const WebKit::WebVector<WebKit::WebString>& filenames) {
fileapi::IsolatedContext::FileInfoSet files;
for (size_t i = 0; i < filenames.size(); ++i) {
- FilePath path = webkit_base::WebStringToFilePath(filenames[i]);
+ base::FilePath path = webkit_base::WebStringToFilePath(filenames[i]);
files.AddPath(path, NULL);
}
std::string filesystemId =
diff --git a/webkit/support/webkit_support.h b/webkit/support/webkit_support.h
index 3120d0b..5ff2558 100644
--- a/webkit/support/webkit_support.h
+++ b/webkit/support/webkit_support.h
@@ -17,7 +17,9 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgentClient.h"
#include "ui/base/keycodes/keyboard_codes.h"
+namespace base {
class FilePath;
+}
namespace WebKit {
class WebApplicationCacheHost;
@@ -56,7 +58,7 @@ namespace webkit_support {
// webkit-in-chromium build, this is the root directory of the checkout. In a
// standalone webkit build, it is Source/WebKit/chromium relative from the
// checkout's root directory.
-FilePath GetChromiumRootDirFilePath();
+base::FilePath GetChromiumRootDirFilePath();
// Initializes or terminates a test environment.
// |unit_test_mode| should be set to true when running in a TestSuite, in which
diff --git a/webkit/support/weburl_loader_mock_factory.cc b/webkit/support/weburl_loader_mock_factory.cc
index 43b15e4..11da208 100644
--- a/webkit/support/weburl_loader_mock_factory.cc
+++ b/webkit/support/weburl_loader_mock_factory.cc
@@ -25,7 +25,7 @@ using WebKit::WebURLResponse;
struct WebURLLoaderMockFactory::ResponseInfo {
WebKit::WebURLResponse response;
- FilePath file_path;
+ base::FilePath file_path;
};
WebURLLoaderMockFactory::WebURLLoaderMockFactory() {}
@@ -41,10 +41,10 @@ void WebURLLoaderMockFactory::RegisterURL(const WebURL& url,
#if defined(OS_POSIX)
// TODO(jcivelli): On Linux, UTF8 might not be correct.
response_info.file_path =
- FilePath(static_cast<std::string>(file_path.utf8()));
+ base::FilePath(static_cast<std::string>(file_path.utf8()));
#elif defined(OS_WIN)
response_info.file_path =
- FilePath(std::wstring(file_path.data(), file_path.length()));
+ base::FilePath(std::wstring(file_path.data(), file_path.length()));
#endif
DCHECK(file_util::PathExists(response_info.file_path))
<< response_info.file_path.MaybeAsASCII() << " does not exist.";
@@ -176,7 +176,7 @@ bool WebURLLoaderMockFactory::IsPending(WebURLLoaderMock* loader) {
}
// static
-bool WebURLLoaderMockFactory::ReadFile(const FilePath& file_path,
+bool WebURLLoaderMockFactory::ReadFile(const base::FilePath& file_path,
WebData* data) {
int64 file_size = 0;
if (!file_util::GetFileSize(file_path, &file_size))
diff --git a/webkit/support/weburl_loader_mock_factory.h b/webkit/support/weburl_loader_mock_factory.h
index 310dbbc..85fe0cc0 100644
--- a/webkit/support/weburl_loader_mock_factory.h
+++ b/webkit/support/weburl_loader_mock_factory.h
@@ -89,7 +89,7 @@ class WebURLLoaderMockFactory {
// Reads |m_filePath| and puts its content in |data|.
// Returns true if it successfully read the file.
- static bool ReadFile(const FilePath& file_path, WebKit::WebData* data);
+ static bool ReadFile(const base::FilePath& file_path, WebKit::WebData* data);
// The loaders that have not being served data yet.
typedef std::map<WebURLLoaderMock*, WebKit::WebURLRequest> LoaderToRequestMap;
diff --git a/webkit/tools/test_shell/image_decoder_unittest.cc b/webkit/tools/test_shell/image_decoder_unittest.cc
index 849d1b2..0458af2 100644
--- a/webkit/tools/test_shell/image_decoder_unittest.cc
+++ b/webkit/tools/test_shell/image_decoder_unittest.cc
@@ -23,7 +23,7 @@ const int kFirstFrameIndex = 0;
// Determine if we should test with file specified by |path| based
// on |file_selection| and the |threshold| for the file size.
-bool ShouldSkipFile(const FilePath& path,
+bool ShouldSkipFile(const base::FilePath& path,
ImageDecoderTestFileSelection file_selection,
const int64 threshold) {
if (file_selection == TEST_ALL)
@@ -36,21 +36,21 @@ bool ShouldSkipFile(const FilePath& path,
} // namespace
-void ReadFileToVector(const FilePath& path, std::vector<char>* contents) {
+void ReadFileToVector(const base::FilePath& path, std::vector<char>* contents) {
std::string raw_image_data;
file_util::ReadFileToString(path, &raw_image_data);
contents->resize(raw_image_data.size());
memcpy(&contents->at(0), raw_image_data.data(), raw_image_data.size());
}
-FilePath GetMD5SumPath(const FilePath& path) {
- static const FilePath::StringType kDecodedDataExtension(
+base::FilePath GetMD5SumPath(const base::FilePath& path) {
+ static const base::FilePath::StringType kDecodedDataExtension(
FILE_PATH_LITERAL(".md5sum"));
- return FilePath(path.value() + kDecodedDataExtension);
+ return base::FilePath(path.value() + kDecodedDataExtension);
}
#if defined(CALCULATE_MD5_SUMS)
-void SaveMD5Sum(const FilePath& path, const WebKit::WebImage& web_image) {
+void SaveMD5Sum(const base::FilePath& path, const WebKit::WebImage& web_image) {
// Calculate MD5 sum.
base::MD5Digest digest;
web_image.getSkBitmap().lockPixels();
@@ -69,8 +69,8 @@ void SaveMD5Sum(const FilePath& path, const WebKit::WebImage& web_image) {
#if !defined(CALCULATE_MD5_SUMS)
void VerifyImage(const WebKit::WebImageDecoder& decoder,
- const FilePath& path,
- const FilePath& md5_sum_path,
+ const base::FilePath& path,
+ const base::FilePath& md5_sum_path,
size_t frame_index) {
// Make sure decoding can complete successfully.
EXPECT_TRUE(decoder.isSizeAvailable()) << path.value();
@@ -103,7 +103,7 @@ void VerifyImage(const WebKit::WebImageDecoder& decoder,
#endif
void ImageDecoderTest::SetUp() {
- FilePath data_dir;
+ base::FilePath data_dir;
ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &data_dir));
data_dir_ = data_dir.AppendASCII("webkit").
AppendASCII("data").
@@ -111,17 +111,17 @@ void ImageDecoderTest::SetUp() {
ASSERT_TRUE(file_util::PathExists(data_dir_)) << data_dir_.value();
}
-std::vector<FilePath> ImageDecoderTest::GetImageFiles() const {
+std::vector<base::FilePath> ImageDecoderTest::GetImageFiles() const {
std::string pattern = "*." + format_;
file_util::FileEnumerator enumerator(data_dir_,
false,
file_util::FileEnumerator::FILES);
- std::vector<FilePath> image_files;
- FilePath next_file_name;
+ std::vector<base::FilePath> image_files;
+ base::FilePath next_file_name;
while (!(next_file_name = enumerator.Next()).empty()) {
- FilePath base_name = next_file_name.BaseName();
+ base::FilePath base_name = next_file_name.BaseName();
#if defined(OS_WIN)
std::string base_name_ascii = WideToASCII(base_name.value());
#else
@@ -135,8 +135,8 @@ std::vector<FilePath> ImageDecoderTest::GetImageFiles() const {
return image_files;
}
-bool ImageDecoderTest::ShouldImageFail(const FilePath& path) const {
- static const FilePath::StringType kBadSuffix(FILE_PATH_LITERAL(".bad."));
+bool ImageDecoderTest::ShouldImageFail(const base::FilePath& path) const {
+ static const base::FilePath::StringType kBadSuffix(FILE_PATH_LITERAL(".bad."));
return (path.value().length() > (kBadSuffix.length() + format_.length()) &&
!path.value().compare(path.value().length() - format_.length() -
kBadSuffix.length(),
@@ -146,18 +146,18 @@ bool ImageDecoderTest::ShouldImageFail(const FilePath& path) const {
void ImageDecoderTest::TestDecoding(
ImageDecoderTestFileSelection file_selection,
const int64 threshold) {
- const std::vector<FilePath> image_files(GetImageFiles());
- for (std::vector<FilePath>::const_iterator i = image_files.begin();
+ const std::vector<base::FilePath> image_files(GetImageFiles());
+ for (std::vector<base::FilePath>::const_iterator i = image_files.begin();
i != image_files.end(); ++i) {
if (ShouldSkipFile(*i, file_selection, threshold))
continue;
- const FilePath md5_sum_path(GetMD5SumPath(*i));
+ const base::FilePath md5_sum_path(GetMD5SumPath(*i));
TestWebKitImageDecoder(*i, md5_sum_path, kFirstFrameIndex);
}
}
-void ImageDecoderTest::TestWebKitImageDecoder(const FilePath& image_path,
- const FilePath& md5_sum_path, int desired_frame_index) const {
+void ImageDecoderTest::TestWebKitImageDecoder(const base::FilePath& image_path,
+ const base::FilePath& md5_sum_path, int desired_frame_index) const {
bool should_test_chunking = true;
bool should_test_failed_images = true;
#ifdef CALCULATE_MD5_SUMS
diff --git a/webkit/tools/test_shell/image_decoder_unittest.h b/webkit/tools/test_shell/image_decoder_unittest.h
index d9bff21..85b88c2 100644
--- a/webkit/tools/test_shell/image_decoder_unittest.h
+++ b/webkit/tools/test_shell/image_decoder_unittest.h
@@ -37,7 +37,7 @@ enum ImageDecoderTestFileSelection {
};
// Returns the path the decoded data is saved at.
-FilePath GetMD5SumPath(const FilePath& path);
+base::FilePath GetMD5SumPath(const base::FilePath& path);
class ImageDecoderTest : public testing::Test {
public:
@@ -47,16 +47,16 @@ class ImageDecoderTest : public testing::Test {
virtual void SetUp() OVERRIDE;
// Returns the vector of image files for testing.
- std::vector<FilePath> GetImageFiles() const;
+ std::vector<base::FilePath> GetImageFiles() const;
// Returns true if the image is bogus and should not be successfully decoded.
- bool ShouldImageFail(const FilePath& path) const;
+ bool ShouldImageFail(const base::FilePath& path) const;
// Tests if decoder decodes image at image_path with underlying frame at
// index desired_frame_index. The md5_sum_path is needed if the test is not
// asked to generate one i.e. if # #define CALCULATE_MD5_SUMS is set.
- void TestWebKitImageDecoder(const FilePath& image_path,
- const FilePath& md5_sum_path, int desired_frame_index) const;
+ void TestWebKitImageDecoder(const base::FilePath& image_path,
+ const base::FilePath& md5_sum_path, int desired_frame_index) const;
// Verifies each of the test image files is decoded correctly and matches the
// expected state. |file_selection| and |threshold| can be used to select
@@ -77,7 +77,7 @@ class ImageDecoderTest : public testing::Test {
protected:
// Path to the test files.
- FilePath data_dir_;
+ base::FilePath data_dir_;
private:
DISALLOW_COPY_AND_ASSIGN(ImageDecoderTest);
diff --git a/webkit/tools/test_shell/plugin_tests.cc b/webkit/tools/test_shell/plugin_tests.cc
index 8a4dbda..ec352b4 100644
--- a/webkit/tools/test_shell/plugin_tests.cc
+++ b/webkit/tools/test_shell/plugin_tests.cc
@@ -42,7 +42,7 @@ const char kPluginsDir[] = "plugins";
class PluginTest : public TestShellTest {
public:
PluginTest() {
- FilePath executable_directory;
+ base::FilePath executable_directory;
PathService::Get(base::DIR_EXE, &executable_directory);
plugin_src_ = executable_directory.AppendASCII(TEST_PLUGIN_NAME);
CHECK(file_util::PathExists(plugin_src_));
@@ -69,8 +69,8 @@ class PluginTest : public TestShellTest {
TestShellTest::SetUp();
}
- FilePath plugin_src_;
- FilePath plugin_file_path_;
+ base::FilePath plugin_src_;
+ base::FilePath plugin_file_path_;
};
// Tests navigator.plugins.refresh() works.
@@ -126,7 +126,7 @@ TEST_F(PluginTest, Refresh) {
// Tests that if a frame is deleted as a result of calling NPP_HandleEvent, we
// don't crash.
TEST_F(PluginTest, DeleteFrameDuringEvent) {
- FilePath test_html = data_dir_;
+ base::FilePath test_html = data_dir_;
test_html = test_html.AppendASCII(kPluginsDir);
test_html = test_html.AppendASCII("delete_frame.html");
test_shell_->LoadFile(test_html);
@@ -144,7 +144,7 @@ TEST_F(PluginTest, DeleteFrameDuringEvent) {
// Tests that a forced reload of the plugin will not crash.
TEST_F(PluginTest, ForceReload) {
- FilePath test_html = data_dir_;
+ base::FilePath test_html = data_dir_;
test_html = test_html.AppendASCII(kPluginsDir);
test_html = test_html.AppendASCII("force_reload.html");
test_shell_->LoadFile(test_html);
@@ -174,7 +174,7 @@ BOOL CALLBACK EnumChildProc(HWND hwnd, LPARAM lparam) {
#endif
TEST_F(PluginTest, MAYBE_PluginVisibilty) {
- FilePath test_html = data_dir_;
+ base::FilePath test_html = data_dir_;
test_html = test_html.AppendASCII(kPluginsDir);
test_html = test_html.AppendASCII("plugin_visibility.html");
test_shell_->LoadFile(test_html);
diff --git a/webkit/tools/test_shell/run_all_tests.cc b/webkit/tools/test_shell/run_all_tests.cc
index 19d1a30..9b3ec46 100644
--- a/webkit/tools/test_shell/run_all_tests.cc
+++ b/webkit/tools/test_shell/run_all_tests.cc
@@ -43,7 +43,7 @@ class TestShellTestSuite : public base::TestSuite {
virtual void Initialize() {
// Override DIR_EXE early in case anything in base::TestSuite uses it.
#if defined(OS_MACOSX)
- FilePath path;
+ base::FilePath path;
PathService::Get(base::DIR_EXE, &path);
path = path.AppendASCII("TestShell.app");
base::mac::SetOverrideFrameworkBundlePath(path);
diff --git a/webkit/tools/test_shell/simple_appcache_system.cc b/webkit/tools/test_shell/simple_appcache_system.cc
index 6c066db..8503672 100644
--- a/webkit/tools/test_shell/simple_appcache_system.cc
+++ b/webkit/tools/test_shell/simple_appcache_system.cc
@@ -387,7 +387,7 @@ SimpleAppCacheSystem::~SimpleAppCacheSystem() {
}
}
-void SimpleAppCacheSystem::InitOnUIThread(const FilePath& cache_directory) {
+void SimpleAppCacheSystem::InitOnUIThread(const base::FilePath& cache_directory) {
DCHECK(!ui_message_loop_);
ui_message_loop_ = MessageLoop::current();
cache_directory_ = cache_directory;
diff --git a/webkit/tools/test_shell/simple_appcache_system.h b/webkit/tools/test_shell/simple_appcache_system.h
index 2975268a..7371913 100644
--- a/webkit/tools/test_shell/simple_appcache_system.h
+++ b/webkit/tools/test_shell/simple_appcache_system.h
@@ -38,7 +38,7 @@ class SimpleAppCacheSystem {
virtual ~SimpleAppCacheSystem();
// One-time main UI thread initialization.
- static void InitializeOnUIThread(const FilePath& cache_directory) {
+ static void InitializeOnUIThread(const base::FilePath& cache_directory) {
if (instance_)
instance_->InitOnUIThread(cache_directory);
}
@@ -85,7 +85,7 @@ class SimpleAppCacheSystem {
friend class SimpleFrontendProxy;
// Instance methods called by our static public methods
- void InitOnUIThread(const FilePath& cache_directory);
+ void InitOnUIThread(const base::FilePath& cache_directory);
void InitOnIOThread(net::URLRequestContext* request_context);
void CleanupIOThread();
WebKit::WebApplicationCacheHost* CreateCacheHostForWebKit(
@@ -109,7 +109,7 @@ class SimpleAppCacheSystem {
return ui_message_loop_ ? true : false;
}
- FilePath cache_directory_;
+ base::FilePath cache_directory_;
MessageLoop* io_message_loop_;
MessageLoop* ui_message_loop_;
scoped_refptr<SimpleBackendProxy> backend_proxy_;
diff --git a/webkit/tools/test_shell/simple_file_system.cc b/webkit/tools/test_shell/simple_file_system.cc
index f665541..87aabf4 100644
--- a/webkit/tools/test_shell/simple_file_system.cc
+++ b/webkit/tools/test_shell/simple_file_system.cc
@@ -54,10 +54,10 @@ namespace {
MessageLoop* g_io_thread;
webkit_blob::BlobStorageController* g_blob_storage_controller;
-void RegisterBlob(const GURL& blob_url, const FilePath& file_path) {
+void RegisterBlob(const GURL& blob_url, const base::FilePath& file_path) {
DCHECK(g_blob_storage_controller);
- FilePath::StringType extension = file_path.Extension();
+ base::FilePath::StringType extension = file_path.Extension();
if (!extension.empty())
extension = extension.substr(1); // Strip leading ".".
@@ -324,7 +324,7 @@ void SimpleFileSystem::DidFinish(WebFileSystemCallbacks* callbacks,
void SimpleFileSystem::DidGetMetadata(WebFileSystemCallbacks* callbacks,
base::PlatformFileError result,
const base::PlatformFileInfo& info,
- const FilePath& platform_path) {
+ const base::FilePath& platform_path) {
if (result == base::PLATFORM_FILE_OK) {
WebFileInfo web_file_info;
web_file_info.length = info.size;
@@ -388,7 +388,7 @@ void SimpleFileSystem::DidCreateSnapshotFile(
WebFileSystemCallbacks* callbacks,
base::PlatformFileError result,
const base::PlatformFileInfo& info,
- const FilePath& platform_path,
+ const base::FilePath& platform_path,
const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref) {
DCHECK(g_io_thread);
if (result == base::PLATFORM_FILE_OK) {
diff --git a/webkit/tools/test_shell/simple_file_system.h b/webkit/tools/test_shell/simple_file_system.h
index 7d55a9f..099aeba 100644
--- a/webkit/tools/test_shell/simple_file_system.h
+++ b/webkit/tools/test_shell/simple_file_system.h
@@ -128,7 +128,7 @@ class SimpleFileSystem
void DidGetMetadata(WebKit::WebFileSystemCallbacks* callbacks,
base::PlatformFileError result,
const base::PlatformFileInfo& info,
- const FilePath& platform_path);
+ const base::FilePath& platform_path);
void DidReadDirectory(
WebKit::WebFileSystemCallbacks* callbacks,
base::PlatformFileError result,
@@ -144,7 +144,7 @@ class SimpleFileSystem
WebKit::WebFileSystemCallbacks* callbacks,
base::PlatformFileError result,
const base::PlatformFileInfo& info,
- const FilePath& platform_path,
+ const base::FilePath& platform_path,
const scoped_refptr<webkit_blob::ShareableFileReference>& file_ref);
// A temporary directory for FileSystem API.
diff --git a/webkit/tools/test_shell/simple_resource_loader_bridge.cc b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
index 02aaf80..743ba26 100644
--- a/webkit/tools/test_shell/simple_resource_loader_bridge.cc
+++ b/webkit/tools/test_shell/simple_resource_loader_bridge.cc
@@ -93,14 +93,14 @@ namespace {
struct TestShellRequestContextParams {
TestShellRequestContextParams(
- const FilePath& in_cache_path,
+ const base::FilePath& in_cache_path,
net::HttpCache::Mode in_cache_mode,
bool in_no_proxy)
: cache_path(in_cache_path),
cache_mode(in_cache_mode),
no_proxy(in_no_proxy) {}
- FilePath cache_path;
+ base::FilePath cache_path;
net::HttpCache::Mode cache_mode;
bool no_proxy;
};
@@ -177,7 +177,7 @@ class TestShellNetworkDelegate : public net::NetworkDelegate {
return rv == net::OK;
}
virtual bool OnCanAccessFile(const net::URLRequest& request,
- const FilePath& path) const OVERRIDE {
+ const base::FilePath& path) const OVERRIDE {
return true;
}
virtual bool OnCanThrottleRequest(
@@ -475,7 +475,7 @@ class RequestProxy
download_to_file_ = params->download_to_file;
if (download_to_file_) {
- FilePath path;
+ base::FilePath path;
if (file_util::CreateTemporaryFile(&path)) {
downloaded_file_ = ShareableFileReference::GetOrCreate(
path, ShareableFileReference::DELETE_ON_FINAL_RELEASE,
@@ -755,7 +755,7 @@ class RequestProxy
// Get the File URL.
original_request.replace(0, http_prefix.size(), file_url_prefix_);
- FilePath file_path;
+ base::FilePath file_path;
if (!net::FileURLToFilePath(GURL(original_request), &file_path)) {
NOTREACHED();
}
@@ -1027,7 +1027,7 @@ class CookieGetter : public base::RefCountedThreadSafe<CookieGetter> {
// static
void SimpleResourceLoaderBridge::Init(
- const FilePath& cache_path,
+ const base::FilePath& cache_path,
net::HttpCache::Mode cache_mode,
bool no_proxy) {
// Make sure to stop any existing IO thread since it may be using the
diff --git a/webkit/tools/test_shell/simple_resource_loader_bridge.h b/webkit/tools/test_shell/simple_resource_loader_bridge.h
index 6d1c63a..35d38b5 100644
--- a/webkit/tools/test_shell/simple_resource_loader_bridge.h
+++ b/webkit/tools/test_shell/simple_resource_loader_bridge.h
@@ -10,9 +10,12 @@
#include "net/http/http_cache.h"
#include "webkit/glue/resource_loader_bridge.h"
-class FilePath;
class GURL;
+namespace base {
+class FilePath;
+}
+
class SimpleResourceLoaderBridge {
public:
// Call this function to initialize the simple resource loader bridge.
@@ -21,7 +24,7 @@ class SimpleResourceLoaderBridge {
// NOTE: If this function is not called, then a default request context will
// be initialized lazily.
//
- static void Init(const FilePath& cache_path,
+ static void Init(const base::FilePath& cache_path,
net::HttpCache::Mode cache_mode,
bool no_proxy);
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index 763495ea..677dc42 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -88,7 +88,7 @@ class URLRequestTestShellFileJob : public net::URLRequestFileJob {
net::URLRequest* request,
net::NetworkDelegate* network_delegate,
const std::string& scheme) {
- FilePath path;
+ base::FilePath path;
PathService::Get(base::DIR_EXE, &path);
path = path.AppendASCII("resources");
path = path.AppendASCII("inspector");
@@ -99,7 +99,7 @@ class URLRequestTestShellFileJob : public net::URLRequestFileJob {
private:
URLRequestTestShellFileJob(net::URLRequest* request,
net::NetworkDelegate* network_delegate,
- const FilePath& path)
+ const base::FilePath& path)
: net::URLRequestFileJob(request, network_delegate, path) {
}
virtual ~URLRequestTestShellFileJob() { }
@@ -263,7 +263,7 @@ void TestShell::InitLogging(bool suppress_error_dialogs,
destination = logging::LOG_ONLY_TO_FILE;
// We might have multiple test_shell processes going at once
- FilePath log_filename;
+ base::FilePath log_filename;
PathService::Get(base::DIR_EXE, &log_filename);
log_filename = log_filename.AppendASCII("test_shell.log");
logging::InitLogging(
@@ -459,9 +459,9 @@ WebView* TestShell::CreateWebView() {
void TestShell::ShowDevTools() {
if (!devtools_shell_) {
- FilePath dir_exe;
+ base::FilePath dir_exe;
PathService::Get(base::DIR_EXE, &dir_exe);
- FilePath devtools_path =
+ base::FilePath devtools_path =
dir_exe.AppendASCII("resources/inspector/devtools.html");
TestShell* devtools_shell;
TestShell::CreateNewWindow(GURL(devtools_path.value()),
@@ -502,7 +502,7 @@ void TestShell::ResetTestController() {
geolocation_client_mock_->resetMock();
}
-void TestShell::LoadFile(const FilePath& file) {
+void TestShell::LoadFile(const base::FilePath& file) {
LoadURLForFrame(net::FilePathToFileURL(file), string16());
}
@@ -559,7 +559,7 @@ void TestShell::GoBackOrForward(int offset) {
}
void TestShell::DumpDocumentText() {
- FilePath file_path;
+ base::FilePath file_path;
if (!PromptForSaveFile(L"Dump document text", &file_path))
return;
@@ -569,7 +569,7 @@ void TestShell::DumpDocumentText() {
}
void TestShell::DumpRenderTree() {
- FilePath file_path;
+ base::FilePath file_path;
if (!PromptForSaveFile(L"Dump render tree", &file_path))
return;
diff --git a/webkit/tools/test_shell/test_shell.h b/webkit/tools/test_shell/test_shell.h
index 58118ab..e464423 100644
--- a/webkit/tools/test_shell/test_shell.h
+++ b/webkit/tools/test_shell/test_shell.h
@@ -59,7 +59,7 @@ public:
bool dump_pixels;
// Filename we dump pixels to (when pixel testing is enabled).
- FilePath pixel_file_name;
+ base::FilePath pixel_file_name;
// The md5 hash of the bitmap dump (when pixel testing is enabled).
std::string pixel_hash;
// URL of the test.
@@ -150,14 +150,14 @@ public:
return true;
}
- void LoadFile(const FilePath& file);
+ void LoadFile(const base::FilePath& file);
void LoadURL(const GURL& url);
void LoadURLForFrame(const GURL& url, const string16& frame_name);
void GoBackOrForward(int offset);
void Reload();
bool Navigate(const TestNavigationEntry& entry, bool reload);
- bool PromptForSaveFile(const wchar_t* prompt_title, FilePath* result);
+ bool PromptForSaveFile(const wchar_t* prompt_title, base::FilePath* result);
string16 GetDocumentText();
void DumpDocumentText();
void DumpRenderTree();
diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc
index 0ec3fd5..6576d07 100644
--- a/webkit/tools/test_shell/test_shell_gtk.cc
+++ b/webkit/tools/test_shell/test_shell_gtk.cc
@@ -41,9 +41,9 @@ using WebKit::WebWidget;
namespace {
-// Convert a FilePath into an FcChar* (used by fontconfig).
+// Convert a base::FilePath into an FcChar* (used by fontconfig).
// The pointer only lives for the duration for the expression.
-const FcChar8* FilePathAsFcChar(const FilePath& path) {
+const FcChar8* FilePathAsFcChar(const base::FilePath& path) {
return reinterpret_cast<const FcChar8*>(path.value().c_str());
}
@@ -159,12 +159,12 @@ void TestShell::InitializeTestShell(bool layout_test_mode,
web_prefs_ = new webkit_glue::WebPreferences;
- FilePath data_path;
+ base::FilePath data_path;
PathService::Get(base::DIR_EXE, &data_path);
data_path = data_path.Append("test_shell.pak");
ResourceBundle::InitSharedInstanceWithPakPath(data_path);
- FilePath resources_dir;
+ base::FilePath resources_dir;
PathService::Get(base::DIR_SOURCE_ROOT, &resources_dir);
resources_dir = resources_dir.Append("webkit/tools/test_shell/resources");
@@ -185,7 +185,7 @@ void TestShell::InitializeTestShell(bool layout_test_mode,
FcInit();
FcConfig* fontcfg = FcConfigCreate();
- FilePath fontconfig_path = resources_dir.Append("fonts.conf");
+ base::FilePath fontconfig_path = resources_dir.Append("fonts.conf");
if (!FcConfigParseAndLoad(fontcfg, FilePathAsFcChar(fontconfig_path),
true)) {
LOG(FATAL) << "Failed to parse fontconfig config file";
@@ -263,7 +263,7 @@ void TestShell::InitializeTestShell(bool layout_test_mode,
}
// Also load the layout-test-specific "Ahem" font.
- FilePath ahem_path = resources_dir.Append("AHEM____.TTF");
+ base::FilePath ahem_path = resources_dir.Append("AHEM____.TTF");
if (!FcConfigAppFontAddFile(fontcfg, FilePathAsFcChar(ahem_path))) {
LOG(FATAL) << "Failed to load font " << ahem_path.value().c_str();
}
@@ -508,7 +508,7 @@ void TestShell::LoadURLForFrame(const GURL& url,
}
bool TestShell::PromptForSaveFile(const wchar_t* prompt_title,
- FilePath* result) {
+ base::FilePath* result) {
GtkWidget* dialog;
dialog = gtk_file_chooser_dialog_new(WideToUTF8(prompt_title).c_str(),
GTK_WINDOW(m_mainWnd),
@@ -525,7 +525,7 @@ bool TestShell::PromptForSaveFile(const wchar_t* prompt_title,
}
char* path = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
gtk_widget_destroy(dialog);
- *result = FilePath(path);
+ *result = base::FilePath(path);
g_free(path);
return true;
}
@@ -538,7 +538,7 @@ std::string TestShell::RewriteLocalUrl(const std::string& url) {
std::string new_url(url);
if (url.compare(0, kPrefixLen, kPrefix, kPrefixLen) == 0) {
- FilePath replace_path;
+ base::FilePath replace_path;
PathService::Get(base::DIR_SOURCE_ROOT, &replace_path);
replace_path = replace_path.Append(
"third_party/WebKit/LayoutTests/");
diff --git a/webkit/tools/test_shell/test_shell_mac.mm b/webkit/tools/test_shell/test_shell_mac.mm
index ccfaa67..fe86310 100644
--- a/webkit/tools/test_shell/test_shell_mac.mm
+++ b/webkit/tools/test_shell/test_shell_mac.mm
@@ -78,12 +78,12 @@ base::LazyInstance <std::map<gfx::NativeWindow, TestShell *> >
TestShell::window_map_ = LAZY_INSTANCE_INITIALIZER;
// Helper method for getting the path to the test shell resources directory.
-FilePath GetResourcesFilePath() {
- FilePath path;
+base::FilePath GetResourcesFilePath() {
+ base::FilePath path;
// We need to know if we're bundled or not to know which path to use.
if (base::mac::AmIBundled()) {
PathService::Get(base::DIR_EXE, &path);
- path = path.Append(FilePath::kParentDirectory);
+ path = path.Append(base::FilePath::kParentDirectory);
return path.AppendASCII("Resources");
} else {
PathService::Get(base::DIR_SOURCE_ROOT, &path);
@@ -215,7 +215,7 @@ void TestShell::InitializeTestShell(bool layout_test_mode,
NSString *resource_path =
[base::mac::FrameworkBundle() pathForResource:@"test_shell"
ofType:@"pak"];
- FilePath resources_pak_path([resource_path fileSystemRepresentation]);
+ base::FilePath resources_pak_path([resource_path fileSystemRepresentation]);
if (!g_resource_data_pack->LoadFromPath(resources_pak_path)) {
LOG(FATAL) << "failed to load test_shell.pak";
}
@@ -236,7 +236,7 @@ void TestShell::InitializeTestShell(bool layout_test_mode,
// Add <app bundle's parent dir>/plugins to the plugin path so we can load
// test plugins.
- FilePath plugins_dir;
+ base::FilePath plugins_dir;
PathService::Get(base::DIR_EXE, &plugins_dir);
if (base::mac::AmIBundled()) {
plugins_dir = plugins_dir.AppendASCII("../../../plugins");
@@ -539,7 +539,7 @@ void TestShell::LoadURLForFrame(const GURL& url,
}
bool TestShell::PromptForSaveFile(const wchar_t* prompt_title,
- FilePath* result)
+ base::FilePath* result)
{
NSSavePanel* save_panel = [NSSavePanel savePanel];
@@ -552,7 +552,7 @@ bool TestShell::PromptForSaveFile(const wchar_t* prompt_title,
[save_panel setDirectoryURL:[NSURL fileURLWithPath:NSHomeDirectory()]];
[save_panel setNameFieldStringValue:@""];
if ([save_panel runModal] == NSFileHandlingPanelOKButton) {
- *result = FilePath([[[save_panel URL] path] fileSystemRepresentation]);
+ *result = base::FilePath([[[save_panel URL] path] fileSystemRepresentation]);
return true;
}
return false;
@@ -566,7 +566,7 @@ std::string TestShell::RewriteLocalUrl(const std::string& url) {
std::string new_url(url);
if (url.compare(0, kPrefixLen, kPrefix, kPrefixLen) == 0) {
- FilePath replace_path;
+ base::FilePath replace_path;
PathService::Get(base::DIR_SOURCE_ROOT, &replace_path);
replace_path = replace_path.Append(
"third_party/WebKit/LayoutTests/");
@@ -628,7 +628,7 @@ base::StringPiece TestShellWebKitInit::GetDataResource(
// Use webkit's broken image icon (16x16)
static std::string broken_image_data;
if (broken_image_data.empty()) {
- FilePath path = GetResourcesFilePath();
+ base::FilePath path = GetResourcesFilePath();
// In order to match WebKit's colors for the missing image, we have to
// use a PNG. The GIF doesn't have the color range needed to correctly
// match the TIFF they use in Safari.
@@ -644,7 +644,7 @@ base::StringPiece TestShellWebKitInit::GetDataResource(
// Use webkit's text area resizer image.
static std::string resize_corner_data;
if (resize_corner_data.empty()) {
- FilePath path = GetResourcesFilePath();
+ base::FilePath path = GetResourcesFilePath();
path = path.AppendASCII("textAreaResizeCorner.png");
bool success = file_util::ReadFileToString(path, &resize_corner_data);
if (!success) {
diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc
index 5bebaad..5c98d98 100644
--- a/webkit/tools/test_shell/test_shell_main.cc
+++ b/webkit/tools/test_shell/test_shell_main.cc
@@ -160,7 +160,7 @@ int main(int argc, char* argv[]) {
if (parsed_command_line.HasSwitch(test_shell::kEnableFileCookies))
net::CookieMonster::EnableFileScheme();
- FilePath cache_path =
+ base::FilePath cache_path =
parsed_command_line.GetSwitchValuePath(test_shell::kCacheDir);
if (cache_path.empty()) {
PathService::Get(base::DIR_EXE, &cache_path);
@@ -214,7 +214,7 @@ int main(int argc, char* argv[]) {
// Treat the first argument as the initial URL to open.
GURL starting_url;
- FilePath path;
+ base::FilePath path;
PathService::Get(base::DIR_SOURCE_ROOT, &path);
path = path.AppendASCII("webkit").AppendASCII("data")
.AppendASCII("test_shell").AppendASCII("index.html");
@@ -227,7 +227,7 @@ int main(int argc, char* argv[]) {
starting_url = url;
} else {
// Treat as a relative file path.
- FilePath path = FilePath(args[0]);
+ base::FilePath path = base::FilePath(args[0]);
file_util::AbsolutePath(&path);
starting_url = net::FilePathToFileURL(path);
}
diff --git a/webkit/tools/test_shell/test_shell_request_context.cc b/webkit/tools/test_shell/test_shell_request_context.cc
index 5bdf4c9..eec8e82 100644
--- a/webkit/tools/test_shell/test_shell_request_context.cc
+++ b/webkit/tools/test_shell/test_shell_request_context.cc
@@ -58,11 +58,11 @@ class TestShellHttpUserAgentSettings : public net::HttpUserAgentSettings {
TestShellRequestContext::TestShellRequestContext()
: ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) {
- Init(FilePath(), net::HttpCache::NORMAL, false);
+ Init(base::FilePath(), net::HttpCache::NORMAL, false);
}
TestShellRequestContext::TestShellRequestContext(
- const FilePath& cache_path,
+ const base::FilePath& cache_path,
net::HttpCache::Mode cache_mode,
bool no_proxy)
: ALLOW_THIS_IN_INITIALIZER_LIST(storage_(this)) {
@@ -70,7 +70,7 @@ TestShellRequestContext::TestShellRequestContext(
}
void TestShellRequestContext::Init(
- const FilePath& cache_path,
+ const base::FilePath& cache_path,
net::HttpCache::Mode cache_mode,
bool no_proxy) {
storage_.set_cookie_store(new net::CookieMonster(NULL, NULL));
diff --git a/webkit/tools/test_shell/test_shell_request_context.h b/webkit/tools/test_shell/test_shell_request_context.h
index 27ef6fe..bcd59e4 100644
--- a/webkit/tools/test_shell/test_shell_request_context.h
+++ b/webkit/tools/test_shell/test_shell_request_context.h
@@ -10,7 +10,9 @@
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_storage.h"
+namespace base {
class FilePath;
+}
namespace fileapi {
class FileSystemContext;
@@ -28,7 +30,7 @@ class TestShellRequestContext : public net::URLRequestContext {
// Use an on-disk cache at the specified location. Optionally, use the cache
// in playback or record mode.
- TestShellRequestContext(const FilePath& cache_path,
+ TestShellRequestContext(const base::FilePath& cache_path,
net::HttpCache::Mode cache_mode,
bool no_proxy);
@@ -43,7 +45,7 @@ class TestShellRequestContext : public net::URLRequestContext {
}
private:
- void Init(const FilePath& cache_path, net::HttpCache::Mode cache_mode,
+ void Init(const base::FilePath& cache_path, net::HttpCache::Mode cache_mode,
bool no_proxy);
net::URLRequestContextStorage storage_;
diff --git a/webkit/tools/test_shell/test_shell_test.cc b/webkit/tools/test_shell/test_shell_test.cc
index 16357f2..2ea5e74 100644
--- a/webkit/tools/test_shell/test_shell_test.cc
+++ b/webkit/tools/test_shell/test_shell_test.cc
@@ -17,7 +17,7 @@
#include "webkit/user_agent/user_agent.h"
#include "webkit/user_agent/user_agent_util.h"
-GURL TestShellTest::GetTestURL(const FilePath& test_case_path,
+GURL TestShellTest::GetTestURL(const base::FilePath& test_case_path,
const std::string& test_case) {
return net::FilePathToFileURL(test_case_path.AppendASCII(test_case));
}
diff --git a/webkit/tools/test_shell/test_shell_test.h b/webkit/tools/test_shell/test_shell_test.h
index 3e2e354..c29a37d 100644
--- a/webkit/tools/test_shell/test_shell_test.h
+++ b/webkit/tools/test_shell/test_shell_test.h
@@ -20,7 +20,7 @@
class TestShellTest : public testing::Test {
protected:
// Returns the path "test_case_path/test_case".
- GURL GetTestURL(const FilePath& test_case_path,
+ GURL GetTestURL(const base::FilePath& test_case_path,
const std::string& test_case);
virtual void SetUp() OVERRIDE;
@@ -31,7 +31,7 @@ class TestShellTest : public testing::Test {
protected:
// Location of SOURCE_ROOT/webkit/data/
- FilePath data_dir_;
+ base::FilePath data_dir_;
TestShell* test_shell_;
};
diff --git a/webkit/tools/test_shell/test_shell_webkit_init.cc b/webkit/tools/test_shell/test_shell_webkit_init.cc
index ded88b3..72ddbbf 100644
--- a/webkit/tools/test_shell/test_shell_webkit_init.cc
+++ b/webkit/tools/test_shell/test_shell_webkit_init.cc
@@ -52,7 +52,7 @@ TestShellWebKitInit::TestShellWebKitInit(bool layout_test_mode)
WebKit::WebRuntimeFeatures::enableJavaScriptI18NAPI(true);
// Load libraries for media and enable the media player.
- FilePath module_path;
+ base::FilePath module_path;
WebKit::WebRuntimeFeatures::enableMediaPlayer(
PathService::Get(base::DIR_MODULE, &module_path) &&
media::InitializeMediaLibrary(module_path));
@@ -277,7 +277,7 @@ void TestShellWebKitInit::GetPlugins(
webkit::npapi::PluginList::Singleton()->GetPlugins(plugins);
// Don't load the forked TestNetscapePlugIn in the chromium code, use
// the copy in webkit.org's repository instead.
- const FilePath::StringType kPluginBlackList[] = {
+ const base::FilePath::StringType kPluginBlackList[] = {
FILE_PATH_LITERAL("npapi_layout_test_plugin.dll"),
FILE_PATH_LITERAL("WebKitTestNetscapePlugIn.plugin"),
FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"),
@@ -285,7 +285,7 @@ void TestShellWebKitInit::GetPlugins(
for (int i = plugins->size() - 1; i >= 0; --i) {
webkit::WebPluginInfo plugin_info = plugins->at(i);
for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) {
- if (plugin_info.path.BaseName() == FilePath(kPluginBlackList[j])) {
+ if (plugin_info.path.BaseName() == base::FilePath(kPluginBlackList[j])) {
plugins->erase(plugins->begin() + i);
}
}
diff --git a/webkit/tools/test_shell/test_shell_win.cc b/webkit/tools/test_shell/test_shell_win.cc
index b2d2c46..0897c44 100644
--- a/webkit/tools/test_shell/test_shell_win.cc
+++ b/webkit/tools/test_shell/test_shell_win.cc
@@ -101,13 +101,13 @@ bool MinidumpCallback(const wchar_t *dumpPath,
// will be happening on developers' machines where they have debuggers.
base::StackString16<kPathBufSize * 2> origPath;
origPath->append(dumpPath);
- origPath->push_back(FilePath::kSeparators[0]);
+ origPath->push_back(base::FilePath::kSeparators[0]);
origPath->append(minidumpID);
origPath->append(L".dmp");
base::StackString16<kPathBufSize * 2> newPath;
newPath->append(dumpPath);
- newPath->push_back(FilePath::kSeparators[0]);
+ newPath->push_back(base::FilePath::kSeparators[0]);
newPath->append(g_currentTestName);
newPath->append(L"-");
newPath->append(minidumpID);
@@ -121,8 +121,8 @@ bool MinidumpCallback(const wchar_t *dumpPath,
}
// Helper method for getting the path to the test shell resources directory.
-FilePath GetResourcesFilePath() {
- FilePath path;
+base::FilePath GetResourcesFilePath() {
+ base::FilePath path;
PathService::Get(base::DIR_SOURCE_ROOT, &path);
path = path.AppendASCII("webkit");
path = path.AppendASCII("tools");
@@ -251,7 +251,7 @@ std::string TestShell::RewriteLocalUrl(const std::string& url) {
std::string new_url(url);
if (url.compare(0, kPrefixLen, kPrefix, kPrefixLen) == 0) {
- FilePath replace_url;
+ base::FilePath replace_url;
PathService::Get(base::DIR_EXE, &replace_url);
replace_url = replace_url.DirName();
replace_url = replace_url.DirName();
@@ -640,7 +640,7 @@ INT_PTR CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) {
}
bool TestShell::PromptForSaveFile(const wchar_t* prompt_title,
- FilePath* result) {
+ base::FilePath* result) {
wchar_t path_buf[MAX_PATH] = L"data.txt";
OPENFILENAME info = {0};
@@ -654,7 +654,7 @@ bool TestShell::PromptForSaveFile(const wchar_t* prompt_title,
if (!GetSaveFileName(&info))
return false;
- *result = FilePath(info.lpstrFile);
+ *result = base::FilePath(info.lpstrFile);
return true;
}
@@ -689,7 +689,7 @@ base::StringPiece TestShellWebKitInit::GetDataResource(
// Use webkit's broken image icon (16x16)
static std::string broken_image_data;
if (broken_image_data.empty()) {
- FilePath path = GetResourcesFilePath();
+ base::FilePath path = GetResourcesFilePath();
path = path.AppendASCII("missingImage.gif");
bool success = file_util::ReadFileToString(path, &broken_image_data);
if (!success) {
@@ -702,7 +702,7 @@ base::StringPiece TestShellWebKitInit::GetDataResource(
// Use webkit's text area resizer image.
static std::string resize_corner_data;
if (resize_corner_data.empty()) {
- FilePath path = GetResourcesFilePath();
+ base::FilePath path = GetResourcesFilePath();
path = path.AppendASCII("textAreaResizeCorner.png");
bool success = file_util::ReadFileToString(path, &resize_corner_data);
if (!success) {
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc
index e946255..1fb12e0 100644
--- a/webkit/tools/test_shell/test_webview_delegate.cc
+++ b/webkit/tools/test_shell/test_webview_delegate.cc
@@ -823,7 +823,7 @@ void TestWebViewDelegate::openFileSystem(
// WebPluginPageDelegate -----------------------------------------------------
WebKit::WebPlugin* TestWebViewDelegate::CreatePluginReplacement(
- const FilePath& file_path) {
+ const base::FilePath& file_path) {
return NULL;
}
diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h
index be1464d..e882017 100644
--- a/webkit/tools/test_shell/test_webview_delegate.h
+++ b/webkit/tools/test_shell/test_webview_delegate.h
@@ -236,10 +236,10 @@ class TestWebViewDelegate : public WebKit::WebViewClient,
// webkit::npapi::WebPluginPageDelegate
virtual webkit::npapi::WebPluginDelegate* CreatePluginDelegate(
- const FilePath& url,
+ const base::FilePath& url,
const std::string& mime_type) OVERRIDE;
virtual WebKit::WebPlugin* CreatePluginReplacement(
- const FilePath& file_path) OVERRIDE;
+ const base::FilePath& file_path) OVERRIDE;
virtual void CreatedPluginWindow(
gfx::PluginWindowHandle handle) OVERRIDE;
virtual void WillDestroyPluginWindow(
diff --git a/webkit/tools/test_shell/test_webview_delegate_gtk.cc b/webkit/tools/test_shell/test_webview_delegate_gtk.cc
index 8141b1c..ec72930 100644
--- a/webkit/tools/test_shell/test_webview_delegate_gtk.cc
+++ b/webkit/tools/test_shell/test_webview_delegate_gtk.cc
@@ -198,7 +198,7 @@ void TestWebViewDelegate::runModal() {
// WebPluginPageDelegate ------------------------------------------------------
webkit::npapi::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
- const FilePath& path,
+ const base::FilePath& path,
const std::string& mime_type) {
return webkit::npapi::WebPluginDelegateImpl::Create(path, mime_type);
}
diff --git a/webkit/tools/test_shell/test_webview_delegate_mac.mm b/webkit/tools/test_shell/test_webview_delegate_mac.mm
index 197ad97..42f5a64 100644
--- a/webkit/tools/test_shell/test_webview_delegate_mac.mm
+++ b/webkit/tools/test_shell/test_webview_delegate_mac.mm
@@ -227,7 +227,7 @@ void TestWebViewDelegate::runModal() {
// WebPluginPageDelegate ------------------------------------------------------
webkit::npapi::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
- const FilePath& path,
+ const base::FilePath& path,
const std::string& mime_type) {
WebWidgetHost *host = GetWidgetHost();
if (!host)
diff --git a/webkit/tools/test_shell/test_webview_delegate_win.cc b/webkit/tools/test_shell/test_webview_delegate_win.cc
index f9ea1a7..c811f0e 100644
--- a/webkit/tools/test_shell/test_webview_delegate_win.cc
+++ b/webkit/tools/test_shell/test_webview_delegate_win.cc
@@ -133,7 +133,7 @@ void TestWebViewDelegate::runModal() {
// WebPluginPageDelegate ------------------------------------------------------
webkit::npapi::WebPluginDelegate* TestWebViewDelegate::CreatePluginDelegate(
- const FilePath& path,
+ const base::FilePath& path,
const std::string& mime_type) {
HWND hwnd = shell_->webViewHost()->view_handle();
if (!hwnd)
diff --git a/webkit/tools/webcore_unit_tests/ICOImageDecoder_unittest.cpp b/webkit/tools/webcore_unit_tests/ICOImageDecoder_unittest.cpp
index f4cdd3d..0c905ca 100644
--- a/webkit/tools/webcore_unit_tests/ICOImageDecoder_unittest.cpp
+++ b/webkit/tools/webcore_unit_tests/ICOImageDecoder_unittest.cpp
@@ -26,8 +26,8 @@ TEST_F(ICOImageDecoderTest, Decoding) {
TEST_F(ICOImageDecoderTest, ImageNonZeroFrameIndex) {
// Test that the decoder decodes multiple sizes of icons which have them.
// Load an icon that has both favicon-size and larger entries.
- FilePath multisize_icon_path(data_dir_.AppendASCII("yahoo.ico"));
- const FilePath md5_sum_path(
+ base::FilePath multisize_icon_path(data_dir_.AppendASCII("yahoo.ico"));
+ const base::FilePath md5_sum_path(
GetMD5SumPath(multisize_icon_path).value() + FILE_PATH_LITERAL("2"));
static const int kDesiredFrameIndex = 3;
TestWebKitImageDecoder(multisize_icon_path, md5_sum_path, kDesiredFrameIndex);
diff --git a/win8/delegate_execute/chrome_util.cc b/win8/delegate_execute/chrome_util.cc
index 701f2e8..b67e80f 100644
--- a/win8/delegate_execute/chrome_util.cc
+++ b/win8/delegate_execute/chrome_util.cc
@@ -36,7 +36,8 @@ const wchar_t kAppUserModelId[] = L"Chromium";
// TODO(grt): These constants live in installer_util. Consider moving them
// into common_constants to allow for reuse.
-const FilePath::CharType kNewChromeExe[] = FILE_PATH_LITERAL("new_chrome.exe");
+const base::FilePath::CharType kNewChromeExe[] =
+ FILE_PATH_LITERAL("new_chrome.exe");
const wchar_t kRenameCommandValue[] = L"cmd";
const wchar_t kChromeAppGuid[] = L"{8A69D345-D564-463c-AFF1-A69D9E530F96}";
const wchar_t kRegPathChromeClient[] =
@@ -48,7 +49,7 @@ const int kExitCodeRenameSuccessful = 23;
// use by a browser process.
// TODO(grt): Move this somewhere central so it can be used by both this
// IsBrowserRunning (below) and IsBrowserAlreadyRunning (browser_util_win.cc).
-string16 GetEventName(const FilePath& chrome_exe) {
+string16 GetEventName(const base::FilePath& chrome_exe) {
static wchar_t const kEventPrefix[] = L"Global\\";
const size_t prefix_len = arraysize(kEventPrefix) - 1;
string16 name;
@@ -63,7 +64,7 @@ string16 GetEventName(const FilePath& chrome_exe) {
// Returns true if |chrome_exe| is in use by a browser process. In this case,
// "in use" means past ChromeBrowserMainParts::PreMainMessageLoopRunImpl.
-bool IsBrowserRunning(const FilePath& chrome_exe) {
+bool IsBrowserRunning(const base::FilePath& chrome_exe) {
base::win::ScopedHandle handle(::OpenEvent(
SYNCHRONIZE, FALSE, GetEventName(chrome_exe).c_str()));
if (handle.IsValid())
@@ -78,8 +79,8 @@ bool IsBrowserRunning(const FilePath& chrome_exe) {
// Returns true if the file new_chrome.exe exists in the same directory as
// |chrome_exe|.
-bool NewChromeExeExists(const FilePath& chrome_exe) {
- FilePath new_chrome_exe(chrome_exe.DirName().Append(kNewChromeExe));
+bool NewChromeExeExists(const base::FilePath& chrome_exe) {
+ base::FilePath new_chrome_exe(chrome_exe.DirName().Append(kNewChromeExe));
return file_util::PathExists(new_chrome_exe);
}
@@ -93,7 +94,7 @@ bool GetUpdateCommand(bool is_per_user, string16* update_command) {
#endif // GOOGLE_CHROME_BUILD
// TODO(grt): This code also lives in installer_util. Refactor for reuse.
-bool IsPerUserInstall(const FilePath& chrome_exe) {
+bool IsPerUserInstall(const base::FilePath& chrome_exe) {
wchar_t program_files_path[MAX_PATH] = {0};
if (SUCCEEDED(SHGetFolderPath(NULL, CSIDL_PROGRAM_FILES, NULL,
SHGFP_TYPE_CURRENT, program_files_path))) {
@@ -188,7 +189,7 @@ bool GetUserSpecificRegistrySuffix(string16* suffix) {
namespace delegate_execute {
-void UpdateChromeIfNeeded(const FilePath& chrome_exe) {
+void UpdateChromeIfNeeded(const base::FilePath& chrome_exe) {
#if defined(GOOGLE_CHROME_BUILD)
// Nothing to do if a browser is already running or if there's no
// new_chrome.exe.
@@ -253,7 +254,7 @@ void UpdateChromeIfNeeded(const FilePath& chrome_exe) {
}
// TODO(gab): This code also lives in shell_util. Refactor for reuse.
-string16 GetAppId(const FilePath& chrome_exe) {
+string16 GetAppId(const base::FilePath& chrome_exe) {
string16 app_id(kAppUserModelId);
string16 suffix;
if (IsPerUserInstall(chrome_exe) &&
diff --git a/win8/delegate_execute/chrome_util.h b/win8/delegate_execute/chrome_util.h
index 634ce6c..f65ec2f 100644
--- a/win8/delegate_execute/chrome_util.h
+++ b/win8/delegate_execute/chrome_util.h
@@ -7,15 +7,17 @@
#include "base/string16.h"
+namespace base {
class FilePath;
+}
namespace delegate_execute {
// Finalizes a previously updated installation.
-void UpdateChromeIfNeeded(const FilePath& chrome_exe);
+void UpdateChromeIfNeeded(const base::FilePath& chrome_exe);
// Returns the appid of the Chrome pointed to by |chrome_exe|.
-string16 GetAppId(const FilePath& chrome_exe);
+string16 GetAppId(const base::FilePath& chrome_exe);
} // namespace delegate_execute
diff --git a/win8/delegate_execute/command_execute_impl.cc b/win8/delegate_execute/command_execute_impl.cc
index 96ca46b..18ba4e7 100644
--- a/win8/delegate_execute/command_execute_impl.cc
+++ b/win8/delegate_execute/command_execute_impl.cc
@@ -60,12 +60,12 @@ HRESULT GetUrlFromShellItem(IShellItem* shell_item, string16* url) {
}
bool LaunchChromeBrowserProcess() {
- FilePath delegate_exe_path;
+ base::FilePath delegate_exe_path;
if (!PathService::Get(base::FILE_EXE, &delegate_exe_path))
return false;
// First try and go up a level to find chrome.exe.
- FilePath chrome_exe_path =
+ base::FilePath chrome_exe_path =
delegate_exe_path.DirName()
.DirName()
.Append(chrome::kBrowserProcessExecutableName);
@@ -242,7 +242,7 @@ STDMETHODIMP CommandExecuteImpl::GetValue(enum AHE_TYPE* pahe) {
return S_OK;
}
- FilePath user_data_dir;
+ base::FilePath user_data_dir;
if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) {
AtlTrace("Failed to get chrome's data dir path, E_FAIL\n");
return E_FAIL;
@@ -376,11 +376,11 @@ STDMETHODIMP CommandExecuteImpl::AllowForegroundTransfer(void* reserved) {
// Returns false if chrome.exe cannot be found.
// static
-bool CommandExecuteImpl::FindChromeExe(FilePath* chrome_exe) {
+bool CommandExecuteImpl::FindChromeExe(base::FilePath* chrome_exe) {
AtlTrace("In %hs\n", __FUNCTION__);
// Look for chrome.exe one folder above delegate_execute.exe (as expected in
// Chrome installs). Failing that, look for it alonside delegate_execute.exe.
- FilePath dir_exe;
+ base::FilePath dir_exe;
if (!PathService::Get(base::DIR_EXE, &dir_exe)) {
AtlTrace("Failed to get current exe path\n");
return false;
diff --git a/win8/delegate_execute/command_execute_impl.h b/win8/delegate_execute/command_execute_impl.h
index 8e0fcbf..1b137d9 100644
--- a/win8/delegate_execute/command_execute_impl.h
+++ b/win8/delegate_execute/command_execute_impl.h
@@ -85,7 +85,7 @@ class ATL_NO_VTABLE DECLSPEC_UUID("A2DF06F9-A21A-44A8-8A99-8B9C84F29160")
STDMETHOD(AllowForegroundTransfer)(void* reserved);
private:
- static bool FindChromeExe(FilePath* chrome_exe);
+ static bool FindChromeExe(base::FilePath* chrome_exe);
static bool path_provider_initialized_;
@@ -96,7 +96,7 @@ class ATL_NO_VTABLE DECLSPEC_UUID("A2DF06F9-A21A-44A8-8A99-8B9C84F29160")
CComPtr<IShellItemArray> item_array_;
CommandLine parameters_;
- FilePath chrome_exe_;
+ base::FilePath chrome_exe_;
STARTUPINFO start_info_;
string16 verb_;
string16 display_name_;
diff --git a/win8/delegate_execute/delegate_execute_operation.cc b/win8/delegate_execute/delegate_execute_operation.cc
index f4aaa41..9663828 100644
--- a/win8/delegate_execute/delegate_execute_operation.cc
+++ b/win8/delegate_execute/delegate_execute_operation.cc
@@ -20,7 +20,8 @@ DelegateExecuteOperation::~DelegateExecuteOperation() {
}
bool DelegateExecuteOperation::Init(const CommandLine* cmd_line) {
- FilePath shortcut(cmd_line->GetSwitchValuePath(switches::kRelaunchShortcut));
+ base::FilePath shortcut(
+ cmd_line->GetSwitchValuePath(switches::kRelaunchShortcut));
if (shortcut.empty()) {
operation_type_ = DELEGATE_EXECUTE;
return true;
diff --git a/win8/delegate_execute/delegate_execute_operation.h b/win8/delegate_execute/delegate_execute_operation.h
index 3fc1b00..8d2900d 100644
--- a/win8/delegate_execute/delegate_execute_operation.h
+++ b/win8/delegate_execute/delegate_execute_operation.h
@@ -60,14 +60,14 @@ class DelegateExecuteOperation {
// Returns the process id of the parent or 0 on failure.
DWORD GetParentPid() const;
- const FilePath& shortcut() const {
+ const base::FilePath& shortcut() const {
return relaunch_shortcut_;
}
private:
OperationType operation_type_;
string16 relaunch_flags_;
- FilePath relaunch_shortcut_;
+ base::FilePath relaunch_shortcut_;
string16 mutex_;
DISALLOW_COPY_AND_ASSIGN(DelegateExecuteOperation);
diff --git a/win8/delegate_execute/delegate_execute_util.cc b/win8/delegate_execute/delegate_execute_util.cc
index d04c667..70ca3e3 100644
--- a/win8/delegate_execute/delegate_execute_util.cc
+++ b/win8/delegate_execute/delegate_execute_util.cc
@@ -16,13 +16,13 @@ CommandLine CommandLineFromParameters(const wchar_t* params) {
string16 command_string(L"noprogram.exe ");
command_string.append(params);
command_line.ParseFromString(command_string);
- command_line.SetProgram(FilePath());
+ command_line.SetProgram(base::FilePath());
}
return command_line;
}
-CommandLine MakeChromeCommandLine(const FilePath& chrome_exe,
+CommandLine MakeChromeCommandLine(const base::FilePath& chrome_exe,
const CommandLine& params,
const string16& argument) {
CommandLine chrome_cmd(params);
diff --git a/win8/delegate_execute/delegate_execute_util.h b/win8/delegate_execute/delegate_execute_util.h
index 5f001ff..36f1556 100644
--- a/win8/delegate_execute/delegate_execute_util.h
+++ b/win8/delegate_execute/delegate_execute_util.h
@@ -8,7 +8,9 @@
#include "base/command_line.h"
#include "base/string16.h"
+namespace base {
class FilePath;
+}
namespace delegate_execute {
@@ -17,7 +19,7 @@ CommandLine CommandLineFromParameters(const wchar_t* params);
// Returns a CommandLine to launch |chrome_exe| with all switches and arguments
// from |params| plus an optional |argument|.
-CommandLine MakeChromeCommandLine(const FilePath& chrome_exe,
+CommandLine MakeChromeCommandLine(const base::FilePath& chrome_exe,
const CommandLine& params,
const string16& argument);
diff --git a/win8/delegate_execute/delegate_execute_util_unittest.cc b/win8/delegate_execute/delegate_execute_util_unittest.cc
index 360d8e7..6fcf65d 100644
--- a/win8/delegate_execute/delegate_execute_util_unittest.cc
+++ b/win8/delegate_execute/delegate_execute_util_unittest.cc
@@ -36,7 +36,7 @@ TEST(DelegateExecuteUtil, CommandLineFromParametersTest) {
TEST(DelegateExecuteUtil, MakeChromeCommandLineTest) {
static const wchar_t kSomeArgument[] = L"http://some.url/";
static const wchar_t kOtherArgument[] = L"http://some.other.url/";
- const FilePath this_exe(CommandLine::ForCurrentProcess()->GetProgram());
+ const base::FilePath this_exe(CommandLine::ForCurrentProcess()->GetProgram());
CommandLine cl(CommandLine::NO_PROGRAM);
diff --git a/win8/metro_driver/file_picker_ash.h b/win8/metro_driver/file_picker_ash.h
index ec8cf6a..4426f5c 100644
--- a/win8/metro_driver/file_picker_ash.h
+++ b/win8/metro_driver/file_picker_ash.h
@@ -10,10 +10,13 @@
#include "base/compiler_specific.h"
#include "base/string16.h"
-class FilePath;
class ChromeAppViewAsh;
struct MetroViewerHostMsg_SaveAsDialogParams;
+namespace base {
+class FilePath;
+}
+
// Base class for the file pickers.
class FilePickerSessionBase {
public:
@@ -79,7 +82,7 @@ class OpenFilePickerSession : public FilePickerSessionBase {
const string16& default_path,
bool allow_multi_select);
- const std::vector<FilePath>& filenames() const {
+ const std::vector<base::FilePath>& filenames() const {
return filenames_;
}
@@ -113,7 +116,7 @@ class OpenFilePickerSession : public FilePickerSessionBase {
bool allow_multi_select_;
// If multi select is true then this member contains the list of filenames
// to be returned back.
- std::vector<FilePath> filenames_;
+ std::vector<base::FilePath> filenames_;
DISALLOW_COPY_AND_ASSIGN(OpenFilePickerSession);
};