components: Change auto to not deduce raw pointers.

This patch updates the code to prevent auto deducing to a raw pointer.

R=jochen, danakj, dcheng
BUG=554600

Review-Url: https://codereview.chromium.org/2110663002
Cr-Commit-Position: refs/heads/master@{#406674}
diff --git a/components/component_updater/component_updater_service.cc b/components/component_updater/component_updater_service.cc
index 5ef5a3f5..ab4ad19 100644
--- a/components/component_updater/component_updater_service.cc
+++ b/components/component_updater/component_updater_service.cc
@@ -234,7 +234,7 @@
   DCHECK(GetComponent(id));
 
   // Check if the request is too soon.
-  const auto component_state(GetComponentState(id));
+  const auto* component_state(GetComponentState(id));
   if (component_state) {
     base::TimeDelta delta = base::Time::Now() - component_state->last_check;
     if (delta < base::TimeDelta::FromSeconds(config_->OnDemandDelay()))
@@ -269,7 +269,7 @@
   for (const auto id : components_order_) {
     DCHECK(components_.find(id) != components_.end());
 
-    auto component(GetComponent(id));
+    auto* component(GetComponent(id));
     if (!component || component->requires_network_encryption)
       secure_ids.push_back(id);
     else
@@ -327,7 +327,7 @@
   DCHECK(components->empty());
 
   for (const auto& id : ids) {
-    const auto registered_component(GetComponent(id));
+    const auto* registered_component(GetComponent(id));
     if (registered_component) {
       components->push_back(*registered_component);
     }
@@ -345,7 +345,7 @@
 
   for (const auto id : components_pending_unregistration_) {
     if (!update_client_->IsUpdating(id)) {
-      const auto component = GetComponent(id);
+      const auto* component = GetComponent(id);
       if (component)
         DoUnregisterComponent(*component);
     }
@@ -376,7 +376,7 @@
 
   // Update the component registration with the new version.
   if (event == Observer::Events::COMPONENT_UPDATED) {
-    auto component(const_cast<CrxComponent*>(GetComponent(id)));
+    auto* component(const_cast<CrxComponent*>(GetComponent(id)));
     if (component) {
       component->version = update_item.next_version;
       component->fingerprint = update_item.next_fp;