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

Unified Diff: chrome/browser/chromeos/extensions/file_manager/file_manager_util.cc

Issue 22629012: file_manager: Remove FileBrowser.OpeningFileType histogram (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/file_manager/file_manager_util.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager/file_manager_util.cc b/chrome/browser/chromeos/extensions/file_manager/file_manager_util.cc
index b0e45cd16a12ce12b4365a791788143bf3aa5041..f58c7b15c23c034b94bdf91428177b3b7a093532 100644
--- a/chrome/browser/chromeos/extensions/file_manager/file_manager_util.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/file_manager_util.cc
@@ -100,15 +100,6 @@ const char* kBrowserSupportedExtensions[] = {
".mhtml", ".mht", ".svg"
};
-// List of all extensions we want to be shown in histogram that keep track of
-// files that were unsuccessfully tried to be opened.
-// The list has to be synced with histogram values.
-const char* kUMATrackingExtensions[] = {
- "other", ".doc", ".docx", ".odt", ".rtf", ".pdf", ".ppt", ".pptx", ".odp",
- ".xls", ".xlsx", ".ods", ".csv", ".odf", ".rar", ".asf", ".wma", ".wmv",
- ".mov", ".mpg", ".log"
-};
-
// Returns a file manager URL for the given |path|.
GURL GetFileManagerUrl(const char* path) {
return GURL(std::string("chrome-extension://") + kFileBrowserDomain + path);
@@ -156,19 +147,6 @@ bool IsFlashPluginEnabled(Profile* profile) {
return IsPepperPluginEnabled(profile, plugin_path);
}
-// 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 *file_extension,
- const char** array,
- size_t array_size) {
- for (size_t i = 0; i < array_size; i++) {
- if (base::strcasecmp(file_extension, array[i]) == 0) {
- return i;
- }
- }
- return 0;
-}
-
// Convert numeric dialog type to a string.
std::string GetDialogTypeAsString(
ui::SelectFileDialog::Type dialog_type) {
@@ -810,13 +788,8 @@ bool ExecuteBuiltinHandler(Browser* browser, const base::FilePath& path) {
return true;
}
- // Unknown file type. Record UMA and show an error message.
- size_t extension_index = UMAExtensionIndex(file_extension.data(),
- kUMATrackingExtensions,
- arraysize(kUMATrackingExtensions));
- UMA_HISTOGRAM_ENUMERATION("FileBrowser.OpeningFileType",
- extension_index,
- arraysize(kUMATrackingExtensions) - 1);
+ // Failed to open the file of unknown type.
+ LOG(WARNING) << "Unknown file type: " << path.value();
return false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698