| 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 3feb7cbd9c2db9e94aa302bd254480df7eae4647..32c310f6032505250dbeaa56ffcbc07f1a5b1479 100644
|
| --- a/chrome/browser/chromeos/extensions/file_handler_util.cc
|
| +++ b/chrome/browser/chromeos/extensions/file_handler_util.cc
|
| @@ -75,18 +75,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;
|
| @@ -200,6 +188,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;
|
| }
|
| @@ -634,8 +634,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(
|
|
|