Makes GetComponentExtensionResourceManager() thread-safe.

As is noted in a bug, this method can be called on various thread.
Actually, the instance itself holds simple mapping and its method
can be const, therefore it's safer to early-initialize and the
method just returns the already initialized object.

Also this should be const and the method does not change its
internal state, therefore it's thread safe.

BUG=445747
[email protected]
TEST=no functional changes / build succeeds

Review URL: https://codereview.chromium.org/830833002

Cr-Commit-Position: refs/heads/master@{#310029}
diff --git a/extensions/browser/test_extensions_browser_client.h b/extensions/browser/test_extensions_browser_client.h
index 58ed584..1431f169 100644
--- a/extensions/browser/test_extensions_browser_client.h
+++ b/extensions/browser/test_extensions_browser_client.h
@@ -80,8 +80,8 @@
       ExtensionFunctionRegistry* registry) const override;
   scoped_ptr<RuntimeAPIDelegate> CreateRuntimeAPIDelegate(
       content::BrowserContext* context) const override;
-  ComponentExtensionResourceManager* GetComponentExtensionResourceManager()
-      override;
+  const ComponentExtensionResourceManager*
+  GetComponentExtensionResourceManager() override;
   void BroadcastEventToRenderers(const std::string& event_name,
                                  scoped_ptr<base::ListValue> args) override;
   net::NetLog* GetNetLog() override;