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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/extension_file_browser_private_api.h" 5 #include "chrome/browser/extensions/extension_file_browser_private_api.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 1083 matching lines...) Expand 10 before | Expand all | Expand 10 after
1094 1094
1095 #ifdef OS_CHROMEOS 1095 #ifdef OS_CHROMEOS
1096 chromeos::CrosLibrary::Get()->GetMountLibrary()->UnmountPath( 1096 chromeos::CrosLibrary::Get()->GetMountLibrary()->UnmountPath(
1097 volume_device_path.c_str()); 1097 volume_device_path.c_str());
1098 #endif 1098 #endif
1099 1099
1100 SendResponse(true); 1100 SendResponse(true);
1101 return true; 1101 return true;
1102 } 1102 }
1103 1103
1104 FormatDeviceFunction::FormatDeviceFunction() {
1105 }
1106
1107 FormatDeviceFunction::~FormatDeviceFunction() {
1108 }
1109
1110 bool FormatDeviceFunction::RunImpl() {
1111 if (args_->GetSize() != 1) {
1112 return false;
1113 }
1114
1115 std::string volume_mount_path;
1116 if (!args_->GetString(0, &volume_mount_path)) {
1117 NOTREACHED();
1118 }
1119
1120 #ifdef OS_CHROMEOS
1121 chromeos::CrosLibrary::Get()->GetMountLibrary()->FormatMountedDevice(
1122 volume_mount_path.c_str());
1123 #endif
1124
1125 SendResponse(true);
1126 return true;
1127 }
1128
1129
1104 GetVolumeMetadataFunction::GetVolumeMetadataFunction() { 1130 GetVolumeMetadataFunction::GetVolumeMetadataFunction() {
1105 } 1131 }
1106 1132
1107 GetVolumeMetadataFunction::~GetVolumeMetadataFunction() { 1133 GetVolumeMetadataFunction::~GetVolumeMetadataFunction() {
1108 } 1134 }
1109 1135
1110 bool GetVolumeMetadataFunction::RunImpl() { 1136 bool GetVolumeMetadataFunction::RunImpl() {
1111 if (args_->GetSize() != 1) { 1137 if (args_->GetSize() != 1) {
1112 error_ = "Invalid argument count"; 1138 error_ = "Invalid argument count";
1113 return false; 1139 return false;
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 1248
1223 SET_STRING(IDS_FILE_BROWSER, DEVICE_TYPE_FLASH); 1249 SET_STRING(IDS_FILE_BROWSER, DEVICE_TYPE_FLASH);
1224 SET_STRING(IDS_FILE_BROWSER, DEVICE_TYPE_HDD); 1250 SET_STRING(IDS_FILE_BROWSER, DEVICE_TYPE_HDD);
1225 SET_STRING(IDS_FILE_BROWSER, DEVICE_TYPE_OPTICAL); 1251 SET_STRING(IDS_FILE_BROWSER, DEVICE_TYPE_OPTICAL);
1226 SET_STRING(IDS_FILE_BROWSER, DEVICE_TYPE_UNDEFINED); 1252 SET_STRING(IDS_FILE_BROWSER, DEVICE_TYPE_UNDEFINED);
1227 1253
1228 SET_STRING(IDS_FILE_BROWSER, CANCEL_LABEL); 1254 SET_STRING(IDS_FILE_BROWSER, CANCEL_LABEL);
1229 SET_STRING(IDS_FILE_BROWSER, OPEN_LABEL); 1255 SET_STRING(IDS_FILE_BROWSER, OPEN_LABEL);
1230 SET_STRING(IDS_FILE_BROWSER, SAVE_LABEL); 1256 SET_STRING(IDS_FILE_BROWSER, SAVE_LABEL);
1231 1257
1258 SET_STRING(IDS_FILE_BROWSER, FORMATTING_WARNING);
1259
1232 SET_STRING(IDS_FILE_BROWSER, SELECT_FOLDER_TITLE); 1260 SET_STRING(IDS_FILE_BROWSER, SELECT_FOLDER_TITLE);
1233 SET_STRING(IDS_FILE_BROWSER, SELECT_OPEN_FILE_TITLE); 1261 SET_STRING(IDS_FILE_BROWSER, SELECT_OPEN_FILE_TITLE);
1234 SET_STRING(IDS_FILE_BROWSER, SELECT_OPEN_MULTI_FILE_TITLE); 1262 SET_STRING(IDS_FILE_BROWSER, SELECT_OPEN_MULTI_FILE_TITLE);
1235 SET_STRING(IDS_FILE_BROWSER, SELECT_SAVEAS_FILE_TITLE); 1263 SET_STRING(IDS_FILE_BROWSER, SELECT_SAVEAS_FILE_TITLE);
1236 1264
1237 SET_STRING(IDS_FILE_BROWSER, COMPUTING_SELECTION); 1265 SET_STRING(IDS_FILE_BROWSER, COMPUTING_SELECTION);
1238 SET_STRING(IDS_FILE_BROWSER, NOTHING_SELECTED); 1266 SET_STRING(IDS_FILE_BROWSER, NOTHING_SELECTED);
1239 SET_STRING(IDS_FILE_BROWSER, ONE_FILE_SELECTED); 1267 SET_STRING(IDS_FILE_BROWSER, ONE_FILE_SELECTED);
1240 SET_STRING(IDS_FILE_BROWSER, ONE_DIRECTORY_SELECTED); 1268 SET_STRING(IDS_FILE_BROWSER, ONE_DIRECTORY_SELECTED);
1241 SET_STRING(IDS_FILE_BROWSER, MANY_FILES_SELECTED); 1269 SET_STRING(IDS_FILE_BROWSER, MANY_FILES_SELECTED);
(...skipping 10 matching lines...) Expand all
1252 #undef SET_STRING 1280 #undef SET_STRING
1253 1281
1254 // TODO(serya): Create a new string in .grd file for this one in M13. 1282 // TODO(serya): Create a new string in .grd file for this one in M13.
1255 dict->SetString("PREVIEW_IMAGE", 1283 dict->SetString("PREVIEW_IMAGE",
1256 l10n_util::GetStringUTF16(IDS_CERT_MANAGER_VIEW_CERT_BUTTON)); 1284 l10n_util::GetStringUTF16(IDS_CERT_MANAGER_VIEW_CERT_BUTTON));
1257 dict->SetString("PLAY_MEDIA", 1285 dict->SetString("PLAY_MEDIA",
1258 l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_PLAY)); 1286 l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_PLAY));
1259 1287
1260 return true; 1288 return true;
1261 } 1289 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698