Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / chromeos / extensions / file_manager / private_api_strings.cc
blob16ebc736e07c30c81d2bcc185933e9e4fc159ca7
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_PROGRESS_SUMMARY", IDS_FILE_BROWSER_SYNC_PROGRESS_SUMMARY);
152 SET_STRING("SYNC_SERVICE_UNAVAILABLE_ERROR",
153 IDS_FILE_BROWSER_SYNC_SERVICE_UNAVAILABLE_ERROR);
156 void AddStringsForGallery(base::DictionaryValue* dict) {
157 SET_STRING("GALLERY_ASPECT_RATIO_16_9",
158 IDS_FILE_BROWSER_GALLERY_ASPECT_RATIO_16_9);
159 SET_STRING("GALLERY_ASPECT_RATIO_1_1",
160 IDS_FILE_BROWSER_GALLERY_ASPECT_RATIO_1_1);
161 SET_STRING("GALLERY_ASPECT_RATIO_6_4",
162 IDS_FILE_BROWSER_GALLERY_ASPECT_RATIO_6_4);
163 SET_STRING("GALLERY_ASPECT_RATIO_7_5",
164 IDS_FILE_BROWSER_GALLERY_ASPECT_RATIO_7_5);
165 SET_STRING("GALLERY_AUTOFIX", IDS_FILE_BROWSER_GALLERY_AUTOFIX);
166 SET_STRING("GALLERY_BRIGHTNESS", IDS_FILE_BROWSER_GALLERY_BRIGHTNESS);
167 SET_STRING("GALLERY_CANCEL_LABEL", IDS_FILE_BROWSER_CANCEL_LABEL);
168 SET_STRING("GALLERY_CONFIRM_DELETE_ONE", IDS_FILE_BROWSER_CONFIRM_DELETE_ONE);
169 SET_STRING("GALLERY_CONFIRM_DELETE_SOME",
170 IDS_FILE_BROWSER_CONFIRM_DELETE_SOME);
171 SET_STRING("GALLERY_CONTRAST", IDS_FILE_BROWSER_GALLERY_CONTRAST);
172 SET_STRING("GALLERY_CROP", IDS_FILE_BROWSER_GALLERY_CROP);
173 SET_STRING("GALLERY_DELETE", IDS_FILE_BROWSER_GALLERY_DELETE);
174 SET_STRING("GALLERY_EDIT", IDS_FILE_BROWSER_GALLERY_EDIT);
175 SET_STRING("GALLERY_ENTER_WHEN_DONE",
176 IDS_FILE_BROWSER_GALLERY_ENTER_WHEN_DONE);
177 SET_STRING("GALLERY_EXPOSURE", IDS_FILE_BROWSER_GALLERY_EXPOSURE);
178 SET_STRING("GALLERY_FILE_EXISTS", IDS_FILE_BROWSER_GALLERY_FILE_EXISTS);
179 SET_STRING("GALLERY_FIXED", IDS_FILE_BROWSER_GALLERY_FIXED);
180 SET_STRING("GALLERY_IMAGE_ERROR", IDS_FILE_BROWSER_GALLERY_IMAGE_ERROR);
181 SET_STRING("GALLERY_IMAGE_OFFLINE", IDS_FILE_BROWSER_GALLERY_IMAGE_OFFLINE);
182 SET_STRING("GALLERY_ITEMS_SELECTED", IDS_FILE_BROWSER_GALLERY_ITEMS_SELECTED);
183 SET_STRING("GALLERY_NO_IMAGES", IDS_FILE_BROWSER_GALLERY_NO_IMAGES);
184 SET_STRING("GALLERY_OK_LABEL", IDS_FILE_BROWSER_OK_LABEL);
185 SET_STRING("GALLERY_OVERWRITE_BUBBLE",
186 IDS_FILE_BROWSER_GALLERY_OVERWRITE_BUBBLE);
187 SET_STRING("GALLERY_OVERWRITE_ORIGINAL",
188 IDS_FILE_BROWSER_GALLERY_OVERWRITE_ORIGINAL);
189 SET_STRING("GALLERY_PRINT", IDS_FILE_BROWSER_GALLERY_PRINT);
190 SET_STRING("GALLERY_READONLY_WARNING",
191 IDS_FILE_BROWSER_GALLERY_READONLY_WARNING);
192 SET_STRING("GALLERY_REDO", IDS_FILE_BROWSER_GALLERY_REDO);
193 SET_STRING("GALLERY_ROTATE_LEFT", IDS_FILE_BROWSER_GALLERY_ROTATE_LEFT);
194 SET_STRING("GALLERY_ROTATE_RIGHT", IDS_FILE_BROWSER_GALLERY_ROTATE_RIGHT);
195 SET_STRING("GALLERY_SAVED", IDS_FILE_BROWSER_GALLERY_SAVED);
196 SET_STRING("GALLERY_SAVE_FAILED", IDS_FILE_BROWSER_GALLERY_SAVE_FAILED);
197 SET_STRING("GALLERY_SHARE", IDS_FILE_BROWSER_GALLERY_SHARE);
198 SET_STRING("GALLERY_SLIDE", IDS_FILE_BROWSER_GALLERY_SLIDE);
199 SET_STRING("GALLERY_SLIDESHOW", IDS_FILE_BROWSER_GALLERY_SLIDESHOW);
200 SET_STRING("GALLERY_THUMBNAIL", IDS_FILE_BROWSER_GALLERY_THUMBNAIL);
201 SET_STRING("GALLERY_UNDO", IDS_FILE_BROWSER_GALLERY_UNDO);
202 SET_STRING("GALLERY_DONE", IDS_FILE_BROWSER_GALLERY_DONE);
205 void AddStringsForVideoPlayer(base::DictionaryValue* dict) {
206 SET_STRING("VIDEO_PLAYER_LOOPED_MODE", IDS_VIDEO_PLAYER_LOOPED_MODE);
207 SET_STRING("VIDEO_PLAYER_PLAYBACK_ERROR", IDS_VIDEO_PLAYER_PLAYBACK_ERROR);
208 SET_STRING("VIDEO_PLAYER_PLAYING_ON", IDS_VIDEO_PLAYER_PLAYING_ON);
209 SET_STRING("VIDEO_PLAYER_PLAY_ON", IDS_VIDEO_PLAYER_PLAY_ON);
210 SET_STRING("VIDEO_PLAYER_PLAY_THIS_COMPUTER",
211 IDS_VIDEO_PLAYER_PLAY_THIS_COMPUTER);
212 SET_STRING("VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED",
213 IDS_VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED);
214 SET_STRING("VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED_FOR_CAST",
215 IDS_VIDEO_PLAYER_VIDEO_FILE_UNSUPPORTED_FOR_CAST);
218 void AddStringsForAudioPlayer(base::DictionaryValue* dict) {
219 SET_STRING("AUDIO_ERROR", IDS_FILE_BROWSER_AUDIO_ERROR);
220 SET_STRING("AUDIO_OFFLINE", IDS_FILE_BROWSER_AUDIO_OFFLINE);
221 SET_STRING("AUDIO_PLAYER_DEFAULT_ARTIST",
222 IDS_FILE_BROWSER_AUDIO_PLAYER_DEFAULT_ARTIST);
223 SET_STRING("AUDIO_PLAYER_TITLE", IDS_FILE_BROWSER_AUDIO_PLAYER_TITLE);
226 void AddStringsForCloudImport(base::DictionaryValue* dict) {
227 SET_STRING("CLOUD_IMPORT_TITLE", IDS_FILE_BROWSER_CLOUD_IMPORT_TITLE);
228 SET_STRING("CLOUD_IMPORT_DESTINATION_FOLDER",
229 IDS_FILE_BROWSER_CLOUD_DESTINATION_FOLDER);
230 SET_STRING("CLOUD_IMPORT_DESCRIPTION",
231 IDS_FILE_BROWSER_CLOUD_IMPORT_DESCRIPTION);
232 SET_STRING("CLOUD_IMPORT_START", IDS_FILE_BROWSER_CLOUD_IMPORT_START);
233 SET_STRING("CLOUD_IMPORT_SHOW_DETAILS",
234 IDS_FILE_BROWSER_CLOUD_IMPORT_SHOW_DETAILS);
235 SET_STRING("CLOUD_IMPORT_COMMAND", IDS_FILE_BROWSER_CLOUD_IMPORT_COMMAND);
236 SET_STRING("CLOUD_IMPORT_CANCEL_COMMAND",
237 IDS_FILE_BROWSER_CLOUD_IMPORT_CANCEL_COMMAND);
239 SET_STRING("CLOUD_IMPORT_STATUS_READY",
240 IDS_FILE_BROWSER_CLOUD_IMPORT_STATUS_DONE);
241 SET_STRING("CLOUD_IMPORT_STATUS_IMPORTING",
242 IDS_FILE_BROWSER_CLOUD_IMPORT_STATUS_IMPORTING);
243 SET_STRING("CLOUD_IMPORT_STATUS_INSUFFICIENT_SPACE",
244 IDS_FILE_BROWSER_CLOUD_IMPORT_STATUS_INSUFFICIENT_SPACE);
245 SET_STRING("CLOUD_IMPORT_STATUS_NO_MEDIA",
246 IDS_FILE_BROWSER_CLOUD_IMPORT_STATUS_NO_MEDIA);
247 SET_STRING("CLOUD_IMPORT_STATUS_READY",
248 IDS_FILE_BROWSER_CLOUD_IMPORT_STATUS_READY);
249 SET_STRING("CLOUD_IMPORT_STATUS_SCANNING",
250 IDS_FILE_BROWSER_CLOUD_IMPORT_STATUS_SCANNING);
251 SET_STRING("CLOUD_IMPORT_ITEMS_REMAINING",
252 IDS_FILE_BROWSER_CLOUD_IMPORT_ITEMS_REMAINING);
254 SET_STRING("CLOUD_IMPORT_TOOLTIP_READY",
255 IDS_FILE_BROWSER_CLOUD_IMPORT_TOOLTIP_DONE);
256 SET_STRING("CLOUD_IMPORT_TOOLTIP_IMPORTING",
257 IDS_FILE_BROWSER_CLOUD_IMPORT_TOOLTIP_IMPORTING);
258 SET_STRING("CLOUD_IMPORT_TOOLTIP_INSUFFICIENT_SPACE",
259 IDS_FILE_BROWSER_CLOUD_IMPORT_TOOLTIP_INSUFFICIENT_SPACE);
260 SET_STRING("CLOUD_IMPORT_TOOLTIP_NO_MEDIA",
261 IDS_FILE_BROWSER_CLOUD_IMPORT_TOOLTIP_NO_MEDIA);
262 SET_STRING("CLOUD_IMPORT_TOOLTIP_READY",
263 IDS_FILE_BROWSER_CLOUD_IMPORT_TOOLTIP_READY);
264 SET_STRING("CLOUD_IMPORT_TOOLTIP_SCANNING",
265 IDS_FILE_BROWSER_CLOUD_IMPORT_TOOLTIP_SCANNING);
268 void AddStringsForCrUiMenuItemShortcuts(base::DictionaryValue* dict) {
269 // Shortcut key names: used from cr.ui.MenuItem.updateShortcut_.
270 SET_STRING("SHORTCUT_ALT", IDS_FILE_BROWSER_SHORTCUT_ALT);
271 SET_STRING("SHORTCUT_CTRL", IDS_FILE_BROWSER_SHORTCUT_CTRL);
272 SET_STRING("SHORTCUT_ENTER", IDS_FILE_BROWSER_SHORTCUT_ENTER);
273 SET_STRING("SHORTCUT_META", IDS_FILE_BROWSER_SHORTCUT_META);
274 SET_STRING("SHORTCUT_SHIFT", IDS_FILE_BROWSER_SHORTCUT_SHIFT);
275 SET_STRING("SHORTCUT_SPACE", IDS_FILE_BROWSER_SHORTCUT_SPACE);
278 void AddStringsForFileErrors(base::DictionaryValue* dict) {
279 SET_STRING("FILE_ERROR_GENERIC", IDS_FILE_BROWSER_FILE_ERROR_GENERIC);
280 SET_STRING("FILE_ERROR_INVALID_MODIFICATION",
281 IDS_FILE_BROWSER_FILE_ERROR_INVALID_MODIFICATION);
282 SET_STRING("FILE_ERROR_INVALID_STATE",
283 IDS_FILE_BROWSER_FILE_ERROR_INVALID_STATE);
284 SET_STRING("FILE_ERROR_NOT_FOUND", IDS_FILE_BROWSER_FILE_ERROR_NOT_FOUND);
285 SET_STRING("FILE_ERROR_NOT_READABLE",
286 IDS_FILE_BROWSER_FILE_ERROR_NOT_READABLE);
287 SET_STRING("FILE_ERROR_NO_MODIFICATION_ALLOWED",
288 IDS_FILE_BROWSER_FILE_ERROR_NO_MODIFICATION_ALLOWED);
289 SET_STRING("FILE_ERROR_PATH_EXISTS", IDS_FILE_BROWSER_FILE_ERROR_PATH_EXISTS);
290 SET_STRING("FILE_ERROR_QUOTA_EXCEEDED",
291 IDS_FILE_BROWSER_FILE_ERROR_QUOTA_EXCEEDED);
292 SET_STRING("FILE_ERROR_SECURITY", IDS_FILE_BROWSER_FILE_ERROR_SECURITY);
295 } // namespace
297 namespace extensions {
299 FileManagerPrivateGetStringsFunction::FileManagerPrivateGetStringsFunction() {
302 FileManagerPrivateGetStringsFunction::~FileManagerPrivateGetStringsFunction() {
305 bool FileManagerPrivateGetStringsFunction::RunSync() {
306 base::DictionaryValue* dict = new base::DictionaryValue();
307 SetResult(dict);
309 AddStringsForDrive(dict);
310 AddStringsForFileTypes(dict);
311 AddStringsForGallery(dict);
312 AddStringsForVideoPlayer(dict);
313 AddStringsForAudioPlayer(dict);
314 AddStringsForCloudImport(dict);
315 AddStringsForCrUiMenuItemShortcuts(dict);
316 AddStringsForFileErrors(dict);
318 SET_STRING("ACTION_LISTEN", IDS_FILE_BROWSER_ACTION_LISTEN);
319 SET_STRING("ACTION_OPEN", IDS_FILE_BROWSER_ACTION_OPEN);
320 SET_STRING("ACTION_OPEN_GDOC", IDS_FILE_BROWSER_ACTION_OPEN_GDOC);
321 SET_STRING("ACTION_OPEN_GSHEET", IDS_FILE_BROWSER_ACTION_OPEN_GSHEET);
322 SET_STRING("ACTION_OPEN_GSLIDES", IDS_FILE_BROWSER_ACTION_OPEN_GSLIDES);
323 SET_STRING("ACTION_VIEW", IDS_FILE_BROWSER_ACTION_VIEW);
324 SET_STRING("ADD_NEW_SERVICES_BUTTON_LABEL",
325 IDS_FILE_BROWSER_ADD_NEW_SERVICES_BUTTON_LABEL);
326 SET_STRING("ALL_FILES_FILTER", IDS_FILE_BROWSER_ALL_FILES_FILTER);
327 SET_STRING("ARCHIVE_MOUNT_FAILED", IDS_FILE_BROWSER_ARCHIVE_MOUNT_FAILED);
328 SET_STRING("CALCULATING_SIZE", IDS_FILE_BROWSER_CALCULATING_SIZE);
329 SET_STRING("CANCEL_LABEL", IDS_FILE_BROWSER_CANCEL_LABEL);
330 SET_STRING("CHANGE_DEFAULT_CAPTION", IDS_FILE_BROWSER_CHANGE_DEFAULT_CAPTION);
331 SET_STRING("CHANGE_DEFAULT_MENU_ITEM",
332 IDS_FILE_BROWSER_CHANGE_DEFAULT_MENU_ITEM);
333 SET_STRING("CLOSE_VOLUME_BUTTON_LABEL",
334 IDS_FILE_BROWSER_CLOSE_VOLUME_BUTTON_LABEL);
335 SET_STRING("CONFIGURE_VOLUME_BUTTON_LABEL",
336 IDS_FILE_BROWSER_CONFIGURE_VOLUME_BUTTON_LABEL);
337 SET_STRING("CONFIRM_MOBILE_DATA_USE",
338 IDS_FILE_BROWSER_CONFIRM_MOBILE_DATA_USE);
339 SET_STRING("CONFIRM_MOBILE_DATA_USE_PLURAL",
340 IDS_FILE_BROWSER_CONFIRM_MOBILE_DATA_USE_PLURAL);
341 SET_STRING("CONFIRM_OVERWRITE_FILE", IDS_FILE_BROWSER_CONFIRM_OVERWRITE_FILE);
342 SET_STRING("CONFLICT_DIALOG_APPLY_TO_ALL",
343 IDS_FILE_BROWSER_CONFLICT_DIALOG_APPLY_TO_ALL);
344 SET_STRING("CONFLICT_DIALOG_KEEP_BOTH",
345 IDS_FILE_BROWSER_CONFLICT_DIALOG_KEEP_BOTH);
346 SET_STRING("CONFLICT_DIALOG_MESSAGE",
347 IDS_FILE_BROWSER_CONFLICT_DIALOG_MESSAGE);
348 SET_STRING("CONFLICT_DIALOG_REPLACE",
349 IDS_FILE_BROWSER_CONFLICT_DIALOG_REPLACE);
350 SET_STRING("COPY_BUTTON_LABEL", IDS_FILE_BROWSER_COPY_BUTTON_LABEL);
351 SET_STRING("COPY_FILESYSTEM_ERROR", IDS_FILE_BROWSER_COPY_FILESYSTEM_ERROR);
352 SET_STRING("COPY_FILE_NAME", IDS_FILE_BROWSER_COPY_FILE_NAME);
353 SET_STRING("COPY_ITEMS_REMAINING", IDS_FILE_BROWSER_COPY_ITEMS_REMAINING);
354 SET_STRING("COPY_PROGRESS_SUMMARY", IDS_FILE_BROWSER_COPY_PROGRESS_SUMMARY);
355 SET_STRING("COPY_SOURCE_NOT_FOUND_ERROR",
356 IDS_FILE_BROWSER_COPY_SOURCE_NOT_FOUND_ERROR);
357 SET_STRING("COPY_TARGET_EXISTS_ERROR",
358 IDS_FILE_BROWSER_COPY_TARGET_EXISTS_ERROR);
359 SET_STRING("COPY_UNEXPECTED_ERROR", IDS_FILE_BROWSER_COPY_UNEXPECTED_ERROR);
360 SET_STRING("CREATE_FOLDER_SHORTCUT_BUTTON_LABEL",
361 IDS_FILE_BROWSER_CREATE_FOLDER_SHORTCUT_BUTTON_LABEL);
362 SET_STRING("CUT_BUTTON_LABEL", IDS_FILE_BROWSER_CUT_BUTTON_LABEL);
363 SET_STRING("DATE_COLUMN_LABEL", IDS_FILE_BROWSER_DATE_COLUMN_LABEL);
364 SET_STRING("DEFAULT_ACTION_LABEL", IDS_FILE_BROWSER_DEFAULT_ACTION_LABEL);
365 SET_STRING("DEFAULT_NEW_FOLDER_NAME",
366 IDS_FILE_BROWSER_DEFAULT_NEW_FOLDER_NAME);
367 SET_STRING("DELETE_BUTTON_LABEL", IDS_FILE_BROWSER_DELETE_BUTTON_LABEL);
368 SET_STRING("DELETE_ERROR", IDS_FILE_BROWSER_DELETE_ERROR);
369 SET_STRING("DELETE_FILE_NAME", IDS_FILE_BROWSER_DELETE_FILE_NAME);
370 SET_STRING("DELETE_ITEMS_REMAINING", IDS_FILE_BROWSER_DELETE_ITEMS_REMAINING);
371 SET_STRING("DELETE_PROGRESS_SUMMARY",
372 IDS_FILE_BROWSER_DELETE_PROGRESS_SUMMARY);
373 SET_STRING("DEVICE_HARD_UNPLUGGED_MESSAGE",
374 IDS_DEVICE_HARD_UNPLUGGED_MESSAGE);
375 SET_STRING("DEVICE_HARD_UNPLUGGED_TITLE", IDS_DEVICE_HARD_UNPLUGGED_TITLE);
376 SET_STRING("DEVICE_UNKNOWN_BUTTON_LABEL", IDS_DEVICE_UNKNOWN_BUTTON_LABEL);
377 SET_STRING("DEVICE_UNKNOWN_DEFAULT_MESSAGE",
378 IDS_DEVICE_UNKNOWN_DEFAULT_MESSAGE);
379 SET_STRING("DEVICE_UNKNOWN_MESSAGE", IDS_DEVICE_UNKNOWN_MESSAGE);
380 SET_STRING("DEVICE_UNSUPPORTED_DEFAULT_MESSAGE",
381 IDS_DEVICE_UNSUPPORTED_DEFAULT_MESSAGE);
382 SET_STRING("DEVICE_UNSUPPORTED_MESSAGE", IDS_DEVICE_UNSUPPORTED_MESSAGE);
383 SET_STRING("DIRECTORY_ALREADY_EXISTS",
384 IDS_FILE_BROWSER_DIRECTORY_ALREADY_EXISTS);
385 SET_STRING("DISABLED_MOBILE_SYNC_NOTIFICATION_ENABLE_BUTTON",
386 IDS_FILE_BROWSER_DISABLED_MOBILE_SYNC_NOTIFICATION_ENABLE_BUTTON);
387 SET_STRING("DISABLED_MOBILE_SYNC_NOTIFICATION_MESSAGE",
388 IDS_FILE_BROWSER_DISABLED_MOBILE_SYNC_NOTIFICATION_MESSAGE);
389 SET_STRING("DOWNLOADS_DIRECTORY_LABEL",
390 IDS_FILE_BROWSER_DOWNLOADS_DIRECTORY_LABEL);
391 SET_STRING("DOWNLOADS_DIRECTORY_WARNING",
392 IDS_FILE_BROWSER_DOWNLOADS_DIRECTORY_WARNING);
393 SET_STRING("DRAGGING_MULTIPLE_ITEMS",
394 IDS_FILE_BROWSER_DRAGGING_MULTIPLE_ITEMS);
395 SET_STRING("ERROR_CREATING_FOLDER", IDS_FILE_BROWSER_ERROR_CREATING_FOLDER);
396 SET_STRING("ERROR_HIDDEN_NAME", IDS_FILE_BROWSER_ERROR_HIDDEN_NAME);
397 SET_STRING("ERROR_INVALID_CHARACTER",
398 IDS_FILE_BROWSER_ERROR_INVALID_CHARACTER);
399 SET_STRING("ERROR_LONG_NAME", IDS_FILE_BROWSER_ERROR_LONG_NAME);
400 SET_STRING("ERROR_PROGRESS_SUMMARY", IDS_FILE_BROWSER_ERROR_PROGRESS_SUMMARY);
401 SET_STRING("ERROR_PROGRESS_SUMMARY_PLURAL",
402 IDS_FILE_BROWSER_ERROR_PROGRESS_SUMMARY_PLURAL);
403 SET_STRING("ERROR_RENAMING", IDS_FILE_BROWSER_ERROR_RENAMING);
404 SET_STRING("ERROR_RESERVED_NAME", IDS_FILE_BROWSER_ERROR_RESERVED_NAME);
405 SET_STRING("ERROR_WHITESPACE_NAME", IDS_FILE_BROWSER_ERROR_WHITESPACE_NAME);
406 SET_STRING("EXTERNAL_STORAGE_DISABLED_MESSAGE",
407 IDS_EXTERNAL_STORAGE_DISABLED_MESSAGE);
408 SET_STRING("FAILED_SPACE_INFO", IDS_FILE_BROWSER_FAILED_SPACE_INFO);
409 SET_STRING("FILENAME_LABEL", IDS_FILE_BROWSER_FILENAME_LABEL);
410 SET_STRING("FILE_ALREADY_EXISTS", IDS_FILE_BROWSER_FILE_ALREADY_EXISTS);
411 SET_STRING("FORMATTING_FINISHED_FAILURE_MESSAGE",
412 IDS_FORMATTING_FINISHED_FAILURE_MESSAGE);
413 SET_STRING("FORMATTING_FINISHED_SUCCESS_MESSAGE",
414 IDS_FORMATTING_FINISHED_SUCCESS_MESSAGE);
415 SET_STRING("FORMATTING_OF_DEVICE_FAILED_TITLE",
416 IDS_FORMATTING_OF_DEVICE_FAILED_TITLE);
417 SET_STRING("FORMATTING_OF_DEVICE_FINISHED_TITLE",
418 IDS_FORMATTING_OF_DEVICE_FINISHED_TITLE);
419 SET_STRING("FORMATTING_OF_DEVICE_PENDING_MESSAGE",
420 IDS_FORMATTING_OF_DEVICE_PENDING_MESSAGE);
421 SET_STRING("FORMATTING_OF_DEVICE_PENDING_TITLE",
422 IDS_FORMATTING_OF_DEVICE_PENDING_TITLE);
423 SET_STRING("FORMATTING_WARNING", IDS_FILE_BROWSER_FORMATTING_WARNING);
424 SET_STRING("FORMAT_DEVICE_BUTTON_LABEL",
425 IDS_FILE_BROWSER_FORMAT_DEVICE_BUTTON_LABEL);
426 SET_STRING("SORT_BUTTON_TOOLTIP", IDS_FILE_BROWSER_SORT_BUTTON_TOOLTIP);
427 SET_STRING("GEAR_BUTTON_TOOLTIP", IDS_FILE_BROWSER_GEAR_BUTTON_TOOLTIP);
428 SET_STRING("HOSTED_OFFLINE_MESSAGE", IDS_FILE_BROWSER_HOSTED_OFFLINE_MESSAGE);
429 SET_STRING("HOSTED_OFFLINE_MESSAGE_PLURAL",
430 IDS_FILE_BROWSER_HOSTED_OFFLINE_MESSAGE_PLURAL);
431 SET_STRING("INSTALL_NEW_EXTENSION_LABEL",
432 IDS_FILE_BROWSER_INSTALL_NEW_EXTENSION_LABEL);
433 SET_STRING("MANY_DIRECTORIES_SELECTED",
434 IDS_FILE_BROWSER_MANY_DIRECTORIES_SELECTED);
435 SET_STRING("MANY_ENTRIES_SELECTED", IDS_FILE_BROWSER_MANY_ENTRIES_SELECTED);
436 SET_STRING("MANY_FILES_SELECTED", IDS_FILE_BROWSER_MANY_FILES_SELECTED);
437 SET_STRING("MORE_ACTIONS", IDS_FILE_BROWSER_MORE_ACTIONS);
438 SET_STRING("MOUNT_ARCHIVE", IDS_FILE_BROWSER_MOUNT_ARCHIVE);
439 SET_STRING("MOVE_FILESYSTEM_ERROR", IDS_FILE_BROWSER_MOVE_FILESYSTEM_ERROR);
440 SET_STRING("MOVE_FILE_NAME", IDS_FILE_BROWSER_MOVE_FILE_NAME);
441 SET_STRING("MOVE_ITEMS_REMAINING", IDS_FILE_BROWSER_MOVE_ITEMS_REMAINING);
442 SET_STRING("MOVE_PROGRESS_SUMMARY", IDS_FILE_BROWSER_MOVE_PROGRESS_SUMMARY);
443 SET_STRING("MOVE_SOURCE_NOT_FOUND_ERROR",
444 IDS_FILE_BROWSER_MOVE_SOURCE_NOT_FOUND_ERROR);
445 SET_STRING("MOVE_TARGET_EXISTS_ERROR",
446 IDS_FILE_BROWSER_MOVE_TARGET_EXISTS_ERROR);
447 SET_STRING("MOVE_UNEXPECTED_ERROR", IDS_FILE_BROWSER_MOVE_UNEXPECTED_ERROR);
448 SET_STRING("MULTIPART_DEVICE_UNSUPPORTED_DEFAULT_MESSAGE",
449 IDS_MULTIPART_DEVICE_UNSUPPORTED_DEFAULT_MESSAGE);
450 SET_STRING("MULTIPART_DEVICE_UNSUPPORTED_MESSAGE",
451 IDS_MULTIPART_DEVICE_UNSUPPORTED_MESSAGE);
452 SET_STRING("MULTI_PROFILE_SHARE_DIALOG_MESSAGE",
453 IDS_FILE_BROWSER_MULTI_PROFILE_SHARE_DIALOG_MESSAGE);
454 SET_STRING("MULTI_PROFILE_SHARE_DIALOG_MESSAGE_PLURAL",
455 IDS_FILE_BROWSER_MULTI_PROFILE_SHARE_DIALOG_MESSAGE_PLURAL);
456 SET_STRING("MULTI_PROFILE_SHARE_DIALOG_TITLE",
457 IDS_FILE_BROWSER_MULTI_PROFILE_SHARE_DIALOG_TITLE);
458 SET_STRING("MULTI_PROFILE_SHARE_DIALOG_TITLE_PLURAL",
459 IDS_FILE_BROWSER_MULTI_PROFILE_SHARE_DIALOG_TITLE_PLURAL);
460 SET_STRING("NAME_COLUMN_LABEL", IDS_FILE_BROWSER_NAME_COLUMN_LABEL);
461 SET_STRING("EMPTY_FOLDER", IDS_FILE_BROWSER_EMPTY_FOLDER);
462 SET_STRING("NEW_FOLDER_BUTTON_LABEL",
463 IDS_FILE_BROWSER_NEW_FOLDER_BUTTON_LABEL);
464 SET_STRING("NEW_WINDOW_BUTTON_LABEL",
465 IDS_FILE_BROWSER_NEW_WINDOW_BUTTON_LABEL);
466 SET_STRING("NO_ACTION_FOR_CRX", IDS_FILE_BROWSER_NO_ACTION_FOR_CRX);
467 SET_STRING("NO_ACTION_FOR_CRX_TITLE",
468 IDS_FILE_BROWSER_NO_ACTION_FOR_CRX_TITLE);
469 SET_STRING("NO_ACTION_FOR_DMG", IDS_FILE_BROWSER_NO_ACTION_FOR_DMG);
470 SET_STRING("NO_ACTION_FOR_EXECUTABLE",
471 IDS_FILE_BROWSER_NO_ACTION_FOR_EXECUTABLE);
472 SET_STRING("NO_ACTION_FOR_FILE", IDS_FILE_BROWSER_NO_ACTION_FOR_FILE);
473 SET_STRING("OFFLINE_COLUMN_LABEL", IDS_FILE_BROWSER_OFFLINE_COLUMN_LABEL);
474 SET_STRING("OFFLINE_HEADER", IDS_FILE_BROWSER_OFFLINE_HEADER);
475 SET_STRING("OFFLINE_MESSAGE", IDS_FILE_BROWSER_OFFLINE_MESSAGE);
476 SET_STRING("OFFLINE_MESSAGE_PLURAL", IDS_FILE_BROWSER_OFFLINE_MESSAGE_PLURAL);
477 SET_STRING("OK_LABEL", IDS_FILE_BROWSER_OK_LABEL);
478 SET_STRING("OPEN_IN_OTHER_DESKTOP_MESSAGE",
479 IDS_FILE_BROWSER_OPEN_IN_OTHER_DESKTOP_MESSAGE);
480 SET_STRING("OPEN_IN_OTHER_DESKTOP_MESSAGE_PLURAL",
481 IDS_FILE_BROWSER_OPEN_IN_OTHER_DESKTOP_MESSAGE_PLURAL);
482 SET_STRING("OPEN_LABEL", IDS_FILE_BROWSER_OPEN_LABEL);
483 SET_STRING("OPEN_WITH_BUTTON_LABEL", IDS_FILE_BROWSER_OPEN_WITH_BUTTON_LABEL);
484 SET_STRING("PASTE_BUTTON_LABEL", IDS_FILE_BROWSER_PASTE_BUTTON_LABEL);
485 SET_STRING("PASTE_INTO_FOLDER_BUTTON_LABEL",
486 IDS_FILE_BROWSER_PASTE_INTO_FOLDER_BUTTON_LABEL);
487 SET_STRING("PREPARING_LABEL", IDS_FILE_BROWSER_PREPARING_LABEL);
488 SET_STRING("REFRESH_BUTTON_LABEL", IDS_FILE_BROWSER_REFRESH_BUTTON_LABEL);
489 SET_STRING("REMOVABLE_DEVICE_DETECTION_TITLE",
490 IDS_REMOVABLE_DEVICE_DETECTION_TITLE);
491 SET_STRING("REMOVABLE_DEVICE_IMPORT_BUTTON_LABEL",
492 IDS_REMOVABLE_DEVICE_IMPORT_BUTTON_LABEL);
493 SET_STRING("REMOVABLE_DEVICE_IMPORT_MESSAGE",
494 IDS_REMOVABLE_DEVICE_IMPORT_MESSAGE);
495 SET_STRING("REMOVABLE_DEVICE_NAVIGATION_BUTTON_LABEL",
496 IDS_REMOVABLE_DEVICE_NAVIGATION_BUTTON_LABEL);
497 SET_STRING("REMOVABLE_DEVICE_NAVIGATION_MESSAGE",
498 IDS_REMOVABLE_DEVICE_NAVIGATION_MESSAGE);
499 SET_STRING("REMOVE_FOLDER_SHORTCUT_BUTTON_LABEL",
500 IDS_FILE_BROWSER_REMOVE_FOLDER_SHORTCUT_BUTTON_LABEL);
501 SET_STRING("RENAME_BUTTON_LABEL", IDS_FILE_BROWSER_RENAME_BUTTON_LABEL);
502 SET_STRING("SAVE_LABEL", IDS_FILE_BROWSER_SAVE_LABEL);
503 SET_STRING("SEARCH_DRIVE_HTML", IDS_FILE_BROWSER_SEARCH_DRIVE_HTML);
504 SET_STRING("SEARCH_NO_MATCHING_FILES_HTML",
505 IDS_FILE_BROWSER_SEARCH_NO_MATCHING_FILES_HTML);
506 SET_STRING("SEARCH_TEXT_LABEL", IDS_FILE_BROWSER_SEARCH_TEXT_LABEL);
507 SET_STRING("TASKS_BUTTON_LABEL", IDS_FILE_BROWSER_TASKS_BUTTON_LABEL);
508 SET_STRING("TOGGLE_HIDDEN_FILES_COMMAND_LABEL",
509 IDS_FILE_BROWSER_TOGGLE_HIDDEN_FILES_COMMAND_LABEL);
510 SET_STRING("SHARE_BUTTON_LABEL", IDS_FILE_BROWSER_SHARE_BUTTON_LABEL);
511 SET_STRING("CHANGE_TO_LISTVIEW_BUTTON_LABEL",
512 IDS_FILE_BROWSER_CHANGE_TO_LISTVIEW_BUTTON_LABEL);
513 SET_STRING("CHANGE_TO_THUMBNAILVIEW_BUTTON_LABEL",
514 IDS_FILE_BROWSER_CHANGE_TO_THUMBNAILVIEW_BUTTON_LABEL);
515 SET_STRING("CANCEL_SELECTION_BUTTON_LABEL",
516 IDS_FILE_BROWSER_CANCEL_SELECTION_BUTTON_LABEL);
517 SET_STRING("SHARE_ERROR", IDS_FILE_BROWSER_SHARE_ERROR);
519 SET_STRING("SIZE_BYTES", IDS_FILE_BROWSER_SIZE_BYTES);
520 SET_STRING("SIZE_COLUMN_LABEL", IDS_FILE_BROWSER_SIZE_COLUMN_LABEL);
521 SET_STRING("SIZE_GB", IDS_FILE_BROWSER_SIZE_GB);
522 SET_STRING("SIZE_KB", IDS_FILE_BROWSER_SIZE_KB);
523 SET_STRING("SIZE_MB", IDS_FILE_BROWSER_SIZE_MB);
524 SET_STRING("SIZE_PB", IDS_FILE_BROWSER_SIZE_PB);
525 SET_STRING("SIZE_TB", IDS_FILE_BROWSER_SIZE_TB);
526 SET_STRING("SPACE_AVAILABLE", IDS_FILE_BROWSER_SPACE_AVAILABLE);
527 SET_STRING("STATUS_COLUMN_LABEL", IDS_FILE_BROWSER_STATUS_COLUMN_LABEL);
528 SET_STRING("SUGGEST_DIALOG_INSTALLATION_FAILED",
529 IDS_FILE_BROWSER_SUGGEST_DIALOG_INSTALLATION_FAILED);
530 SET_STRING("SUGGEST_DIALOG_LINK_TO_WEBSTORE",
531 IDS_FILE_BROWSER_SUGGEST_DIALOG_LINK_TO_WEBSTORE);
532 SET_STRING("SUGGEST_DIALOG_TITLE", IDS_FILE_BROWSER_SUGGEST_DIALOG_TITLE);
533 SET_STRING("SUGGEST_DIALOG_FOR_PROVIDERS_TITLE",
534 IDS_FILE_BROWSER_SUGGEST_DIALOG_FOR_PROVIDERS_TITLE);
535 SET_STRING("SUGGEST_DIALOG_LOADING_SPINNER_ALT",
536 IDS_WEBSTORE_WIDGET_LOADING_SPINNER_ALT);
537 SET_STRING("SUGGEST_DIALOG_INSTALLING_SPINNER_ALT",
538 IDS_WEBSTORE_WIDGET_INSTALLING_SPINNER_ALT);
539 SET_STRING("THUMBNAIL_VIEW_TOOLTIP", IDS_FILE_BROWSER_THUMBNAIL_VIEW_TOOLTIP);
540 SET_STRING("TIME_TODAY", IDS_FILE_BROWSER_TIME_TODAY);
541 SET_STRING("TIME_YESTERDAY", IDS_FILE_BROWSER_TIME_YESTERDAY);
542 SET_STRING("TRANSFER_PROGRESS_SUMMARY",
543 IDS_FILE_BROWSER_TRANSFER_PROGRESS_SUMMARY);
544 SET_STRING("TYPE_COLUMN_LABEL", IDS_FILE_BROWSER_TYPE_COLUMN_LABEL);
545 SET_STRING("UNKNOWN_FILESYSTEM_WARNING",
546 IDS_FILE_BROWSER_UNKNOWN_FILESYSTEM_WARNING);
547 SET_STRING("UNMOUNT_DEVICE_BUTTON_LABEL",
548 IDS_FILE_BROWSER_UNMOUNT_DEVICE_BUTTON_LABEL);
549 SET_STRING("UNMOUNT_FAILED", IDS_FILE_BROWSER_UNMOUNT_FAILED);
550 SET_STRING("UNSUPPORTED_FILESYSTEM_WARNING",
551 IDS_FILE_BROWSER_UNSUPPORTED_FILESYSTEM_WARNING);
552 SET_STRING("UPLOAD_LABEL", IDS_FILE_BROWSER_UPLOAD_LABEL);
553 SET_STRING("WAITING_FOR_SPACE_INFO", IDS_FILE_BROWSER_WAITING_FOR_SPACE_INFO);
554 SET_STRING("ZIP_FILESYSTEM_ERROR", IDS_FILE_BROWSER_ZIP_FILESYSTEM_ERROR);
555 SET_STRING("ZIP_FILE_NAME", IDS_FILE_BROWSER_ZIP_FILE_NAME);
556 SET_STRING("ZIP_ITEMS_REMAINING", IDS_FILE_BROWSER_ZIP_ITEMS_REMAINING);
557 SET_STRING("ZIP_PROGRESS_SUMMARY", IDS_FILE_BROWSER_ZIP_PROGRESS_SUMMARY);
558 SET_STRING("ZIP_SELECTION_BUTTON_LABEL",
559 IDS_FILE_BROWSER_ZIP_SELECTION_BUTTON_LABEL);
560 SET_STRING("ZIP_TARGET_EXISTS_ERROR",
561 IDS_FILE_BROWSER_ZIP_TARGET_EXISTS_ERROR);
562 SET_STRING("ZIP_UNEXPECTED_ERROR", IDS_FILE_BROWSER_ZIP_UNEXPECTED_ERROR);
563 #undef SET_STRING
565 dict->SetBoolean("PDF_VIEW_ENABLED",
566 file_manager::util::ShouldBeOpenedWithPlugin(
567 GetProfile(), FILE_PATH_LITERAL(".pdf")));
568 dict->SetBoolean("SWF_VIEW_ENABLED",
569 file_manager::util::ShouldBeOpenedWithPlugin(
570 GetProfile(), FILE_PATH_LITERAL(".swf")));
571 dict->SetString("CHROMEOS_RELEASE_BOARD",
572 base::SysInfo::GetLsbReleaseBoard());
573 dict->SetString(
574 "DOWNLOADS_LOW_SPACE_WARNING_HELP_URL",
575 base::StringPrintf(kHelpURLFormat, kDownloadsLowSpaceWarningHelpNumber));
576 dict->SetString("FILES_APP_HELP_URL",
577 base::StringPrintf(kHelpURLFormat, kFilesAppHelpNumber));
579 dict->SetString("GOOGLE_DRIVE_BUY_STORAGE_URL", kGoogleDriveBuyStorageUrl);
580 dict->SetString(
581 "GOOGLE_DRIVE_ERROR_HELP_URL",
582 base::StringPrintf(kHelpURLFormat, kGoogleDriveErrorHelpNumber));
583 dict->SetString("GOOGLE_DRIVE_HELP_URL", kGoogleDriveHelpUrl);
584 dict->SetString("GOOGLE_DRIVE_OVERVIEW_URL", kGoogleDriveOverviewUrl);
585 dict->SetString("GOOGLE_DRIVE_REDEEM_URL", kGoogleDriveRedeemUrl);
586 dict->SetString("GOOGLE_DRIVE_ROOT_URL", kGoogleDriveRootUrl);
587 dict->SetString(
588 "NO_ACTION_FOR_FILE_URL",
589 base::StringPrintf(kHelpURLFormat, kNoActionForFileHelpNumber));
590 dict->SetString("UI_LOCALE", extension_l10n_util::CurrentLocaleOrDefault());
592 const std::string& app_locale = g_browser_process->GetApplicationLocale();
593 webui::SetLoadTimeDataDefaults(app_locale, dict);
595 return true;
598 } // namespace extensions