Index: chrome/browser/chromeos/extensions/file_handler_util.cc |
diff --git a/chrome/browser/chromeos/extensions/file_handler_util.cc b/chrome/browser/chromeos/extensions/file_handler_util.cc |
index 9802c25e7f9c03cdf676ea12f0d1f34fd5615aaa..6aab112b378d60b308f4cbfe0c54a7686e595035 100644 |
--- a/chrome/browser/chromeos/extensions/file_handler_util.cc |
+++ b/chrome/browser/chromeos/extensions/file_handler_util.cc |
@@ -76,18 +76,6 @@ int ExtractProcessFromExtensionId(const std::string& extension_id, |
return process->GetID(); |
} |
-// Update file handler usage stats. |
-void UpdateFileHandlerUsageStats(Profile* profile, const std::string& task_id) { |
- if (!profile || !profile->GetPrefs()) |
- return; |
- DictionaryPrefUpdate prefs_usage_update(profile->GetPrefs(), |
- prefs::kLastUsedFileBrowserHandlers); |
- prefs_usage_update->SetWithoutPathExpansion(task_id, |
- new base::FundamentalValue( |
- static_cast<int>(base::Time::Now().ToInternalValue()/ |
- base::Time::kMicrosecondsPerSecond))); |
-} |
- |
URLPatternSet GetAllMatchingPatterns(const FileBrowserHandler* handler, |
const std::vector<GURL>& files_list) { |
URLPatternSet matching_patterns; |
@@ -201,6 +189,18 @@ void SortLastUsedHandlerList(LastUsedHandlerList *list) { |
} // namespace |
+// Update file handler usage stats. |
+void UpdateFileHandlerUsageStats(Profile* profile, const std::string& task_id) { |
+ if (!profile || !profile->GetPrefs()) |
+ return; |
+ DictionaryPrefUpdate prefs_usage_update(profile->GetPrefs(), |
+ prefs::kLastUsedFileBrowserHandlers); |
+ prefs_usage_update->SetWithoutPathExpansion(task_id, |
+ new base::FundamentalValue( |
+ static_cast<int>(base::Time::Now().ToInternalValue()/ |
+ base::Time::kMicrosecondsPerSecond))); |
+} |
+ |
int GetReadWritePermissions() { |
return kReadWriteFilePermissions; |
} |
@@ -635,8 +635,6 @@ void FileTaskExecutor::SetupPermissionsAndDispatchEvent( |
details->SetInteger("tab_id", ExtensionTabUtil::GetTabId(contents)); |
} |
- UpdateFileHandlerUsageStats(profile_, MakeTaskID(extension_id_, action_id_)); |
- |
std::string json_args; |
base::JSONWriter::Write(event_args.get(), &json_args); |
event_router->DispatchEventToExtension( |