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

Issue 6324004: Made return types of various Value::DeepCopy() implementations more specific (Closed)

Created:
9 years, 11 months ago by akalin
Modified:
9 years, 7 months ago
Reviewers:
tony, Evan Martin, evanm
CC:
chromium-reviews, ncarter (slow), idana, Raghu Simha, Erik does not do reviews, brettw-cc_chromium.org, Aaron Boodman, arv (Not doing code reviews), pam+watch_chromium.org, Paweł Hajdan Jr., tim (not reviewing), e.verdon
Visibility:
Public.

Description

Made return types of various Value::DeepCopy() implementations more specific Since C++ supports covariant return types, a subclass of Value can return its own pointer type for Value::DeepCopy(). Also made signatures of Value::Create*Value() more specific. Removed now-unnecessary casts. Added test for covariant return types. BUG=None TEST=Compile Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=71617

Patch Set 1 #

Patch Set 2 : Add test for covariant return types #

Unified diffs Side-by-side diffs Delta from patch set Stats (+124 lines, -76 lines) Patch
M base/values.h View 1 7 chunks +13 lines, -10 lines 0 comments Download
M base/values.cc View 6 chunks +10 lines, -10 lines 0 comments Download
M base/values_unittest.cc View 1 5 chunks +67 lines, -11 lines 0 comments Download
M ceee/ie/broker/window_api_module.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_function.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_prefs.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/extensions/external_pref_extension_loader.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/extensions/sandboxed_extension_unpacker.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/importer/importer_bridge.cc View 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/policy/device_management_policy_cache.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/glue/preference_model_associator.cc View 2 chunks +2 lines, -3 lines 0 comments Download
M chrome/common/extensions/extension.cc View 5 chunks +6 lines, -11 lines 0 comments Download
M chrome/common/extensions/extension_unittest.cc View 13 chunks +18 lines, -18 lines 0 comments Download
M chrome/service/cloud_print/cloud_print_proxy_backend.cc View 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
akalin
+evmar for review
9 years, 11 months ago (2011-01-16 11:23:40 UTC) #1
evanm
Didn't realize that you could override in this way. LGTM if you're sure the overrides ...
9 years, 11 months ago (2011-01-16 18:23:57 UTC) #2
akalin
9 years, 11 months ago (2011-01-16 22:09:36 UTC) #3
On 2011/01/16 18:23:57, evanm wrote:
> Didn't realize that you could override in this way.  LGTM if you're sure the
> overrides work

I'm sure, but I added a test anyway, since DeepCopy() isn't pure virtual in
Values.

Committing as soon as trybots pass.

Powered by Google App Engine
This is Rietveld 408576698