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

Issue 5581008: Add a new GetInstance() method for singleton classes, take 2. (Closed)

Created:
10 years ago by Satish
Modified:
9 years, 7 months ago
CC:
chromium-reviews, ddorwin+watch_chromium.org, vrk (LEFT CHROMIUM), fbarchard, Alpha Left Google, ben+cc_chromium.org, Erik does not do reviews, Paweł Hajdan Jr., jam, apatrick_chromium, sjl, Aaron Boodman, acolwell GONE FROM CHROMIUM, annacc, darin-cc_chromium.org, awong, brettw-cc_chromium.org, pam+watch_chromium.org, scherkus (not reviewing), amit, stuartmorgan+watch_chromium.org, ceee-reviews_chromium.org
Visibility:
Public.

Description

Add a new GetInstance() method for singleton classes, take 2. 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 all files except those under chrome/browser, chrome/net, chrome/service and third_party/WebKit (these will be done in future CLs). Suggested files to focus for reviewers: - joi@ for files under src/ceee - tommi@ for files under src/chrome_frame - maruel@ for the rest of the files. BUG=65298 TEST=all existing tests should continue to pass. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=68577

Patch Set 1 #

Patch Set 2 : . #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+269 lines, -182 lines) Patch
M base/global_descriptors_posix.h View 1 chunk +7 lines, -0 lines 4 comments Download
M base/global_descriptors_posix.cc View 1 chunk +11 lines, -0 lines 0 comments Download
M ceee/ie/broker/api_dispatcher.h View 1 chunk +4 lines, -2 lines 0 comments Download
M ceee/ie/broker/api_dispatcher.cc View 5 chunks +16 lines, -17 lines 0 comments Download
M ceee/ie/broker/broker.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M ceee/ie/broker/broker_module.cc View 1 chunk +1 line, -2 lines 0 comments Download
M ceee/ie/broker/chrome_postman.cc View 3 chunks +5 lines, -5 lines 0 comments Download
M ceee/ie/broker/executors_manager.h View 3 chunks +4 lines, -1 line 0 comments Download
M ceee/ie/broker/executors_manager.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M ceee/ie/broker/tab_api_module.cc View 2 chunks +3 lines, -4 lines 0 comments Download
M ceee/ie/plugin/bho/cookie_accountant.h View 1 chunk +4 lines, -2 lines 0 comments Download
M ceee/ie/plugin/bho/cookie_accountant.cc View 1 chunk +6 lines, -1 line 0 comments Download
M ceee/ie/plugin/bho/web_progress_notifier.cc View 1 chunk +1 line, -1 line 0 comments Download
M ceee/ie/plugin/bho/webrequest_notifier.h View 1 chunk +4 lines, -3 lines 0 comments Download
M ceee/ie/plugin/bho/webrequest_notifier.cc View 11 chunks +15 lines, -10 lines 0 comments Download
M chrome/app/breakpad_linux.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/app/chrome_main.cc View 1 1 chunk +1 line, -4 lines 0 comments Download
M chrome/browser/gpu_process_host.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/plugin_process_host.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/renderer_host/resource_message_filter_gtk.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/zygote_main_linux.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/gpu/gpu_channel.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/gpu/gpu_video_service.h View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/gpu/gpu_video_service.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/renderer/automation/dom_automation_v8_extension.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/extensions/bindings_utils.h View 1 chunk +1 line, -14 lines 0 comments Download
M chrome/renderer/extensions/bindings_utils.cc View 1 chunk +14 lines, -0 lines 0 comments Download
M chrome/renderer/extensions/event_bindings.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/extensions/extension_api_json_validity_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/renderer/extensions/extension_process_bindings.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/renderer/extensions/js_only_v8_extensions.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/renderer/extensions/renderer_extension_bindings.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/webdriver/commands/create_session.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/webdriver/commands/session_with_id.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/webdriver/commands/webdriver_command.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/webdriver/server.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/test/webdriver/session_manager.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/webdriver/session_manager.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome_frame/chrome_tab.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome_frame/dll_redirector.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome_frame/dll_redirector.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome_frame/policy_settings.h View 4 chunks +11 lines, -7 lines 0 comments Download
M chrome_frame/policy_settings.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome_frame/protocol_sink_wrap.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M chrome_frame/simple_resource_loader.h View 1 chunk +1 line, -3 lines 0 comments Download
M chrome_frame/simple_resource_loader.cc View 2 chunks +8 lines, -2 lines 0 comments Download
M chrome_frame/test/policy_settings_unittest.cc View 5 chunks +46 lines, -44 lines 0 comments Download
M chrome_frame/utils.cc View 2 chunks +4 lines, -5 lines 0 comments Download
M gfx/gtk_native_view_id_manager.h View 1 chunk +3 lines, -3 lines 0 comments Download
M gfx/gtk_native_view_id_manager.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M gfx/native_widget_types_gtk.cc View 1 chunk +1 line, -1 line 0 comments Download
M ipc/ipc_channel_posix.cc View 1 chunk +1 line, -1 line 0 comments Download
M media/filters/ffmpeg_demuxer.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M media/filters/ffmpeg_glue.h View 1 chunk +4 lines, -1 line 0 comments Download
M media/filters/ffmpeg_glue.cc View 2 chunks +6 lines, -1 line 0 comments Download
M media/filters/ffmpeg_glue_unittest.cc View 5 chunks +6 lines, -6 lines 0 comments Download
M views/focus/focus_manager.h View 1 chunk +1 line, -3 lines 0 comments Download
M views/focus/focus_manager.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M webkit/glue/plugins/pepper_resource_tracker.h View 1 chunk +1 line, -3 lines 0 comments Download
M webkit/glue/plugins/pepper_resource_tracker.cc View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Satish
10 years ago (2010-12-07 17:04:33 UTC) #1
M-A Ruel
Also, once there's no appearance of Singleton in headers files, you could add a check ...
10 years ago (2010-12-07 17:32:20 UTC) #2
Satish
> Also, once there's no appearance of Singleton in headers files, you could add a ...
10 years ago (2010-12-07 17:45:27 UTC) #3
M-A Ruel
lgtm for the rest, just make sure Evan is fine about the dual singleton for ...
10 years ago (2010-12-07 17:49:17 UTC) #4
Evan Martin
http://codereview.chromium.org/5581008/diff/2001/base/global_descriptors_posix.h File base/global_descriptors_posix.h (right): http://codereview.chromium.org/5581008/diff/2001/base/global_descriptors_posix.h#newcode45 base/global_descriptors_posix.h:45: static GlobalDescriptors* GetInstance(); On 2010/12/07 17:49:17, Marc-Antoine Ruel wrote: ...
10 years ago (2010-12-07 17:55:16 UTC) #5
Satish
> Ugh, no, this was definitely not intentional. :( > Please let me fix the ...
10 years ago (2010-12-07 17:59:05 UTC) #6
Evan Martin
On Tue, Dec 7, 2010 at 9:59 AM, <satish@chromium.org> wrote: >> Ugh, no, this was ...
10 years ago (2010-12-07 18:00:46 UTC) #7
tommi (sloooow) - chröme
lgtm for chrome frame.
10 years ago (2010-12-07 18:38:17 UTC) #8
Jói
10 years ago (2010-12-07 18:56:25 UTC) #9
LGTM for CEEE.

Please run ceee/smoke_test.bat in an admin command prompt before submitting to
make sure the CEEE tests pass.

Very cool stuff, thanks for doing this Satish.

Powered by Google App Engine
This is Rietveld 408576698