Use an Omaha-style GUID app ID for updater self-updates.

Bug: 1001126
Change-Id: Ie9145aedd7021da0e1f258ae2b89a15770a00bff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1787402
Commit-Queue: Sergey Poromov <[email protected]>
Reviewed-by: Sergey Poromov <[email protected]>
Reviewed-by: Sorin Jianu <[email protected]>
Auto-Submit: Joshua Pawlicki <[email protected]>
Cr-Commit-Position: refs/heads/master@{#696824}
diff --git a/components/component_updater/component_updater_service.cc b/components/component_updater/component_updater_service.cc
index a98f186..41b569a 100644
--- a/components/component_updater/component_updater_service.cc
+++ b/components/component_updater/component_updater_service.cc
@@ -114,30 +114,30 @@
 // it will be replaced.
 bool CrxUpdateService::RegisterComponent(const CrxComponent& component) {
   DCHECK(thread_checker_.CalledOnValidThread());
-  if (component.pk_hash.empty() || !component.version.IsValid() ||
+  if (component.app_id.empty() || !component.version.IsValid() ||
       !component.installer) {
     return false;
   }
 
   // Update the registration data if the component has been registered before.
-  const std::string id(GetCrxComponentID(component));
-  auto it = components_.find(id);
+  auto it = components_.find(component.app_id);
   if (it != components_.end()) {
     it->second = component;
     return true;
   }
 
-  components_.insert(std::make_pair(id, component));
-  components_order_.push_back(id);
+  components_.insert(std::make_pair(component.app_id, component));
+  components_order_.push_back(component.app_id);
   for (const auto& mime_type : component.handled_mime_types)
-    component_ids_by_mime_type_[mime_type] = id;
+    component_ids_by_mime_type_[mime_type] = component.app_id;
 
   // Create an initial state for this component. The state is mutated in
   // response to events from the UpdateClient instance.
   CrxUpdateItem item;
-  item.id = id;
+  item.id = component.app_id;
   item.component = component;
-  const auto inserted = component_states_.insert(std::make_pair(id, item));
+  const auto inserted =
+      component_states_.insert(std::make_pair(component.app_id, item));
   DCHECK(inserted.second);
 
   // Start the timer if this is the first component registered. The first timer