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

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: Final (hopefully) version. 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 7ef2d1b653618394cc901cbbb2af732c22ac72cd..99e6ab86cb604e683171e8dbf7f3385e7be473bd 100644
--- a/chrome/browser/extensions/extension_file_browser_private_api.cc
+++ b/chrome/browser/extensions/extension_file_browser_private_api.cc
@@ -1224,6 +1224,7 @@ bool RemoveMountFunction::RunImpl() {
return true;
}
+
GetMountPointsFunction::GetMountPointsFunction() {
}
@@ -1237,7 +1238,7 @@ bool GetMountPointsFunction::RunImpl() {
base::ListValue *mounts = new base::ListValue();
result_.reset(mounts);
- #ifdef OS_CHROMEOS
+#ifdef OS_CHROMEOS
chromeos::MountLibrary *mount_lib =
chromeos::CrosLibrary::Get()->GetMountLibrary();
chromeos::MountLibrary::MountPointMap mount_points =
@@ -1250,6 +1251,32 @@ bool GetMountPointsFunction::RunImpl() {
mounts->Append(MountPointToValue(profile_, it->second));
}
#endif
+
+ SendResponse(true);
+ 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)) {
asargent_no_longer_on_chrome 2011/07/29 23:14:19 nit: you probably want to either CHECK(false) here
sidor.dev 2011/07/29 23:28:27 Done.
+ NOTREACHED();
+ }
+
+#ifdef OS_CHROMEOS
+ chromeos::CrosLibrary::Get()->GetMountLibrary()->FormatMountedDevice(
+ volume_mount_path.c_str());
+#endif
+
SendResponse(true);
return true;
}
@@ -1405,6 +1432,8 @@ bool FileDialogStringsFunction::RunImpl() {
SET_STRING(IDS_FILE_BROWSER, CONFIRM_DELETE_ONE);
SET_STRING(IDS_FILE_BROWSER, CONFIRM_DELETE_SOME);
+ 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