| Index: chrome/browser/extensions/file_manager_util.cc
|
| ===================================================================
|
| --- chrome/browser/extensions/file_manager_util.cc (revision 108523)
|
| +++ chrome/browser/extensions/file_manager_util.cc (working copy)
|
| @@ -46,7 +46,10 @@
|
| const char kMediaPlayerUrl[] = FILEBROWSER_URL("mediaplayer.html");
|
| const char kMediaPlayerPlaylistUrl[] = FILEBROWSER_URL("playlist.html");
|
| #undef FILEBROWSER_URL
|
| +#undef FILEBROWSER_DOMAIN
|
|
|
| +namespace {
|
| +
|
| const char kPdfExtension[] = ".pdf";
|
| // List of file extension we can open in tab.
|
| const char* kBrowserSupportedExtensions[] = {
|
| @@ -117,11 +120,6 @@
|
| return plugin_prefs->IsPluginEnabled(plugin);
|
| }
|
|
|
| -// static
|
| -GURL FileManagerUtil::GetFileBrowserExtensionUrl() {
|
| - return GURL(kFileBrowserExtensionUrl);
|
| -}
|
| -
|
| // Returns index |ext| has in the |array|. If there is no |ext| in |array|, last
|
| // element's index is return (last element should have irrelevant value).
|
| int UMAExtensionIndex(const char *ext,
|
| @@ -135,7 +133,14 @@
|
| return 0;
|
| }
|
|
|
| +} // namespace
|
| +
|
| // static
|
| +GURL FileManagerUtil::GetFileBrowserExtensionUrl() {
|
| + return GURL(kFileBrowserExtensionUrl);
|
| +}
|
| +
|
| +// static
|
| GURL FileManagerUtil::GetFileBrowserUrl() {
|
| return GURL(kBaseFileBrowserUrl);
|
| }
|
| @@ -230,12 +235,10 @@
|
| std::string url = FileManagerUtil::GetFileBrowserUrl().spec() +
|
| '?' + EscapeUrlEncodedData(json_args, false);
|
| return GURL(url);
|
| -
|
| }
|
|
|
| // static
|
| -void FileManagerUtil::ShowFullTabUrl(Profile*,
|
| - const FilePath& dir) {
|
| +void FileManagerUtil::ViewFolder(const FilePath& dir) {
|
| Browser* browser = BrowserList::GetLastActive();
|
| if (!browser)
|
| return;
|
| @@ -254,6 +257,7 @@
|
| browser->ShowSingletonTabRespectRef(GURL(url));
|
| }
|
|
|
| +// static
|
| void FileManagerUtil::ViewItem(const FilePath& full_path, bool enqueue) {
|
| std::string ext = full_path.Extension();
|
| // For things supported natively by the browser, we should open it
|
| @@ -314,8 +318,7 @@
|
| IDS_FILEBROWSER_ERROR_VIEWING_FILE_TITLE,
|
| UTF8ToUTF16(full_path.BaseName().value())),
|
| l10n_util::GetStringUTF16(
|
| - IDS_FILEBROWSER_ERROR_VIEWING_FILE)
|
| - ));
|
| + IDS_FILEBROWSER_ERROR_VIEWING_FILE)));
|
| }
|
|
|
| // static
|
|
|