Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(461)

Issue 8819022: Don't attempt to forward declare StringPiece. (Closed)

Created:
9 years ago by erikwright (departed)
Modified:
9 years ago
Reviewers:
tony
CC:
chromium-reviews, pam+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

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

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -8 lines) Patch
M webkit/glue/webkit_glue.h View 1 chunk +0 lines, -4 lines 0 comments Download
M webkit/tools/test_shell/test_shell.h View 2 chunks +1 line, -4 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
erikwright (departed)
Hi Tony, PTAL. Thanks, Erik
9 years ago (2011-12-07 15:22:00 UTC) #1
tony
LGTM, however I disagree with reason (1). If callers want automatic coercion, they should include ...
9 years ago (2011-12-07 18:41:42 UTC) #2
erikwright (departed)
On 2011/12/07 18:41:42, tony wrote: > LGTM, however I disagree with reason (1). If callers ...
9 years ago (2011-12-07 18:49:06 UTC) #3
tony
I'm OK with you submitting the CL with the current description, but I still disagree ...
9 years ago (2011-12-07 19:26:56 UTC) #4
erikwright (departed)
On 2011/12/07 19:26:56, tony wrote: > I'm OK with you submitting the CL with the ...
9 years ago (2011-12-07 19:57:34 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erikwright@chromium.org/8819022/1
9 years ago (2011-12-07 20:00:30 UTC) #6
commit-bot: I haz the power
Presubmit check for 8819022-1 failed and returned exit status 1. Running presubmit commit checks ...
9 years ago (2011-12-07 20:00:35 UTC) #7
erikwright (departed)
9 years ago (2011-12-07 21:19:51 UTC) #8
Committed manually due to copyright exception (this is Apple copyright).

http://src.chromium.org/viewvc/chrome?view=rev&revision=113465

Powered by Google App Engine
This is Rietveld 408576698