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

Issue 8722: Wrap forward declarations in their relevant namespace (Closed)

Created:
12 years, 1 month ago by vega.james
Modified:
9 years, 7 months ago
Reviewers:
Dean McNamee, wtc, agl
Visibility:
Public.

Description

Wrap forward declarations in their relevant namespace Forward declarations can't simply use "class $namespace::$class;" syntax. Instead one needs to use "namespace $namespace { class $class; }" syntax.

Patch Set 1 #

Patch Set 2 : Add indentation and a missing header to silence another gcc4.3 error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -3 lines) Patch
M chrome/browser/history/thumbnail_database.h View 1 1 chunk +3 lines, -1 line 2 comments Download
M chrome/browser/views/old_frames/vista_frame.h View 1 1 chunk +4 lines, -1 line 2 comments Download
M chrome/browser/webdata/web_database.h View 1 1 chunk +3 lines, -1 line 1 comment Download
M net/http/http_network_transaction_unittest.cc View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
vega.james_gmail.com
It seems older compilers are lax about this, but it causes problems with gcc4.3.
12 years, 1 month ago (2008-10-29 23:09:57 UTC) #1
agl
http://codereview.chromium.org/8722/diff/1/2 File chrome/browser/history/thumbnail_database.h (right): http://codereview.chromium.org/8722/diff/1/2#newcode19 Line 19: class Time; For a scope this small, we ...
12 years, 1 month ago (2008-11-03 19:42:55 UTC) #2
Dean McNamee
Can we use the class foo::Blah syntax if the namespace was already defined somewhere? Maybe ...
12 years, 1 month ago (2008-11-03 20:21:48 UTC) #3
vega.james_gmail.com
On 2008/11/03 20:21:48, Dean McNamee wrote: > Can we use the class foo::Blah syntax if ...
12 years, 1 month ago (2008-11-03 20:41:34 UTC) #4
vega.james_gmail.com
r4723
12 years, 1 month ago (2008-11-05 15:38:39 UTC) #5
wtc
http://codereview.chromium.org/8722/diff/9/10 File chrome/browser/history/thumbnail_database.h (right): http://codereview.chromium.org/8722/diff/9/10#newcode18 Line 18: namespace base { The "namespace" line was indented ...
12 years, 1 month ago (2008-11-05 21:40:32 UTC) #6
vega.james_gmail.com
12 years, 1 month ago (2008-11-05 21:55:33 UTC) #7
Thanks for the comments, but this has already been committed (hence why the
review is closed).  Not sure if someone that is able wants to fix the mixed up
indentation in chrome/browser/history/thumbnail_database.h.

http://codereview.chromium.org/8722/diff/9/10
File chrome/browser/history/thumbnail_database.h (right):

http://codereview.chromium.org/8722/diff/9/10#newcode18
Line 18: namespace base {
On 2008/11/05 21:40:32, wtc wrote:
> The "namespace" line was indented by accident.

Hmm, don't know how I missed that I indented the wrong line.

http://codereview.chromium.org/8722/diff/9/11
File chrome/browser/views/old_frames/vista_frame.h (right):

http://codereview.chromium.org/8722/diff/9/11#newcode35
Line 35: class FocusManager;
On 2008/11/05 21:40:32, wtc wrote:
> The contents of namespaces don't need to be indented.
> 
>
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Namespace_Form...

agl specifically requested it since these are such small namespace blocks.  See
previous comments in the review.

Powered by Google App Engine
This is Rietveld 408576698