Chromium Code Reviews

Issue 5634005: Add a new GetInstance() method for singleton classes under chrome/service and /net. (Closed)

Created:
10 years ago by Satish
Modified:
9 years, 7 months ago
Reviewers:
sanjeevr, ukai, agl, willchan no longer on Chromium
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Add a new GetInstance() method for singleton classes under chrome/service and /net. This is a small step towards making all singleton classes use the Singleton<T> pattern within their code and not expect the callers to know about it. This CL includes files under chrome/service and /net with related files elsewhere. Suggested files to focus for reviewers: - @sanjeevr for chrome/common and chrome/service - @ukai for net/websockets - @agl for rest of net BUG=65298 TEST=all existing tests should continue to pass. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=68722

Patch Set 1 #

Patch Set 2 : . #

Total comments: 11

Patch Set 3 : . #

Total comments: 2

Patch Set 4 : . #

Unified diffs Side-by-side diffs Stats (+138 lines, -60 lines)
M chrome/common/service_process_util.h View 4 chunks +10 lines, -3 lines 0 comments
M chrome/common/service_process_util.cc View 2 chunks +6 lines, -0 lines 0 comments
M chrome/common/service_process_util_unittest.cc View 4 chunks +20 lines, -9 lines 0 comments
M chrome/service/service_main.cc View 1 chunk +1 line, -1 line 0 comments
M chrome/service/service_process.cc View 4 chunks +4 lines, -4 lines 0 comments
M net/base/bandwidth_metrics.h View 1 chunk +1 line, -3 lines 0 comments
A net/base/bandwidth_metrics.cc View 1 chunk +15 lines, -0 lines 0 comments
M net/net.gyp View 1 chunk +2 lines, -0 lines 0 comments
M net/socket_stream/socket_stream_job.cc View 1 chunk +3 lines, -6 lines 0 comments
M net/socket_stream/socket_stream_job_manager.h View 2 chunks +7 lines, -2 lines 0 comments
M net/socket_stream/socket_stream_job_manager.cc View 2 chunks +7 lines, -0 lines 0 comments
M net/spdy/spdy_stream.cc View 2 chunks +0 lines, -2 lines 0 comments
M net/url_request/https_prober.h View 3 chunks +6 lines, -3 lines 0 comments
M net/url_request/https_prober.cc View 2 chunks +6 lines, -0 lines 0 comments
M net/url_request/url_request.cc View 8 chunks +15 lines, -14 lines 0 comments
M net/url_request/url_request_http_job.cc View 1 chunk +1 line, -1 line 0 comments
M net/url_request/url_request_job_manager.h View 3 chunks +8 lines, -2 lines 0 comments
M net/url_request/url_request_job_manager.cc View 2 chunks +6 lines, -0 lines 0 comments
M net/websockets/websocket_job.cc View 5 chunks +8 lines, -7 lines 0 comments
M net/websockets/websocket_job_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments
M net/websockets/websocket_throttle.h View 2 chunks +5 lines, -1 line 0 comments
M net/websockets/websocket_throttle.cc View 1 chunk +5 lines, -0 lines 0 comments

Messages

Total messages: 10 (0 generated)
Satish
10 years ago (2010-12-07 21:07:21 UTC) #1
agl
I think this is ok, but you need to get willchan to review really.
10 years ago (2010-12-07 21:11:48 UTC) #2
Satish
Adding willchan@ to the review as recommended by agl@.
10 years ago (2010-12-07 21:13:50 UTC) #3
willchan no longer on Chromium
LGTM with nits. http://codereview.chromium.org/5634005/diff/2001/chrome/common/service_process_util.h File chrome/common/service_process_util.h (right): http://codereview.chromium.org/5634005/diff/2001/chrome/common/service_process_util.h#newcode56 chrome/common/service_process_util.h:56: // Returns false is another service ...
10 years ago (2010-12-08 00:58:46 UTC) #4
ukai
LGTM with nits. http://codereview.chromium.org/5634005/diff/2001/net/spdy/spdy_stream.cc File net/spdy/spdy_stream.cc (right): http://codereview.chromium.org/5634005/diff/2001/net/spdy/spdy_stream.cc#newcode39 net/spdy/spdy_stream.cc:39: ScopedBandwidthMetrics::ScopedBandwidthMetrics() don't we have net/base/bandwidth_metrics.cc ? ...
10 years ago (2010-12-08 01:44:14 UTC) #5
willchan no longer on Chromium
http://codereview.chromium.org/5634005/diff/2001/net/spdy/spdy_stream.cc File net/spdy/spdy_stream.cc (right): http://codereview.chromium.org/5634005/diff/2001/net/spdy/spdy_stream.cc#newcode39 net/spdy/spdy_stream.cc:39: ScopedBandwidthMetrics::ScopedBandwidthMetrics() On 2010/12/08 01:44:15, ukai wrote: > don't we ...
10 years ago (2010-12-08 04:02:47 UTC) #6
Satish
All comments addressed. Will wait for your LGTMs again before submitting. http://codereview.chromium.org/5634005/diff/2001/chrome/common/service_process_util.h File chrome/common/service_process_util.h (right): ...
10 years ago (2010-12-08 12:58:22 UTC) #7
willchan no longer on Chromium
http://codereview.chromium.org/5634005/diff/13001/net/socket_stream/socket_stream_job_manager.h File net/socket_stream/socket_stream_job_manager.h (right): http://codereview.chromium.org/5634005/diff/13001/net/socket_stream/socket_stream_job_manager.h#newcode12 net/socket_stream/socket_stream_job_manager.h:12: #include "base/singleton.h" As joth mentioned in another code review, ...
10 years ago (2010-12-08 18:09:41 UTC) #8
Satish
http://codereview.chromium.org/5634005/diff/13001/net/socket_stream/socket_stream_job_manager.h File net/socket_stream/socket_stream_job_manager.h (right): http://codereview.chromium.org/5634005/diff/13001/net/socket_stream/socket_stream_job_manager.h#newcode12 net/socket_stream/socket_stream_job_manager.h:12: #include "base/singleton.h" On 2010/12/08 18:09:41, willchan wrote: > As ...
10 years ago (2010-12-08 22:06:39 UTC) #9
ukai
10 years ago (2010-12-09 00:20:44 UTC) #10
LGTM

Powered by Google App Engine