Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / chromeos / extensions / file_manager / private_api_strings.cc
blob59099116e4c5da7ac67f6ba19d8ec9020217dd8e
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/chromeos/extensions/file_manager/private_api_strings.h"
7 #include "base/strings/stringprintf.h"
8 #include "base/sys_info.h"
9 #include "chrome/browser/browser_process.h"
10 #include "chrome/browser/chromeos/file_manager/open_with_browser.h"
11 #include "chrome/grit/generated_resources.h"
12 #include "chromeos/system/statistics_provider.h"
13 #include "extensions/common/extension_l10n_util.h"
14 #include "ui/base/l10n/l10n_util.h"
15 #include "ui/base/webui/web_ui_util.h"
16 #include "ui/strings/grit/app_locale_settings.h"
18 namespace {
20 // Location of the page to buy more storage for Google Drive.
21 const char kGoogleDriveBuyStorageUrl[] =
22 "https://www.google.com/settings/storage";
24 // Location of the overview page about Google Drive.
25 const char kGoogleDriveOverviewUrl[] =
26 "https://support.google.com/chromebook/?p=filemanager_drive";
28 // Location of Google drive redeem page.
29 const char kGoogleDriveRedeemUrl[] =
30 "http://www.google.com/intl/en/chrome/devices/goodies.html"
31 "?utm_source=filesapp&utm_medium=banner&utm_campaign=gsg";
33 // Location of Google Drive specific help.
34 const char kGoogleDriveHelpUrl[] =
35 "https://support.google.com/chromebook/?p=filemanager_drivehelp";
37 // Location of Google Drive root.
38 const char kGoogleDriveRootUrl[] = "https://drive.google.com";
40 // Printf format
41 const char kHelpURLFormat[] = "https://support.google.com/chromebook/answer/%d";
43 // Location of the help page for low space warning in the downloads directory.
44 const int kDownloadsLowSpaceWarningHelpNumber = 1061547;
46 // Location of Files App specific help.
47 const int kFilesAppHelpNumber = 1056323;
49 // Location of the help page about connecting to Google Drive.
50 const int kGoogleDriveErrorHelpNumber = 2649458;
52 // Location of the help page about no-action-available files.
53 const int kNoActionForFileHelpNumber = 1700055;
55 #define SET_STRING(id, idr) dict->SetString(id, l10n_util::GetStringUTF16(idr))
57 void AddStringsForFileTypes(base::DictionaryValue* dict) {
58 // TODO(crbug.com/438921): Rename string IDs to something like
59 // FILE_TYPE_WHATEVER.
60 SET_STRING("AUDIO_FILE_TYPE", IDS_FILE_BROWSER_AUDIO_FILE_TYPE);
61 SET_STRING("EXCEL_FILE_TYPE", IDS_FILE_BROWSER_EXCEL_FILE_TYPE);
62 SET_STRING("FOLDER", IDS_FILE_BROWSER_FOLDER);
63 SET_STRING("GDOC_DOCUMENT_FILE_TYPE",
64 IDS_FILE_BROWSER_GDOC_DOCUMENT_FILE_TYPE);
65 SET_STRING("GDRAW_DOCUMENT_FILE_TYPE",
66 IDS_FILE_BROWSER_GDRAW_DOCUMENT_FILE_TYPE);
67 SET_STRING("GENERIC_FILE_TYPE", IDS_FILE_BROWSER_GENERIC_FILE_TYPE);
68 SET_STRING("GFORM_DOCUMENT_FILE_TYPE",
69 IDS_FILE_BROWSER_GFORM_DOCUMENT_FILE_TYPE);
70 SET_STRING("GLINK_DOCUMENT_FILE_TYPE",
71 IDS_FILE_BROWSER_GLINK_DOCUMENT_FILE_TYPE);
72 SET_STRING("GMAP_DOCUMENT_FILE_TYPE",
73 IDS_FILE_BROWSER_GMAP_DOCUMENT_FILE_TYPE);
74 SET_STRING("GSHEET_DOCUMENT_FILE_TYPE",
75 IDS_FILE_BROWSER_GSHEET_DOCUMENT_FILE_TYPE);
76 SET_STRING("GSLIDES_DOCUMENT_FILE_TYPE",
77 IDS_FILE_BROWSER_GSLIDES_DOCUMENT_FILE_TYPE);
78 SET_STRING("GTABLE_DOCUMENT_FILE_TYPE",
79 IDS_FILE_BROWSER_GTABLE_DOCUMENT_FILE_TYPE);
80 SET_STRING("HTML_DOCUMENT_FILE_TYPE",
81 IDS_FILE_BROWSER_HTML_DOCUMENT_FILE_TYPE);
82 SET_STRING("IMAGE_FILE_TYPE", IDS_FILE_BROWSER_IMAGE_FILE_TYPE);
83 SET_STRING("NO_EXTENSION_FILE_TYPE", IDS_FILE_BROWSER_NO_EXTENSION_FILE_TYPE);
84 SET_STRING("PDF_DOCUMENT_FILE_TYPE", IDS_FILE_BROWSER_PDF_DOCUMENT_FILE_TYPE);
85 SET_STRING("PLAIN_TEXT_FILE_TYPE", IDS_FILE_BROWSER_PLAIN_TEXT_FILE_TYPE);
86 SET_STRING("POWERPOINT_PRESENTATION_FILE_TYPE",
87 IDS_FILE_BROWSER_POWERPOINT_PRESENTATION_FILE_TYPE);
88 SET_STRING("RAR_ARCHIVE_FILE_TYPE", IDS_FILE_BROWSER_RAR_ARCHIVE_FILE_TYPE);
89 SET_STRING("TAR_ARCHIVE_FILE_TYPE", IDS_FILE_BROWSER_TAR_ARCHIVE_FILE_TYPE);
90 SET_STRING("TAR_BZIP2_ARCHIVE_FILE_TYPE",
91 IDS_FILE_BROWSER_TAR_BZIP2_ARCHIVE_FILE_TYPE);
92 SET_STRING("TAR_GZIP_ARCHIVE_FILE_TYPE",
93 IDS_FILE_BROWSER_TAR_GZIP_ARCHIVE_FILE_TYPE);
94 SET_STRING("VIDEO_FILE_TYPE", IDS_FILE_BROWSER_VIDEO_FILE_TYPE);
95 SET_STRING("WORD_DOCUMENT_FILE_TYPE",
96 IDS_FILE_BROWSER_WORD_DOCUMENT_FILE_TYPE);
97 SET_STRING("ZIP_ARCHIVE_FILE_TYPE", IDS_FILE_BROWSER_ZIP_ARCHIVE_FILE_TYPE);
100 void AddStringsForDrive(base::DictionaryValue* dict) {
101 SET_STRING("DRIVE_BUY_MORE_SPACE", IDS_FILE_BROWSER_DRIVE_BUY_MORE_SPACE);
102 SET_STRING("DRIVE_BUY_MORE_SPACE_LINK",
103 IDS_FILE_BROWSER_DRIVE_BUY_MORE_SPACE_LINK);
104 SET_STRING("DRIVE_CANNOT_REACH", IDS_FILE_BROWSER_DRIVE_CANNOT_REACH);
105 SET_STRING("DRIVE_DIRECTORY_LABEL", IDS_FILE_BROWSER_DRIVE_DIRECTORY_LABEL);
106 SET_STRING("DRIVE_LEARN_MORE", IDS_FILE_BROWSER_DRIVE_LEARN_MORE);
107 SET_STRING("DRIVE_MENU_HELP", IDS_FILE_BROWSER_DRIVE_MENU_HELP);
108 SET_STRING("DRIVE_MOBILE_CONNECTION_OPTION",
109 IDS_FILE_BROWSER_DRIVE_MOBILE_CONNECTION_OPTION);
110 SET_STRING("DRIVE_MY_DRIVE_LABEL", IDS_FILE_BROWSER_DRIVE_MY_DRIVE_LABEL);
111 SET_STRING("DRIVE_NOT_REACHED", IDS_FILE_BROWSER_DRIVE_NOT_REACHED);
112 SET_STRING("DRIVE_OFFLINE_COLLECTION_LABEL",
113 IDS_FILE_BROWSER_DRIVE_OFFLINE_COLLECTION_LABEL);
114 SET_STRING("DRIVE_OUT_OF_SPACE_HEADER",
115 IDS_FILE_BROWSER_DRIVE_OUT_OF_SPACE_HEADER);
116 SET_STRING("DRIVE_OUT_OF_SPACE_MESSAGE",
117 IDS_FILE_BROWSER_DRIVE_OUT_OF_SPACE_MESSAGE);
118 SET_STRING("DRIVE_RECENT_COLLECTION_LABEL",
119 IDS_FILE_BROWSER_DRIVE_RECENT_COLLECTION_LABEL);
120 SET_STRING("DRIVE_SHARED_WITH_ME_COLLECTION_LABEL",
121 IDS_FILE_BROWSER_DRIVE_SHARED_WITH_ME_COLLECTION_LABEL);
122 SET_STRING("DRIVE_SHARE_TYPE_CAN_COMMENT",
123 IDS_FILE_BROWSER_DRIVE_SHARE_TYPE_CAN_COMMENT);
124 SET_STRING("DRIVE_SHARE_TYPE_CAN_EDIT",
125 IDS_FILE_BROWSER_DRIVE_SHARE_TYPE_CAN_EDIT);
126 SET_STRING("DRIVE_SHARE_TYPE_CAN_VIEW",
127 IDS_FILE_BROWSER_DRIVE_SHARE_TYPE_CAN_VIEW);
128 SET_STRING("DRIVE_SHOW_HOSTED_FILES_OPTION",
129 IDS_FILE_BROWSER_DRIVE_SHOW_HOSTED_FILES_OPTION);
130 SET_STRING("DRIVE_SPACE_AVAILABLE_LONG",
131 IDS_FILE_BROWSER_DRIVE_SPACE_AVAILABLE_LONG);
132 SET_STRING("DRIVE_VISIT_DRIVE_GOOGLE_COM",
133 IDS_FILE_BROWSER_DRIVE_VISIT_DRIVE_GOOGLE_COM);
134 SET_STRING("DRIVE_WELCOME_CHECK_ELIGIBILITY",
135 IDS_FILE_BROWSER_DRIVE_WELCOME_CHECK_ELIGIBILITY);
136 SET_STRING("DRIVE_WELCOME_DISMISS", IDS_FILE_BROWSER_DRIVE_WELCOME_DISMISS);
137 SET_STRING("DRIVE_WELCOME_TEXT_LONG",
138 IDS_FILE_BROWSER_DRIVE_WELCOME_TEXT_LONG);
139 SET_STRING("DRIVE_WELCOME_TEXT_SHORT",
140 IDS_FILE_BROWSER_DRIVE_WELCOME_TEXT_SHORT);
141 SET_STRING("DRIVE_WELCOME_TITLE", IDS_FILE_BROWSER_DRIVE_WELCOME_TITLE);
142 SET_STRING("DRIVE_WELCOME_TITLE_ALTERNATIVE",
143 IDS_FILE_BROWSER_DRIVE_WELCOME_TITLE_ALTERNATIVE);
144 SET_STRING("DRIVE_WELCOME_TITLE_ALTERNATIVE_1TB",
145 IDS_FILE_BROWSER_DRIVE_WELCOME_TITLE_ALTERNATIVE_1TB);
146 SET_STRING("SYNC_DELETE_WITHOUT_PERMISSION_ERROR",
147 IDS_FILE_BROWSER_SYNC_DELETE_WITHOUT_PERMISSION_ERROR);
148 SET_STRING("SYNC_FILE_NAME", IDS_FILE_BROWSER_SYNC_FILE_NAME);
149 SET_STRING("SYNC_FILE_NUMBER", IDS_FILE_BROWSER_SYNC_FILE_NUMBER);
150 SET_STRING("SYNC_MISC_ERROR", IDS_FILE_BROWSER_SYNC_MISC_ERROR);
151 SET_STRING("SYNC_NO_SERVER_SPACE", IDS_FILE_BROWSER_SYNC_NO_SERVER_SPACE);
152 SET_STRING("SYNC_PROGRESS_SUMMARY", IDS_FILE_BROWSER_SYNC_PROGRESS_SUMMARY);
153 SET_STRING("SYNC_SERVICE_UNAVAILABLE_ERROR",
154 IDS_FILE_BROWSER_SYNC_SERVICE_UNAVAILABLE_ERROR);
157 void AddStringsForGallery(base::DictionaryValue* dict) {
158 SET_STRING("GALLERY_ASPECT_RATIO_16_9",
159 IDS_FILE_BROWSER_GALLERY_ASPECT_RATIO_16_9);
160 SET_STRING("GALLERY_ASPECT_RATIO_1_1",
161 IDS_FILE_BROWSER_GALLERY_ASPECT_RATIO_1_1);
162 SET_STRING("GALLERY_ASPECT_RATIO_6_4",
163 IDS_FILE_BROWSER_GALLERY_ASPECT_RATIO_6_4);
164 SET_STRING("GALLERY_ASPECT_RATIO_7_5",
165 IDS_FILE_BROWSER_GALLERY_ASPECT_RATIO_7_5);
166 SET_STRING("GALLERY_AUTOFIX", IDS_FILE_BROWSER_GALLERY_AUTOFIX);
167 SET_STRING("GALLERY_BRIGHTNESS", IDS_FILE_BROWSER_GALLERY_BRIGHTNESS);
168 SET_STRING("GALLERY_CANCEL_LABEL", IDS_FILE_BROWSER_CANCEL_LABEL);
169 SET_STRING("GALLERY_CONFIRM_DELETE_ONE", IDS_FILE_BROWSER_CONFIRM_DELETE_ONE);
170 SET_STRING("GALLERY_CONFIRM_DELETE_SOME",
171 IDS_FILE_BROWSER_CONFIRM_DELETE_SOME);
172 SET_STRING("GALLERY_CONTRAST", IDS_FILE_BROWSER_GALLERY_CONTRAST);
173 SET_STRING("GALLERY_CROP", IDS_FILE_BROWSER_GALLERY_CROP);
174 SET_STRING("GALLERY_DELETE", IDS_FILE_BROWSER_GALLERY_DELETE);
175 SET_STRING("GALLERY_EDIT", IDS_FILE_BROWSER_GALLERY_EDIT);
176 SET_STRING("GALLERY_EXIT", IDS_FILE_BROWSER_GALLERY_EXIT);
177 SET_STRING("GALLERY_ENTER_WHEN_DONE",
178 IDS_FILE_BROWSER_GALLERY_ENTER_WHEN_DONE);
179 SET_STRING("GALLERY_EXPOSURE", IDS_FILE_BROWSER_GALLERY_EXPOSURE);
180 SET_STRING("GALLERY_FILE_EXISTS", IDS_FILE_BROWSER_GALLERY_FILE_EXISTS);
181 SET_STRING("GALLERY_FIXED", IDS_FILE_BROWSER_GALLERY_FIXED);
182 SET_STRING("GALLERY_IMAGE_ERROR", IDS_FILE_BROWSER_GALLERY_IMAGE_ERROR);
183 SET_STRING("GALLERY_IMAGE_OFFLINE", IDS_FILE_BROWSER_GALLERY_IMAGE_OFFLINE);
184 SET_STRING("GALLERY_ITEMS_SELECTED", IDS_FILE_BROWSER_GALLERY_ITEMS_SELECTED);
185 SET_STRING("GALLERY_NO_IMAGES", IDS_FILE_BROWSER_GALLERY_NO_IMAGES);
186 SET_STRING("GALLERY_OK_LABEL", IDS_FILE_BROWSER_OK_LABEL);
187 SET_STRING("GALLERY_OVERWRITE_BUBBLE",
188 IDS_FILE_BROWSER_GALLERY_OVERWRITE_BUBBLE);
189 SET_STRING("GALLERY_OVERWRITE_ORIGINAL",
190 IDS_FILE_BROWSER_GALLERY_OVERWRITE_ORIGINAL);
191 SET_STRING("GALLERY_PRINT", IDS_FILE_BROWSER_GALLERY_PRINT);
192 SET_STRING("GALLERY_READONLY_WARNING",
193 IDS_FILE_BROWSER_GALLERY_READONLY_WARNING);
194 SET_STRING("GALLERY_READONLY_AND_NON_WRITABLE_FORMAT_WARNING",
195 IDS_FILE_BROWSER_GALLERY_READONLY_AND_NON_WRITABLE_FORMAT_WARNING);
196 SET_STRING("GALLERY_NON_WRITABLE_FORMAT_WARNING",
197 IDS_FILE_BROWSER_GALLERY_NON_WRITABLE_FORMAT_WARNING);
198 SET_STRING("GALLERY_REDO", IDS_FILE_BROWSER_GALLERY_REDO);
199 SET_STRING("GALLERY_ROTATE_LEFT", IDS_FILE_BROWSER_GALLERY_ROTATE_LEFT);
200 SET_STRING("GALLERY_ROTATE_RIGHT", IDS_FILE_BROWSER_GALLERY_ROTATE_RIGHT);
201 SET_STRING("GALLERY_SAVED", IDS_FILE_BROWSER_GALLERY_SAVED);
202 SET_STRING("GALLERY_SAVE_FAILED", IDS_FILE_BROWSER_GALLERY_SAVE_FAILED);
203 SET_STRING("GALLERY_SHARE", IDS_FILE_BROWSER_GALLERY_SHARE);
204 SET_STRING("GALLERY_SLIDE", IDS_FILE_BROWSER_GALLERY_SLIDE);
205 SET_STRING("GALLERY_SLIDESHOW", IDS_FILE_BROWSER_GALLERY_SLIDESHOW);
206 SET_STRING("GALLERY_THUMBNAIL", IDS_FILE_BROWSER_GALLERY_THUMBNAIL);
207 SET_STRING("GALLERY_UNDO", IDS_FILE_BROWSER_GALLERY_UNDO);
208 SET_STRING("GALLERY_DONE", IDS_FILE_BROWSER_GALLERY_DONE);
211 void AddStringsForVideoPlayer(base::DictionaryValue* dict) {
212 SET_STRING("VIDEO_PLAYER_LOOPED_MODE", IDS_VIDEO_PLAYER_LOOPED_MODE);
213 SET_STRING("VIDEO_PLAYER_PLAYBACK_ERROR", IDS_VIDEO_PLAYER_PLAYBACK_ERROR);
214 SET_STRING("VIDEO_PLAYER_PLAYING_ON", IDS_VIDEO_PLAYER_PLAYING_ON);
215 SET_STRING("VIDEO_PLAYER_PLAY_ON", IDS_VIDEO_PLAYER_PLAY_ON);
216 SET_STRING("VIDEO_PLAYER_PLAY_THIS_COMPUTER",
217 IDS_VIDEO_PLAYER_PLAY_THIS_COMPUTER);
218 SET_STRING("VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED",
219 IDS_VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED);
220 SET_STRING("VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED_FOR_CAST",
221 IDS_VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED_FOR_CAST);
224 void AddStringsForAudioPlayer(base::DictionaryValue* dict) {
225 SET_STRING("AUDIO_ERROR", IDS_FILE_BROWSER_AUDIO_ERROR);
226 SET_STRING("AUDIO_OFFLINE", IDS_FILE_BROWSER_AUDIO_OFFLINE);
227 SET_STRING("AUDIO_PLAYER_DEFAULT_ARTIST",
228 IDS_FILE_BROWSER_AUDIO_PLAYER_DEFAULT_ARTIST);
229 SET_STRING("AUDIO_PLAYER_TITLE", IDS_FILE_BROWSER_AUDIO_PLAYER_TITLE);
232 void AddStringsForCloudImport(base::DictionaryValue* dict) {
233 SET_STRING("CLOUD_IMPORT_TITLE", IDS_FILE_BROWSER_CLOUD_IMPORT_TITLE);
234 SET_STRING("CLOUD_IMPORT_DESTINATION_FOLDER",
235 IDS_FILE_BROWSER_CLOUD_DESTINATION_FOLDER);
236 SET_STRING("CLOUD_IMPORT_DESCRIPTION",
237 IDS_FILE_BROWSER_CLOUD_IMPORT_DESCRIPTION);
238 SET_STRING("CLOUD_IMPORT_START", IDS_FILE_BROWSER_CLOUD_IMPORT_START);
239 SET_STRING("CLOUD_IMPORT_SHOW_DETAILS",
240 IDS_FILE_BROWSER_CLOUD_IMPORT_SHOW_DETAILS);
241 SET_STRING("CLOUD_IMPORT_COMMAND", IDS_FILE_BROWSER_CLOUD_IMPORT_COMMAND);
242 SET_STRING("CLOUD_IMPORT_CANCEL_COMMAND",
243 IDS_FILE_BROWSER_CLOUD_IMPORT_CANCEL_COMMAND);
245 SET_STRING("CLOUD_IMPORT_STATUS_READY",
246 IDS_FILE_BROWSER_CLOUD_IMPORT_STATUS_DONE);
247 SET_STRING("CLOUD_IMPORT_STATUS_IMPORTING",
248 IDS_FILE_BROWSER_CLOUD_IMPORT_STATUS_IMPORTING);
249 SET_STRING("CLOUD_IMPORT_STATUS_INSUFFICIENT_SPACE",
250 IDS_FILE_BROWSER_CLOUD_IMPORT_STATUS_INSUFFICIENT_SPACE);
251 SET_STRING("CLOUD_IMPORT_STATUS_NO_MEDIA",
252 IDS_FILE_BROWSER_CLOUD_IMPORT_STATUS_NO_MEDIA);
253 SET_STRING("CLOUD_IMPORT_STATUS_READY",
254 IDS_FILE_BROWSER_CLOUD_IMPORT_STATUS_READY);
255 SET_STRING("CLOUD_IMPORT_STATUS_SCANNING",
256 IDS_FILE_BROWSER_CLOUD_IMPORT_STATUS_SCANNING);
257 SET_STRING("CLOUD_IMPORT_ITEMS_REMAINING",
258 IDS_FILE_BROWSER_CLOUD_IMPORT_ITEMS_REMAINING);
260 SET_STRING("CLOUD_IMPORT_TOOLTIP_READY",
261 IDS_FILE_BROWSER_CLOUD_IMPORT_TOOLTIP_DONE);
262 SET_STRING("CLOUD_IMPORT_TOOLTIP_IMPORTING",
263 IDS_FILE_BROWSER_CLOUD_IMPORT_TOOLTIP_IMPORTING);
264 SET_STRING("CLOUD_IMPORT_TOOLTIP_INSUFFICIENT_SPACE",
265 IDS_FILE_BROWSER_CLOUD_IMPORT_TOOLTIP_INSUFFICIENT_SPACE);
266 SET_STRING("CLOUD_IMPORT_TOOLTIP_NO_MEDIA",
267 IDS_FILE_BROWSER_CLOUD_IMPORT_TOOLTIP_NO_MEDIA);
268 SET_STRING("CLOUD_IMPORT_TOOLTIP_READY",
269 IDS_FILE_BROWSER_CLOUD_IMPORT_TOOLTIP_READY);
270 SET_STRING("CLOUD_IMPORT_TOOLTIP_SCANNING",
271 IDS_FILE_BROWSER_CLOUD_IMPORT_TOOLTIP_SCANNING);
274 void AddStringsForCrUiMenuItemShortcuts(base::DictionaryValue* dict) {
275 // Shortcut key names: used from cr.ui.MenuItem.updateShortcut_.
276 SET_STRING("SHORTCUT_ALT", IDS_FILE_BROWSER_SHORTCUT_ALT);
277 SET_STRING("SHORTCUT_CTRL", IDS_FILE_BROWSER_SHORTCUT_CTRL);
278 SET_STRING("SHORTCUT_ENTER", IDS_FILE_BROWSER_SHORTCUT_ENTER);
279 SET_STRING("SHORTCUT_META", IDS_FILE_BROWSER_SHORTCUT_META);
280 SET_STRING("SHORTCUT_SHIFT", IDS_FILE_BROWSER_SHORTCUT_SHIFT);
281 SET_STRING("SHORTCUT_SPACE", IDS_FILE_BROWSER_SHORTCUT_SPACE);
284 void AddStringsForFileErrors(base::DictionaryValue* dict) {
285 SET_STRING("FILE_ERROR_GENERIC", IDS_FILE_BROWSER_FILE_ERROR_GENERIC);
286 SET_STRING("FILE_ERROR_INVALID_MODIFICATION",
287 IDS_FILE_BROWSER_FILE_ERROR_INVALID_MODIFICATION);
288 SET_STRING("FILE_ERROR_INVALID_STATE",
289 IDS_FILE_BROWSER_FILE_ERROR_INVALID_STATE);
290 SET_STRING("FILE_ERROR_NOT_FOUND", IDS_FILE_BROWSER_FILE_ERROR_NOT_FOUND);
291 SET_STRING("FILE_ERROR_NOT_READABLE",
292 IDS_FILE_BROWSER_FILE_ERROR_NOT_READABLE);
293 SET_STRING("FILE_ERROR_NO_MODIFICATION_ALLOWED",
294 IDS_FILE_BROWSER_FILE_ERROR_NO_MODIFICATION_ALLOWED);
295 SET_STRING("FILE_ERROR_PATH_EXISTS", IDS_FILE_BROWSER_FILE_ERROR_PATH_EXISTS);
296 SET_STRING("FILE_ERROR_QUOTA_EXCEEDED",
297 IDS_FILE_BROWSER_FILE_ERROR_QUOTA_EXCEEDED);
298 SET_STRING("FILE_ERROR_SECURITY", IDS_FILE_BROWSER_FILE_ERROR_SECURITY);
301 } // namespace
303 namespace extensions {
305 FileManagerPrivateGetStringsFunction::FileManagerPrivateGetStringsFunction() {
308 FileManagerPrivateGetStringsFunction::~FileManagerPrivateGetStringsFunction() {
311 bool FileManagerPrivateGetStringsFunction::RunSync() {
312 base::DictionaryValue* dict = new base::DictionaryValue();
313 SetResult(dict);
315 AddStringsForDrive(dict);
316 AddStringsForFileTypes(dict);
317 AddStringsForGallery(dict);
318 AddStringsForVideoPlayer(dict);
319 AddStringsForAudioPlayer(dict);
320 AddStringsForCloudImport(dict);
321 AddStringsForCrUiMenuItemShortcuts(dict);
322 AddStringsForFileErrors(dict);
324 SET_STRING("ACTION_LISTEN", IDS_FILE_BROWSER_ACTION_LISTEN);
325 SET_STRING("ACTION_OPEN", IDS_FILE_BROWSER_ACTION_OPEN);
326 SET_STRING("ACTION_OPEN_GDOC", IDS_FILE_BROWSER_ACTION_OPEN_GDOC);
327 SET_STRING("ACTION_OPEN_GSHEET", IDS_FILE_BROWSER_ACTION_OPEN_GSHEET);
328 SET_STRING("ACTION_OPEN_GSLIDES", IDS_FILE_BROWSER_ACTION_OPEN_GSLIDES);
329 SET_STRING("ACTION_VIEW", IDS_FILE_BROWSER_ACTION_VIEW);
330 SET_STRING("ADD_NEW_SERVICES_BUTTON_LABEL",
331 IDS_FILE_BROWSER_ADD_NEW_SERVICES_BUTTON_LABEL);
332 SET_STRING("ALL_FILES_FILTER", IDS_FILE_BROWSER_ALL_FILES_FILTER);
333 SET_STRING("ARCHIVE_MOUNT_FAILED", IDS_FILE_BROWSER_ARCHIVE_MOUNT_FAILED);
334 SET_STRING("CALCULATING_SIZE", IDS_FILE_BROWSER_CALCULATING_SIZE);
335 SET_STRING("CANCEL_LABEL", IDS_FILE_BROWSER_CANCEL_LABEL);
336 SET_STRING("CHANGE_DEFAULT_CAPTION", IDS_FILE_BROWSER_CHANGE_DEFAULT_CAPTION);
337 SET_STRING("CHANGE_DEFAULT_MENU_ITEM",
338 IDS_FILE_BROWSER_CHANGE_DEFAULT_MENU_ITEM);
339 SET_STRING("CLOSE_VOLUME_BUTTON_LABEL",
340 IDS_FILE_BROWSER_CLOSE_VOLUME_BUTTON_LABEL);
341 SET_STRING("CONFIGURE_VOLUME_BUTTON_LABEL",
342 IDS_FILE_BROWSER_CONFIGURE_VOLUME_BUTTON_LABEL);
343 SET_STRING("CONFIRM_MOBILE_DATA_USE",
344 IDS_FILE_BROWSER_CONFIRM_MOBILE_DATA_USE);
345 SET_STRING("CONFIRM_MOBILE_DATA_USE_PLURAL",
346 IDS_FILE_BROWSER_CONFIRM_MOBILE_DATA_USE_PLURAL);
347 SET_STRING("CONFIRM_OVERWRITE_FILE", IDS_FILE_BROWSER_CONFIRM_OVERWRITE_FILE);
348 SET_STRING("CONFLICT_DIALOG_APPLY_TO_ALL",
349 IDS_FILE_BROWSER_CONFLICT_DIALOG_APPLY_TO_ALL);
350 SET_STRING("CONFLICT_DIALOG_KEEP_BOTH",
351 IDS_FILE_BROWSER_CONFLICT_DIALOG_KEEP_BOTH);
352 SET_STRING("CONFLICT_DIALOG_MESSAGE",
353 IDS_FILE_BROWSER_CONFLICT_DIALOG_MESSAGE);
354 SET_STRING("CONFLICT_DIALOG_REPLACE",
355 IDS_FILE_BROWSER_CONFLICT_DIALOG_REPLACE);
356 SET_STRING("COPY_BUTTON_LABEL", IDS_FILE_BROWSER_COPY_BUTTON_LABEL);
357 SET_STRING("COPY_FILESYSTEM_ERROR", IDS_FILE_BROWSER_COPY_FILESYSTEM_ERROR);
358 SET_STRING("COPY_FILE_NAME", IDS_FILE_BROWSER_COPY_FILE_NAME);
359 SET_STRING("COPY_ITEMS_REMAINING", IDS_FILE_BROWSER_COPY_ITEMS_REMAINING);
360 SET_STRING("COPY_PROGRESS_SUMMARY", IDS_FILE_BROWSER_COPY_PROGRESS_SUMMARY);
361 SET_STRING("COPY_SOURCE_NOT_FOUND_ERROR",
362 IDS_FILE_BROWSER_COPY_SOURCE_NOT_FOUND_ERROR);
363 SET_STRING("COPY_TARGET_EXISTS_ERROR",
364 IDS_FILE_BROWSER_COPY_TARGET_EXISTS_ERROR);
365 SET_STRING("COPY_UNEXPECTED_ERROR", IDS_FILE_BROWSER_COPY_UNEXPECTED_ERROR);
366 SET_STRING("CREATE_FOLDER_SHORTCUT_BUTTON_LABEL",
367 IDS_FILE_BROWSER_CREATE_FOLDER_SHORTCUT_BUTTON_LABEL);
368 SET_STRING("CUT_BUTTON_LABEL", IDS_FILE_BROWSER_CUT_BUTTON_LABEL);
369 SET_STRING("DATE_COLUMN_LABEL", IDS_FILE_BROWSER_DATE_COLUMN_LABEL);
370 SET_STRING("DEFAULT_ACTION_LABEL", IDS_FILE_BROWSER_DEFAULT_ACTION_LABEL);
371 SET_STRING("DEFAULT_NEW_FOLDER_NAME",
372 IDS_FILE_BROWSER_DEFAULT_NEW_FOLDER_NAME);
373 SET_STRING("DELETE_BUTTON_LABEL", IDS_FILE_BROWSER_DELETE_BUTTON_LABEL);
374 SET_STRING("DELETE_ERROR", IDS_FILE_BROWSER_DELETE_ERROR);
375 SET_STRING("DELETE_FILE_NAME", IDS_FILE_BROWSER_DELETE_FILE_NAME);
376 SET_STRING("DELETE_ITEMS_REMAINING", IDS_FILE_BROWSER_DELETE_ITEMS_REMAINING);
377 SET_STRING("DELETE_PROGRESS_SUMMARY",
378 IDS_FILE_BROWSER_DELETE_PROGRESS_SUMMARY);
379 SET_STRING("DEVICE_HARD_UNPLUGGED_MESSAGE",
380 IDS_DEVICE_HARD_UNPLUGGED_MESSAGE);
381 SET_STRING("DEVICE_HARD_UNPLUGGED_TITLE", IDS_DEVICE_HARD_UNPLUGGED_TITLE);
382 SET_STRING("DEVICE_UNKNOWN_BUTTON_LABEL", IDS_DEVICE_UNKNOWN_BUTTON_LABEL);
383 SET_STRING("DEVICE_UNKNOWN_DEFAULT_MESSAGE",
384 IDS_DEVICE_UNKNOWN_DEFAULT_MESSAGE);
385 SET_STRING("DEVICE_UNKNOWN_MESSAGE", IDS_DEVICE_UNKNOWN_MESSAGE);
386 SET_STRING("DEVICE_UNSUPPORTED_DEFAULT_MESSAGE",
387 IDS_DEVICE_UNSUPPORTED_DEFAULT_MESSAGE);
388 SET_STRING("DEVICE_UNSUPPORTED_MESSAGE", IDS_DEVICE_UNSUPPORTED_MESSAGE);
389 SET_STRING("DIRECTORY_ALREADY_EXISTS",
390 IDS_FILE_BROWSER_DIRECTORY_ALREADY_EXISTS);
391 SET_STRING("DISABLED_MOBILE_SYNC_NOTIFICATION_ENABLE_BUTTON",
392 IDS_FILE_BROWSER_DISABLED_MOBILE_SYNC_NOTIFICATION_ENABLE_BUTTON);
393 SET_STRING("DISABLED_MOBILE_SYNC_NOTIFICATION_MESSAGE",
394 IDS_FILE_BROWSER_DISABLED_MOBILE_SYNC_NOTIFICATION_MESSAGE);
395 SET_STRING("DOWNLOADS_DIRECTORY_LABEL",
396 IDS_FILE_BROWSER_DOWNLOADS_DIRECTORY_LABEL);
397 SET_STRING("DOWNLOADS_DIRECTORY_WARNING",
398 IDS_FILE_BROWSER_DOWNLOADS_DIRECTORY_WARNING);
399 SET_STRING("DRAGGING_MULTIPLE_ITEMS",
400 IDS_FILE_BROWSER_DRAGGING_MULTIPLE_ITEMS);
401 SET_STRING("ERROR_CREATING_FOLDER", IDS_FILE_BROWSER_ERROR_CREATING_FOLDER);
402 SET_STRING("ERROR_HIDDEN_NAME", IDS_FILE_BROWSER_ERROR_HIDDEN_NAME);
403 SET_STRING("ERROR_INVALID_CHARACTER",
404 IDS_FILE_BROWSER_ERROR_INVALID_CHARACTER);
405 SET_STRING("ERROR_LONG_NAME", IDS_FILE_BROWSER_ERROR_LONG_NAME);
406 SET_STRING("ERROR_PROGRESS_SUMMARY", IDS_FILE_BROWSER_ERROR_PROGRESS_SUMMARY);
407 SET_STRING("ERROR_PROGRESS_SUMMARY_PLURAL",
408 IDS_FILE_BROWSER_ERROR_PROGRESS_SUMMARY_PLURAL);
409 SET_STRING("ERROR_RENAMING", IDS_FILE_BROWSER_ERROR_RENAMING);
410 SET_STRING("ERROR_RESERVED_NAME", IDS_FILE_BROWSER_ERROR_RESERVED_NAME);
411 SET_STRING("ERROR_WHITESPACE_NAME", IDS_FILE_BROWSER_ERROR_WHITESPACE_NAME);
412 SET_STRING("EXTERNAL_STORAGE_DISABLED_MESSAGE",
413 IDS_EXTERNAL_STORAGE_DISABLED_MESSAGE);
414 SET_STRING("FAILED_SPACE_INFO", IDS_FILE_BROWSER_FAILED_SPACE_INFO);
415 SET_STRING("FILENAME_LABEL", IDS_FILE_BROWSER_FILENAME_LABEL);
416 SET_STRING("FILE_ALREADY_EXISTS", IDS_FILE_BROWSER_FILE_ALREADY_EXISTS);
417 SET_STRING("FORMATTING_FINISHED_FAILURE_MESSAGE",
418 IDS_FORMATTING_FINISHED_FAILURE_MESSAGE);
419 SET_STRING("FORMATTING_FINISHED_SUCCESS_MESSAGE",
420 IDS_FORMATTING_FINISHED_SUCCESS_MESSAGE);
421 SET_STRING("FORMATTING_OF_DEVICE_FAILED_TITLE",
422 IDS_FORMATTING_OF_DEVICE_FAILED_TITLE);
423 SET_STRING("FORMATTING_OF_DEVICE_FINISHED_TITLE",
424 IDS_FORMATTING_OF_DEVICE_FINISHED_TITLE);
425 SET_STRING("FORMATTING_OF_DEVICE_PENDING_MESSAGE",
426 IDS_FORMATTING_OF_DEVICE_PENDING_MESSAGE);
427 SET_STRING("FORMATTING_OF_DEVICE_PENDING_TITLE",
428 IDS_FORMATTING_OF_DEVICE_PENDING_TITLE);
429 SET_STRING("FORMATTING_WARNING", IDS_FILE_BROWSER_FORMATTING_WARNING);
430 SET_STRING("FORMAT_DEVICE_BUTTON_LABEL",
431 IDS_FILE_BROWSER_FORMAT_DEVICE_BUTTON_LABEL);
432 SET_STRING("SORT_BUTTON_TOOLTIP", IDS_FILE_BROWSER_SORT_BUTTON_TOOLTIP);
433 SET_STRING("GEAR_BUTTON_TOOLTIP", IDS_FILE_BROWSER_GEAR_BUTTON_TOOLTIP);
434 SET_STRING("HOSTED_OFFLINE_MESSAGE", IDS_FILE_BROWSER_HOSTED_OFFLINE_MESSAGE);
435 SET_STRING("HOSTED_OFFLINE_MESSAGE_PLURAL",
436 IDS_FILE_BROWSER_HOSTED_OFFLINE_MESSAGE_PLURAL);
437 SET_STRING("INSTALL_NEW_EXTENSION_LABEL",
438 IDS_FILE_BROWSER_INSTALL_NEW_EXTENSION_LABEL);
439 SET_STRING("MANY_DIRECTORIES_SELECTED",
440 IDS_FILE_BROWSER_MANY_DIRECTORIES_SELECTED);
441 SET_STRING("MANY_ENTRIES_SELECTED", IDS_FILE_BROWSER_MANY_ENTRIES_SELECTED);
442 SET_STRING("MANY_FILES_SELECTED", IDS_FILE_BROWSER_MANY_FILES_SELECTED);
443 SET_STRING("MORE_ACTIONS", IDS_FILE_BROWSER_MORE_ACTIONS);
444 SET_STRING("MOUNT_ARCHIVE", IDS_FILE_BROWSER_MOUNT_ARCHIVE);
445 SET_STRING("MOVE_FILESYSTEM_ERROR", IDS_FILE_BROWSER_MOVE_FILESYSTEM_ERROR);
446 SET_STRING("MOVE_FILE_NAME", IDS_FILE_BROWSER_MOVE_FILE_NAME);
447 SET_STRING("MOVE_ITEMS_REMAINING", IDS_FILE_BROWSER_MOVE_ITEMS_REMAINING);
448 SET_STRING("MOVE_PROGRESS_SUMMARY", IDS_FILE_BROWSER_MOVE_PROGRESS_SUMMARY);
449 SET_STRING("MOVE_SOURCE_NOT_FOUND_ERROR",
450 IDS_FILE_BROWSER_MOVE_SOURCE_NOT_FOUND_ERROR);
451 SET_STRING("MOVE_TARGET_EXISTS_ERROR",
452 IDS_FILE_BROWSER_MOVE_TARGET_EXISTS_ERROR);
453 SET_STRING("MOVE_UNEXPECTED_ERROR", IDS_FILE_BROWSER_MOVE_UNEXPECTED_ERROR);
454 SET_STRING("MULTIPART_DEVICE_UNSUPPORTED_DEFAULT_MESSAGE",
455 IDS_MULTIPART_DEVICE_UNSUPPORTED_DEFAULT_MESSAGE);
456 SET_STRING("MULTIPART_DEVICE_UNSUPPORTED_MESSAGE",
457 IDS_MULTIPART_DEVICE_UNSUPPORTED_MESSAGE);
458 SET_STRING("MULTI_PROFILE_SHARE_DIALOG_MESSAGE",
459 IDS_FILE_BROWSER_MULTI_PROFILE_SHARE_DIALOG_MESSAGE);
460 SET_STRING("MULTI_PROFILE_SHARE_DIALOG_MESSAGE_PLURAL",
461 IDS_FILE_BROWSER_MULTI_PROFILE_SHARE_DIALOG_MESSAGE_PLURAL);
462 SET_STRING("MULTI_PROFILE_SHARE_DIALOG_TITLE",
463 IDS_FILE_BROWSER_MULTI_PROFILE_SHARE_DIALOG_TITLE);
464 SET_STRING("MULTI_PROFILE_SHARE_DIALOG_TITLE_PLURAL",
465 IDS_FILE_BROWSER_MULTI_PROFILE_SHARE_DIALOG_TITLE_PLURAL);
466 SET_STRING("NAME_COLUMN_LABEL", IDS_FILE_BROWSER_NAME_COLUMN_LABEL);
467 SET_STRING("EMPTY_FOLDER", IDS_FILE_BROWSER_EMPTY_FOLDER);
468 SET_STRING("NEW_FOLDER_BUTTON_LABEL",
469 IDS_FILE_BROWSER_NEW_FOLDER_BUTTON_LABEL);
470 SET_STRING("NEW_WINDOW_BUTTON_LABEL",
471 IDS_FILE_BROWSER_NEW_WINDOW_BUTTON_LABEL);
472 SET_STRING("NO_ACTION_FOR_CRX", IDS_FILE_BROWSER_NO_ACTION_FOR_CRX);
473 SET_STRING("NO_ACTION_FOR_CRX_TITLE",
474 IDS_FILE_BROWSER_NO_ACTION_FOR_CRX_TITLE);
475 SET_STRING("NO_ACTION_FOR_DMG", IDS_FILE_BROWSER_NO_ACTION_FOR_DMG);
476 SET_STRING("NO_ACTION_FOR_EXECUTABLE",
477 IDS_FILE_BROWSER_NO_ACTION_FOR_EXECUTABLE);
478 SET_STRING("NO_ACTION_FOR_FILE", IDS_FILE_BROWSER_NO_ACTION_FOR_FILE);
479 SET_STRING("OFFLINE_COLUMN_LABEL", IDS_FILE_BROWSER_OFFLINE_COLUMN_LABEL);
480 SET_STRING("OFFLINE_HEADER", IDS_FILE_BROWSER_OFFLINE_HEADER);
481 SET_STRING("OFFLINE_MESSAGE", IDS_FILE_BROWSER_OFFLINE_MESSAGE);
482 SET_STRING("OFFLINE_MESSAGE_PLURAL", IDS_FILE_BROWSER_OFFLINE_MESSAGE_PLURAL);
483 SET_STRING("OK_LABEL", IDS_FILE_BROWSER_OK_LABEL);
484 SET_STRING("OPEN_IN_OTHER_DESKTOP_MESSAGE",
485 IDS_FILE_BROWSER_OPEN_IN_OTHER_DESKTOP_MESSAGE);
486 SET_STRING("OPEN_IN_OTHER_DESKTOP_MESSAGE_PLURAL",
487 IDS_FILE_BROWSER_OPEN_IN_OTHER_DESKTOP_MESSAGE_PLURAL);
488 SET_STRING("OPEN_LABEL", IDS_FILE_BROWSER_OPEN_LABEL);
489 SET_STRING("OPEN_WITH_BUTTON_LABEL", IDS_FILE_BROWSER_OPEN_WITH_BUTTON_LABEL);
490 SET_STRING("PASTE_BUTTON_LABEL", IDS_FILE_BROWSER_PASTE_BUTTON_LABEL);
491 SET_STRING("PASTE_INTO_FOLDER_BUTTON_LABEL",
492 IDS_FILE_BROWSER_PASTE_INTO_FOLDER_BUTTON_LABEL);
493 SET_STRING("PREPARING_LABEL", IDS_FILE_BROWSER_PREPARING_LABEL);
494 SET_STRING("REFRESH_BUTTON_LABEL", IDS_FILE_BROWSER_REFRESH_BUTTON_LABEL);
495 SET_STRING("REMOVABLE_DEVICE_DETECTION_TITLE",
496 IDS_REMOVABLE_DEVICE_DETECTION_TITLE);
497 SET_STRING("REMOVABLE_DEVICE_IMPORT_BUTTON_LABEL",
498 IDS_REMOVABLE_DEVICE_IMPORT_BUTTON_LABEL);
499 SET_STRING("REMOVABLE_DEVICE_IMPORT_MESSAGE",
500 IDS_REMOVABLE_DEVICE_IMPORT_MESSAGE);
501 SET_STRING("REMOVABLE_DEVICE_NAVIGATION_BUTTON_LABEL",
502 IDS_REMOVABLE_DEVICE_NAVIGATION_BUTTON_LABEL);
503 SET_STRING("REMOVABLE_DEVICE_NAVIGATION_MESSAGE",
504 IDS_REMOVABLE_DEVICE_NAVIGATION_MESSAGE);
505 SET_STRING("REMOVE_FOLDER_SHORTCUT_BUTTON_LABEL",
506 IDS_FILE_BROWSER_REMOVE_FOLDER_SHORTCUT_BUTTON_LABEL);
507 SET_STRING("RENAME_BUTTON_LABEL", IDS_FILE_BROWSER_RENAME_BUTTON_LABEL);
508 SET_STRING("SAVE_LABEL", IDS_FILE_BROWSER_SAVE_LABEL);
509 SET_STRING("SEARCH_DRIVE_HTML", IDS_FILE_BROWSER_SEARCH_DRIVE_HTML);
510 SET_STRING("SEARCH_NO_MATCHING_FILES_HTML",
511 IDS_FILE_BROWSER_SEARCH_NO_MATCHING_FILES_HTML);
512 SET_STRING("SEARCH_TEXT_LABEL", IDS_FILE_BROWSER_SEARCH_TEXT_LABEL);
513 SET_STRING("TASKS_BUTTON_LABEL", IDS_FILE_BROWSER_TASKS_BUTTON_LABEL);
514 SET_STRING("TOGGLE_HIDDEN_FILES_COMMAND_LABEL",
515 IDS_FILE_BROWSER_TOGGLE_HIDDEN_FILES_COMMAND_LABEL);
516 SET_STRING("SHARE_BUTTON_LABEL", IDS_FILE_BROWSER_SHARE_BUTTON_LABEL);
517 SET_STRING("CHANGE_TO_LISTVIEW_BUTTON_LABEL",
518 IDS_FILE_BROWSER_CHANGE_TO_LISTVIEW_BUTTON_LABEL);
519 SET_STRING("CHANGE_TO_THUMBNAILVIEW_BUTTON_LABEL",
520 IDS_FILE_BROWSER_CHANGE_TO_THUMBNAILVIEW_BUTTON_LABEL);
521 SET_STRING("CANCEL_SELECTION_BUTTON_LABEL",
522 IDS_FILE_BROWSER_CANCEL_SELECTION_BUTTON_LABEL);
523 SET_STRING("SHARE_ERROR", IDS_FILE_BROWSER_SHARE_ERROR);
525 SET_STRING("SIZE_BYTES", IDS_FILE_BROWSER_SIZE_BYTES);
526 SET_STRING("SIZE_COLUMN_LABEL", IDS_FILE_BROWSER_SIZE_COLUMN_LABEL);
527 SET_STRING("SIZE_GB", IDS_FILE_BROWSER_SIZE_GB);
528 SET_STRING("SIZE_KB", IDS_FILE_BROWSER_SIZE_KB);
529 SET_STRING("SIZE_MB", IDS_FILE_BROWSER_SIZE_MB);
530 SET_STRING("SIZE_PB", IDS_FILE_BROWSER_SIZE_PB);
531 SET_STRING("SIZE_TB", IDS_FILE_BROWSER_SIZE_TB);
532 SET_STRING("SPACE_AVAILABLE", IDS_FILE_BROWSER_SPACE_AVAILABLE);
533 SET_STRING("STATUS_COLUMN_LABEL", IDS_FILE_BROWSER_STATUS_COLUMN_LABEL);
534 SET_STRING("SUGGEST_DIALOG_INSTALLATION_FAILED",
535 IDS_FILE_BROWSER_SUGGEST_DIALOG_INSTALLATION_FAILED);
536 SET_STRING("SUGGEST_DIALOG_LINK_TO_WEBSTORE",
537 IDS_FILE_BROWSER_SUGGEST_DIALOG_LINK_TO_WEBSTORE);
538 SET_STRING("SUGGEST_DIALOG_TITLE", IDS_FILE_BROWSER_SUGGEST_DIALOG_TITLE);
539 SET_STRING("SUGGEST_DIALOG_FOR_PROVIDERS_TITLE",
540 IDS_FILE_BROWSER_SUGGEST_DIALOG_FOR_PROVIDERS_TITLE);
541 SET_STRING("SUGGEST_DIALOG_LOADING_SPINNER_ALT",
542 IDS_WEBSTORE_WIDGET_LOADING_SPINNER_ALT);
543 SET_STRING("SUGGEST_DIALOG_INSTALLING_SPINNER_ALT",
544 IDS_WEBSTORE_WIDGET_INSTALLING_SPINNER_ALT);
545 SET_STRING("THUMBNAIL_VIEW_TOOLTIP", IDS_FILE_BROWSER_THUMBNAIL_VIEW_TOOLTIP);
546 SET_STRING("TIME_TODAY", IDS_FILE_BROWSER_TIME_TODAY);
547 SET_STRING("TIME_YESTERDAY", IDS_FILE_BROWSER_TIME_YESTERDAY);
548 SET_STRING("TRANSFER_PROGRESS_SUMMARY",
549 IDS_FILE_BROWSER_TRANSFER_PROGRESS_SUMMARY);
550 SET_STRING("TYPE_COLUMN_LABEL", IDS_FILE_BROWSER_TYPE_COLUMN_LABEL);
551 SET_STRING("UNKNOWN_FILESYSTEM_WARNING",
552 IDS_FILE_BROWSER_UNKNOWN_FILESYSTEM_WARNING);
553 SET_STRING("UNMOUNT_DEVICE_BUTTON_LABEL",
554 IDS_FILE_BROWSER_UNMOUNT_DEVICE_BUTTON_LABEL);
555 SET_STRING("UNMOUNT_FAILED", IDS_FILE_BROWSER_UNMOUNT_FAILED);
556 SET_STRING("UNSUPPORTED_FILESYSTEM_WARNING",
557 IDS_FILE_BROWSER_UNSUPPORTED_FILESYSTEM_WARNING);
558 SET_STRING("UPLOAD_LABEL", IDS_FILE_BROWSER_UPLOAD_LABEL);
559 SET_STRING("WAITING_FOR_SPACE_INFO", IDS_FILE_BROWSER_WAITING_FOR_SPACE_INFO);
560 SET_STRING("ZIP_FILESYSTEM_ERROR", IDS_FILE_BROWSER_ZIP_FILESYSTEM_ERROR);
561 SET_STRING("ZIP_FILE_NAME", IDS_FILE_BROWSER_ZIP_FILE_NAME);
562 SET_STRING("ZIP_ITEMS_REMAINING", IDS_FILE_BROWSER_ZIP_ITEMS_REMAINING);
563 SET_STRING("ZIP_PROGRESS_SUMMARY", IDS_FILE_BROWSER_ZIP_PROGRESS_SUMMARY);
564 SET_STRING("ZIP_SELECTION_BUTTON_LABEL",
565 IDS_FILE_BROWSER_ZIP_SELECTION_BUTTON_LABEL);
566 SET_STRING("ZIP_TARGET_EXISTS_ERROR",
567 IDS_FILE_BROWSER_ZIP_TARGET_EXISTS_ERROR);
568 SET_STRING("ZIP_UNEXPECTED_ERROR", IDS_FILE_BROWSER_ZIP_UNEXPECTED_ERROR);
569 #undef SET_STRING
571 dict->SetBoolean("PDF_VIEW_ENABLED",
572 file_manager::util::ShouldBeOpenedWithPlugin(
573 GetProfile(), FILE_PATH_LITERAL(".pdf")));
574 dict->SetBoolean("SWF_VIEW_ENABLED",
575 file_manager::util::ShouldBeOpenedWithPlugin(
576 GetProfile(), FILE_PATH_LITERAL(".swf")));
577 dict->SetString("CHROMEOS_RELEASE_BOARD",
578 base::SysInfo::GetLsbReleaseBoard());
579 dict->SetString(
580 "DOWNLOADS_LOW_SPACE_WARNING_HELP_URL",
581 base::StringPrintf(kHelpURLFormat, kDownloadsLowSpaceWarningHelpNumber));
582 dict->SetString("FILES_APP_HELP_URL",
583 base::StringPrintf(kHelpURLFormat, kFilesAppHelpNumber));
585 dict->SetString("GOOGLE_DRIVE_BUY_STORAGE_URL", kGoogleDriveBuyStorageUrl);
586 dict->SetString(
587 "GOOGLE_DRIVE_ERROR_HELP_URL",
588 base::StringPrintf(kHelpURLFormat, kGoogleDriveErrorHelpNumber));
589 dict->SetString("GOOGLE_DRIVE_HELP_URL", kGoogleDriveHelpUrl);
590 dict->SetString("GOOGLE_DRIVE_OVERVIEW_URL", kGoogleDriveOverviewUrl);
591 dict->SetString("GOOGLE_DRIVE_REDEEM_URL", kGoogleDriveRedeemUrl);
592 dict->SetString("GOOGLE_DRIVE_ROOT_URL", kGoogleDriveRootUrl);
593 dict->SetString(
594 "NO_ACTION_FOR_FILE_URL",
595 base::StringPrintf(kHelpURLFormat, kNoActionForFileHelpNumber));
596 dict->SetString("UI_LOCALE", extension_l10n_util::CurrentLocaleOrDefault());
598 const std::string& app_locale = g_browser_process->GetApplicationLocale();
599 webui::SetLoadTimeDataDefaults(app_locale, dict);
601 return true;
604 } // namespace extensions