Some tests are failing with the new code, so they are using old catapult. I was too hasty in removing this.

Revert "Remove cruft in gaia_id and extensions_to_load."

This reverts commit 2d706d8c2fd72cd74a076b2cf815f498f4ee3d73.

Change-Id: I3f7d230a174b3c5943e76ed71e809bded1c36193
Reviewed-on: https://chromium-review.googlesource.com/339673
Commit-Ready: Achuith Bhandarkar <achuith@chromium.org>
Tested-by: Achuith Bhandarkar <achuith@chromium.org>
Reviewed-by: harpreet Grewal <harpreet@chromium.org>
diff --git a/client/common_lib/cros/chrome.py b/client/common_lib/cros/chrome.py
index 5e1cf29..9fc6975 100644
--- a/client/common_lib/cros/chrome.py
+++ b/client/common_lib/cros/chrome.py
@@ -98,6 +98,18 @@
             finder_options.browser_options.AppendExtraBrowserArgs(
                     extra_browser_args)
 
+        # TODO(achuith): Remove this after PFQ revs. crbug.com/603169.
+        if logged_in:
+            try:
+                extensions_to_load = finder_options.extensions_to_load
+                for path in extension_paths:
+                    extension = extension_to_load.ExtensionToLoad(
+                            path, self.browser_type, is_component=is_component)
+                    extensions_to_load.append(extension)
+                self._extensions_to_load = extensions_to_load
+            except AttributeError:
+              pass
+
         # finder options must be set before parse_args(), browser options must
         # be set before Create().
         # TODO(crbug.com/360890) Below MUST be '2' so that it doesn't inhibit
@@ -119,16 +131,23 @@
         self.password = b_options.password if password is None else password
         b_options.username = self.username
         b_options.password = self.password
-        if gaia_id is not None:
-            b_options.gaia_id = gaia_id
+        # gaia_id will be added to telemetry code in chromium repository later
+        try:
+            self.gaia_id = b_options.gaia_id if gaia_id is None else gaia_id
+            b_options.gaia_id = self.gaia_id
+        except AttributeError:
+            pass
 
         if logged_in:
-            extensions_to_load = b_options.extensions_to_load
-            for path in extension_paths:
-                extension = extension_to_load.ExtensionToLoad(
-                        path, self.browser_type, is_component=is_component)
-                extensions_to_load.append(extension)
-            self._extensions_to_load = extensions_to_load
+            try:
+                extensions_to_load = b_options.extensions_to_load
+                for path in extension_paths:
+                    extension = extension_to_load.ExtensionToLoad(
+                            path, self.browser_type, is_component=is_component)
+                    extensions_to_load.append(extension)
+                self._extensions_to_load = extensions_to_load
+            except AttributeError:
+              pass
 
         # Turn on collection of Chrome coredumps via creation of a magic file.
         # (Without this, Chrome coredumps are trashed.)