Index: chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc |
diff --git a/chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc b/chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc |
index 26391aab6376542e2793944387881df072f8053f..66a749e632f06f495472234a14a56c426d5ed2fc 100644 |
--- a/chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc |
+++ b/chrome/browser/chromeos/extensions/file_manager/private_api_strings.cc |
@@ -148,6 +148,14 @@ void AddStringsForDrive(base::DictionaryValue* dict) { |
IDS_FILE_BROWSER_DRIVE_WELCOME_TITLE_ALTERNATIVE); |
SET_STRING("DRIVE_WELCOME_TITLE_ALTERNATIVE_1TB", |
IDS_FILE_BROWSER_DRIVE_WELCOME_TITLE_ALTERNATIVE_1TB); |
+ SET_STRING("SYNC_DELETE_WITHOUT_PERMISSION_ERROR", |
+ IDS_FILE_BROWSER_SYNC_DELETE_WITHOUT_PERMISSION_ERROR); |
+ SET_STRING("SYNC_FILE_NAME", IDS_FILE_BROWSER_SYNC_FILE_NAME); |
+ SET_STRING("SYNC_FILE_NUMBER", IDS_FILE_BROWSER_SYNC_FILE_NUMBER); |
+ SET_STRING("SYNC_MISC_ERROR", IDS_FILE_BROWSER_SYNC_MISC_ERROR); |
+ SET_STRING("SYNC_PROGRESS_SUMMARY", IDS_FILE_BROWSER_SYNC_PROGRESS_SUMMARY); |
+ SET_STRING("SYNC_SERVICE_UNAVAILABLE_ERROR", |
+ IDS_FILE_BROWSER_SYNC_SERVICE_UNAVAILABLE_ERROR); |
} |
void AddStringsForGallery(base::DictionaryValue* dict) { |
@@ -221,63 +229,24 @@ void AddStringsForVideoPlayer(base::DictionaryValue* dict) { |
IDS_VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED_FOR_CAST); |
} |
-} // namespace |
- |
-namespace extensions { |
- |
-FileManagerPrivateGetStringsFunction::FileManagerPrivateGetStringsFunction() { |
-} |
- |
-FileManagerPrivateGetStringsFunction::~FileManagerPrivateGetStringsFunction() { |
-} |
- |
-bool FileManagerPrivateGetStringsFunction::RunSync() { |
- base::DictionaryValue* dict = new base::DictionaryValue(); |
- SetResult(dict); |
- |
- AddStringsForDrive(dict); |
- AddStringsForFileTypes(dict); |
- AddStringsForGallery(dict); |
- AddStringsForVideoPlayer(dict); |
- |
- SET_STRING("ACTION_LISTEN", IDS_FILE_BROWSER_ACTION_LISTEN); |
- SET_STRING("ACTION_OPEN", IDS_FILE_BROWSER_ACTION_OPEN); |
- SET_STRING("ACTION_OPEN_GDOC", IDS_FILE_BROWSER_ACTION_OPEN_GDOC); |
- SET_STRING("ACTION_OPEN_GSHEET", IDS_FILE_BROWSER_ACTION_OPEN_GSHEET); |
- SET_STRING("ACTION_OPEN_GSLIDES", IDS_FILE_BROWSER_ACTION_OPEN_GSLIDES); |
- SET_STRING("ACTION_VIEW", IDS_FILE_BROWSER_ACTION_VIEW); |
- SET_STRING("ACTION_WATCH", IDS_FILE_BROWSER_ACTION_WATCH); |
- SET_STRING("ADD_NEW_SERVICES_BUTTON_LABEL", |
- IDS_FILE_BROWSER_ADD_NEW_SERVICES_BUTTON_LABEL); |
- SET_STRING("ALL_FILES_FILTER", IDS_FILE_BROWSER_ALL_FILES_FILTER); |
- SET_STRING("ARCHIVE_DIRECTORY_LABEL", |
- IDS_FILE_BROWSER_ARCHIVE_DIRECTORY_LABEL); |
- SET_STRING("ARCHIVE_MOUNT_FAILED", IDS_FILE_BROWSER_ARCHIVE_MOUNT_FAILED); |
+void AddStringsForAudioPlayer(base::DictionaryValue* dict) { |
SET_STRING("AUDIO_ERROR", IDS_FILE_BROWSER_AUDIO_ERROR); |
SET_STRING("AUDIO_OFFLINE", IDS_FILE_BROWSER_AUDIO_OFFLINE); |
SET_STRING("AUDIO_PLAYER_DEFAULT_ARTIST", |
IDS_FILE_BROWSER_AUDIO_PLAYER_DEFAULT_ARTIST); |
SET_STRING("AUDIO_PLAYER_TITLE", IDS_FILE_BROWSER_AUDIO_PLAYER_TITLE); |
- SET_STRING("CALCULATING_SIZE", IDS_FILE_BROWSER_CALCULATING_SIZE); |
- SET_STRING("CANCEL_LABEL", IDS_FILE_BROWSER_CANCEL_LABEL); |
- SET_STRING("CHANGE_DEFAULT_CAPTION", IDS_FILE_BROWSER_CHANGE_DEFAULT_CAPTION); |
- SET_STRING("CHANGE_DEFAULT_MENU_ITEM", |
- IDS_FILE_BROWSER_CHANGE_DEFAULT_MENU_ITEM); |
- SET_STRING("CLOSE_VOLUME_BUTTON_LABEL", |
- IDS_FILE_BROWSER_CLOSE_VOLUME_BUTTON_LABEL); |
+} |
- SET_STRING("CLOUD_IMPORT_TITLE", |
- IDS_FILE_BROWSER_CLOUD_IMPORT_TITLE); |
+void AddStringsForCloudImport(base::DictionaryValue* dict) { |
+ SET_STRING("CLOUD_IMPORT_TITLE", IDS_FILE_BROWSER_CLOUD_IMPORT_TITLE); |
SET_STRING("CLOUD_IMPORT_DESTINATION_FOLDER", |
IDS_FILE_BROWSER_CLOUD_DESTINATION_FOLDER); |
SET_STRING("CLOUD_IMPORT_DESCRIPTION", |
IDS_FILE_BROWSER_CLOUD_IMPORT_DESCRIPTION); |
- SET_STRING("CLOUD_IMPORT_START", |
- IDS_FILE_BROWSER_CLOUD_IMPORT_START); |
+ SET_STRING("CLOUD_IMPORT_START", IDS_FILE_BROWSER_CLOUD_IMPORT_START); |
SET_STRING("CLOUD_IMPORT_SHOW_DETAILS", |
IDS_FILE_BROWSER_CLOUD_IMPORT_SHOW_DETAILS); |
- SET_STRING("CLOUD_IMPORT_COMMAND", |
- IDS_FILE_BROWSER_CLOUD_IMPORT_COMMAND); |
+ SET_STRING("CLOUD_IMPORT_COMMAND", IDS_FILE_BROWSER_CLOUD_IMPORT_COMMAND); |
SET_STRING("CLOUD_IMPORT_CANCEL_COMMAND", |
IDS_FILE_BROWSER_CLOUD_IMPORT_CANCEL_COMMAND); |
@@ -308,7 +277,78 @@ bool FileManagerPrivateGetStringsFunction::RunSync() { |
IDS_FILE_BROWSER_CLOUD_IMPORT_TOOLTIP_READY); |
SET_STRING("CLOUD_IMPORT_TOOLTIP_SCANNING", |
IDS_FILE_BROWSER_CLOUD_IMPORT_TOOLTIP_SCANNING); |
+} |
+ |
+void AddStringsForCrUiMenuItemShortcuts(base::DictionaryValue* dict) { |
+ // Shortcut key names: used from cr.ui.MenuItem.updateShortcut_. |
+ SET_STRING("SHORTCUT_ALT", IDS_FILE_BROWSER_SHORTCUT_ALT); |
+ SET_STRING("SHORTCUT_CTRL", IDS_FILE_BROWSER_SHORTCUT_CTRL); |
+ SET_STRING("SHORTCUT_ENTER", IDS_FILE_BROWSER_SHORTCUT_ENTER); |
+ SET_STRING("SHORTCUT_META", IDS_FILE_BROWSER_SHORTCUT_META); |
+ SET_STRING("SHORTCUT_SHIFT", IDS_FILE_BROWSER_SHORTCUT_SHIFT); |
+ SET_STRING("SHORTCUT_SPACE", IDS_FILE_BROWSER_SHORTCUT_SPACE); |
+} |
+void AddStringsForFileErrors(base::DictionaryValue* dict) { |
+ SET_STRING("FILE_ERROR_GENERIC", IDS_FILE_BROWSER_FILE_ERROR_GENERIC); |
+ SET_STRING("FILE_ERROR_INVALID_MODIFICATION", |
+ IDS_FILE_BROWSER_FILE_ERROR_INVALID_MODIFICATION); |
+ SET_STRING("FILE_ERROR_INVALID_STATE", |
+ IDS_FILE_BROWSER_FILE_ERROR_INVALID_STATE); |
+ SET_STRING("FILE_ERROR_NOT_FOUND", IDS_FILE_BROWSER_FILE_ERROR_NOT_FOUND); |
+ SET_STRING("FILE_ERROR_NOT_READABLE", |
+ IDS_FILE_BROWSER_FILE_ERROR_NOT_READABLE); |
+ SET_STRING("FILE_ERROR_NO_MODIFICATION_ALLOWED", |
+ IDS_FILE_BROWSER_FILE_ERROR_NO_MODIFICATION_ALLOWED); |
+ SET_STRING("FILE_ERROR_PATH_EXISTS", IDS_FILE_BROWSER_FILE_ERROR_PATH_EXISTS); |
+ SET_STRING("FILE_ERROR_QUOTA_EXCEEDED", |
+ IDS_FILE_BROWSER_FILE_ERROR_QUOTA_EXCEEDED); |
+ SET_STRING("FILE_ERROR_SECURITY", IDS_FILE_BROWSER_FILE_ERROR_SECURITY); |
+} |
+ |
+} // namespace |
+ |
+namespace extensions { |
+ |
+FileManagerPrivateGetStringsFunction::FileManagerPrivateGetStringsFunction() { |
+} |
+ |
+FileManagerPrivateGetStringsFunction::~FileManagerPrivateGetStringsFunction() { |
+} |
+ |
+bool FileManagerPrivateGetStringsFunction::RunSync() { |
+ base::DictionaryValue* dict = new base::DictionaryValue(); |
+ SetResult(dict); |
+ |
+ AddStringsForDrive(dict); |
+ AddStringsForFileTypes(dict); |
+ AddStringsForGallery(dict); |
+ AddStringsForVideoPlayer(dict); |
+ AddStringsForAudioPlayer(dict); |
+ AddStringsForCloudImport(dict); |
+ AddStringsForCrUiMenuItemShortcuts(dict); |
+ AddStringsForFileErrors(dict); |
+ |
+ SET_STRING("ACTION_LISTEN", IDS_FILE_BROWSER_ACTION_LISTEN); |
+ SET_STRING("ACTION_OPEN", IDS_FILE_BROWSER_ACTION_OPEN); |
+ SET_STRING("ACTION_OPEN_GDOC", IDS_FILE_BROWSER_ACTION_OPEN_GDOC); |
+ SET_STRING("ACTION_OPEN_GSHEET", IDS_FILE_BROWSER_ACTION_OPEN_GSHEET); |
+ SET_STRING("ACTION_OPEN_GSLIDES", IDS_FILE_BROWSER_ACTION_OPEN_GSLIDES); |
+ SET_STRING("ACTION_VIEW", IDS_FILE_BROWSER_ACTION_VIEW); |
+ SET_STRING("ACTION_WATCH", IDS_FILE_BROWSER_ACTION_WATCH); |
+ SET_STRING("ADD_NEW_SERVICES_BUTTON_LABEL", |
+ IDS_FILE_BROWSER_ADD_NEW_SERVICES_BUTTON_LABEL); |
+ SET_STRING("ALL_FILES_FILTER", IDS_FILE_BROWSER_ALL_FILES_FILTER); |
+ SET_STRING("ARCHIVE_DIRECTORY_LABEL", |
+ IDS_FILE_BROWSER_ARCHIVE_DIRECTORY_LABEL); |
+ SET_STRING("ARCHIVE_MOUNT_FAILED", IDS_FILE_BROWSER_ARCHIVE_MOUNT_FAILED); |
+ SET_STRING("CALCULATING_SIZE", IDS_FILE_BROWSER_CALCULATING_SIZE); |
+ SET_STRING("CANCEL_LABEL", IDS_FILE_BROWSER_CANCEL_LABEL); |
+ SET_STRING("CHANGE_DEFAULT_CAPTION", IDS_FILE_BROWSER_CHANGE_DEFAULT_CAPTION); |
+ SET_STRING("CHANGE_DEFAULT_MENU_ITEM", |
+ IDS_FILE_BROWSER_CHANGE_DEFAULT_MENU_ITEM); |
+ SET_STRING("CLOSE_VOLUME_BUTTON_LABEL", |
+ IDS_FILE_BROWSER_CLOSE_VOLUME_BUTTON_LABEL); |
SET_STRING("CONFIGURE_VOLUME_BUTTON_LABEL", |
IDS_FILE_BROWSER_CONFIGURE_VOLUME_BUTTON_LABEL); |
SET_STRING("CONFIRM_MOBILE_DATA_USE", |
@@ -386,20 +426,6 @@ bool FileManagerPrivateGetStringsFunction::RunSync() { |
SET_STRING("FAILED_SPACE_INFO", IDS_FILE_BROWSER_FAILED_SPACE_INFO); |
SET_STRING("FILENAME_LABEL", IDS_FILE_BROWSER_FILENAME_LABEL); |
SET_STRING("FILE_ALREADY_EXISTS", IDS_FILE_BROWSER_FILE_ALREADY_EXISTS); |
- SET_STRING("FILE_ERROR_GENERIC", IDS_FILE_BROWSER_FILE_ERROR_GENERIC); |
- SET_STRING("FILE_ERROR_INVALID_MODIFICATION", |
- IDS_FILE_BROWSER_FILE_ERROR_INVALID_MODIFICATION); |
- SET_STRING("FILE_ERROR_INVALID_STATE", |
- IDS_FILE_BROWSER_FILE_ERROR_INVALID_STATE); |
- SET_STRING("FILE_ERROR_NOT_FOUND", IDS_FILE_BROWSER_FILE_ERROR_NOT_FOUND); |
- SET_STRING("FILE_ERROR_NOT_READABLE", |
- IDS_FILE_BROWSER_FILE_ERROR_NOT_READABLE); |
- SET_STRING("FILE_ERROR_NO_MODIFICATION_ALLOWED", |
- IDS_FILE_BROWSER_FILE_ERROR_NO_MODIFICATION_ALLOWED); |
- SET_STRING("FILE_ERROR_PATH_EXISTS", IDS_FILE_BROWSER_FILE_ERROR_PATH_EXISTS); |
- SET_STRING("FILE_ERROR_QUOTA_EXCEEDED", |
- IDS_FILE_BROWSER_FILE_ERROR_QUOTA_EXCEEDED); |
- SET_STRING("FILE_ERROR_SECURITY", IDS_FILE_BROWSER_FILE_ERROR_SECURITY); |
SET_STRING("FORMATTING_FINISHED_FAILURE_MESSAGE", |
IDS_FORMATTING_FINISHED_FAILURE_MESSAGE); |
SET_STRING("FORMATTING_FINISHED_SUCCESS_MESSAGE", |
@@ -509,14 +535,6 @@ bool FileManagerPrivateGetStringsFunction::RunSync() { |
IDS_FILE_BROWSER_CANCEL_SELECTION_BUTTON_LABEL); |
SET_STRING("SHARE_ERROR", IDS_FILE_BROWSER_SHARE_ERROR); |
- // Shortcut key names: used from cr.ui.MenuItem.updateShortcut_. |
- SET_STRING("SHORTCUT_ALT", IDS_FILE_BROWSER_SHORTCUT_ALT); |
- SET_STRING("SHORTCUT_CTRL", IDS_FILE_BROWSER_SHORTCUT_CTRL); |
- SET_STRING("SHORTCUT_ENTER", IDS_FILE_BROWSER_SHORTCUT_ENTER); |
- SET_STRING("SHORTCUT_META", IDS_FILE_BROWSER_SHORTCUT_META); |
- SET_STRING("SHORTCUT_SHIFT", IDS_FILE_BROWSER_SHORTCUT_SHIFT); |
- SET_STRING("SHORTCUT_SPACE", IDS_FILE_BROWSER_SHORTCUT_SPACE); |
- |
SET_STRING("SIZE_BYTES", IDS_FILE_BROWSER_SIZE_BYTES); |
SET_STRING("SIZE_COLUMN_LABEL", IDS_FILE_BROWSER_SIZE_COLUMN_LABEL); |
SET_STRING("SIZE_GB", IDS_FILE_BROWSER_SIZE_GB); |
@@ -533,14 +551,6 @@ bool FileManagerPrivateGetStringsFunction::RunSync() { |
SET_STRING("SUGGEST_DIALOG_TITLE", IDS_FILE_BROWSER_SUGGEST_DIALOG_TITLE); |
SET_STRING("SUGGEST_DIALOG_FOR_PROVIDERS_TITLE", |
IDS_FILE_BROWSER_SUGGEST_DIALOG_FOR_PROVIDERS_TITLE); |
- SET_STRING("SYNC_DELETE_WITHOUT_PERMISSION_ERROR", |
- IDS_FILE_BROWSER_SYNC_DELETE_WITHOUT_PERMISSION_ERROR); |
- SET_STRING("SYNC_FILE_NAME", IDS_FILE_BROWSER_SYNC_FILE_NAME); |
- SET_STRING("SYNC_FILE_NUMBER", IDS_FILE_BROWSER_SYNC_FILE_NUMBER); |
- SET_STRING("SYNC_MISC_ERROR", IDS_FILE_BROWSER_SYNC_MISC_ERROR); |
- SET_STRING("SYNC_PROGRESS_SUMMARY", IDS_FILE_BROWSER_SYNC_PROGRESS_SUMMARY); |
- SET_STRING("SYNC_SERVICE_UNAVAILABLE_ERROR", |
- IDS_FILE_BROWSER_SYNC_SERVICE_UNAVAILABLE_ERROR); |
SET_STRING("THUMBNAIL_VIEW_TOOLTIP", IDS_FILE_BROWSER_THUMBNAIL_VIEW_TOOLTIP); |
SET_STRING("TIME_TODAY", IDS_FILE_BROWSER_TIME_TODAY); |
SET_STRING("TIME_YESTERDAY", IDS_FILE_BROWSER_TIME_YESTERDAY); |