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

Unified Diff: chrome/browser/chromeos/file_manager/file_browser_handlers.cc

Issue 589473002: Files.app: Enable externalfile: protocol for MTP volumes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit fix Created 6 years, 3 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/file_manager/file_browser_handlers.cc
diff --git a/chrome/browser/chromeos/file_manager/file_browser_handlers.cc b/chrome/browser/chromeos/file_manager/file_browser_handlers.cc
index 038be0462a535cca29f7265fce46a51b2b471266..b13bf10d1a7b5f04e5412163391c147f667e7d56 100644
--- a/chrome/browser/chromeos/file_manager/file_browser_handlers.cc
+++ b/chrome/browser/chromeos/file_manager/file_browser_handlers.cc
@@ -4,6 +4,9 @@
#include "chrome/browser/chromeos/file_manager/file_browser_handlers.h"
+#include <algorithm>
+#include <set>
+
#include "base/bind.h"
#include "base/files/file_util.h"
#include "base/i18n/case_conversion.h"
@@ -430,7 +433,6 @@ void FileBrowserHandlerExecutor::SetupHandlerHostFileAccessPermissions(
// is used to handle certain action IDs of the file manager.
bool ShouldBeOpenedWithBrowser(const std::string& extension_id,
const std::string& action_id) {
-
return (extension_id == kFileManagerAppId &&
(action_id == "view-pdf" ||
action_id == "view-swf" ||
@@ -448,10 +450,8 @@ bool OpenFilesWithBrowser(Profile* profile,
int num_opened = 0;
for (size_t i = 0; i < file_urls.size(); ++i) {
const FileSystemURL& file_url = file_urls[i];
- if (chromeos::FileSystemBackend::CanHandleURL(file_url)) {
- const base::FilePath& file_path = file_url.path();
- num_opened += util::OpenFileWithBrowser(profile, file_path);
- }
+ if (chromeos::FileSystemBackend::CanHandleURL(file_url))
+ num_opened += util::OpenFileWithBrowser(profile, file_url);
mtomasz 2014/09/25 06:48:09 We're adding here a bool to an int. It works, but
hirono 2014/09/25 07:38:07 Done.
}
return num_opened > 0;
}

Powered by Google App Engine
This is Rietveld 408576698