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

Unified Diff: chrome/browser/chromeos/extensions/file_handler_util.cc

Issue 10411018: [FileBrowser] Added DefaultAction dialog to choose default action. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with master. Created 8 years, 7 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
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(
« no previous file with comments | « chrome/browser/chromeos/extensions/file_handler_util.h ('k') | chrome/browser/extensions/extension_function_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698