OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/file_manager/file_browser_handlers.h" | 5 #include "chrome/browser/chromeos/file_manager/file_browser_handlers.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/i18n/case_conversion.h" | 9 #include "base/i18n/case_conversion.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 // The executor object will be self deleted on completion. | 498 // The executor object will be self deleted on completion. |
499 (new FileBrowserHandlerExecutor( | 499 (new FileBrowserHandlerExecutor( |
500 profile, extension, action_id))->Execute(file_urls, done); | 500 profile, extension, action_id))->Execute(file_urls, done); |
501 return true; | 501 return true; |
502 } | 502 } |
503 | 503 |
504 bool IsFallbackFileBrowserHandler(const file_tasks::TaskDescriptor& task) { | 504 bool IsFallbackFileBrowserHandler(const file_tasks::TaskDescriptor& task) { |
505 return (task.task_type == file_tasks::TASK_TYPE_FILE_BROWSER_HANDLER && | 505 return (task.task_type == file_tasks::TASK_TYPE_FILE_BROWSER_HANDLER && |
506 (task.app_id == kFileManagerAppId || | 506 (task.app_id == kFileManagerAppId || |
507 task.app_id == extension_misc::kQuickOfficeComponentExtensionId || | 507 task.app_id == extension_misc::kQuickOfficeComponentExtensionId || |
508 task.app_id == extension_misc::kQuickOfficeDevExtensionId || | 508 task.app_id == extension_misc::kQuickOfficeInternalExtensionId || |
509 task.app_id == extension_misc::kQuickOfficeExtensionId)); | 509 task.app_id == extension_misc::kQuickOfficeExtensionId)); |
510 } | 510 } |
511 | 511 |
512 FileBrowserHandlerList FindFileBrowserHandlers( | 512 FileBrowserHandlerList FindFileBrowserHandlers( |
513 Profile* profile, | 513 Profile* profile, |
514 const std::vector<GURL>& file_list) { | 514 const std::vector<GURL>& file_list) { |
515 FileBrowserHandlerList common_handlers; | 515 FileBrowserHandlerList common_handlers; |
516 for (std::vector<GURL>::const_iterator it = file_list.begin(); | 516 for (std::vector<GURL>::const_iterator it = file_list.begin(); |
517 it != file_list.end(); ++it) { | 517 it != file_list.end(); ++it) { |
518 FileBrowserHandlerList handlers = | 518 FileBrowserHandlerList handlers = |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 common_handlers.erase(gallery_iter); | 561 common_handlers.erase(gallery_iter); |
562 else | 562 else |
563 common_handlers.erase(watch_iter); | 563 common_handlers.erase(watch_iter); |
564 } | 564 } |
565 | 565 |
566 return common_handlers; | 566 return common_handlers; |
567 } | 567 } |
568 | 568 |
569 } // namespace file_browser_handlers | 569 } // namespace file_browser_handlers |
570 } // namespace file_manager | 570 } // namespace file_manager |
OLD | NEW |