| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // We need case-insensitive matching, and pattern in the handler is already | 113 // We need case-insensitive matching, and pattern in the handler is already |
| 114 // in lower case. | 114 // in lower case. |
| 115 const GURL lowercase_url(EscapedUtf8ToLower(selected_file_url.spec())); | 115 const GURL lowercase_url(EscapedUtf8ToLower(selected_file_url.spec())); |
| 116 | 116 |
| 117 FileBrowserHandlerList results; | 117 FileBrowserHandlerList results; |
| 118 for (const scoped_refptr<const Extension>& extension : | 118 for (const scoped_refptr<const Extension>& extension : |
| 119 registry->enabled_extensions()) { | 119 registry->enabled_extensions()) { |
| 120 if (profile->IsOffTheRecord() && | 120 if (profile->IsOffTheRecord() && |
| 121 !extensions::util::IsIncognitoEnabled(extension->id(), profile)) | 121 !extensions::util::IsIncognitoEnabled(extension->id(), profile)) |
| 122 continue; | 122 continue; |
| 123 if (extensions::util::IsEphemeralApp(extension->id(), profile)) | |
| 124 continue; | |
| 125 | |
| 126 FileBrowserHandler::List* handler_list = | 123 FileBrowserHandler::List* handler_list = |
| 127 FileBrowserHandler::GetHandlers(extension.get()); | 124 FileBrowserHandler::GetHandlers(extension.get()); |
| 128 if (!handler_list) | 125 if (!handler_list) |
| 129 continue; | 126 continue; |
| 130 for (FileBrowserHandler::List::const_iterator handler_iter = | 127 for (FileBrowserHandler::List::const_iterator handler_iter = |
| 131 handler_list->begin(); | 128 handler_list->begin(); |
| 132 handler_iter != handler_list->end(); | 129 handler_iter != handler_list->end(); |
| 133 ++handler_iter) { | 130 ++handler_iter) { |
| 134 const FileBrowserHandler* handler = handler_iter->get(); | 131 const FileBrowserHandler* handler = handler_iter->get(); |
| 135 if (!handler->MatchesURL(lowercase_url)) | 132 if (!handler->MatchesURL(lowercase_url)) |
| (...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 if (common_handlers.empty()) | 526 if (common_handlers.empty()) |
| 530 return FileBrowserHandlerList(); | 527 return FileBrowserHandlerList(); |
| 531 } | 528 } |
| 532 } | 529 } |
| 533 | 530 |
| 534 return common_handlers; | 531 return common_handlers; |
| 535 } | 532 } |
| 536 | 533 |
| 537 } // namespace file_browser_handlers | 534 } // namespace file_browser_handlers |
| 538 } // namespace file_manager | 535 } // namespace file_manager |
| OLD | NEW |