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

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

Issue 12218136: [cros] Remove file manager code for WebIntents file tasks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | « chrome/browser/chromeos/extensions/file_handler_util.h ('k') | 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 3349718766f014fa24f4649cc006bd7cd6ac6175..bdfa722b1721815a0a2ce953d7109c70cd518c93 100644
--- a/chrome/browser/chromeos/extensions/file_handler_util.cc
+++ b/chrome/browser/chromeos/extensions/file_handler_util.cc
@@ -55,7 +55,6 @@ namespace file_handler_util {
const char kTaskFile[] = "file";
const char kTaskDrive[] = "drive";
-const char kTaskWebIntent[] = "web-intent";
const char kTaskApp[] = "app";
namespace {
@@ -270,7 +269,6 @@ std::string MakeTaskID(const std::string& extension_id,
const std::string& action_id) {
DCHECK(task_type == kTaskFile ||
task_type == kTaskDrive ||
- task_type == kTaskWebIntent ||
task_type == kTaskApp);
return base::StringPrintf("%s|%s|%s",
extension_id.c_str(),
@@ -321,7 +319,6 @@ bool CrackTaskID(const std::string& task_id,
*task_type = result[1];
DCHECK(*task_type == kTaskFile ||
*task_type == kTaskDrive ||
- *task_type == kTaskWebIntent ||
*task_type == kTaskApp);
}
@@ -542,27 +539,6 @@ class ExtensionTaskExecutor : public FileTaskExecutor {
FileTaskFinishedCallback done_;
};
-class WebIntentTaskExecutor : public FileTaskExecutor {
- public:
- // FileTaskExecutor overrides.
- virtual bool ExecuteAndNotify(const std::vector<FileSystemURL>& file_urls,
- const FileTaskFinishedCallback& done) OVERRIDE;
-
- private:
- // FileTaskExecutor is the only class allowed to create one.
- friend class FileTaskExecutor;
-
- WebIntentTaskExecutor(Profile* profile,
- const GURL& source_url,
- const std::string& file_browser_id,
- const std::string& extension_id,
- const std::string& action_id);
- virtual ~WebIntentTaskExecutor();
-
- const std::string extension_id_;
- const std::string action_id_;
-};
-
class AppTaskExecutor : public FileTaskExecutor {
public:
// FileTaskExecutor overrides.
@@ -605,13 +581,6 @@ FileTaskExecutor* FileTaskExecutor::Create(Profile* profile,
extension_id, // really app_id
action_id);
- if (task_type == kTaskWebIntent)
- return new WebIntentTaskExecutor(profile,
- source_url,
- file_browser_id,
- extension_id,
- action_id);
-
if (task_type == kTaskApp)
return new AppTaskExecutor(profile,
source_url,
@@ -1012,35 +981,6 @@ void ExtensionTaskExecutor::SetupHandlerHostFileAccessPermissions(
}
}
-WebIntentTaskExecutor::WebIntentTaskExecutor(
- Profile* profile,
- const GURL& source_url,
- const std::string& file_browser_id,
- const std::string& extension_id,
- const std::string& action_id)
- : FileTaskExecutor(profile, source_url, file_browser_id, extension_id),
- action_id_(action_id) {
-}
-
-WebIntentTaskExecutor::~WebIntentTaskExecutor() {}
-
-bool WebIntentTaskExecutor::ExecuteAndNotify(
- const std::vector<FileSystemURL>& file_urls,
- const FileTaskFinishedCallback& done) {
- if (!FileBrowserHasAccessPermissionForFiles(file_urls))
- return false;
-
- for (size_t i = 0; i != file_urls.size(); ++i) {
- extensions::LaunchPlatformAppWithPath(profile(), GetExtension(),
- file_urls[i].path());
- }
-
- if (!done.is_null())
- done.Run(true);
-
- return true;
-}
-
AppTaskExecutor::AppTaskExecutor(
Profile* profile,
const GURL& source_url,
« no previous file with comments | « chrome/browser/chromeos/extensions/file_handler_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698