diff options
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/about_flags.cc | 7 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_file_browser_private_api.cc | 2 | ||||
-rw-r--r-- | chrome/browser/resources/file_manager/js/file_manager.js | 2 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 3 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 1 |
5 files changed, 15 insertions, 0 deletions
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 49dbd3f..263f031 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc @@ -362,6 +362,13 @@ const Experiment kExperiments[] = { kOsCrOS, SINGLE_VALUE_TYPE(switches::kWebUILogin) }, + { + "enable-archives", + IDS_FILE_BROWSER_MOUNT_ARCHIVE, + IDS_FILE_MANAGER, + kOsCrOS, + SINGLE_VALUE_TYPE(switches::kEnableArchives) + }, #endif { "memory-widget", diff --git a/chrome/browser/extensions/extension_file_browser_private_api.cc b/chrome/browser/extensions/extension_file_browser_private_api.cc index f64321e..0a6be00 100644 --- a/chrome/browser/extensions/extension_file_browser_private_api.cc +++ b/chrome/browser/extensions/extension_file_browser_private_api.cc @@ -1527,6 +1527,8 @@ bool FileDialogStringsFunction::RunImpl() { l10n_util::GetStringUTF16(IDS_CERT_MANAGER_VIEW_CERT_BUTTON)); dict->SetString("PLAY_MEDIA", l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_PLAY)); + if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableArchives)) + dict->SetString("ENABLE_ARCHIVES", "true"); return true; } diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js index f9c8514..b5e971f 100644 --- a/chrome/browser/resources/file_manager/js/file_manager.js +++ b/chrome/browser/resources/file_manager/js/file_manager.js @@ -1647,6 +1647,8 @@ FileManager.prototype = { task.iconUrl = chrome.extension.getURL('images/icon_mount_archive_16x16.png'); task.title = str('MOUNT_ARCHIVE'); + if (str('ENABLE_ARCHIVES') != 'true') + continue; } } this.renderTaskButton_(task); diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index e03bf0f..a160c7b 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -1113,6 +1113,9 @@ const char kCompressSystemFeedback[] = "compress-sys-feedback"; // Enables overriding the path for the default authentication extension. const char kAuthExtensionPath[] = "auth-ext-path"; +// Enables archive file (zip) handling in file manager. +const char kEnableArchives[] = "enable-archives"; + #ifndef NDEBUG // Skips all other OOBE pages after user login. const char kOobeSkipPostLogin[] = "oobe-skip-postlogin"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 4e7785e..c766d8b 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -306,6 +306,7 @@ extern const char kStubCros[]; extern const char kScreenSaverUrl[]; extern const char kCompressSystemFeedback[]; extern const char kAuthExtensionPath[]; +extern const char kEnableArchives[]; #ifndef NDEBUG extern const char kOobeSkipPostLogin[]; extern const char kFileManagerExtensionPath[]; |