summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-26 00:13:12 +0000
committerzelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-08-26 00:13:12 +0000
commit35d16db1744e29b28524da4b75da3fb7eb8c5ad4 (patch)
tree753856958ec57361014443a96177600326d375c9
parent3a766e0115e9799db766a88554b9ab12ee5bf2a4 (diff)
downloadchromium_src-35d16db1744e29b28524da4b75da3fb7eb8c5ad4.zip
chromium_src-35d16db1744e29b28524da4b75da3fb7eb8c5ad4.tar.gz
chromium_src-35d16db1744e29b28524da4b75da3fb7eb8c5ad4.tar.bz2
Put archive file handling support behind a flag for M14.
BUG=chromium-os:19657 TEST=make sure 'Open archive' task shows up only when --enable-archives switch is provided Review URL: http://codereview.chromium.org/7741020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98360 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/about_flags.cc7
-rw-r--r--chrome/browser/extensions/extension_file_browser_private_api.cc2
-rw-r--r--chrome/browser/resources/file_manager/js/file_manager.js2
-rw-r--r--chrome/common/chrome_switches.cc3
-rw-r--r--chrome/common/chrome_switches.h1
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[];