diff options
author | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-13 22:51:17 +0000 |
---|---|---|
committer | benwells@chromium.org <benwells@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-13 22:51:17 +0000 |
commit | 3563c312b0b4d0115857de26a2153047ab434953 (patch) | |
tree | 46354d9e9b78bc64d2cc24beed71d561cc3d1090 /chrome/browser/chromeos/extensions/file_handler_util.cc | |
parent | 2430e24bb9d58b846f6548fa952df74a6faab26a (diff) | |
download | chromium_src-3563c312b0b4d0115857de26a2153047ab434953.zip chromium_src-3563c312b0b4d0115857de26a2153047ab434953.tar.gz chromium_src-3563c312b0b4d0115857de26a2153047ab434953.tar.bz2 |
[cros] Remove file manager code for WebIntents file tasks.
Apps cannot handle files via WebIntents declarations anymore.
BUG=173194
Review URL: https://chromiumcodereview.appspot.com/12218136
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@182329 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/extensions/file_handler_util.cc')
-rw-r--r-- | chrome/browser/chromeos/extensions/file_handler_util.cc | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/chrome/browser/chromeos/extensions/file_handler_util.cc b/chrome/browser/chromeos/extensions/file_handler_util.cc index 3349718..bdfa722 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, |