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.

Additional changes: Four C-style casts have been changed to static_cast. One instance of using "" to construct an empty string has been changed to std::string().

BUG=637812

Review-Url: https://codereview.chromium.org/2334613003
Cr-Commit-Position: refs/heads/master@{#418180}
diff --git a/chrome/browser/shell_integration_win.cc b/chrome/browser/shell_integration_win.cc
index 6c889d3..27610f8c 100644
--- a/chrome/browser/shell_integration_win.cc
+++ b/chrome/browser/shell_integration_win.cc
@@ -380,8 +380,8 @@
   // Helper function to create a registry watcher for a given |key_path|. Do
   // nothing on initialization failure.
   void AddRegistryKeyWatcher(const wchar_t* key_path) {
-    auto reg_key = base::WrapUnique(
-        new base::win::RegKey(HKEY_CURRENT_USER, key_path, KEY_NOTIFY));
+    auto reg_key = base::MakeUnique<base::win::RegKey>(HKEY_CURRENT_USER,
+                                                       key_path, KEY_NOTIFY);
 
     if (reg_key->Valid() &&
         reg_key->StartWatching(