diff options
author | erikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-07 21:07:38 +0000 |
---|---|---|
committer | erikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-07 21:07:38 +0000 |
commit | 4f42e23ebe6bdc4a25dddcbeebc7aafc883611cd (patch) | |
tree | 29fb04fefea4be28b197194bc5b6b033391db700 /webkit/tools | |
parent | 6974f8d6d0e9a14e4b73919e253fd05ca136e33a (diff) | |
download | chromium_src-4f42e23ebe6bdc4a25dddcbeebc7aafc883611cd.zip chromium_src-4f42e23ebe6bdc4a25dddcbeebc7aafc883611cd.tar.gz chromium_src-4f42e23ebe6bdc4a25dddcbeebc7aafc883611cd.tar.bz2 |
Don't attempt to forward declare StringPiece. #include the declaration, or remove the forward declaration where it was not actually used.
1) Forward declaring StringPiece is generally discouraged because it prevents callers from benefiting from automatic coersion from string/char* types.
2) A follow-up CL (http://codereview.chromium.org/8659047/) will make StringPiece a template, and thus awkward to forward declare. The very small number of places that were appropriately forward declaring it do not justify writing a 'string_piece_forward.h'.
This particular CL would be one of the rare ones where a forward declaration would be 'appropriate', but it does not warrant forward-declaring both the template and the typedef, and the number of similar cases does not justify creating a _forward.h header.
BUG=87634
R=tony@chromium.org
Review URL: http://codereview.chromium.org/8819022
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@113465 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools')
-rw-r--r-- | webkit/tools/test_shell/test_shell.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/webkit/tools/test_shell/test_shell.h b/webkit/tools/test_shell/test_shell.h index 2d6baef..2085e63 100644 --- a/webkit/tools/test_shell/test_shell.h +++ b/webkit/tools/test_shell/test_shell.h @@ -35,6 +35,7 @@ #include "base/basictypes.h" #include "base/file_path.h" #include "base/scoped_temp_dir.h" +#include "base/string_piece.h" #if defined(OS_MACOSX) #include "base/lazy_instance.h" #endif @@ -57,10 +58,6 @@ class TestShellDevToolsAgent; class TestShellDevToolsClient; class TestWebViewDelegate; -namespace base { -class StringPiece; -} - namespace WebKit { class WebDeviceOrientationClientMock; class WebGeolocationClientMock; |