|
Re-write many calls to WrapUnique() with MakeUnique()
A mostly-automated change to convert instances of WrapUnique(new Foo(...)) to
MakeUnique<Foo>(...). See the thread at
https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/iQgMedVA8-k
for background.
To avoid requiring too many manual fixups, the change skips some cases that are
frequently problematic. In particular, in methods named Foo::Method() it will
not try to change WrapUnique(new Foo()) to MakeUnique<Foo>(). This is because
Foo::Method() may be accessing an internal constructor of Foo.
Cases where MakeUnique<NestedClass>(...) is called within a method of
OuterClass are common but hard to detect automatically, so have been fixed-up
manually.
The only types of manual fix ups applied are:
1) Revert MakeUnique back to WrapUnique
2) Change NULL to nullptr in argument list (MakeUnique cannot forward NULL
correctly)
3) Add base:: namespace qualifier where missing.
WrapUnique(new Foo) has not been converted to MakeUnique<Foo>() as this might
change behaviour if Foo does not have a user-defined constructor. For example,
WrapUnique(new int) creates an unitialised integer, but MakeUnique<int>()
creates an integer initialised to 0.
git cl format has been been run over the CL. Spot-checking has uncovered no
cases of mis-formatting.
BUG= 637812
Committed: https://crrev.com/55d8215215c10a413f227b8bcf0e3a826e7b5b2a
Cr-Commit-Position: refs/heads/master@{#415929}
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+332 lines, -361 lines) |
Patch |
|
M |
components/policy/core/browser/android/policy_converter.cc
|
View
|
|
5 chunks |
+10 lines, -10 lines |
0 comments
|
Download
|
|
M |
components/policy/core/browser/autofill_policy_handler_unittest.cc
|
View
|
1
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
components/policy/core/browser/configuration_policy_handler_unittest.cc
|
View
|
|
29 chunks |
+41 lines, -41 lines |
0 comments
|
Download
|
|
M |
components/policy/core/browser/configuration_policy_pref_store_unittest.cc
|
View
|
|
5 chunks |
+6 lines, -6 lines |
0 comments
|
Download
|
|
M |
components/policy/core/browser/proxy_policy_handler_unittest.cc
|
View
|
1
|
13 chunks |
+55 lines, -62 lines |
0 comments
|
Download
|
|
M |
components/policy/core/browser/url_blacklist_policy_handler_unittest.cc
|
View
|
1
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
components/policy/core/common/async_policy_provider_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
components/policy/core/common/cloud/cloud_policy_client_unittest.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
components/policy/core/common/cloud/cloud_policy_manager_unittest.cc
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
components/policy/core/common/cloud/component_cloud_policy_service.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
components/policy/core/common/cloud/component_cloud_policy_service_unittest.cc
|
View
|
1
|
3 chunks |
+4 lines, -5 lines |
0 comments
|
Download
|
|
M |
components/policy/core/common/cloud/component_cloud_policy_store_unittest.cc
|
View
|
1
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
components/policy/core/common/cloud/component_cloud_policy_updater_unittest.cc
|
View
|
1
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
components/policy/core/common/cloud/external_policy_data_fetcher.cc
|
View
|
1
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
components/policy/core/common/cloud/mock_cloud_external_data_manager.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
components/policy/core/common/cloud/policy_header_io_helper_unittest.cc
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
components/policy/core/common/cloud/policy_header_service.cc
|
View
|
|
1 chunk |
+3 lines, -2 lines |
0 comments
|
Download
|
|
M |
components/policy/core/common/cloud/user_cloud_policy_manager.cc
|
View
|
1
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
components/policy/core/common/cloud/user_cloud_policy_manager_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
components/policy/core/common/configuration_policy_provider_test.cc
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
components/policy/core/common/generate_policy_source_unittest.cc
|
View
|
1
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
|
M |
components/policy/core/common/policy_bundle_unittest.cc
|
View
|
|
5 chunks |
+22 lines, -22 lines |
0 comments
|
Download
|
|
M |
components/policy/core/common/policy_loader_ios_unittest.mm
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
components/policy/core/common/policy_loader_mac_unittest.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
components/policy/core/common/policy_loader_win_unittest.cc
|
View
|
|
2 chunks |
+9 lines, -9 lines |
0 comments
|
Download
|
|
M |
components/policy/core/common/policy_map_unittest.cc
|
View
|
|
9 chunks |
+53 lines, -70 lines |
0 comments
|
Download
|
|
M |
components/policy/core/common/policy_service_impl_unittest.cc
|
View
|
1
|
15 chunks |
+51 lines, -55 lines |
0 comments
|
Download
|
|
M |
components/policy/core/common/policy_statistics_collector_unittest.cc
|
View
|
|
1 chunk |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
components/policy/core/common/preg_parser_win_unittest.cc
|
View
|
|
3 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
components/policy/core/common/proxy_policy_provider_unittest.cc
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
|
M |
components/policy/core/common/registry_dict_win_unittest.cc
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
components/policy/core/common/remote_commands/test_remote_command_job.cc
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
components/policy/core/common/schema_map_unittest.cc
|
View
|
|
6 chunks |
+27 lines, -27 lines |
0 comments
|
Download
|
|
M |
components/policy/core/common/schema_registry_tracking_policy_provider_unittest.cc
|
View
|
|
5 chunks |
+5 lines, -5 lines |
0 comments
|
Download
|
Total messages: 22 (14 generated)
|