Convert bare new to base::MakeRefCounted<> in extensions directories

Converts all usages of bare new that:
(1) construct base::RefCounted objects,
(2) use public constructors,
(3) are in an extensions directory, and
(4) wouldn't cause changes in non-extensions directory
to use base::MakeRefCounted instead.

Bug: 919580
Change-Id: Ia6def2e499e5195640695b577004df2cd6d95300
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1772133
Commit-Queue: Matthew Denton <[email protected]>
Reviewed-by: Istiaque Ahmed <[email protected]>
Reviewed-by: Devlin <[email protected]>
Cr-Commit-Position: refs/heads/master@{#691910}
diff --git a/chrome/browser/extensions/default_apps.h b/chrome/browser/extensions/default_apps.h
index 10f477b..d98f43cd 100644
--- a/chrome/browser/extensions/default_apps.h
+++ b/chrome/browser/extensions/default_apps.h
@@ -6,6 +6,7 @@
 #define CHROME_BROWSER_EXTENSIONS_DEFAULT_APPS_H_
 
 #include "base/macros.h"
+#include "base/memory/scoped_refptr.h"
 #include "chrome/browser/extensions/external_provider_impl.h"
 #include "extensions/common/manifest.h"
 
@@ -43,7 +44,7 @@
  public:
   Provider(Profile* profile,
            VisitorInterface* service,
-           extensions::ExternalLoader* loader,
+           scoped_refptr<extensions::ExternalLoader> loader,
            extensions::Manifest::Location crx_location,
            extensions::Manifest::Location download_location,
            int creation_flags);