summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-28 14:24:18 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-28 14:24:18 +0000
commitfea004cad2fa677636bbd6eb4a5a4947c81fd5e1 (patch)
treefa48759ff1da39c3789a801d552b9eac34c85c2b
parent8fb9adb65397d68380ce02c08b2c3cde1d495451 (diff)
downloadchromium_src-fea004cad2fa677636bbd6eb4a5a4947c81fd5e1.zip
chromium_src-fea004cad2fa677636bbd6eb4a5a4947c81fd5e1.tar.gz
chromium_src-fea004cad2fa677636bbd6eb4a5a4947c81fd5e1.tar.bz2
content: Remove "WebKit-only" branch from GetWebKitRootDirFilePath().
As a consequency of simplifying GetWebKitRootDirFilePath(), GetChromiumRootDirFilePath() can be removed. All paths that correspond to "WebKit-only" checkouts aren't valid anymore since the Blink's fork and can be removed now. BUG=None R=jochen@chromium.org Review URL: https://codereview.chromium.org/20169003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214128 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/shell/common/webkit_test_helpers.cc29
-rw-r--r--content/shell/common/webkit_test_helpers.h3
-rw-r--r--content/shell/shell_content_browser_client.cc6
3 files changed, 5 insertions, 33 deletions
diff --git a/content/shell/common/webkit_test_helpers.cc b/content/shell/common/webkit_test_helpers.cc
index 36e3da4..320eb4b 100644
--- a/content/shell/common/webkit_test_helpers.cc
+++ b/content/shell/common/webkit_test_helpers.cc
@@ -113,34 +113,7 @@ void ApplyLayoutTestDefaultPreferences(WebPreferences* prefs) {
base::FilePath GetWebKitRootDirFilePath() {
base::FilePath base_path;
PathService::Get(base::DIR_SOURCE_ROOT, &base_path);
- if (base::PathExists(
- base_path.Append(FILE_PATH_LITERAL("third_party/WebKit")))) {
- // We're in a WebKit-in-chrome checkout.
- return base_path.Append(FILE_PATH_LITERAL("third_party/WebKit"));
- } else if (base::PathExists(
- base_path.Append(FILE_PATH_LITERAL("chromium")))) {
- // We're in a WebKit-only checkout on Windows.
- return base_path.Append(FILE_PATH_LITERAL("../.."));
- } else if (base::PathExists(
- base_path.Append(FILE_PATH_LITERAL("webkit/support")))) {
- // We're in a WebKit-only/xcodebuild checkout on Mac
- return base_path.Append(FILE_PATH_LITERAL("../../.."));
- }
- // We're in a WebKit-only, make-build, so the DIR_SOURCE_ROOT is already the
- // WebKit root. That, or we have no idea where we are.
- return base_path;
-}
-
-base::FilePath GetChromiumRootDirFilePath() {
- base::FilePath webkit_path = GetWebKitRootDirFilePath();
- if (base::PathExists(webkit_path.Append(
- FILE_PATH_LITERAL("Source/WebKit/chromium/webkit/support")))) {
- // We're in a WebKit-only checkout.
- return webkit_path.Append(FILE_PATH_LITERAL("Source/WebKit/chromium"));
- } else {
- // We're in a Chromium checkout, and WebKit is in third_party/WebKit.
- return webkit_path.Append(FILE_PATH_LITERAL("../.."));
- }
+ return base_path.Append(FILE_PATH_LITERAL("third_party/WebKit"));
}
} // namespace content
diff --git a/content/shell/common/webkit_test_helpers.h b/content/shell/common/webkit_test_helpers.h
index a171f2e..60cdce6 100644
--- a/content/shell/common/webkit_test_helpers.h
+++ b/content/shell/common/webkit_test_helpers.h
@@ -32,9 +32,6 @@ void ApplyLayoutTestDefaultPreferences(WebPreferences* prefs);
// Returns the root of the Blink checkout.
base::FilePath GetWebKitRootDirFilePath();
-// Returns the root of the chromium checkout.
-base::FilePath GetChromiumRootDirFilePath();
-
} // namespace content
#endif // CONTENT_SHELL_COMMON_WEBKIT_TEST_HELPERS_H_
diff --git a/content/shell/shell_content_browser_client.cc b/content/shell/shell_content_browser_client.cc
index af24c16..a08dac2 100644
--- a/content/shell/shell_content_browser_client.cc
+++ b/content/shell/shell_content_browser_client.cc
@@ -59,8 +59,10 @@ ShellContentBrowserClient::ShellContentBrowserClient()
if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
return;
webkit_source_dir_ = GetWebKitRootDirFilePath();
- base::FilePath dictionary_file_path = base::MakeAbsoluteFilePath(
- GetChromiumRootDirFilePath().Append(
+ base::FilePath source_root_path;
+ PathService::Get(base::DIR_SOURCE_ROOT, &source_root_path);
+ base::FilePath dictionary_file_path =
+ base::MakeAbsoluteFilePath(source_root_path.Append(
FILE_PATH_LITERAL("third_party/hyphen/hyph_en_US.dic")));
hyphen_dictionary_file_ = base::CreatePlatformFile(dictionary_file_path,
base::PLATFORM_FILE_READ |