Turn the rename Save to Download experiment off

The experiment to rename "Save Image" to "Download Image" is having a negative
impact, it needs to be turned off.
This CL cleans up the code added for this experiment.

BUG=669069

Review-Url: https://codereview.chromium.org/2810233004
Cr-Commit-Position: refs/heads/master@{#465165}
diff --git a/ios/chrome/app/strings/ios_strings.grd b/ios/chrome/app/strings/ios_strings.grd
index b53e4328f..1a98919b 100644
--- a/ios/chrome/app/strings/ios_strings.grd
+++ b/ios/chrome/app/strings/ios_strings.grd
@@ -543,9 +543,6 @@
       <message name="IDS_IOS_CONTENT_CONTEXT_SAVEIMAGE" desc="The name of the Save Image As command in the content area context menu">
         Save Image
       </message>
-      <message name="IDS_IOS_CONTENT_CONTEXT_DOWNLOADIMAGE" desc="The name of the Download Image command in the content area context menu">
-        Download Image
-      </message>
       <message name="IDS_IOS_CONTENT_SUGGESTIONS_DELETE" desc="The name of the Delete command in the Content Suggestions articles context menu">
         Delete
       </message>
diff --git a/ios/chrome/browser/about_flags.mm b/ios/chrome/browser/about_flags.mm
index bc0a1c4..a04dd41 100644
--- a/ios/chrome/browser/about_flags.mm
+++ b/ios/chrome/browser/about_flags.mm
@@ -191,16 +191,6 @@
     command_line->AppendSwitch(switches::kDisablePaymentRequest);
   }
 
-  // Populate command line flag for the Rename "Save Image" to "Download Image"
-  // experiment.
-  NSString* enableDownloadRenaming =
-      [defaults stringForKey:@"EnableDownloadRenaming"];
-  if ([enableDownloadRenaming isEqualToString:@"Enabled"]) {
-    command_line->AppendSwitch(switches::kEnableDownloadImageRenaming);
-  } else if ([enableDownloadRenaming isEqualToString:@"Disabled"]) {
-    command_line->AppendSwitch(switches::kDisableDownloadImageRenaming);
-  }
-
   // Populate command line flag for Suggestions UI display.
   NSString* enableSuggestions = [defaults stringForKey:@"EnableSuggestions"];
   if ([enableSuggestions isEqualToString:@"Enabled"]) {
diff --git a/ios/chrome/browser/chrome_switches.cc b/ios/chrome/browser/chrome_switches.cc
index 6e6b734..6f73b44e 100644
--- a/ios/chrome/browser/chrome_switches.cc
+++ b/ios/chrome/browser/chrome_switches.cc
@@ -47,9 +47,6 @@
 // Disables Physical Web scanning for nearby URLs.
 const char kDisableIOSPhysicalWeb[] = "disable-ios-physical-web";
 
-// Disables the string change from "Save Image" to "Download Image".
-const char kDisableDownloadImageRenaming[] = "disable-download-image-renaming";
-
 // Disables the Suggestions UI
 const char kDisableSuggestionsUI[] = "disable-suggestions-ui";
 
@@ -90,9 +87,6 @@
 // Enables Physical Web scanning for nearby URLs.
 const char kEnableIOSPhysicalWeb[] = "enable-ios-physical-web";
 
-// Enables the string change from "Save Image" to "Download Image".
-const char kEnableDownloadImageRenaming[] = "enable-download-image-renaming";
-
 // Enables the Suggestions UI
 const char kEnableSuggestionsUI[] = "enable-suggestions-ui";
 
diff --git a/ios/chrome/browser/chrome_switches.h b/ios/chrome/browser/chrome_switches.h
index aaac82d..322636f3 100644
--- a/ios/chrome/browser/chrome_switches.h
+++ b/ios/chrome/browser/chrome_switches.h
@@ -20,7 +20,6 @@
 extern const char kDisablePaymentRequest[];
 extern const char kDisableTabStripAutoScrollNewTabs[];
 extern const char kDisableIOSPhysicalWeb[];
-extern const char kDisableDownloadImageRenaming[];
 extern const char kDisableSuggestionsUI[];
 
 extern const char kEnableContextualSearch[];
@@ -35,7 +34,6 @@
 extern const char kEnableReaderModeToolbarIcon[];
 extern const char kEnableSpotlightActions[];
 extern const char kEnableIOSPhysicalWeb[];
-extern const char kEnableDownloadImageRenaming[];
 extern const char kEnableSuggestionsUI[];
 
 extern const char kIOSForceVariationIds[];
diff --git a/ios/chrome/browser/experimental_flags.h b/ios/chrome/browser/experimental_flags.h
index 5cb7b85..3ab4110 100644
--- a/ios/chrome/browser/experimental_flags.h
+++ b/ios/chrome/browser/experimental_flags.h
@@ -46,9 +46,6 @@
 // Whether auto-reload is enabled.
 bool IsAutoReloadEnabled();
 
-// Whether "Save Image" should be renamed as "Download Image".
-bool IsDownloadRenamingEnabled();
-
 // Whether the external applicaiton prompt is enabled.
 bool IsExternalApplicationPromptEnabled();
 
diff --git a/ios/chrome/browser/experimental_flags.mm b/ios/chrome/browser/experimental_flags.mm
index c410716..1ae41b0d 100644
--- a/ios/chrome/browser/experimental_flags.mm
+++ b/ios/chrome/browser/experimental_flags.mm
@@ -44,9 +44,6 @@
 NSString* const kSafariVCSignInDisabled = @"SafariVCSignInDisabled";
 NSString* const kWhatsNewPromoStatus = @"WhatsNewPromoStatus";
 
-const base::Feature kIOSDownloadImageRenaming{
-    "IOSDownloadImageRenaming", base::FEATURE_DISABLED_BY_DEFAULT};
-
 }  // namespace
 
 namespace experimental_flags {
@@ -94,19 +91,6 @@
                           base::CompareCase::INSENSITIVE_ASCII);
 }
 
-bool IsDownloadRenamingEnabled() {
-  // Check if the experimental flag is forced on or off.
-  base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
-  if (command_line->HasSwitch(switches::kEnableDownloadImageRenaming)) {
-    return true;
-  } else if (command_line->HasSwitch(switches::kDisableDownloadImageRenaming)) {
-    return false;
-  }
-
-  // Check if the finch experiment is turned on.
-  return base::FeatureList::IsEnabled(kIOSDownloadImageRenaming);
-}
-
 bool IsExternalApplicationPromptEnabled() {
   return ![[NSUserDefaults standardUserDefaults]
       boolForKey:kExternalAppPromptDisabled];
diff --git a/ios/chrome/browser/resources/Settings.bundle/Experimental.plist b/ios/chrome/browser/resources/Settings.bundle/Experimental.plist
index e5e22800..a931c238 100644
--- a/ios/chrome/browser/resources/Settings.bundle/Experimental.plist
+++ b/ios/chrome/browser/resources/Settings.bundle/Experimental.plist
@@ -184,28 +184,6 @@
 			<key>Type</key>
 			<string>PSMultiValueSpecifier</string>
 			<key>Title</key>
-			<string>Enable Download Image Renaming</string>
-			<key>Key</key>
-			<string>EnableDownloadRenaming</string>
-			<key>DefaultValue</key>
-			<string></string>
-			<key>Values</key>
-			<array>
-				<string></string>
-				<string>Enabled</string>
-				<string>Disabled</string>
-			</array>
-			<key>Titles</key>
-			<array>
-				<string>Default</string>
-				<string>Enabled</string>
-				<string>Disabled</string>
-			</array>
-		</dict>
-		<dict>
-			<key>Type</key>
-			<string>PSMultiValueSpecifier</string>
-			<key>Title</key>
 			<string>Gaia Environment</string>
 			<key>Key</key>
 			<string>GAIAEnvironment</string>
diff --git a/ios/chrome/browser/ui/browser_view_controller.mm b/ios/chrome/browser/ui/browser_view_controller.mm
index 5bb9155b..2979eb4 100644
--- a/ios/chrome/browser/ui/browser_view_controller.mm
+++ b/ios/chrome/browser/ui/browser_view_controller.mm
@@ -2595,13 +2595,7 @@
   if (isImage) {
     web::Referrer referrer([_model currentTab].url, params.referrer_policy);
     // Save Image.
-    if (experimental_flags::IsDownloadRenamingEnabled()) {
-      title = l10n_util::GetNSStringWithFixup(
-          IDS_IOS_CONTENT_CONTEXT_DOWNLOADIMAGE);
-    } else {
-      title =
-          l10n_util::GetNSStringWithFixup(IDS_IOS_CONTENT_CONTEXT_SAVEIMAGE);
-    }
+    title = l10n_util::GetNSStringWithFixup(IDS_IOS_CONTENT_CONTEXT_SAVEIMAGE);
     action = ^{
       Record(ACTION_SAVE_IMAGE, isImage, isLink);
       [weakSelf saveImageAtURL:imageUrl referrer:referrer];