| 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 10 matching lines...) Expand all Loading... |
| 21 #include "chrome/common/extensions/api/file_browser_private.h" | 21 #include "chrome/common/extensions/api/file_browser_private.h" |
| 22 #include "chrome/common/extensions/extension_constants.h" | 22 #include "chrome/common/extensions/extension_constants.h" |
| 23 #include "content/public/browser/browser_thread.h" | 23 #include "content/public/browser/browser_thread.h" |
| 24 #include "content/public/browser/child_process_security_policy.h" | 24 #include "content/public/browser/child_process_security_policy.h" |
| 25 #include "content/public/browser/render_process_host.h" | 25 #include "content/public/browser/render_process_host.h" |
| 26 #include "content/public/browser/site_instance.h" | 26 #include "content/public/browser/site_instance.h" |
| 27 #include "content/public/browser/web_contents.h" | 27 #include "content/public/browser/web_contents.h" |
| 28 #include "extensions/browser/event_router.h" | 28 #include "extensions/browser/event_router.h" |
| 29 #include "extensions/browser/extension_host.h" | 29 #include "extensions/browser/extension_host.h" |
| 30 #include "extensions/browser/extension_system.h" | 30 #include "extensions/browser/extension_system.h" |
| 31 #include "extensions/browser/extension_util.h" |
| 31 #include "extensions/browser/lazy_background_task_queue.h" | 32 #include "extensions/browser/lazy_background_task_queue.h" |
| 32 #include "extensions/common/extension_set.h" | 33 #include "extensions/common/extension_set.h" |
| 33 #include "extensions/common/manifest_handlers/background_info.h" | 34 #include "extensions/common/manifest_handlers/background_info.h" |
| 34 #include "net/base/escape.h" | 35 #include "net/base/escape.h" |
| 35 #include "webkit/browser/fileapi/file_system_context.h" | 36 #include "webkit/browser/fileapi/file_system_context.h" |
| 36 #include "webkit/browser/fileapi/file_system_url.h" | 37 #include "webkit/browser/fileapi/file_system_url.h" |
| 37 #include "webkit/common/fileapi/file_system_info.h" | 38 #include "webkit/common/fileapi/file_system_info.h" |
| 38 #include "webkit/common/fileapi/file_system_util.h" | 39 #include "webkit/common/fileapi/file_system_util.h" |
| 39 | 40 |
| 40 using content::BrowserThread; | 41 using content::BrowserThread; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 const GURL lowercase_url(EscapedUtf8ToLower(selected_file_url.spec())); | 109 const GURL lowercase_url(EscapedUtf8ToLower(selected_file_url.spec())); |
| 109 | 110 |
| 110 FileBrowserHandlerList results; | 111 FileBrowserHandlerList results; |
| 111 for (extensions::ExtensionSet::const_iterator iter = | 112 for (extensions::ExtensionSet::const_iterator iter = |
| 112 service->extensions()->begin(); | 113 service->extensions()->begin(); |
| 113 iter != service->extensions()->end(); ++iter) { | 114 iter != service->extensions()->end(); ++iter) { |
| 114 const Extension* extension = iter->get(); | 115 const Extension* extension = iter->get(); |
| 115 if (profile->IsOffTheRecord() && | 116 if (profile->IsOffTheRecord() && |
| 116 !extensions::util::IsIncognitoEnabled(extension->id(), profile)) | 117 !extensions::util::IsIncognitoEnabled(extension->id(), profile)) |
| 117 continue; | 118 continue; |
| 119 if (extensions::util::IsEphemeralApp(extension->id(), profile)) |
| 120 continue; |
| 118 | 121 |
| 119 FileBrowserHandler::List* handler_list = | 122 FileBrowserHandler::List* handler_list = |
| 120 FileBrowserHandler::GetHandlers(extension); | 123 FileBrowserHandler::GetHandlers(extension); |
| 121 if (!handler_list) | 124 if (!handler_list) |
| 122 continue; | 125 continue; |
| 123 for (FileBrowserHandler::List::const_iterator handler_iter = | 126 for (FileBrowserHandler::List::const_iterator handler_iter = |
| 124 handler_list->begin(); | 127 handler_list->begin(); |
| 125 handler_iter != handler_list->end(); | 128 handler_iter != handler_list->end(); |
| 126 ++handler_iter) { | 129 ++handler_iter) { |
| 127 const FileBrowserHandler* handler = handler_iter->get(); | 130 const FileBrowserHandler* handler = handler_iter->get(); |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 if (common_handlers.empty()) | 529 if (common_handlers.empty()) |
| 527 return FileBrowserHandlerList(); | 530 return FileBrowserHandlerList(); |
| 528 } | 531 } |
| 529 } | 532 } |
| 530 | 533 |
| 531 return common_handlers; | 534 return common_handlers; |
| 532 } | 535 } |
| 533 | 536 |
| 534 } // namespace file_browser_handlers | 537 } // namespace file_browser_handlers |
| 535 } // namespace file_manager | 538 } // namespace file_manager |
| OLD | NEW |