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

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

Issue 9692049: Gave native File Browser file handlers higher priority than 3rd party handlers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Radically simplified implementation Created 8 years, 9 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_handler_util.cc
diff --git a/chrome/browser/chromeos/extensions/file_handler_util.cc b/chrome/browser/chromeos/extensions/file_handler_util.cc
index 743f8c548cd5edbbddf5719ee1d67013a78625fb..3e30f9f3dfa1e2a80bb746c613605f8a1763feb8 100644
--- a/chrome/browser/chromeos/extensions/file_handler_util.cc
+++ b/chrome/browser/chromeos/extensions/file_handler_util.cc
@@ -9,6 +9,7 @@
#include "base/json/json_writer.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
+#include "chrome/browser/chromeos/extensions/file_manager_util.h"
#include "chrome/browser/extensions/extension_event_router.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_tab_util.h"
@@ -213,6 +214,12 @@ bool FindCommonTasks(Profile* profile,
iter != common_tasks.end(); ++iter) {
// Get timestamp of when this task was used last time.
int last_used_timestamp = 0;
+
+ if ((*iter)->extension_id() == kFileBrowserDomain) {
+ // Give a little bump to the action from File Browser extenion
+ // to make sure it is the default on a fresh profile.
+ last_used_timestamp = 1;
+ }
prefs_tasks->GetInteger(MakeTaskID((*iter)->extension_id(), (*iter)->id()),
&last_used_timestamp);
URLPatternSet matching_patterns = GetAllMatchingPatterns(*iter, files_list);
« 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