Remove the obsolete needsadmin attribute.

It seems that the needsadmin attribute hasn't been used for a long time, so
stop parsing it. We were parsing out the value, then ignoring it anyway.

BUG=chromium:199039
TEST=built, trybot mario-release

Change-Id: Ic0fbb8924af7c647fe1630cc60c260587431a0ff
Reviewed-on: https://gerrit.chromium.org/gerrit/47822
Reviewed-by: Gilad Arnold <garnold@chromium.org>
Tested-by: Don Garrett <dgarrett@chromium.org>
Reviewed-by: Jay Srinivasan <jaysri@chromium.org>
Commit-Queue: Don Garrett <dgarrett@chromium.org>
diff --git a/omaha_request_action.cc b/omaha_request_action.cc
index 043ec1d..6d2ade4 100644
--- a/omaha_request_action.cc
+++ b/omaha_request_action.cc
@@ -44,7 +44,7 @@
 static const char* kTagMetadataSignatureRsa = "MetadataSignatureRsa";
 static const char* kTagMetadataSize = "MetadataSize";
 static const char* kTagMoreInfo = "MoreInfo";
-static const char* kTagNeedsAdmin = "needsadmin";
+// Deprecated: "NeedsAdmin"
 static const char* kTagPrompt = "Prompt";
 static const char* kTagSha256 = "sha256";
 
@@ -666,8 +666,6 @@
       ParseInt(XmlGetProperty(pie_action_node, kTagMetadataSize));
   output_object->metadata_signature =
       XmlGetProperty(pie_action_node, kTagMetadataSignatureRsa);
-  output_object->needs_admin =
-      XmlGetProperty(pie_action_node, kTagNeedsAdmin) == "true";
   output_object->prompt = XmlGetProperty(pie_action_node, kTagPrompt) == "true";
   output_object->deadline = XmlGetProperty(pie_action_node, kTagDeadline);
   output_object->max_days_to_scatter =
diff --git a/omaha_request_action_unittest.cc b/omaha_request_action_unittest.cc
index 4897b7a..e550070 100644
--- a/omaha_request_action_unittest.cc
+++ b/omaha_request_action_unittest.cc
@@ -312,7 +312,6 @@
   EXPECT_EQ("http://more/info", response.more_info_url);
   EXPECT_EQ("HASH1234=", response.hash);
   EXPECT_EQ(123, response.size);
-  EXPECT_FALSE(response.needs_admin);
   EXPECT_TRUE(response.prompt);
   EXPECT_EQ("20101020", response.deadline);
 }
@@ -761,7 +760,6 @@
   EXPECT_EQ("", response.more_info_url);
   EXPECT_EQ("lkq34j5345", response.hash);
   EXPECT_EQ(587, response.size);
-  EXPECT_TRUE(response.needs_admin);
   EXPECT_FALSE(response.prompt);
   EXPECT_TRUE(response.deadline.empty());
 }
diff --git a/omaha_response.h b/omaha_response.h
index ea4fab1..db39868 100644
--- a/omaha_response.h
+++ b/omaha_response.h
@@ -24,7 +24,6 @@
         metadata_size(0),
         max_days_to_scatter(0),
         max_failure_count_per_url(0),
-        needs_admin(false),
         prompt(false),
         is_delta_payload(false),
         disable_payload_backoff(false) {}
@@ -53,7 +52,6 @@
   // next URL in the current pass. This is a configurable value from the
   // Omaha Response attribute, if ever we need to fine tune the behavior.
   uint32_t max_failure_count_per_url;
-  bool needs_admin;
   bool prompt;
 
   // True if the payload described in this response is a delta payload.
diff --git a/omaha_response_handler_action_unittest.cc b/omaha_response_handler_action_unittest.cc
index 80dfc5c..88ac0c4 100644
--- a/omaha_response_handler_action_unittest.cc
+++ b/omaha_response_handler_action_unittest.cc
@@ -112,7 +112,6 @@
     in.more_info_url = "http://more/info";
     in.hash = "HASH+";
     in.size = 12;
-    in.needs_admin = true;
     in.prompt = false;
     in.deadline = "20101020";
     InstallPlan install_plan;
@@ -139,7 +138,6 @@
     in.more_info_url = "http://more/info";
     in.hash = "HASHj+";
     in.size = 12;
-    in.needs_admin = true;
     in.prompt = true;
     InstallPlan install_plan;
     EXPECT_TRUE(DoTest(in, "/dev/sda5", &install_plan));
@@ -159,7 +157,6 @@
     in.more_info_url = "http://more/info";
     in.hash = "HASHj+";
     in.size = 12;
-    in.needs_admin = true;
     in.prompt = true;
     in.deadline = "some-deadline";
     InstallPlan install_plan;