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

Issue 8395025: Make RegistryControlledDomainService a static-function container class, rather than a Singleton (Closed)

Created:
9 years, 2 months ago by Ryan Sleevi
Modified:
9 years, 1 month ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Make RegistryControlledDomainService a static-function container class, rather than a Singleton BUG=none TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=107539

Patch Set 1 #

Patch Set 2 : Fix type punning #

Patch Set 3 : Update licenses #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -119 lines) Patch
M net/base/registry_controlled_domain.h View 1 2 4 chunks +18 lines, -40 lines 2 comments Download
M net/base/registry_controlled_domain.cc View 1 2 5 chunks +19 lines, -31 lines 2 comments Download
M net/base/registry_controlled_domain_unittest.cc View 1 5 chunks +22 lines, -48 lines 2 comments Download

Messages

Total messages: 10 (0 generated)
Ryan Sleevi
vandebo: Tripped up one of my CLs due to trying to access the RCDS on ...
9 years, 2 months ago (2011-10-25 23:44:03 UTC) #1
vandebo (ex-Chrome)
LGTM
9 years, 2 months ago (2011-10-26 00:05:48 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rsleevi@chromium.org/8395025/3001
9 years, 2 months ago (2011-10-26 04:52:47 UTC) #3
commit-bot: I haz the power
Presubmit check for 8395025-3001 failed and returned exit status 1. Running presubmit commit checks ...
9 years, 2 months ago (2011-10-26 04:52:49 UTC) #4
Ryan Sleevi
Mark, Pawel - Could you provide guidance on what the "correct" thing to do here ...
9 years, 1 month ago (2011-10-26 22:52:15 UTC) #5
Mark Larson
Please use the Chromium-specific header like cookie_monster. This is not a blanket recommendation for MPL/tri-license ...
9 years, 1 month ago (2011-10-27 00:41:43 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/rsleevi@chromium.org/8395025/7001
9 years, 1 month ago (2011-10-27 06:50:42 UTC) #7
commit-bot: I haz the power
Change committed as 107539
9 years, 1 month ago (2011-10-27 08:00:22 UTC) #8
wtc
LGTM. Good cleanup! http://codereview.chromium.org/8395025/diff/7001/net/base/registry_controlled_domain.cc File net/base/registry_controlled_domain.cc (left): http://codereview.chromium.org/8395025/diff/7001/net/base/registry_controlled_domain.cc#oldcode60 net/base/registry_controlled_domain.cc:60: RegistryControlledDomainService* test_instance_; Is test_instance_ not used? ...
9 years, 1 month ago (2011-10-27 22:44:09 UTC) #9
Ryan Sleevi
9 years, 1 month ago (2011-10-27 22:48:03 UTC) #10
http://codereview.chromium.org/8395025/diff/7001/net/base/registry_controlled...
File net/base/registry_controlled_domain.cc (left):

http://codereview.chromium.org/8395025/diff/7001/net/base/registry_controlled...
net/base/registry_controlled_domain.cc:60: RegistryControlledDomainService*
test_instance_;
On 2011/10/27 22:44:09, wtc wrote:
> 
> Is test_instance_ not used?

Not in the refactor, no. Previously it was used by GetInstance() - further
indicating that the Singleton<>-ness was simply related to testing.

http://codereview.chromium.org/8395025/diff/7001/net/base/registry_controlled...
File net/base/registry_controlled_domain.h (right):

http://codereview.chromium.org/8395025/diff/7001/net/base/registry_controlled...
net/base/registry_controlled_domain.h:203: typedef const struct DomainRule*
(*FindDomainPtr)(const char *, unsigned int);
On 2011/10/27 22:44:09, wtc wrote:
> 
> Nit: list this typedef at the beginning of the private section.

Will send a quick cleanup CL.

http://codereview.chromium.org/8395025/diff/7001/net/base/registry_controlled...
File net/base/registry_controlled_domain_unittest.cc (left):

http://codereview.chromium.org/8395025/diff/7001/net/base/registry_controlled...
net/base/registry_controlled_domain_unittest.cc:255: }  // namespace
On 2011/10/27 22:44:09, wtc wrote:
> 
> Why did you need to reduce the unnamed namespace?  Just
> curious.

friend scope. Because RegistryControlledDomainService is in net::, the implicit
forward declare from "friend class RegistryControlledDomainTest" declares a
net::RegistryControlledDomainTest.

The same pattern is used throughout the GTest friending, as far as I could tell.

Powered by Google App Engine
This is Rietveld 408576698