Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10635)

Unified Diff: chrome/browser/extensions/extension_file_browser_private_api.cc

Issue 7471024: Formatting feature initial commit for ChromeOS Tree (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Added dependency on cros change Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_file_browser_private_api.cc
diff --git a/chrome/browser/extensions/extension_file_browser_private_api.cc b/chrome/browser/extensions/extension_file_browser_private_api.cc
index 2266a1cb3264c2ed1c6f5d8f78b40ef97470d92e..448cb4ddbf4e3deb40877e782655e23a64ffb540 100644
--- a/chrome/browser/extensions/extension_file_browser_private_api.cc
+++ b/chrome/browser/extensions/extension_file_browser_private_api.cc
@@ -1101,6 +1101,32 @@ bool UnmountVolumeFunction::RunImpl() {
return true;
}
+FormatDeviceFunction::FormatDeviceFunction() {
+}
+
+FormatDeviceFunction::~FormatDeviceFunction() {
+}
+
+bool FormatDeviceFunction::RunImpl() {
+ if (args_->GetSize() != 1) {
+ return false;
+ }
+
+ std::string volume_mount_path;
+ if (!args_->GetString(0, &volume_mount_path)) {
+ NOTREACHED();
+ }
+
+#ifdef OS_CHROMEOS
+ chromeos::CrosLibrary::Get()->GetMountLibrary()->FormatMountedDevice(
+ volume_mount_path.c_str());
+#endif
+
+ SendResponse(true);
+ return true;
+}
+
+
GetVolumeMetadataFunction::GetVolumeMetadataFunction() {
}
@@ -1229,6 +1255,8 @@ bool FileDialogStringsFunction::RunImpl() {
SET_STRING(IDS_FILE_BROWSER, OPEN_LABEL);
SET_STRING(IDS_FILE_BROWSER, SAVE_LABEL);
+ SET_STRING(IDS_FILE_BROWSER, FORMATTING_WARNING);
+
SET_STRING(IDS_FILE_BROWSER, SELECT_FOLDER_TITLE);
SET_STRING(IDS_FILE_BROWSER, SELECT_OPEN_FILE_TITLE);
SET_STRING(IDS_FILE_BROWSER, SELECT_OPEN_MULTI_FILE_TITLE);

Powered by Google App Engine
This is Rietveld 408576698