diff options
Diffstat (limited to 'webkit/support')
-rw-r--r-- | webkit/support/platform_support_android.cc | 10 | ||||
-rw-r--r-- | webkit/support/platform_support_linux.cc | 8 | ||||
-rw-r--r-- | webkit/support/platform_support_mac.mm | 16 | ||||
-rw-r--r-- | webkit/support/platform_support_win.cc | 8 | ||||
-rw-r--r-- | webkit/support/simple_database_system.cc | 8 | ||||
-rw-r--r-- | webkit/support/simple_database_system.h | 2 | ||||
-rw-r--r-- | webkit/support/test_webkit_platform_support.cc | 10 | ||||
-rw-r--r-- | webkit/support/test_webkit_platform_support.h | 2 | ||||
-rw-r--r-- | webkit/support/test_webplugin_page_delegate.cc | 4 | ||||
-rw-r--r-- | webkit/support/test_webplugin_page_delegate.h | 4 | ||||
-rw-r--r-- | webkit/support/webkit_support.cc | 42 | ||||
-rw-r--r-- | webkit/support/webkit_support.h | 4 | ||||
-rw-r--r-- | webkit/support/weburl_loader_mock_factory.cc | 8 | ||||
-rw-r--r-- | webkit/support/weburl_loader_mock_factory.h | 2 |
14 files changed, 65 insertions, 63 deletions
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; |